/* ==========================================================================
   CERRAMIENTOS DE TERRAZAS · Capa "Colores de Málaga"
   Paleta mediterránea (mar, jacaranda, buganvilla, terracota, olivo,
   turquesa) aplicada a Servicios, a la nueva sección Málaga, al fondo real
   del hero y a las historias. Se carga después de theme.css y explore.css.
   Fotos de Málaga: Wikimedia Commons, con autor y licencia junto a cada una.
   ========================================================================== */

:root {
    --mar: #0B5FA5;         --mar-2: #13A8D8;        --mar-l: #8FD8FF;
    --jacaranda: #5B3CC4;   --jacaranda-2: #9A6BF0;  --jacaranda-l: #CDB8FF;
    --buganvilla: #B0124F;  --buganvilla-2: #EC4C8A; --buganvilla-l: #FFA6CB;
    --terracota: #B8400B;   --terracota-2: #F59E0B;  --terracota-l: #FFC56B;
    --olivo: #157A4C;       --olivo-2: #2BB673;      --olivo-l: #8EF0BF;
    --turquesa: #0B6F7B;    --turquesa-2: #19B3C4;   --turquesa-l: #7FE7F2;
}

/* ------------------------------------------------------------------------
   Hero con foto real de Málaga de fondo
   ------------------------------------------------------------------------ */
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 60% 40%;
}
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(10, 27, 36, .94) 0%, rgba(10, 27, 36, .82) 38%, rgba(10, 27, 36, .45) 70%, rgba(10, 27, 36, .55) 100%),
        linear-gradient(180deg, rgba(91, 60, 196, .25) 0%, rgba(236, 76, 138, .18) 60%, rgba(245, 158, 11, .2) 100%);
}
.hero--vivid .hero-deco { z-index: 0; }
.hero-credit {
    position: absolute;
    right: 20px;
    bottom: 86px;
    z-index: 2;
    max-width: none;
    margin: 0;
    font-size: 11px;
    color: rgba(255, 255, 255, .6);
}
.hero-credit a { color: rgba(255, 255, 255, .8); text-decoration: underline; text-underline-offset: 2px; }
.hero-credit a:hover { color: #fff; }
@media (max-width: 900px) {
    .hero-credit { position: static; padding: 18px 20px 0; text-align: right; }
}

/* Enlace "Málaga" del menú con un toque de color */
.nav-link--malaga {
    background: linear-gradient(90deg, var(--jacaranda), var(--buganvilla-2), var(--terracota-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}
.nav-link--malaga:hover { color: transparent; border-color: var(--buganvilla-2); }

/* ------------------------------------------------------------------------
   Servicios a todo color
   ------------------------------------------------------------------------ */
.services {
    position: relative;
    overflow-x: hidden;
    overflow-x: clip;
    background:
        radial-gradient(520px 420px at 6% 8%, rgba(154, 107, 240, .28), transparent 65%),
        radial-gradient(520px 420px at 96% 12%, rgba(236, 76, 138, .22), transparent 65%),
        radial-gradient(620px 460px at 80% 96%, rgba(245, 158, 11, .22), transparent 65%),
        radial-gradient(620px 460px at 10% 92%, rgba(19, 168, 216, .24), transparent 65%),
        #FFF9F2;
}
.services .section-title {
    background: linear-gradient(90deg, var(--mar) 0%, var(--jacaranda) 35%, var(--buganvilla-2) 65%, var(--terracota) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Colores por servicio (también los usa la historia a pantalla completa) */
.service-card[data-story="cortinas"]    { --c1: var(--mar);        --c2: var(--mar-2);        --cl: var(--mar-l); }
.service-card[data-story="techos"]      { --c1: var(--jacaranda);  --c2: var(--jacaranda-2);  --cl: var(--jacaranda-l); }
.service-card[data-story="locales"]     { --c1: var(--buganvilla); --c2: var(--buganvilla-2); --cl: var(--buganvilla-l); }
.service-card[data-story="pergolas"]    { --c1: var(--terracota);  --c2: var(--terracota-2);  --cl: var(--terracota-l); }
.service-card[data-story="separadores"] { --c1: var(--olivo);      --c2: var(--olivo-2);      --cl: var(--olivo-l); }
.service-card[data-story="mamparas"]    { --c1: var(--turquesa);   --c2: var(--turquesa-2);   --cl: var(--turquesa-l); }

.services .service-card[data-story] {
    border: 0;
    color: #fff;
    background: var(--c1);
    background:
        radial-gradient(320px 240px at 100% 100%, color-mix(in srgb, var(--c2) 70%, transparent), transparent 70%),
        linear-gradient(170deg, var(--c1) 0%, color-mix(in srgb, var(--c1) 82%, #000) 100%);
    box-shadow: 0 22px 40px -22px var(--c1);
}
.services .service-card[data-story]:hover {
    border-color: transparent;
    box-shadow: 0 30px 50px -22px var(--c1);
}
.services .service-card[data-story] .service-cover::after {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0) 55%, var(--c1) 100%);
}
.services .service-card[data-story] .service-icon {
    background: #fff;
    color: var(--c1);
    border-color: color-mix(in srgb, var(--c2) 60%, #fff);
    box-shadow: 0 12px 22px -12px rgba(0, 0, 0, .6);
}
.services .service-card[data-story] .service-title { color: #fff; }
.services .service-card[data-story] .service-description { color: rgba(255, 255, 255, .86); }
.services .service-card[data-story] .service-features li { color: rgba(255, 255, 255, .92); }
.services .service-card[data-story] .service-features li .icon { background: rgba(255, 255, 255, .2); color: #fff; }
.services .service-card[data-story] .btn-service {
    background: #fff;
    border-color: #fff;
    color: var(--c1);
    font-weight: 800;
}
.services .service-card[data-story] .btn-service:hover {
    background: transparent;
    color: #fff;
}
.services .service-card[data-story] .service-cover__chip { background: color-mix(in srgb, var(--c1) 70%, transparent); }
.services .service-card[data-story] .service-cover__chip svg { color: var(--c1); }

/* Chips de filtro, cada uno de su color */
.explore-chip { --chip: var(--petrol); }
.explore-chip[data-filter="hogar"]    { --chip: var(--mar); }
.explore-chip[data-filter="negocio"]  { --chip: var(--buganvilla); }
.explore-chip[data-filter="interior"] { --chip: var(--olivo); }
.explore-chip[data-filter="cubierta"] { --chip: var(--jacaranda); }
.explore-chip::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--chip);
}
.explore-chip:hover { border-color: var(--chip); color: var(--chip); }
.explore-chip[aria-pressed="true"] {
    background: var(--chip);
    border-color: var(--chip);
    color: #fff;
    box-shadow: 0 10px 20px -10px var(--chip);
}
.explore-chip[aria-pressed="true"]::before { background: #fff; }
.explore-chip .explore-chip__count { background: color-mix(in srgb, var(--chip) 12%, #fff); color: var(--chip); }
.explore-track span { background: linear-gradient(90deg, var(--mar-2), var(--jacaranda-2), var(--buganvilla-2), var(--terracota-2)); }
.explore-arrow:hover:not(:disabled) { background: var(--jacaranda); }

.services .services-cta {
    background:
        radial-gradient(400px 200px at 0% 0%, rgba(143, 216, 255, .35), transparent 60%),
        linear-gradient(110deg, var(--mar) 0%, var(--jacaranda) 50%, var(--buganvilla) 100%);
}

/* ------------------------------------------------------------------------
   Historias: acento del color de cada servicio
   ------------------------------------------------------------------------ */
.story { --accent: var(--sun-light); --accent-1: var(--turquesa); --accent-2: var(--turquesa-2); }
.story .story-kicker { color: var(--accent); }
.story .story__seg.is-active::after { background: var(--accent); }
.story .story-chip svg { background: var(--accent); }
.story .story-list li svg { background: linear-gradient(135deg, var(--accent-2), var(--accent-1)); }
.story .story-list li { border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.story .story-fact__big { background: linear-gradient(90deg, var(--accent), #fff 50%, var(--accent)); -webkit-background-clip: text; background-clip: text; }
.story .story-slide--fact .story-slide__shade {
    background: radial-gradient(800px 500px at 50% 50%, color-mix(in srgb, var(--accent-1) 45%, transparent), rgba(5, 14, 18, .85));
}
.story .story-slide--cover .story-slide__shade {
    background:
        linear-gradient(0deg, rgba(5, 14, 18, .92) 0%, rgba(5, 14, 18, .3) 55%, rgba(5, 14, 18, .2) 100%),
        linear-gradient(90deg, color-mix(in srgb, var(--accent-1) 55%, transparent) 0%, transparent 70%);
}
.story .story-next span { color: var(--accent); }

/* ------------------------------------------------------------------------
   Sección Málaga
   ------------------------------------------------------------------------ */
.malaga {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(700px 500px at 0% 0%, rgba(19, 168, 216, .55), transparent 60%),
        radial-gradient(700px 500px at 100% 100%, rgba(245, 158, 11, .45), transparent 60%),
        linear-gradient(135deg, #0B3F73 0%, #2A3FA8 35%, #5B3CC4 65%, #B0124F 100%);
}
.malaga-deco span {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .5;
    pointer-events: none;
}
.malaga-deco span:nth-child(1) { width: 320px; height: 320px; left: 55%; top: -80px; background: #EC4C8A; }
.malaga-deco span:nth-child(2) { width: 260px; height: 260px; left: -60px; top: 45%; background: #2BB673; opacity: .35; }
.malaga-deco span:nth-child(3) { width: 300px; height: 300px; right: -80px; top: 40%; background: #F59E0B; opacity: .35; }
.malaga .container { position: relative; }
.malaga .section-title { color: #fff; }
.malaga .section-subtitle { color: rgba(255, 255, 255, .85); }
.malaga .eyebrow {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .3);
    color: #fff;
}
.malaga .eyebrow::before { background: linear-gradient(135deg, #FFC56B, #EC4C8A); box-shadow: 0 0 0 3px rgba(255, 255, 255, .2); }

.malaga-mosaic {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 230px;
    grid-auto-flow: dense;
    gap: 16px;
}
.malaga-tile {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, .1);
    box-shadow: 0 24px 40px -24px rgba(0, 0, 0, .7);
    outline: 3px solid transparent;
    outline-offset: -3px;
    transition: outline-color .25s ease, transform .3s ease;
}
.malaga-tile--big  { grid-column: span 2; grid-row: span 2; }
.malaga-tile--tall { grid-row: span 2; }
.malaga-tile--wide { grid-column: span 2; }
.malaga-tile--cta  { grid-column: span 2; }
.malaga-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .9s cubic-bezier(.2, .7, .2, 1);
}
.malaga-tile:hover { outline-color: var(--tone); transform: translateY(-3px); }
.malaga-tile:hover img { transform: scale(1.06); }
.malaga-tile figcaption {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 48px 16px 14px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, .78) 100%);
}
.malaga-tile__place {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--tone);
    color: var(--tone-ink, #fff);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.malaga-tile figcaption strong { font-family: var(--font-sans); font-size: 18px; font-weight: 800; color: #fff; line-height: 1.2; }
.malaga-tile--big figcaption strong { font-size: 26px; }
.photo-credit { font-size: 11px; color: rgba(255, 255, 255, .72); line-height: 1.4; }
.photo-credit a { color: rgba(255, 255, 255, .9); text-decoration: underline; text-underline-offset: 2px; }
.photo-credit a:hover { color: #fff; }
.malaga-tile .ct-zoom-btn { color: var(--tone); }

.malaga-tile--cta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 6px;
    padding: 26px 28px;
    background:
        radial-gradient(300px 200px at 100% 0%, rgba(255, 255, 255, .35), transparent 60%),
        linear-gradient(135deg, #FFC24D 0%, #F59E0B 45%, #EC4C8A 100%);
    color: var(--ink);
}
.malaga-cta__kicker { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: rgba(20, 24, 26, .7); }
.malaga-tile--cta strong { font-family: var(--font-sans); font-size: 26px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.malaga-tile--cta p { margin: 0 0 8px; color: rgba(20, 24, 26, .8); }
.malaga-tile--cta .btn-sun { background: var(--ink); color: #fff; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .6); }
.malaga-tile--cta .btn-sun:hover { color: #fff; }

.malaga-towns { margin-top: 40px; text-align: center; }
.malaga-towns p { margin: 0 auto 16px; font-weight: 700; color: #fff; }
.malaga-towns ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.malaga-towns li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .5);
}
.malaga-towns li::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--dot);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--dot) 25%, transparent);
}

@media (max-width: 900px) {
    .malaga-mosaic { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; gap: 12px; }
    .malaga-tile--big { grid-column: span 2; grid-row: span 2; }
    .malaga-tile--wide, .malaga-tile--cta { grid-column: span 2; }
    .malaga-tile--big figcaption strong { font-size: 20px; }
    .malaga-tile figcaption strong { font-size: 15px; }
    .malaga-tile figcaption { padding: 36px 12px 10px; }
}
@media (max-width: 480px) {
    .malaga-tile .photo-credit { font-size: 10px; }
    .malaga-tile--tall { grid-row: span 2; }
}

/* Crédito de la foto dentro del visor */
.viewer__credit { font-size: 12px; color: rgba(255, 255, 255, .6); margin: -6px 0 16px; }
.viewer__credit a { color: rgba(255, 255, 255, .85); text-decoration: underline; }

/* Con el enlace "Málaga" el menú de escritorio va más justo: compactamos */
@media (min-width: 901px) {
    .logo-text .logo-title, .logo-text .logo-subtitle { white-space: nowrap; }
}
@media (min-width: 901px) and (max-width: 1440px) {
    .header-content { gap: 20px; }
    .mobile-nav { gap: 16px; }
    .nav-link { font-size: 13.5px; }
    .nav-link--highlight { padding: 7px 12px; }
    .btn-whatsapp { padding: 9px 14px; }
}
@media (min-width: 901px) and (max-width: 1180px) {
    .logo-text .logo-subtitle { display: none; }
    .logo-text .logo-title { white-space: normal; max-width: 120px; font-size: 13px; }
    .header-logo .logo { width: 36px; }
    .nav-link--highlight .icon { display: none; }
    .mobile-nav { gap: 12px; }
    .nav-link { font-size: 13px; }
    .btn-whatsapp { font-size: 0; gap: 0; padding: 10px; }
    .btn-whatsapp svg { width: 18px; height: 18px; }
}

/* ------------------------------------------------------------------------
   Beneficios: "Abierta / Cerrada" con fotos agradables
   ------------------------------------------------------------------------ */
.comparison-visual--modes { align-items: start; gap: 28px; }
.comparison-figure { position: relative; margin: 0 0 6px; }
.comparison-visual--modes .comparison-img {
    aspect-ratio: 4 / 3;
    border-radius: 26px;
    box-shadow: 0 30px 50px -28px rgba(11, 63, 115, .55);
    transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.comparison-visual--modes .comparison-after .comparison-img { object-position: 30% 50%; }
.comparison-visual--modes .comparison-before:hover .comparison-img,
.comparison-visual--modes .comparison-after:hover .comparison-img { transform: translateY(-4px) rotate(-.4deg); }
.comparison-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .4);
}
.comparison-tag--open   { background: var(--grad-sun); color: var(--ink); }
.comparison-tag--closed { background: linear-gradient(135deg, var(--mar-2), var(--jacaranda)); color: #fff; }
.comparison-visual--modes h3 { font-size: 20px; font-weight: 800; }
.comparison-visual--modes .comparison-before h3 { color: var(--terracota); }
.comparison-visual--modes .comparison-after h3 { color: var(--mar); }
.comparison-visual--modes p { font-size: 15px; color: var(--ink-70); }
.comparison-visual--modes .comparison-arrow {
    align-self: center;
    margin-top: -60px;
    background: linear-gradient(135deg, var(--terracota-2), var(--buganvilla-2), var(--jacaranda-2));
    color: #fff;
    box-shadow: 0 12px 26px -10px rgba(91, 60, 196, .7);
}
.photo-credit--dark { color: var(--ink-55); }
.photo-credit--dark a { color: var(--ink-70); }
.photo-credit--dark a:hover { color: var(--ink); }
@media (max-width: 900px) {
    .comparison-visual--modes .comparison-arrow { margin: -8px auto; transform: rotate(90deg); }
}
