/* =====================================================================
   Nube Living · Hoja de estilos principal
   ---------------------------------------------------------------------
   Identidad: azules serenos, blancos amplios, formas redondeadas y el
   motivo de la "nube"/arco. Accesibilidad WCAG 2.1 AA: cuerpo >=18px,
   contraste alto, foco visible, animaciones suaves y desactivables.

   Índice:
     1. Tokens (variables de marca)
     2. Reset y base
     3. Tipografía
     4. Accesibilidad (skip link, foco)
     5. Layout (contenedores, secciones, bandas)
     6. Cabecera y navegación
     7. Pie de página
     8. Botones
     9. Tarjetas y rejillas
    10. Hero
    11. Listas de iconos / ventajas
    12. Formularios
    13. Galería / lightbox
    14. Banner de cookies
    15. Utilidades
    16. Motivo nube / decoración
    17. Reduced motion
   ===================================================================== */

/* ------------------------------------------------------------------ */
/* 0. TIPOGRAFÍAS (de sistema · sin descargas externas, RGPD ok)       */
/* ------------------------------------------------------------------ */
/* Web unificada en una sans redondeada y limpia tipo Segoe UI. Es una
   fuente de sistema: no se descarga nada (cero peticiones externas). En
   Windows se ve Segoe UI; en macOS/iOS, San Francisco; en Android, Roboto. */

/* ------------------------------------------------------------------ */
/* 1. TOKENS                                                           */
/* ------------------------------------------------------------------ */
:root {
    /* Paleta de marca (funcional §3.2) */
    --azul-oscuro:   #16386E; /* titulares */
    --azul-marca:    #2E6699; /* principal */
    --azul-acento:   #0E5AA7; /* enlaces */
    --azul-intenso:  #013893; /* bandas */
    --azul-claro:    #9FC1DD; /* detalles */
    --tinte-panel:   #EEF4FA; /* fondos */
    --tinte-suave:   #F6F9FD; /* fondos */
    --texto:         #28323C; /* cuerpo */
    --texto-suave:   #62707E; /* secundario */
    --calido:        #B98E5A; /* acento puntual */
    --blanco:        #ffffff;

    /* Tipografía unificada (títulos y texto): Segoe UI con caída al tipo de sistema. */
    --font-display: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
    --font-sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;

    /* Escala tipográfica (cuerpo base 18px, fluida) */
    --fs-base: 1.125rem;            /* 18px */
    --fs-sm:   0.9375rem;           /* 15px */
    --fs-lg:   clamp(1.18rem, 1.05rem + 0.6vw, 1.35rem);
    /* Titulares con escala normal de sans (Segoe UI tiene altura-x estándar). */
    --fs-h3:   clamp(1.35rem, 1.15rem + 1vw, 1.7rem);
    --fs-h2:   clamp(1.85rem, 1.45rem + 2vw, 2.6rem);
    --fs-h1:   clamp(2.3rem, 1.8rem + 3vw, 3.7rem);

    /* Espaciado */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 3rem;
    --space-6: 4.5rem;
    --space-7: 6.5rem;

    /* Layout */
    --container: 1180px;
    --container-narrow: 760px;
    --radius:    14px;
    --radius-lg: 26px;
    --radius-pill: 999px;

    /* Sombras suaves */
    --shadow-sm: 0 2px 10px rgba(22, 56, 110, 0.06);
    --shadow:    0 10px 30px rgba(22, 56, 110, 0.10);
    --shadow-lg: 0 24px 60px rgba(22, 56, 110, 0.14);

    /* Transiciones */
    --t-fast: 0.18s ease;
    --t:      0.28s ease;

    --header-h: 104px;
}

/* ------------------------------------------------------------------ */
/* 2. RESET Y BASE                                                     */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: var(--fs-base);
    line-height: 1.7;
    color: var(--texto);
    background: var(--blanco);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img, picture, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol { margin: 0; padding: 0; }

/* ------------------------------------------------------------------ */
/* 3. TIPOGRAFÍA                                                       */
/* ------------------------------------------------------------------ */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--azul-oscuro);
    line-height: 1.18;
    font-weight: 700;
    margin: 0 0 var(--space-2);
    text-wrap: balance;
}

h1 { font-size: var(--fs-h1); letter-spacing: -0.01em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

p { margin: 0 0 var(--space-2); max-width: 68ch; }

a {
    color: var(--azul-acento);
    text-decoration: none;
    transition: color var(--t-fast);
}
a:hover { text-decoration: underline; }

strong { font-weight: 600; color: var(--azul-oscuro); }

/* Etiqueta superior de sección (mayúsculas espaciadas) */
.eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--azul-marca);
    margin-bottom: var(--space-1);
}

.lead {
    font-size: var(--fs-lg);
    color: var(--texto-suave);
    max-width: 60ch;
}

/* ------------------------------------------------------------------ */
/* 4. ACCESIBILIDAD                                                    */
/* ------------------------------------------------------------------ */
/* Salto al contenido para lectores de pantalla y teclado */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--azul-oscuro);
    color: #fff;
    padding: 0.8rem 1.2rem;
    border-radius: 0 0 var(--radius) 0;
    z-index: 2000;
}
.skip-link:focus {
    left: 0;
    text-decoration: none;
}

/* Foco visible y generoso al navegar con teclado */
:focus-visible {
    outline: 3px solid var(--azul-acento);
    outline-offset: 2px;
    border-radius: 4px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------ */
/* 5. LAYOUT                                                           */
/* ------------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--space-3);
}
.container--narrow { max-width: var(--container-narrow); }

.section {
    padding-block: var(--space-6);
}
.section--tight { padding-block: var(--space-5); }

/* Bandas de color para ritmo visual */
.band-tint   { background: var(--tinte-suave); }
.band-panel  { background: var(--tinte-panel); }
.band-deep {
    background: linear-gradient(160deg, var(--azul-intenso), var(--azul-oscuro));
    color: #fff;
}
.band-deep h1, .band-deep h2, .band-deep h3 { color: #fff; }
.band-deep .lead, .band-deep p { color: rgba(255,255,255,0.85); }
.band-deep .eyebrow { color: var(--azul-claro); }

.section-head {
    max-width: 60ch;
    margin-bottom: var(--space-4);
}
.section-head--center {
    margin-inline: auto;
    text-align: center;
}

/* ------------------------------------------------------------------ */
/* 6. CABECERA Y NAVEGACIÓN                                            */
/* ------------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid rgba(22,56,110,0.08);
}
/* Fila superior: logotipo centrado */
.site-header__top {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem var(--space-3) 0.5rem;
}
.site-logo { display: inline-flex; align-items: center; }
.site-logo img { height: 72px; width: auto; }

/* Tira de menú: una sola línea, fina y centrada */
.main-nav { border-top: 1px solid rgba(22,56,110,0.07); }
.main-nav__list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: clamp(0.9rem, 2.4vw, 2.4rem);
    list-style: none;
    max-width: 1320px;
    margin-inline: auto;
    padding: 0.45rem var(--space-3);
}
.main-nav a {
    color: var(--azul-oscuro);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.005em;
    white-space: nowrap;
    padding: 0.3rem 0.1rem;
    position: relative;
}
.main-nav a:hover { text-decoration: none; color: var(--azul-acento); }
/* Subrayado animado / página activa */
.main-nav a::after {
    content: "";
    position: absolute;
    left: 0; bottom: -3px;
    width: 100%; height: 2px;
    background: var(--azul-acento);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t);
}
.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--azul-acento); }

/* CTA dentro de la tira: botón compacto para que la tira siga fina */
.main-nav__cta { margin-left: 0.3rem; }
.main-nav__cta .btn { padding: 0.5rem 1.2rem; min-height: 38px; font-size: 0.86rem; }
/* El color de los enlaces del menú no debe pisar el texto blanco del botón */
.main-nav .btn--primary,
.main-nav .btn--primary:hover { color: #fff; }
.main-nav .btn--secondary,
.main-nav .btn--secondary:hover { color: var(--azul-acento); }
.main-nav__cta a::after { display: none; }

/* Botón hamburguesa (móvil): a la izquierda de la fila superior */
.nav-toggle {
    display: none;
    position: absolute;
    left: var(--space-2);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: 0;
    width: 44px; height: 44px;
    border-radius: var(--radius);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.nav-toggle:hover { background: var(--tinte-panel); }
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
    content: "";
    display: block;
    width: 24px; height: 2px;
    background: var(--azul-oscuro);
    border-radius: 2px;
    transition: transform var(--t), opacity var(--t-fast);
}
.nav-toggle span { position: relative; }
.nav-toggle span::before { position: absolute; top: -7px; }
.nav-toggle span::after  { position: absolute; top: 7px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------------ */
/* 7. PIE DE PÁGINA                                                    */
/* ------------------------------------------------------------------ */
.site-footer {
    background: linear-gradient(160deg, var(--azul-oscuro), #0f2a52);
    color: rgba(255,255,255,0.82);
    padding-block: var(--space-6) var(--space-3);
    margin-top: var(--space-6);
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--azul-claro); }
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: var(--space-5);
}
.footer-brand img { height: 48px; width: auto; margin-bottom: var(--space-2); }
/* Botón del pie: el color de enlace blanco del footer pisaba el texto del
   botón (blanco sobre blanco). Recuperamos el texto oscuro. */
.site-footer .btn--light, .site-footer .btn--light:hover { color: var(--azul-oscuro); }
.footer-col h4 { color: #fff; font-family: var(--font-sans); font-size: 0.95rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: var(--space-2); }
.footer-col ul { list-style: none; display: grid; gap: 0.6rem; }
/* Contacto: el «Solicita información» se separa visualmente de los datos
   (email/dirección) como CTA, según la propuesta del cliente. */
.footer-col__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: var(--space-3);
    padding-bottom: 3px;
    border-bottom: 2px solid var(--azul-claro);
}
.footer-col__cta:hover { color: var(--azul-claro); }
.footer-col__cta span { transition: transform var(--t); }
.footer-col__cta:hover span { transform: translateX(3px); }
.footer-col__datos { margin-top: 0; }
.footer-bottom {
    margin-top: var(--space-5);
    padding-top: var(--space-3);
    border-top: 1px solid rgba(255,255,255,0.15);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2) var(--space-4);
    align-items: center;
    justify-content: space-between;
    font-size: var(--fs-sm);
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); }

/* ------------------------------------------------------------------ */
/* 8. BOTONES                                                          */
/* ------------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    font-family: var(--font-sans);
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1;
    padding: 0.95rem 1.6rem;
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform var(--t-fast), background var(--t), box-shadow var(--t), border-color var(--t);
    text-align: center;
    min-height: 52px; /* objetivo táctil amplio */
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn--primary {
    background: var(--azul-marca);
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn--primary:hover { background: var(--azul-oscuro); box-shadow: var(--shadow); color: #fff; }

.btn--secondary {
    background: transparent;
    color: var(--azul-acento);
    border-color: var(--azul-claro);
}
.btn--secondary:hover { border-color: var(--azul-acento); background: var(--tinte-panel); color: var(--azul-acento); }

.btn--light {
    background: #fff;
    color: var(--azul-oscuro);
}
.btn--light:hover { background: var(--tinte-panel); color: var(--azul-oscuro); }

/* Botón secundario para fondos OSCUROS (hero, bandas): texto y borde claros.
   El btn--secundario normal (texto azul) es solo para fondos claros. */
.btn--outline-light {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.65);
}
.btn--outline-light:hover { background: #fff; color: var(--azul-oscuro); border-color: #fff; }

.btn--lg { font-size: 1.1rem; padding: 1.1rem 2rem; }
.btn--block { width: 100%; }

/* ------------------------------------------------------------------ */
/* 9. TARJETAS Y REJILLAS                                              */
/* ------------------------------------------------------------------ */
.grid { display: grid; gap: var(--space-3); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: #fff;
    border: 1px solid rgba(22,56,110,0.10);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
    transition: transform var(--t), box-shadow var(--t);
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: var(--space-1); }
.card p:last-child { margin-bottom: 0; }

.card__icon {
    width: 56px; height: 56px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--tinte-panel);
    color: var(--azul-marca);
    margin-bottom: var(--space-2);
}
.card__icon svg { width: 30px; height: 30px; stroke: currentColor; }

/* Tarjeta con imagen (avances, mosaicos) */
.tile {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--tinte-panel);
    aspect-ratio: 4 / 3;
    display: block;
}
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.tile:hover img { transform: scale(1.05); }
.tile__label {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 1.6rem 1.2rem 1rem;
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.15rem;
    background: linear-gradient(to top, rgba(15,42,82,0.85), transparent);
}

/* ------------------------------------------------------------------ */
/* 10. HERO                                                            */
/* ------------------------------------------------------------------ */
.hero {
    position: relative;
    color: #fff;
    min-height: min(82vh, 720px);
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(160deg, var(--azul-marca), var(--azul-oscuro));
}
.hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(110deg, rgba(15,42,82,0.78) 0%, rgba(15,42,82,0.45) 55%, rgba(15,42,82,0.25) 100%);
}
.hero__inner { position: relative; z-index: 1; padding-block: var(--space-6); }
.hero h1 { color: #fff; max-width: 16ch; }
.hero .lead { color: rgba(255,255,255,0.92); margin-bottom: var(--space-4); }
.hero__cta { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* Encabezado interior (páginas internas) */
.page-hero {
    background: linear-gradient(160deg, var(--azul-marca), var(--azul-oscuro));
    color: #fff;
    padding-block: calc(var(--space-6)) var(--space-6);
    position: relative;
    overflow: hidden;
}
.page-hero h1 { color: #fff; }
.page-hero .lead { color: rgba(255,255,255,0.9); }

/* Encabezado claro (réplica de los bocetos: fondo blanco, texto azul) */
.page-hero--light { background: #fff; color: var(--texto); padding-block: var(--space-6) var(--space-5); }
.page-hero--light h1, .page-hero--light h2 { color: var(--azul-oscuro); }
.page-hero--light .lead { color: var(--texto-suave); }
.page-hero--light .eyebrow { color: var(--azul-acento); }
.page-head { text-align: center; max-width: 60ch; margin: 0 auto var(--space-4); }

/* Servicios · subtítulo del hero con más presencia (petición del cliente) */
.page-head--servicios .page-head__sub {
    font-size: clamp(1.15rem, 1rem + 0.7vw, 1.45rem);
    color: var(--azul-marca);
    font-weight: 500;
    max-width: 42ch;
    margin: var(--space-2) auto 0;
}

/* Servicios · bloque de la cuota mensual (diferencial clave frente a competencia) */
.cuota .eyebrow { margin-bottom: var(--space-2); }
.cuota__headline {
    color: #fff;
    font-weight: 700;
    line-height: 1.08;
    font-size: clamp(1.9rem, 1.35rem + 2.6vw, 3.1rem);
    margin: 0 0 var(--space-1);
    text-wrap: balance;
}
.cuota__sub {
    color: #fff;
    font-weight: 600;
    font-size: clamp(1.05rem, 0.95rem + 0.5vw, 1.35rem);
    margin: 0 0 var(--space-3);
}
.cuota .lead { color: rgba(255,255,255,0.78); font-size: 1rem; }

/* ------------------------------------------------------------------ */
/* 11. LISTAS DE ICONOS / VENTAJAS                                     */
/* ------------------------------------------------------------------ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-3);
}
.feature {
    text-align: center;
    padding: var(--space-3) var(--space-2);
}
.feature__icon {
    width: 64px; height: 64px;
    margin: 0 auto var(--space-2);
    display: grid; place-items: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid rgba(22,56,110,0.10);
    color: var(--azul-marca);
    box-shadow: var(--shadow-sm);
}
.feature__icon svg { width: 32px; height: 32px; stroke: currentColor; fill: none; }
.feature h3 { font-family: var(--font-sans); font-size: 1.05rem; color: var(--azul-oscuro); margin-bottom: 0.2rem; }
.feature p { font-size: var(--fs-sm); color: var(--texto-suave); margin: 0 auto; max-width: 24ch; }

/* Lista con check (servicios incluidos) */
.checklist { list-style: none; display: grid; gap: 0.9rem; }
.checklist li {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 0.7rem;
    align-items: start;
}
.checklist li::before {
    content: "";
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--tinte-panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E6699' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 16px no-repeat;
    margin-top: 3px;
}

/* Cifras clave */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-3);
    text-align: center;
}
.stat__num {
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 1.6rem + 2.5vw, 3.4rem);
    color: var(--azul-acento);
    line-height: 1;
    font-weight: 600;
}
.band-deep .stat__num { color: #fff; }
.stat__label { font-size: var(--fs-sm); color: var(--texto-suave); margin-top: 0.4rem; }
.band-deep .stat__label { color: var(--azul-claro); }

/* ------------------------------------------------------------------ */
/* 12. FORMULARIOS                                                     */
/* ------------------------------------------------------------------ */
.form { display: grid; gap: var(--space-3); }
.form__row { display: grid; gap: var(--space-3); }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 0.45rem; }
.field > label {
    font-weight: 600;
    color: var(--azul-oscuro);
    font-size: 0.98rem;
}
.field .req { color: var(--azul-acento); }
.field input,
.field select,
.field textarea {
    font-family: inherit;
    font-size: 1.05rem;
    color: var(--texto);
    background: #fff;
    border: 2px solid rgba(22,56,110,0.18);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    width: 100%;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    min-height: 52px;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--azul-acento);
    box-shadow: 0 0 0 4px rgba(14,90,167,0.15);
}
.field__hint { font-size: var(--fs-sm); color: var(--texto-suave); }
.field__error {
    font-size: var(--fs-sm);
    color: #b3261e;
    font-weight: 500;
    min-height: 1.2em;
}
.field--invalid input,
.field--invalid select,
.field--invalid textarea { border-color: #b3261e; }

/* Consentimiento RGPD */
.consent {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: start;
    background: var(--tinte-suave);
    border: 1px solid rgba(22,56,110,0.10);
    border-radius: var(--radius);
    padding: var(--space-2);
    font-size: var(--fs-sm);
    color: var(--texto-suave);
}
.consent input[type="checkbox"] {
    width: 24px; height: 24px;
    margin-top: 2px;
    accent-color: var(--azul-marca);
    flex-shrink: 0;
}

/* Honeypot anti-spam: oculto a personas, visible a bots */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

/* Avisos de estado del formulario */
.alert {
    border-radius: var(--radius);
    padding: var(--space-2) var(--space-3);
    border: 1px solid transparent;
}
.alert--error   { background: #fdecea; border-color: #f5c6c0; color: #8a1c12; }
.alert--success { background: #e8f5ee; border-color: #b7e0c6; color: #1d6b3a; }

/* ------------------------------------------------------------------ */
/* 13. GALERÍA / LIGHTBOX                                              */
/* ------------------------------------------------------------------ */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-2);
}
.gallery__item {
    border: 0; padding: 0; cursor: zoom-in;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--tinte-panel);
    aspect-ratio: 4 / 3;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t); }
.gallery__item:hover img { transform: scale(1.04); }

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(10,25,50,0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-3);
}
.lightbox[open], .lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.lightbox__close, .lightbox__nav {
    position: absolute;
    background: rgba(255,255,255,0.14);
    border: 0;
    color: #fff;
    width: 54px; height: 54px;
    border-radius: 50%;
    font-size: 1.6rem;
    cursor: pointer;
    display: grid; place-items: center;
}
.lightbox__close { top: 1.2rem; right: 1.2rem; }
.lightbox__nav--prev { left: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1.2rem; top: 50%; transform: translateY(-50%); }
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,0.28); }

/* ------------------------------------------------------------------ */
/* 14. BANNER DE COOKIES                                               */
/* ------------------------------------------------------------------ */
.cookie-banner {
    position: fixed;
    left: 50%;
    bottom: var(--space-3);
    transform: translateX(-50%);
    width: min(680px, calc(100% - 2rem));
    background: #fff;
    border: 1px solid rgba(22,56,110,0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-3);
    z-index: 2500;
    display: none;
}
.cookie-banner.is-visible { display: block; }
.cookie-banner p { font-size: var(--fs-sm); color: var(--texto-suave); }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.cookie-banner__actions .btn { padding: 0.7rem 1.3rem; min-height: 46px; font-size: 0.95rem; }

/* ------------------------------------------------------------------ */
/* 15. UTILIDADES                                                      */
/* ------------------------------------------------------------------ */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mx-auto { margin-inline: auto; }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.flow > * + * { margin-top: var(--space-3); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.cluster--center { justify-content: center; }

/* Bloque de captación final reutilizable */
.cta-band {
    text-align: center;
    border-radius: var(--radius-lg);
    background: linear-gradient(160deg, var(--azul-intenso), var(--azul-oscuro));
    color: #fff;
    padding: var(--space-6) var(--space-4);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.88); margin-inline: auto; }

/* Dos columnas texto + media */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    align-items: center;
}
.split__media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; }
/* Reposiciona el recorte hacia arriba para no cortar cabezas (p. ej. la pareja
   de «Un día a tu ritmo»). */
.split__media.img-shift-top .img-real img { object-position: center top; }
/* «Un día en Nube Living»: la foto es vertical y la mujer va en el centro-bajo;
   bajamos el encuadre para no recortarla y eliminar el hueco de fachada de arriba. */
.split__media.un-dia-media .img-real img { object-position: center 62%; }

/* ------------------------------------------------------------------ */
/* 16. MOTIVO NUBE / DECORACIÓN                                        */
/* ------------------------------------------------------------------ */
/* Arco superior suave que remata algunas bandas (sello de marca) */
.arc-divider {
    display: block;
    width: 100%;
    height: 60px;
    color: var(--blanco); /* el relleno del arco */
}
.arc-divider svg { width: 100%; height: 100%; display: block; }

/* Recuadro de imagen pendiente (boceto): hueco reservado para la imagen real */
.img-ph {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background:
        repeating-linear-gradient(45deg, var(--tinte-panel), var(--tinte-panel) 14px, var(--tinte-suave) 14px, var(--tinte-suave) 28px);
    border: 2px dashed var(--azul-claro);
    border-radius: var(--radius-lg);
    color: var(--azul-marca);
    text-align: center;
    padding: var(--space-3);
    width: 100%;
}
.img-ph__icon { width: 54px; color: var(--azul-claro); }
.img-ph__icon svg { width: 100%; height: auto; }
.img-ph__cap {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--azul-marca);
    max-width: 26ch;
    line-height: 1.3;
}
.img-ph--wide     { aspect-ratio: 16 / 7; }
.img-ph--4-3      { aspect-ratio: 4 / 3; }
.img-ph--square   { aspect-ratio: 1 / 1; }
.img-ph--portrait { aspect-ratio: 3 / 4; }
.img-ph--tall     { aspect-ratio: 2 / 3; }

/* Imagen real (rellena el mismo hueco que el recuadro) */
.img-real { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--tinte-panel); width: 100%; }
.img-real img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-real--contain { background: #fff; border: 1px solid rgba(22,56,110,0.10); }
.img-real--contain img { object-fit: contain; }
/* Natural: muestra la imagen TAL CUAL, a su proporción, sin recortes ni bordes */
.img-real--natural { aspect-ratio: auto; background: transparent; }
.img-real--natural img { height: auto; object-fit: fill; }
.img-real--wide     { aspect-ratio: 16 / 7; }
.img-real--4-3      { aspect-ratio: 4 / 3; }
.img-real--square   { aspect-ratio: 1 / 1; }
.img-real--portrait { aspect-ratio: 3 / 4; }
.img-real--tall     { aspect-ratio: 2 / 3; }
/* Sobre fondos oscuros */
.band-deep .img-ph, .hero .img-ph {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.4);
    color: #fff;
}
.band-deep .img-ph__icon, .hero .img-ph__icon { color: rgba(255,255,255,0.55); }
.band-deep .img-ph__cap, .hero .img-ph__cap { color: rgba(255,255,255,0.9); }

/* Nube decorativa para heroes sin fotografía (motivo de marca) */
.deco-cloud {
    position: absolute;
    z-index: 0;
    color: #fff;
    opacity: 0.07;
    pointer-events: none;
}
.deco-cloud--tr { top: -40px; right: -30px; width: clamp(220px, 32vw, 460px); }
.deco-cloud--bl { bottom: -60px; left: -40px; width: clamp(200px, 26vw, 380px); }
.deco-cloud svg { width: 100%; height: auto; }

/* Sello redondo "+50 / Senior Living" */
.badge-round {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 96px; height: 96px;
    border-radius: 50%;
    background: #fff;
    color: var(--azul-marca);
    box-shadow: var(--shadow);
    text-align: center;
    line-height: 1.1;
    flex-shrink: 0;
}
.badge-round strong { font-family: var(--font-display); font-size: 1.6rem; color: var(--azul-oscuro); }
.badge-round span { font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-suave); }

/* Cita destacada (idea en una frase) */
.quote {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 1.1rem + 2vw, 2.4rem);
    color: var(--azul-oscuro);
    line-height: 1.3;
    max-width: 22ch;
    margin: 0 auto;
    text-wrap: balance;
}
.quote--left { margin: 0; }
/* Cita más pequeña y ancha (menos líneas) */
.quote--sm { font-size: clamp(1.1rem, 0.95rem + 0.7vw, 1.45rem); line-height: 1.45; max-width: 46ch; }

/* Momentos del día: tarjeta unificada (imagen cuadrada arriba + texto debajo).
   El padding de la tarjeta deja un margen blanco alrededor de la foto, como
   la referencia del cliente; el texto va alineado a la izquierda. */
.moment-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(22,56,110,0.10);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-2);
    transition: transform var(--t), box-shadow var(--t);
}
.moment-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
/* La imagen mantiene proporción cuadrada; la sombra la lleva la tarjeta. */
.moment-card .img-real { border-radius: var(--radius); box-shadow: none; }
.moment-card__body { padding: var(--space-3) var(--space-2) var(--space-2); }
.moment-card__body h3 { color: var(--azul-oscuro); margin-bottom: var(--space-1); }
.moment-card__body p:last-child { margin-bottom: 0; color: var(--texto-suave); }

/* ------------------------------------------------------------------ */
/* 16b. FAQ (acordeón nativo)                                          */
/* ------------------------------------------------------------------ */
.faq-list { display: grid; gap: var(--space-2); }
.faq-item {
    background: #fff;
    border: 1px solid rgba(22,56,110,0.12);
    border-radius: var(--radius);
    overflow: hidden;
}
.faq-item__q {
    list-style: none;
    cursor: pointer;
    padding: 1.1rem 1.3rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--azul-oscuro);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
}
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__q::after {
    content: "";
    width: 22px; height: 22px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E6699' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform var(--t);
}
.faq-item[open] .faq-item__q::after { transform: rotate(45deg); }
.faq-item[open] .faq-item__q { color: var(--azul-acento); }
.faq-item__a { padding: 0 1.3rem 1.2rem; }
.faq-item__a p { margin: 0; color: var(--texto-suave); }

/* ------------------------------------------------------------------ */
/* 16c. PÁGINAS LEGALES Y DE SISTEMA                                   */
/* ------------------------------------------------------------------ */
.legal-content { max-width: 760px; margin-inline: auto; }
.legal-content h2 { margin-top: var(--space-5); font-size: var(--fs-h3); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content ul { padding-left: 1.4rem; list-style: disc; }
.legal-content li { margin-bottom: 0.4rem; }
.legal-content .updated { color: var(--texto-suave); font-size: var(--fs-sm); }

/* Página de sistema (gracias / 404): centrada y aireada */
.system-screen {
    min-height: 60vh;
    display: grid;
    place-items: center;
    text-align: center;
    padding-block: var(--space-6);
}
.system-screen .container { max-width: 640px; }
.system-screen__icon {
    width: 88px; height: 88px;
    margin: 0 auto var(--space-3);
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--tinte-panel);
    color: var(--azul-marca);
}
.system-screen__icon svg { width: 46px; height: 46px; }

/* ------------------------------------------------------------------ */
/* 16d. ELEMENTOS DE LOS BOCETOS                                        */
/* ------------------------------------------------------------------ */
/* Separador línea — nube — línea */
.cloud-rule { display: flex; align-items: center; justify-content: center; gap: 0.8rem; color: var(--azul-marca); margin: var(--space-3) 0; }
.cloud-rule__line { height: 1px; width: clamp(40px, 12vw, 110px); background: currentColor; opacity: 0.45; }
.cloud-rule svg { width: 30px; height: 18px; }
.cloud-rule--center { margin-inline: auto; }

/* Sello "Senior Living +50" */
.sello { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--azul-acento); }

/* Portada (Inicio): clara y centrada como el boceto */
.cover { padding-block: var(--space-6) var(--space-4); text-align: center; }
.cover h1 { max-width: 18ch; margin-inline: auto; }
.cover .lead { margin-inline: auto; }
.cover__tag { color: var(--texto-suave); }

/* Ficha lateral del apartamento tipo (icono · cifra · etiqueta) */
.spec-list { display: grid; gap: 0.2rem; }
.spec-row { display: grid; grid-template-columns: 46px auto 1fr; gap: 0.9rem; align-items: center; padding: 0.7rem 0; border-bottom: 1px solid rgba(22,56,110,0.10); }
.spec-row:last-child { border-bottom: 0; }
.spec-row__icon { color: var(--azul-marca); display: grid; place-items: center; }
.spec-row__icon svg { width: 30px; height: 30px; }
.spec-row__num { font-family: var(--font-display); font-size: 1.5rem; color: var(--azul-oscuro); font-weight: 600; }
.spec-row__label { color: var(--texto-suave); font-size: var(--fs-sm); line-height: 1.3; }

/* Caja de superficies */
/* Recuadro de superficies: azul suave para destacarlo (sin ser oscuro). */
.surface-box { background: #d7e6f6; border: 1px solid rgba(22,56,110,0.18); border-radius: var(--radius-lg); padding: var(--space-3); }
/* Nota legal de superficies: pequeña, con asterisco, justo debajo del recuadro. */
.surface-note { font-size: 0.82rem; color: var(--texto-suave); line-height: 1.4; margin: 0.6rem 0 0; max-width: 60ch; }
.surface-note__star { color: var(--azul-marca); font-weight: 700; }
.surface-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem 1.4rem; }
.surface-grid dt { color: var(--texto-suave); font-size: var(--fs-sm); }
.surface-grid dd { margin: 0 0 0.6rem; font-weight: 600; color: var(--azul-oscuro); }

/* Ubicación: texto más ancho (menos líneas) y mapa centrado */
.ubicacion-intro { max-width: 900px; margin-inline: auto; }
.ubicacion-intro .lead { max-width: none; }
.mapa-wrap { max-width: 940px; margin-inline: auto; }

/* Mosaico de servicios con etiqueta bajo cada hueco */
.tile-caption { text-align: center; color: var(--azul-acento); font-weight: 600; font-size: var(--fs-sm); margin-top: 0.5rem; display: flex; gap: 0.4rem; align-items: center; justify-content: center; }
.tile-caption svg { width: 18px; height: 18px; }

/* Galería de Servicios: Spa vertical destacado + cuadrícula de 6 (boceto) */
.serv-galeria { display: grid; grid-template-columns: 5fr 7fr; gap: var(--space-3); align-items: stretch; }
.serv-galeria__hero { margin: 0; display: flex; flex-direction: column; }
.serv-galeria__hero .img-real { flex: 1 1 auto; min-height: 0; aspect-ratio: auto; }
.serv-galeria__hero .img-real img { height: 100%; }
.serv-galeria__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 760px) {
    .serv-galeria { grid-template-columns: 1fr; }
    .serv-galeria__hero .img-real { aspect-ratio: 3 / 4; }
}

/* Galería de espacios (boceto): Spa grande a la izquierda + rejilla de 6 */
.spaces-gallery { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: var(--space-2); }
.spaces-gallery__feature { grid-column: 1; grid-row: 1 / 4; display: flex; flex-direction: column; margin: 0; }
.spaces-gallery__img { flex: 1; min-height: 220px; aspect-ratio: auto; }
.space-item { display: flex; flex-direction: column; }
@media (max-width: 760px) {
    .spaces-gallery { grid-template-columns: 1fr 1fr; }
    .spaces-gallery__feature { grid-column: 1 / 3; grid-row: auto; }
    .spaces-gallery__img { aspect-ratio: 16 / 9; min-height: 0; }
}
@media (max-width: 480px) {
    .spaces-gallery { grid-template-columns: 1fr; }
    .spaces-gallery__feature { grid-column: 1; }
}

/* Servicios incluidos en 2 filas de 4 */
.features--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 700px) { .features--4 { grid-template-columns: repeat(2, 1fr); } }

/* Logo de Grupo Medinaceli (tamaño contenido para que se vea nítido).
   Selector específico para ganar a ".split__media img { width:100% }". */
.split__media img.logo-medinaceli,
.logo-medinaceli {
    width: 260px;
    max-width: 80%;
    height: auto;
    box-shadow: none;
    border-radius: 0;
    display: block;
    margin-left: auto;   /* empuja el logo a la derecha y lo separa del texto */
}
/* En móvil (split apilado) se centra para no quedar pegado al borde. */
@media (max-width: 980px) {
    .split__media img.logo-medinaceli,
    .logo-medinaceli { margin-inline: auto; }
}

/* Cifras/iconos centrados que reparten 4 + 3 (en vez de fila auto) */
.features--center {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
}
.features--center .feature { flex: 0 1 calc(25% - var(--space-3)); min-width: 160px; }
@media (max-width: 720px) {
    .features--center .feature { flex-basis: calc(50% - var(--space-3)); }
}

/* Logo de Medinaceli en el pie (chip blanco sobre fondo oscuro) */
.footer-medinaceli { color: #fff; font-weight: 600; white-space: nowrap; }

/* Solicita información: dos columnas (texto + formulario) */
.contact-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: var(--space-5); align-items: start; }
.contact-intro .sello { display: block; margin-bottom: var(--space-1); }
.contact-claims__title { font-size: var(--fs-h3); margin-top: var(--space-4); }
.form-card { background: #fff; border: 1px solid rgba(22,56,110,0.12); border-radius: var(--radius-lg); padding: var(--space-4); box-shadow: var(--shadow); }
.form-card h2 { font-size: var(--fs-h3); }
.form-card .field__hint { margin-bottom: var(--space-2); }

/* Grupos de casillas (interés / tipo de vivienda) */
.check-group { border: 0; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.check-group legend { font-weight: 600; color: var(--azul-oscuro); font-size: 0.98rem; padding: 0; margin-bottom: 0.2rem; }
.check-group .check-inline { font-weight: 400; color: var(--texto); }
.check-inline { display: flex; align-items: center; gap: 0.6rem; cursor: pointer; }
.check-inline input { width: 22px; height: 22px; accent-color: var(--azul-marca); flex-shrink: 0; }

@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; gap: var(--space-4); } }

/* Datos de contacto (boceto Solicita información) */
.contact-info { text-align: center; }
.contact-info p { display: flex; align-items: center; justify-content: center; gap: 0.6rem; margin: 0.5rem 0; color: var(--texto); }
.contact-info a { color: var(--azul-acento); }
.contact-info__ic { color: var(--azul-marca); display: inline-flex; }
.contact-info__ic svg { width: 22px; height: 22px; }
.contact-info__addr { color: var(--texto-suave); }

/* ------------------------------------------------------------------ */
/* 16b. COMPONENTES NUEVOS (hero home, carrusel, lupa, aparición)      */
/* ------------------------------------------------------------------ */

/* Hero de la Home: imagen de fondo + texto encima (reutiliza .hero).   */
.hero--home { min-height: min(86vh, 760px); }
/* «Senior Living +50 en Majadahonda»: distintivo con más presencia (debe leerse
   desde el primer momento), en píldora translúcida para no competir con el título. */
.hero--home .eyebrow {
    color: #fff;
    font-size: clamp(0.85rem, 0.78rem + 0.35vw, 1.05rem);
    letter-spacing: 0.16em;
    background: rgba(255,255,255,0.16);
    border: 1px solid rgba(255,255,255,0.34);
    padding: 0.45em 1.1em;
    border-radius: var(--radius-pill);
    margin-bottom: var(--space-2);
}
.hero--home .hero__inner { text-align: center; }
.hero--home h1 { margin-inline: auto; max-width: 20ch; }
.hero--home .lead { margin-inline: auto; max-width: 46ch; }

/* Sección "intro" bajo el hero: texto a la izquierda + carrusel a la derecha. */
.home-intro__text { text-align: left; }
.home-intro__text .sello { display: block; margin-bottom: var(--space-1); }
.home-intro__text .lead { max-width: 38ch; }
.home-intro__text .hero__cta { justify-content: flex-start; }

/* Carrusel de imágenes (autoavance con fundido elegante). Sin JS, se ve
   la primera imagen; ui.js rota las demás. */
.carousel { position: relative; width: 100%; }
.carousel__viewport {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--tinte-panel);
}
.carousel--square   .carousel__viewport { aspect-ratio: 1 / 1; }
.carousel--4-3      .carousel__viewport { aspect-ratio: 4 / 3; }
.carousel--wide     .carousel__viewport { aspect-ratio: 16 / 9; }
.carousel--portrait .carousel__viewport { aspect-ratio: 3 / 4; }
.carousel__slide {
    position: absolute;
    inset: 0;
    display: block;
    opacity: 0;
    z-index: 0;
    transition: opacity 1.5s ease; /* fundido lento y visible entre imágenes */
    will-change: opacity;
}
.carousel__slide.is-active { opacity: 1; z-index: 1; }
.carousel__slide:not(.is-active) { pointer-events: none; }
.carousel__slide img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.045);
    transition: transform 7s ease; /* leve deriva tipo Ken Burns */
}
.carousel__slide.is-active img { transform: scale(1); }

/* Texto-llamada que aparece en la parte inferior de la imagen al pasar el ratón. */
.carousel__cta {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; gap: 0.4rem;
    padding: 1.6rem 1.1rem 0.95rem;
    color: #fff;
    font-weight: 600;
    font-size: var(--fs-sm);
    background: linear-gradient(to top, rgba(15,42,82,0.9), rgba(15,42,82,0));
    transform: translateY(10px);
    opacity: 0;
    transition: opacity var(--t), transform var(--t);
}
.carousel__slide:hover .carousel__cta,
.carousel__slide:focus-visible .carousel__cta { transform: none; opacity: 1; }
.carousel__dots { display: flex; gap: 0.5rem; justify-content: center; margin-top: var(--space-2); }
.carousel__dot {
    width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%;
    background: var(--azul-claro); opacity: 0.5; cursor: pointer;
    transition: opacity var(--t-fast), transform var(--t-fast), background var(--t-fast);
}
.carousel__dot:hover { opacity: 0.85; }
.carousel__dot.is-active { opacity: 1; background: var(--azul-marca); transform: scale(1.25); }

/* Lupa: al pasar el ratón, la imagen se amplía sobre la posición del cursor. */
.zoom-lens { cursor: zoom-in; }
.zoom-lens .img-real { overflow: hidden; }
.zoom-lens img { transition: transform 0.18s ease; will-change: transform; }

/* Aparición elegante (fade + subida). Pensada para titular y subtítulo. */
.reveal-in { animation: reveal-up 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.reveal-in--d1 { animation-delay: 0.16s; }
.reveal-in--d2 { animation-delay: 0.32s; }
@keyframes reveal-up {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}

/* Galería de espacios (Servicios): movimiento elegante al pasar el ratón.
   La imagen se amplía suavemente y la tarjeta se eleva un poco. */
.serv-galeria .img-real { transition: transform var(--t), box-shadow var(--t); }
.serv-galeria .img-real img { transition: transform 1s cubic-bezier(0.2, 0.6, 0.2, 1); }
.serv-galeria .img-real:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.serv-galeria .img-real:hover img { transform: scale(1.07); }

/* En banda oscura, el icono circular pasa a blanco translúcido. */
.band-deep .card__icon { background: rgba(255,255,255,0.14); color: #fff; }

/* Servicios incluidos (estilo boceto): tarjeta con borde, icono a la
   izquierda y texto a la derecha. */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-3); }
.svc-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.95rem 1.1rem;
    background: #fff;
    border: 1px solid rgba(22,56,110,0.14);
    border-radius: var(--radius);
    transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.svc-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(22,56,110,0.24); }
.svc-item__icon { flex: 0 0 auto; color: var(--azul-marca); display: grid; place-items: center; }
.svc-item__icon svg { width: 28px; height: 28px; }
.svc-item__label { font-size: var(--fs-sm); font-weight: 600; color: var(--azul-oscuro); line-height: 1.25; }

/* Citas flotando alrededor de una imagen (La vida en Nube Living):
   una arriba-izquierda y otra abajo-derecha, con flotación suave. */
.float-quotes { position: relative; }
.float-quote {
    position: absolute;
    z-index: 2;
    max-width: 13ch;
    padding: 0.7rem 1.05rem;
    background: #fff;
    color: var(--azul-oscuro);
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 0.95rem + 0.7vw, 1.6rem);
    font-weight: 600;
    line-height: 1.18;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-wrap: balance;
    animation: float-soft 5.5s ease-in-out infinite;
}
.float-quote--tl { top: -1.1rem; left: -1.6rem; }
.float-quote--br { bottom: -1.1rem; right: -1.6rem; text-align: right; animation-delay: -2.75s; }
@keyframes float-soft {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

/* Aparición escalonada al hacer scroll (p. ej. servicios incluidos: uno a uno).
   El estado oculto solo se aplica si hay JS (clase .has-reveal en <html>); sin
   JS todo queda visible. El JS añade .is-revealed al entrar en pantalla. */
.has-reveal [data-reveal] > * { opacity: 0; }
.has-reveal [data-reveal].is-revealed > * { animation: reveal-up 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both; }
.has-reveal [data-reveal].is-revealed > *:nth-child(2) { animation-delay: 0.08s; }
.has-reveal [data-reveal].is-revealed > *:nth-child(3) { animation-delay: 0.16s; }
.has-reveal [data-reveal].is-revealed > *:nth-child(4) { animation-delay: 0.24s; }
.has-reveal [data-reveal].is-revealed > *:nth-child(5) { animation-delay: 0.32s; }
.has-reveal [data-reveal].is-revealed > *:nth-child(6) { animation-delay: 0.40s; }
.has-reveal [data-reveal].is-revealed > *:nth-child(7) { animation-delay: 0.48s; }
.has-reveal [data-reveal].is-revealed > *:nth-child(8) { animation-delay: 0.56s; }

/* Mapa "click para cargar" (Ubicación): vista previa con filtro estético y, al
   pulsar, se sustituye por el iframe interactivo de Google Maps. */
.map-embed {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--tinte-panel);
}
.map-embed__preview { position: absolute; inset: 0; }
.map-embed__img {
    width: 100%; height: 100%;
    object-fit: cover;
    /* Filtro sutil para que el mapa se vea más estético. */
    filter: grayscale(0.18) contrast(1.05) saturate(1.05);
}
.map-embed__overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 0.6rem; text-align: center;
    padding: var(--space-3);
    color: #fff;
    background: linear-gradient(160deg, rgba(15,42,82,0.55), rgba(15,42,82,0.38));
}
.map-embed__pin { width: 42px; height: 42px; color: #fff; }
.map-embed__pin svg { width: 100%; height: 100%; }
.map-embed__addr { font-family: var(--font-display); font-size: 1.25rem; margin: 0; max-width: 28ch; color: #fff; }
.map-embed__note { font-size: 0.78rem; opacity: 0.85; margin: 0; }
.map-embed__frame { width: 100%; height: 100%; border: 0; display: block; }

/* Lista vertical de cifras del proyecto (Estado): icono + texto, una por línea. */
.cifra-list { list-style: none; display: grid; gap: 0.1rem; margin: 0; padding: 0; }
.cifra-row { display: grid; grid-template-columns: 42px 1fr; gap: 0.9rem; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid rgba(22,56,110,0.10); }
.cifra-row:last-child { border-bottom: 0; }
.cifra-row__icon { color: var(--azul-marca); display: grid; place-items: center; }
.cifra-row__icon svg { width: 28px; height: 28px; }
.cifra-row__txt { color: var(--texto-suave); line-height: 1.3; }
.cifra-row__txt strong { color: var(--azul-oscuro); font-family: var(--font-display); font-size: 1.2rem; margin-right: 0.35rem; }

/* Título forzado a una sola línea (Estado del proyecto). */
.title-1line { white-space: nowrap; }
@media (max-width: 520px) { .title-1line { white-space: normal; } }

/* ------------------------------------------------------------------ */
/* 17. RESPONSIVE                                                      */
/* ------------------------------------------------------------------ */
@media (max-width: 980px) {
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .split { grid-template-columns: 1fr; }
    /* En móvil los split apilan en el orden del código (cada sección decide). */
}

@media (max-width: 820px) {
    :root { --header-h: 70px; }

    /* Logo: algo más pequeño en móvil para encajar en la cabecera. */
    .site-logo img { height: 54px; }

    /* Menú móvil desplegable */
    .nav-toggle { display: inline-flex; }
    .main-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        background: #fff;
        border-top: 0;
        border-bottom: 1px solid rgba(22,56,110,0.10);
        box-shadow: var(--shadow);
        transform: translateY(-120%);
        transition: transform var(--t);
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
        visibility: hidden;
    }
    .main-nav.is-open { transform: translateY(0); visibility: visible; }
    .main-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-width: none;
        padding: var(--space-2) var(--space-3) var(--space-3);
    }
    .main-nav li { border-bottom: 1px solid rgba(22,56,110,0.07); }
    .main-nav a { display: block; padding: 1rem 0.4rem; font-size: 1.1rem; white-space: normal; }
    .main-nav a::after { display: none; }
    /* CTA del menú a ancho completo en el desplegable */
    .main-nav__cta { margin-left: 0; border-bottom: 0; }
    .main-nav__cta .btn { margin-top: var(--space-2); width: 100%; min-height: 52px; font-size: 1rem; padding: 0.95rem 1.6rem; }
}

/* Servicios incluidos: 4 → 2 → 1 columnas. */
@media (max-width: 860px) { .svc-grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 620px) {
    .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: var(--space-4); }
    .stats { grid-template-columns: 1fr 1fr; }
    .section { padding-block: var(--space-5); }
}

/* Citas flotantes y tarjetas de servicios en pantallas pequeñas. */
@media (max-width: 560px) {
    .svc-grid { grid-template-columns: 1fr; }
    .float-quote { font-size: 1.05rem; padding: 0.5rem 0.8rem; max-width: 12ch; }
    .float-quote--tl { top: -0.5rem; left: -0.3rem; }
    .float-quote--br { bottom: -0.5rem; right: -0.3rem; }
}

/* ------------------------------------------------------------------ */
/* 18. REDUCED MOTION                                                  */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    .tile img, .gallery__item img { transition: none; }
}

/* ==================================================================== */
/* Apartamentos · cabecera + características + dos tipologías (propuesta)  */
/* ==================================================================== */
.apt-hero { padding-top: var(--space-4); padding-bottom: var(--space-3); }
.apt-hero__grid { align-items: center; gap: var(--space-4); }
.apt-hero__title { color: var(--azul-oscuro); margin: 0.15rem 0 0.6rem; line-height: 1.04; }

/* Banda de características: caja blanca con separadores verticales */
.car-band { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); background: #fff; border: 1px solid rgba(22,56,110,0.12); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.car-band li { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.45rem; padding: 1rem 0.5rem; font-size: 0.82rem; font-weight: 500; color: var(--texto); line-height: 1.25; }
.car-band li + li { border-left: 1px solid rgba(22,56,110,0.10); }
.car-band__ic { width: 34px; height: 34px; color: var(--azul-marca); display: inline-flex; }
.car-band__ic svg { width: 100%; height: 100%; }

/* Dos tipologías sobre blanco (sin tarjeta) */
.tipologias { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); align-items: start; }
.tipo__head { text-align: center; margin-bottom: 1rem; }
.tipo__head h2 { color: var(--azul-oscuro); margin: 0; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.75rem); }
.tipo__num { color: var(--azul-acento); font-weight: 600; margin: 0.2rem 0 0; }
.tipo__plano { margin-bottom: 1rem; }
.tipo__plano .img-real { background: var(--tinte-suave); }
.tipo__foto { margin-bottom: 1.1rem; }
.tipo-sup { list-style: none; margin: 0; padding: 0; }
.tipo-sup li { display: flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.2rem; border-bottom: 1px solid rgba(22,56,110,0.10); }
.tipo-sup__ic { width: 24px; height: 24px; color: var(--azul-marca); flex: 0 0 auto; display: inline-flex; }
.tipo-sup__ic svg { width: 100%; height: 100%; }
.tipo-sup__label { color: var(--texto-suave); }
.tipo-sup__val { margin-left: auto; font-weight: 600; color: var(--azul-oscuro); }
.tipo-sup__total { border-bottom: 0 !important; }
.tipo-sup__total .tipo-sup__label, .tipo-sup__total .tipo-sup__val { color: var(--azul-oscuro); font-weight: 700; }

/* CTA · Lista de interés (banda clara, texto + botón) */
.apt-cta { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; background: var(--tinte-panel); border-radius: var(--radius-lg); padding: 1.7rem 2rem; }
.apt-cta__text h2 { color: var(--azul-oscuro); margin: 0 0 0.3rem; font-size: clamp(1.35rem, 1.15rem + 1vw, 1.75rem); }
.apt-cta__text p { margin: 0; color: var(--texto-suave); max-width: 54ch; }

@media (max-width: 760px) {
    .car-band { grid-template-columns: repeat(3, 1fr); }
    .car-band li + li { border-left: 0; }
    .tipologias { grid-template-columns: 1fr; }
    .apt-cta { flex-direction: column; align-items: flex-start; }
}

/* Spa con galería (lightbox al pinchar) */
.serv-galeria__hero .spa-trigger { flex: 1 1 auto; min-height: 0; display: flex; position: relative; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.serv-galeria__hero .spa-trigger .img-real { flex: 1 1 auto; min-height: 0; aspect-ratio: auto; width: 100%; }
.spa-trigger__badge { position: absolute; bottom: 0.8rem; right: 0.8rem; background: rgba(16,32,56,0.78); color: #fff; font-size: 0.85rem; font-weight: 600; padding: 0.4rem 0.8rem; border-radius: var(--radius-pill); display: inline-flex; align-items: center; gap: 0.4rem; transition: background 0.2s; }
.spa-trigger__badge svg { width: 18px; height: 18px; stroke: currentColor; fill: none; }
.spa-trigger:hover .spa-trigger__badge, .spa-trigger:focus-visible .spa-trigger__badge { background: var(--azul-marca); }
