/* =====================================================
   FUENTES LOCALES OPTIMIZADAS (WOFF2)
   ===================================================== */
/* Bebas Neue (400) - Titulares display */
@font-face {
    font-family: 'Bebas Neue';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/bebas-neue-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Bebas Neue';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/bebas-neue-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Syne (700) - Títulos y cabeceras */
@font-face {
    font-family: 'Syne';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/syne-700-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Syne';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('fonts/syne-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Outfit (400-600) - Texto base y navegación */
@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('fonts/outfit-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 400 600;
    font-display: swap;
    src: url('fonts/outfit-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Space Mono (400) - Pestañas y etiquetas */
@font-face {
    font-family: 'Space Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/space-mono-400-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Space Mono';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('fonts/space-mono-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Superficies */
    --bg-hero: #030B18;
    --bg-alt-light: #F8FAFF;
    --bg-alt-dark: #0A1628;
    --footer-bg: #123255;

    /* Cian — CTAs, eyebrows, highlights, iconos interactivos */
    --primary: oklch(0.62 0.18 210);
    /* Púrpura — solo detalles puntuales (p. ej. .text-accent, .btn-glow--accent) */
    --accent: #A855F7;
    /* Cian claro — hovers outline, nav, bordes suaves */
    --accent-soft: #38BDF8;

    --text-light: #E2F4FF;
    --text-dark: #0F1C2E;
    --text-muted: color-mix(in srgb, var(--text-dark) 42%, #6b7280);

    --font-display: 'Bebas Neue', sans-serif;
    --font-heading: 'Syne', sans-serif;
    --font-body: 'Outfit', sans-serif;
    --font-mono: 'Space Mono', monospace;

    --glow: 0 0 22px color-mix(in srgb, var(--primary) 38%, transparent);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);

    /* FABs scroll-top + WhatsApp (mismo borde derecho, iPhone safe area) */
    --fab-right: max(1rem, env(safe-area-inset-right, 0px));
    --fab-size: 3.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Texto visible para lectores de pantalla y buscadores (p. ej. contexto local en H1) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-alt-light);
    color: var(--text-dark);
    overflow-x: hidden;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Anclas (#servicios, etc.): el header fijo no tape el inicio de la sección */
html {
    scroll-padding-top: calc(4.25rem + env(safe-area-inset-top, 0px));
    /* Evita “saltos” al scroll cuando el navegador reacomoda el ancla (p. ej. al animar bloques) */
    overflow-anchor: none;
}

/* Anclas de sección: el JS apunta al .services-header; sin margen extra en CSS */
main section[id],
main>section[id] {
    scroll-margin-top: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 0;
    background: color-mix(in srgb, var(--bg-hero) 22%, transparent);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid color-mix(in srgb, var(--text-light) 10%, transparent);
    transition: background 0.3s ease, backdrop-filter 0.3s ease, padding 0.3s ease;
}

.header.scrolled {
    background: color-mix(in srgb, var(--bg-hero) 94%, transparent);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--text-light) 6%, transparent);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-container>a picture {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.logo {
    height: 40px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

/* CTA menú: una línea; en escritorio el wrap no genera caja (los hijos siguen en la fila del nav) */
.nav-cta-wrap {
    display: contents;
}

.nav .nav-cta-mobile {
    white-space: nowrap;
}

@media (min-width: 1025px) {
    .nav-cta-wrap .nav-cta-mobile {
        margin-left: 1rem;
    }
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary);
}

.btn-glow {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    background-color: var(--primary);
    color: white;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    box-shadow: 0 0 22px color-mix(in srgb, var(--primary) 34%, transparent);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-glow:hover {
    background-color: color-mix(in srgb, var(--primary) 82%, white);
    box-shadow: 0 0 28px color-mix(in srgb, var(--primary) 48%, transparent);
    transform: translateY(-2px);
}

/* CTA opcional en púrpura (contraste con el cian por defecto) */
.btn-glow--accent {
    background-color: var(--accent);
    box-shadow: 0 0 22px color-mix(in srgb, var(--accent) 34%, transparent);
}

.btn-glow--accent:hover {
    background-color: color-mix(in srgb, var(--accent) 86%, white);
    box-shadow: 0 0 30px color-mix(in srgb, var(--accent) 50%, transparent);
}

.btn-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, white 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.btn-glow:hover::before {
    opacity: 0.1;
}

/* Ripple Effect */
.ripple::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-anim 600ms linear;
    pointer-events: none;
}

/* Hero Section */
.hero {
    position: relative;
    /* svh = altura estable con la barra de Safari visible; dvh al ocultarse/mostrarse la barra recalcula y “salta” el layout en vertical */
    min-height: 92vh;
    min-height: 92svh;
    padding-top: 90px;
    padding-bottom: 5.5rem;
    display: flex;
    align-items: center;
    background-color: var(--bg-hero);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.hero-bg picture {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
}

.hero-bg__media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /*
      object-position: HORIZONTAL VERTICAL;  (dos valores, normalmente en %)

      Primer valor — IZQUIERDA / DERECHA de la foto:
        0%   → enfatiza el lado IZQUIERDO de la imagen original.
        50%  → centro en horizontal.
        100% → enfatiza el lado DERECHO.
        Si “te falta” ver lo que está a la derecha del encuadre, SUBE este número (p. ej. 55 → 75).

      Segundo valor — ARRIBA / ABAJO de la foto:
        0%   → enfatiza la parte ALTA (cielo, horizonte arriba).
        50%  → centro en vertical.
        100% → enfatiza la parte BAJA (suelo, agua abajo).
        Si quieres bajar un poco el encuadre dentro de la foto, SUBE este número.

      Con object-fit: cover la imagen siempre llena el bloque; esto solo elige qué trozo se recorta.
    */
    object-position: center left;
    display: block;
    transform-origin: left center;
    will-change: transform;
    animation: zoomInOut 20s ease-in-out infinite alternate;
}

/* Móvil/táctil: la animación infinita en el fondo provoca scroll entrecortado y “saltos” */
@media (hover: none) and (pointer: coarse) {
    .hero-bg__media {
        animation: none;
        will-change: auto;
        transform: none;
    }

    /* Sin reveals al scroll: menos capas/compositor y menos choque con scroll anchoring en Safari */
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    /* backdrop-filter en cabecera fija es muy caro al scroll en iOS y refuerza tirones */
    .header {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: color-mix(in srgb, var(--bg-hero) 90%, transparent);
    }

    .header.scrolled {
        background: color-mix(in srgb, var(--bg-hero) 96%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-bg__media {
        animation: none;
        will-change: auto;
        transform: none;
    }

    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Tablet/móvil: el hero crece al apilar badge + vídeo; sin esto `cover` ampliaba la foto.
   Se fija la altura de la foto a la del hero original (92svh) anclada arriba y se funde por abajo. */
@media (max-width: 1024px) {
    .hero {
        padding-top: 115px;
    }

    .hero-bg .hero-bg__media {
        height: 100%;
        -webkit-mask-image: none;
        mask-image: none;
    }
}

@media (max-width: 768px) {
    .hero-bg__media {
        /* Prueba pares tipo 65% 35% o 80% 30% hasta que en tablet/móvil se vea la zona que quieres */
        object-position: 70% 28%;
        /* La foto no lleva opacity; damos un poco más de luz al píxel (el velo oscuro va aparte en .hero-overlay) */
        filter: brightness(1.12) saturate(1.04);
    }
}

@media (max-width: 420px) {
    .hero-bg__media {
        /* Móvil muy estrecho: a veces hace falta más % en horizontal (más a la “derecha” de la foto) */
        object-position: 50% 24%;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.btn-outline {
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: color-mix(in srgb, var(--primary) 18%, transparent);
    border-color: color-mix(in srgb, var(--primary) 65%, white) !important;
    box-shadow: 0 0 20px color-mix(in srgb, var(--primary) 26%, transparent);
    transform: translateY(-2px);
}

.btn-outline--on-dark {
    border: 1px solid color-mix(in srgb, var(--text-light) 32%, transparent);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-outline--on-dark:hover {
    border-color: color-mix(in srgb, var(--text-light) 55%, transparent);
    color: white;
}

.hero-container {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(1.5rem, 3.5vw, 3.5rem);
    width: 100%;
}

/* Pantallas anchas: el hero usa un contenedor más ancho que el resto de secciones (texto más a la izquierda) */
@media (min-width: 1341px) {
    .hero-container {
        max-width: 1300px;
        padding-inline: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 3;
    padding-top: 1rem;
    text-align: left;
    flex: 1 1 60%;
    max-width: 660px;
    margin-left: 0;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.eyebrow-line {
    width: 2rem;
    height: 1px;
    background-color: var(--primary);
}

.eyebrow-text {
    margin: 0;
    line-height: inherit;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    white-space: nowrap;
}


.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    font-weight: 400;
    color: white;
    line-height: 1;
    letter-spacing: 0.02em;
    margin-bottom: 1rem;
    text-transform: uppercase;
    text-shadow: 0 2px 24px rgba(3, 11, 24, 0.55), 0 1px 3px rgba(3, 11, 24, 0.8);
    white-space: nowrap;
}

.text-primary {
    color: var(--primary);
}

.text-accent {
    color: var(--accent);
}

.accent-phrase-container {
    margin-bottom: 2rem;
}

.accent-phrase {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(0.9rem, 1.85vw, 1.28rem);
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

@media (min-width: 480px) {
    .hero .accent-phrase {
        white-space: nowrap;
    }
}

.accent-line-container {
    width: 280px;
    max-width: 100%;
    height: 2px;
}

.accent-line {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 28%, transparent));
    border-radius: 9999px;
    transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-overlay--gradient {
    /* Oscuro detrás del bloque de texto (izquierda) */
    background:
        radial-gradient(ellipse 95% 120% at 8% 42%,
            rgba(3, 11, 24, 0.90) 0%,
            rgba(3, 11, 24, 0.48) 42%,
            rgba(3, 11, 24, 0.16) 66%,
            rgba(3, 11, 24, 0) 80%);
}

@media (max-width: 768px) {
    .hero-overlay--gradient {
        /* Velo suave en móvil: contraste para el texto superior sin tapar la piscina */
        background: radial-gradient(ellipse 120% 90% at 10% 15%,
                rgba(3, 11, 24, 0.68) 0%,
                rgba(3, 11, 24, 0.30) 38%,
                rgba(3, 11, 24, 0.06) 68%,
                rgba(3, 11, 24, 0) 90%);
    }
}

.hero-body {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    color: var(--text-light);
    max-width: 36rem;
    line-height: 1.625;
    text-shadow: 0 1px 18px rgba(3, 11, 24, 0.65);
}

/* Distintivo Certificado Renolit Alkorplan */
.hero-renolit-badge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.15rem;
    margin-top: 1.35rem;
    margin-bottom: 0.25rem;
    padding: 0.8rem 1.25rem;
    background: linear-gradient(135deg, rgba(6, 18, 36, 0.88) 0%, rgba(12, 34, 62, 0.78) 100%);
    border: 1px solid rgba(56, 189, 248, 0.38);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 12px 30px rgba(3, 11, 24, 0.6), 0 0 25px rgba(56, 189, 248, 0.14);
    max-width: 540px;
    width: 100%;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.hero-renolit-badge:hover {
    border-color: rgba(56, 189, 248, 0.7);
    border-left-color: var(--accent-soft);
    box-shadow: 0 16px 36px rgba(3, 11, 24, 0.7), 0 0 32px rgba(0, 210, 255, 0.25);
    transform: translateY(-2px);
}

.hero-renolit-logo-wrap {
    flex-shrink: 0;
    width: 60px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000000;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    overflow: hidden;
}

.hero-renolit-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.hero-renolit-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.hero-renolit-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-soft);
    line-height: 1.2;
    margin-bottom: 0.2rem;
}

.hero-renolit-check {
    width: 14px;
    height: 14px;
    stroke: var(--primary);
    flex-shrink: 0;
}

.hero-renolit-brand {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 0.2rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.hero-renolit-desc {
    font-family: var(--font-body);
    font-size: 0.84rem;
    color: rgba(226, 244, 255, 0.9);
    line-height: 1.35;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-renolit-action {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    margin-top: 0.5rem;
}

.hero-carnet-thumb-wrap {
    position: relative;
    width: 54px;
    height: 34px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(0, 210, 255, 0.38);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45);
    background: #000;
}

.hero-carnet-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.hero-carnet-zoom-icon {
    position: absolute;
    inset: 0;
    background: rgba(3, 11, 24, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.hero-renolit-badge:hover .hero-carnet-zoom-icon {
    opacity: 1;
}

.hero-renolit-badge:hover .hero-carnet-thumb {
    transform: scale(1.08);
}

.hero-carnet-label {
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary);
    white-space: nowrap;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.28);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.hero-renolit-badge:hover .hero-carnet-label {
    background: var(--primary);
    color: #030b18;
    border-color: var(--primary);
}

/* Vídeo pequeño flotante en el Hero (derecha) */
.hero-video-side {
    flex: 0 0 340px;
    max-width: 360px;
    width: 100%;
    margin-left: auto;
    align-self: flex-end;
    margin-bottom: 0.65rem;
}

.hero-video-box {
    background: linear-gradient(135deg, rgba(6, 18, 36, 0.88) 0%, rgba(12, 34, 62, 0.78) 100%);
    border: 1px solid rgba(56, 189, 248, 0.32);
    border-radius: 16px;
    padding: 0.85rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 20px 45px rgba(3, 11, 24, 0.7), 0 0 30px rgba(0, 210, 255, 0.12);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-video-box:hover {
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 24px 50px rgba(3, 11, 24, 0.8), 0 0 35px rgba(0, 210, 255, 0.22);
    transform: translateY(-3px);
}

.hero-video-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    padding: 0 0.2rem;
}

.hero-video-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-light);
}

.hero-video-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--primary);
    box-shadow: 0 0 8px var(--primary);
    animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.35;
        transform: scale(0.85);
    }
}

.hero-video-dur {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--accent-soft);
    letter-spacing: 0.05em;
}

.hero-video-card {
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #000000;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hero-video-card.video-youtube-facade.is-playing iframe {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    display: block;
}

.hero-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--primary) 92%, white);
    color: var(--bg-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 20px color-mix(in srgb, var(--primary) 70%, transparent);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.hero-video-card:hover .hero-play-btn {
    transform: scale(1.1);
    box-shadow: 0 0 28px var(--primary);
}

.hero-video-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.65rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent-soft);
    text-decoration: none;
    transition: color 0.2s ease, gap 0.2s ease;
}

.hero-video-footer:hover {
    color: #ffffff;
    gap: 0.6rem;
}

.hero-cta {
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
    gap: 1rem;
    margin-top: 1.75rem;
    flex-wrap: wrap;
}

.wave-divider {
    overflow: hidden;
    line-height: 0;
    margin-top: -2px;
    margin-right: -2px;
    width: calc(100% + 2px);
    position: relative;
    z-index: 1;
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 80px;
    transform: translateY(-1px);
}

.hero-wave-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 2;
    line-height: 0;
    pointer-events: none;
}

.hero-wave-divider svg {
    display: block;
    width: 100%;
    height: 80px;
}

/* Typography & Sections */
.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
    text-align: center;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
    -webkit-hyphens: none;
}

.text-light {
    color: var(--text-light) !important;
}

/* Services */
.services {
    padding: 0 0 2.5rem 0;
    background-color: var(--bg-alt-light);
}

.services-header {
    text-align: center;
    margin-bottom: 2.5rem;
    overflow: visible;
}

.services-eyebrow {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
    display: block;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.hero-eyebrow .eyebrow-text {
    white-space: nowrap;
}

.legal-page .header,
.error-page .header {
    background: color-mix(in srgb, var(--bg-hero) 94%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid color-mix(in srgb, var(--text-light) 6%, transparent);
}

.footer-centered {
    text-align: center;
}

.footer-centered>picture {
    display: block;
    margin: 0 auto 0.8rem;
}

.footer-centered-logo {
    height: 46px;
    width: auto;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
}

.footer-centered-company {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.footer-centered-tagline {
    color: rgba(255, 255, 255, 0.72);
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.footer-centered-contact {
    color: rgba(255, 255, 255, 0.68);
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.footer-centered-legal {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    margin-bottom: 0.85rem;
}

.services-intro {
    font-family: var(--font-body);
    color: var(--text-muted);
    max-width: 42rem;
    margin: 0 auto;
    font-size: 1rem;
    line-height: 1.625;
}

.services-intro.text-light {
    color: color-mix(in srgb, var(--text-light) 72%, transparent);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1280px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.service-card {
    background: #FFFFFF;
    border-radius: 1rem;
    border-top: 3px solid transparent;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
    display: flex;
    flex-direction: column;
}

/* Enlace invisible: misma apariencia que la tarjeta, solo cursor al pasar */
a.service-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px color-mix(in srgb, var(--primary) 14%, transparent);
    border-top-color: color-mix(in srgb, var(--primary) 65%, var(--text-dark));
}

.card-image-wrapper {
    position: relative;
    height: 13rem;
    overflow: hidden;
}

.card-image-wrapper>picture {
    display: block;
    width: 100%;
    height: 100%;
}

/*
  Acabados / coronación: mismo alto que el resto (.card-image-wrapper). Encuadre al borde agua–piedra–terraza.
*/
.card-image-wrapper--stone-vertical .card-image,
.card-image-wrapper--stone-vertical picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 78%;
    transform: none;
    transition: transform 0.65s ease, object-position 0.45s ease;
}

.service-card:hover .card-image-wrapper--stone-vertical .card-image,
.service-card:hover .card-image-wrapper--stone-vertical picture img {
    transform: scale(1.045);
    object-position: 50% 72%;
}

.card-image-wrapper--stone-vertical .card-gradient {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.38), transparent 52%);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.service-card:hover .card-image {
    transform: scale(1.05);
}

.card-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
}

.card-icon-container {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
}

.card-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: white;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-subtitle {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
    line-height: 1.35;
    color: var(--primary);
}

.service-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--bg-hero);
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.service-desc {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.625;
    margin-bottom: 1.25rem;
}

.service-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: color-mix(in srgb, var(--text-dark) 72%, #64748b);
}

.check-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
    color: var(--primary);
}

.testimonial-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.testimonial-card__head .stars {
    color: var(--primary);
    font-size: 1.45rem;
    line-height: 1;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.testimonial-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(0.8rem, 2.4vw, 1rem);
    color: var(--bg-hero);
    text-align: right;
    line-height: 1.25;
    margin: 0;
    flex: 1;
    min-width: 0;
}

.testimonial-card .testimonial-text {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-dark);
    margin: 0;
}

.list-text {
    font-family: var(--font-body);
}

/* Why Us Section */
.why-us {
    padding: 0 0 2.5rem 0;
    background-color: var(--bg-alt-dark);
    position: relative;
}

.why-us-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .why-us-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.glass-card {
    background: color-mix(in srgb, var(--bg-alt-light) 94%, var(--text-dark) 6%);
    border: 1px solid color-mix(in srgb, var(--text-dark) 10%, transparent);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    background: color-mix(in srgb, var(--bg-alt-light) 92%, var(--text-dark) 8%);
    border-color: color-mix(in srgb, var(--primary) 22%, transparent);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--primary) 12%, transparent);
}

.glass-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    background: color-mix(in srgb, var(--primary) 18%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.glass-icon svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.glass-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.glass-desc {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.625;
}

.cta-strip {
    background: color-mix(in srgb, var(--bg-alt-light) 94%, var(--text-dark) 6%);
    border: 1px solid color-mix(in srgb, var(--text-dark) 10%, transparent);
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 768px) {
    .cta-strip {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
    }
}

.cta-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--bg-hero);
    margin-bottom: 0.25rem;
}

.cta-desc {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.cta-strip--inverse .cta-title {
    color: var(--text-light);
}

.cta-strip--inverse .cta-desc {
    color: color-mix(in srgb, var(--text-light) 52%, transparent);
}

.cta-btn {
    white-space: nowrap;
    flex-shrink: 0;
}

.cta-strip--inverse {
    background: var(--bg-alt-dark);
    border: 1px solid color-mix(in srgb, var(--primary) 28%, transparent);
}

/* Gallery (Before / After) */
.gallery {
    padding: 0 0 2.5rem 0;
    background-color: var(--bg-alt-light);
    position: relative;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.gallery-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

.gallery-tab {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.65rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid color-mix(in srgb, var(--text-dark) 14%, transparent);
    background: color-mix(in srgb, var(--bg-alt-light) 92%, var(--text-dark) 8%);
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.gallery-tab:hover {
    color: var(--text-dark);
    border-color: color-mix(in srgb, var(--primary) 35%, transparent);
}

.gallery-tab.is-active {
    color: white;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: var(--glow);
}

.gallery-panel {
    display: none;
}

.gallery-panel.is-active {
    display: block;
}

.gallery-photo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .gallery-photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gallery-photo-card {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--bg-alt-dark);
}

.gallery-photo-frame {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--bg-alt-dark);
}

.gallery-photo-frame picture {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    transition: transform 0.45s ease;
}

.gallery-photo-card:hover .gallery-photo {
    transform: scale(1.03);
}

/* Cubiertas: fotos panorámicas 16:9 — ancho completo, sin recorte ni marco */
.gallery-photo-grid--landscape .gallery-photo-frame {
    aspect-ratio: auto;
    height: auto;
    background: transparent;
}

.gallery-photo-grid--landscape .gallery-photo-frame picture {
    height: auto;
}

.gallery-photo-grid--landscape .gallery-photo {
    width: 100%;
    height: auto;
    object-fit: unset;
    vertical-align: middle;
}

.gallery-photo-grid--landscape .gallery-photo-card {
    background: transparent;
    box-shadow: var(--shadow);
}

.gallery-photo-grid--landscape .gallery-photo-card:hover .gallery-photo {
    transform: scale(1.02);
}

.gallery-photo-caption {
    padding: 1.5rem;
    text-align: left;
}

.gallery-photo-title {
    font-family: var(--font-heading);
    font-weight: 700;
    color: white;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.gallery-photo-desc {
    font-family: var(--font-body);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.gallery-cta {
    padding-bottom: 0.5rem;
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.wave-top {
    bottom: auto;
    top: -1px;
    transform: rotate(180deg);
}

.wave-top svg {
    fill: var(--bg-alt-dark);
    animation: wave-move 12s linear infinite alternate-reverse;
}

.ba-slider {
    position: relative;
    width: 100%;
    margin: 0 auto;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    background-color: var(--bg-alt-dark);
    display: flex;
    flex-direction: column;
}

.ba-slider>div:not(.ba-slider-container) {
    flex: 1 1 auto;
}

.ba-slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    cursor: ew-resize;
}

.ba-labels {
    position: absolute;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 20;
    user-select: none;
    -webkit-user-select: none;
}

.label-before,
.label-after {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    color: white;
}

.label-before {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.label-after {
    background: var(--primary);
}

.ba-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.before-wrapper {
    width: 50%;
    overflow: hidden;
    border-right: 2px solid var(--primary);
    pointer-events: none;
    will-change: width;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.before {
    width: 1000px;
    /* Should match max-width of slider approx */
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background-color: var(--primary);
    cursor: ew-resize;
    transform: translateX(-50%);
    z-index: 10;
    box-shadow: var(--glow);
    user-select: none;
    -webkit-user-select: none;
    will-change: left;
}

.ba-handle-arrows {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: var(--bg-hero);
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--glow);
}

.ba-handle-arrows::before,
.ba-handle-arrows::after {
    content: "";
    border: solid var(--text-light);
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: 3px;
}

.ba-handle-arrows::before {
    transform: rotate(135deg);
    margin-right: 4px;
}

.ba-handle-arrows::after {
    transform: rotate(-45deg);
    margin-left: 4px;
}

/* Videos Masonry */
.videos {
    padding: 8rem 0;
    background-color: var(--bg-alt-dark);
}

.video-masonry {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.video-card {
    background: #000;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 210, 255, 0.2);
    border-color: rgba(0, 210, 255, 0.4);
}

.main-video {
    aspect-ratio: 16 / 9;
    width: 100%;
    min-height: 0;
}

.video-embed-card,
.video-youtube-facade {
    display: block;
    background: #000;
}

.video-youtube-facade {
    cursor: pointer;
}

.video-youtube-facade.is-playing {
    cursor: default;
}

.video-youtube-facade.is-playing iframe {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000;
    display: block;
}

.video-embed-card iframe {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000;
    display: block;
}

.video-embed-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: linear-gradient(180deg,
            color-mix(in srgb, var(--bg-alt-dark) 35%, transparent),
            color-mix(in srgb, var(--bg-alt-dark) 88%, transparent));
}

.side-video {
    aspect-ratio: 9 / 16;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    min-height: 0;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: filter 0.5s ease;
    filter: brightness(0.75);
}

.video-card:hover .video-thumbnail {
    filter: brightness(0.9);
}

.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    pointer-events: none;
}

.side-video .video-play-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.play-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 20px color-mix(in srgb, var(--primary) 40%, transparent);
    transition: transform 0.3s ease, background 0.3s ease;
    pointer-events: auto;
}

.main-video .play-btn {
    width: 80px;
    height: 80px;
}

.play-btn:hover {
    transform: scale(1.1);
    background: white;
    color: var(--primary);
}

.video-title {
    color: white;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.main-video .video-title {
    font-size: 2rem;
}

.video-embed-meta .video-title {
    transform: none;
    margin: 0;
    font-size: 1.35rem;
}

.video-card:hover .video-title {
    transform: translateY(0);
}

/* Video Modal */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2;
}

.video-modal-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.video-modal-content {
    width: min(92vw, 1200px);
    max-width: 1200px;
    max-height: min(85vh, 90dvh);
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.video-modal.active .video-modal-content {
    transform: scale(1);
}

#videoContainer {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

#videoContainer iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: none;
    display: block;
}

#videoContainer video {
    width: 100%;
    height: auto;
    max-height: min(85vh, 90dvh);
    object-fit: contain;
    object-position: center;
    border: none;
    display: block;
    background: #000;
}

.video-modal-content.is-portrait {
    width: min(92vw, 400px);
    max-width: 400px;
}

.video-modal-content.is-portrait #videoContainer iframe {
    aspect-ratio: 9 / 16;
    max-height: min(85vh, 90dvh);
}

/* Modal Carnet Oficial */
.carnet-modal {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.carnet-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.carnet-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 11, 24, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.carnet-modal-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 580px;
    background: linear-gradient(160deg, rgba(13, 27, 49, 0.98) 0%, rgba(6, 16, 32, 0.98) 100%);
    border: 1px solid rgba(0, 210, 255, 0.35);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), 0 0 50px rgba(0, 210, 255, 0.2);
    padding: 2rem 2.25rem 1.85rem;
    transform: scale(0.92) translateY(12px);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.carnet-modal.active .carnet-modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.carnet-modal-close {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.carnet-modal-close:hover {
    background: rgba(0, 210, 255, 0.2);
    border-color: var(--primary);
    transform: rotate(90deg);
}

.carnet-modal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: var(--font-heading);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    background: rgba(0, 210, 255, 0.1);
    border: 1px solid rgba(0, 210, 255, 0.25);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.65rem;
}

.carnet-modal-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.35rem;
    letter-spacing: -0.01em;
}

.carnet-modal-subtitle {
    font-family: var(--font-body);
    font-size: 0.85rem;
    color: rgba(226, 244, 255, 0.75);
    margin: 0 0 1.25rem;
}

.carnet-modal-img-wrap {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    background: #000;
}

.carnet-modal-img {
    width: 100%;
    height: auto;
    display: block;
}

.carnet-modal-footer {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
    margin-top: 1.25rem;
    padding-top: 1.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.carnet-info-item {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.carnet-info-label {
    font-family: var(--font-heading);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.55);
}

.carnet-info-val {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
}

.carnet-info-val.carnet-code {
    color: #ffffff;
    font-family: monospace;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

.carnet-info-val.carnet-valid {
    color: #ffffff;
}

/* Footer */
.footer {
    background-color: var(--bg-hero);
    padding: 3rem 0;
    text-align: center;
    color: rgba(226, 244, 255, 0.5);
    font-family: var(--font-mono);
}

.larc-link {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: color 0.3s ease;
}

.larc-link:hover {
    color: #ffffff;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Debajo del hero: sin escalonado largo (index tenía delays hasta 0.5s → sensación de bloque “tardío”) */
.services .reveal,
.why-us .reveal,
.gallery .reveal,
.videos .reveal,
.testimonios .reveal,
.contacto .reveal {
    transition: opacity 0.12s ease-out, transform 0.12s ease-out;
    transition-delay: 0s !important;
    transform: translateY(10px);
}

.services .reveal.active,
.why-us .reveal.active,
.gallery .reveal.active,
.videos .reveal.active,
.testimonios .reveal.active,
.contacto .reveal.active {
    transform: translateY(0);
}

/* Split Text Animation Classes */
.char {
    display: inline-block;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s cubic-bezier(0.25, 1, 0.5, 1), transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.char.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .video-masonry {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }

    .side-video {
        max-width: 100%;
    }
}

/* Scroll to Top Button */
.go-top {
    position: fixed;
    bottom: 9.2rem;
    right: var(--fab-right);
    width: var(--fab-size);
    height: var(--fab-size);
    background-color: var(--bg-alt-light);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* Por encima del banner de cookies (1200) */
    z-index: 1250;
    transition: all 0.3s ease;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
}

.go-top.visible {
    opacity: 0.8;
    pointer-events: auto;
    transform: translateY(0);
}

html.nav-menu-open,
body.nav-menu-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.nav-menu-open .go-top,
body.nav-menu-open .go-top.visible {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateY(12px) !important;
}

.go-top:hover {
    background-color: white;
    color: var(--primary);
    transform: translateY(-3px);
    opacity: 1;
}

.whatsapp-float {
    right: var(--fab-right) !important;
    bottom: 4.8rem !important;
    width: var(--fab-size) !important;
    height: var(--fab-size) !important;
    z-index: 1250 !important;
}

/* Nav Dropdown */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-arrow {
    display: inline-block;
    transition: transform 0.25s ease;
    margin-left: 0.35rem;
    vertical-align: middle;
}

.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.footer-centered-legal a+a::before {
    content: "|";
    color: rgba(255, 255, 255, 0.45);
    margin-right: 0.8rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: color-mix(in srgb, var(--bg-hero) 94%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--text-light) 10%, transparent);
    border-radius: 0.75rem;
    min-width: 340px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 100;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 0.875rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.dropdown-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
    padding-left: 1.75rem;
}

@keyframes zoomInOut {
    from {
        transform: scale(1);
    }

    to {
        /* Zoom suave: 1.1 recortaba mucho y “bailaba” la imagen */
        transform: scale(1.035);
    }
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    align-items: center;
    justify-content: center;
    min-width: 2.75rem;
    min-height: 2.75rem;
    border-radius: 0.375rem;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 110;
}

.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: color-mix(in srgb, var(--bg-hero) 55%, transparent);
    z-index: 90;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.nav-overlay.active {
    display: block;
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: clamp(2.35rem, 4.2vw, 4.35rem);
    }
}

@media (max-width: 1024px) {
    .hero {
        min-height: auto !important;
        padding-bottom: 7rem !important;
    }

    .hero-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start !important;
        gap: 0;
    }

    .hero-content {
        display: contents !important;
    }

    .hero-eyebrow {
        order: 1;
        width: 100%;
    }

    .hero-title {
        order: 2;
        width: 100%;
    }

    .accent-phrase-container {
        order: 3;
        width: 100%;
    }

    .hero-body {
        order: 4;
        width: 100%;
        max-width: 100%;
    }

    .hero-renolit-badge {
        order: 5;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 0.65rem 0.95rem;
        margin-top: 0.75rem;
        margin-bottom: 0.5rem;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .hero-renolit-logo-wrap {
        width: 44px !important;
        height: 42px !important;
        flex-shrink: 0;
    }

    .hero-renolit-status {
        font-size: 0.68rem !important;
        margin-bottom: 0.08rem !important;
        line-height: 1.15 !important;
    }

    .hero-renolit-brand {
        font-size: 0.95rem !important;
        margin-bottom: 0.08rem !important;
        line-height: 1.15 !important;
    }

    .hero-renolit-desc {
        font-size: 0.73rem !important;
        line-height: 1.25 !important;
    }

    .hero-renolit-action {
        gap: 0.45rem;
    }

    .hero-carnet-thumb-wrap {
        width: 46px;
        height: 29px;
    }

    .hero-carnet-label {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }

    /* Vídeo alineado a la izquierda */
    .hero-video-side {
        order: 6;
        flex: 0 0 auto !important;
        width: 100%;
        max-width: 22rem;
        margin-inline: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem !important;
        align-self: flex-start !important;
        box-sizing: border-box;
    }

    .hero-video-box {
        padding: 0.45rem 0.55rem !important;
        border-radius: 12px;
    }

    .hero-video-top {
        margin-bottom: 0.2rem !important;
        padding: 0 0.15rem !important;
    }

    .hero-video-tag {
        font-size: 0.68rem !important;
    }

    .hero-video-dur {
        font-size: 0.65rem !important;
    }

    .hero-video-card {
        aspect-ratio: 16 / 9 !important;
        width: 100% !important;
        border-radius: 8px;
    }

    .hero-video-card .video-thumbnail {
        aspect-ratio: 16 / 9 !important;
        object-fit: cover !important;
    }

    .hero-play-btn {
        width: 38px !important;
        height: 38px !important;
    }

    .hero-play-btn svg {
        width: 16px !important;
        height: 16px !important;
    }

    .hero-video-footer {
        margin-top: 0.25rem !important;
        padding-top: 0.25rem !important;
        font-size: 0.72rem !important;
    }

    .hero-cta {
        order: 7;
        flex: 0 0 auto !important;
        width: 100%;
        margin-top: 0.25rem !important;
    }

    .hero-eyebrow .eyebrow-line {
        display: none;
    }

    .hero-eyebrow {
        flex-wrap: wrap;
        row-gap: 0.35rem;
        gap: 0;
    }

    .hero .eyebrow-text {
        white-space: normal;
        text-shadow: 0 1px 12px rgba(3, 11, 24, 0.95), 0 2px 4px rgba(3, 11, 24, 0.9);
    }

    .hero-cta {
        flex-wrap: wrap;
        width: 100%;
        max-width: 100%;
    }

    .hero-cta .btn-glow,
    .hero-cta .btn-outline--on-dark {
        min-height: 2.75rem;
        min-width: 0;
        flex: 1 1 calc(50% - 0.5rem);
        max-width: 100%;
        justify-content: center;
        white-space: normal;
        text-align: center;
        box-sizing: border-box;
    }

    .mobile-menu-toggle {
        display: inline-flex !important;
    }

    .header-container {
        justify-content: space-between;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: color-mix(in srgb, var(--bg-hero) 94%, transparent);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid color-mix(in srgb, var(--text-light) 10%, transparent);
        display: none;
    }

    .nav.active {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        max-height: calc(100vh - 4.75rem);
        max-height: calc(100svh - 4.75rem - env(safe-area-inset-bottom, 0px));
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 2rem;
    }

    .nav .nav-link {
        width: 100%;
        max-width: 22rem;
        justify-content: center;
        min-height: 2.75rem;
    }

    .nav-dropdown {
        width: 100%;
        max-width: 22rem;
        display: block;
    }

    .nav-dropdown>.nav-link {
        width: 100%;
        justify-content: center;
        gap: 0;
    }

    /* Fila dedicada: centra el botón en Safari/WebKit (evita desvío a la izquierda del solo flex-item) */
    .nav-cta-wrap {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        max-width: 22rem;
        align-self: center;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }

    .nav-cta-wrap .nav-cta-mobile,
    .nav-cta-wrap .btn-glow.nav-cta-mobile {
        margin: 0 !important;
        width: 100%;
        max-width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        padding-inline: 1.25rem;
        white-space: nowrap;
        text-align: center;
    }

    .nav-dropdown {
        width: 100%;
        max-width: 22rem;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .nav-dropdown>.nav-link {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        cursor: pointer;
        user-select: none;
    }

    .nav-dropdown .dropdown-arrow {
        display: inline-block !important;
        transition: transform 0.3s ease;
    }

    .nav-dropdown.open .dropdown-arrow {
        transform: rotate(180deg);
    }

    .dropdown-menu {
        margin-top: 0.35rem;
        margin-left: 0;
        width: 100%;
    }

    .nav-dropdown .dropdown-menu {
        position: static !important;
        transform: none !important;
        left: auto !important;
        top: auto !important;
        min-width: 0 !important;
        width: 100% !important;
        max-width: 22rem;
        margin: 0;
        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        max-height: 0;
        opacity: 0;
        visibility: hidden !important;
        overflow: hidden;
        pointer-events: none;
        transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease, margin 0.3s ease;
    }

    .nav-dropdown:hover .dropdown-menu {
        transform: none !important;
    }

    .nav-dropdown.open .dropdown-menu,
    .nav-dropdown.open:hover .dropdown-menu {
        max-height: 500px;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto;
        margin-top: 0.65rem;
        margin-bottom: 0.35rem;
        gap: 0.45rem;
    }

    .nav-dropdown .dropdown-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 19rem;
        padding: 0.55rem 0.75rem;
        font-size: 1rem;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.72);
        text-align: center;
        white-space: normal;
        border-radius: 0.5rem;
        line-height: 1.35;
        transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
    }

    .nav-dropdown .dropdown-link:hover,
    .nav-dropdown .dropdown-link:active {
        background: rgba(0, 210, 255, 0.08);
        color: var(--primary, #00d2ff);
        padding-left: 0.75rem;
        transform: scale(1.02);
    }
}

@media (max-width: 1024px) and (orientation: landscape) {

    .nav-cta-wrap .nav-cta-mobile,
    .nav-cta-wrap .btn-glow.nav-cta-mobile {
        min-height: 3.1rem;
        padding-top: 0.7rem;
        padding-bottom: 0.7rem;
    }
}

@media (max-width: 640px) {
    .video-masonry {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.85rem;
    }

    .side-video {
        max-width: 100%;
        margin-inline: 0;
    }

    .hero-renolit-badge {
        display: flex;
        flex-wrap: wrap;
        gap: 0.65rem 0.85rem;
        padding: 0.75rem 0.95rem;
        margin-top: 0.6rem;
        margin-bottom: 0.4rem;
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .hero-renolit-logo-wrap {
        width: 44px;
        height: 42px;
        flex-shrink: 0;
        margin-top: 0.5rem;
    }

    .hero-renolit-text {
        flex: 1 1 0%;
        min-width: 0;
    }

    .hero-renolit-status {
        font-size: 0.68rem;
        line-height: 1.15;
        margin-bottom: 0.08rem;
    }

    .hero-renolit-brand {
        font-size: 0.95rem;
        line-height: 1.15;
        margin-bottom: 0.08rem;
    }

    .hero-renolit-desc {
        font-size: 0.73rem;
        line-height: 1.25;
    }

    .hero-renolit-action {
        gap: 0.55rem;
        margin-top: 0.35rem;
    }

    .hero-carnet-thumb-wrap {
        width: 46px;
        height: 29px;
    }

    .hero-carnet-label {
        display: inline-block;
        font-size: 0.68rem;
        padding: 0.22rem 0.55rem;
    }

    .hero-carnet-zoom-icon {
        opacity: 0.85;
        background: rgba(3, 11, 24, 0.4);
    }

    .hero-video-side {
        flex: 0 0 auto !important;
        width: 100%;
        max-width: 22rem;
        margin-inline: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-top: 0.4rem;
        margin-bottom: 0.5rem !important;
        align-self: flex-start !important;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: clamp(1.7rem, 6.2vw, 2.85rem);
        line-height: 1.2;
        margin-bottom: 1.35rem;
        padding-inline: 0.35rem;
        box-sizing: border-box;
    }

    .container {
        padding: 0 1rem;
    }

    .hero {
        min-height: auto !important;
        padding-top: 115px;
        padding-bottom: 7rem !important;
    }

    .hero-content {
        padding-top: 0.5rem;
        margin-left: 0 !important;
        max-width: 100% !important;
        padding-right: 0.5rem;
    }

    .video-embed-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .video-embed-meta .video-title {
        font-size: 1.1rem;
    }

    .video-embed-card iframe {
        min-height: 220px;
    }

    .hero-title {
        font-size: clamp(2rem, 10vw, 3.4rem) !important;
    }

    .hero-body {
        max-width: 100%;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
        gap: 0.65rem !important;
        margin-top: 0.25rem !important;
    }

    .hero-cta .btn-glow,
    .hero-cta .btn-outline--on-dark {
        width: 100%;
        max-width: 22rem;
        box-sizing: border-box;
    }

    .hero-eyebrow {
        margin-bottom: 1rem;
    }

    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .contact-form-container {
        order: 1;
        width: 100%;
    }

    .contact-content {
        order: 2;
        width: 100%;
    }

    .contact-form input:not([type="checkbox"]),
    .contact-form textarea {
        min-height: 2.75rem !important;
    }

    .contact-form textarea {
        min-height: 6.5rem !important;
    }

    .contact-form,
    .contact-content>div {
        width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .go-top {
        right: var(--fab-right);
        bottom: 9.6rem;
    }

    .whatsapp-float {
        right: var(--fab-right) !important;
        bottom: 5rem !important;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.9rem !important;
    }

    .footer-copy {
        width: 100%;
    }

    .footer-legal-links {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.65rem 1rem !important;
        justify-content: flex-start;
    }
}

/*
  Giro a horizontal en móvil: la anchura suele ser >768px, así que el bloque de arriba no basta.
  Viewport “bajo” (max-height) = típico teléfono apaisado. dvh/svh se actualizan al rotar (mejor que vh solo).
*/
@media (orientation: landscape) and (max-height: 520px) {
    .hero {
        min-height: unset !important;
        min-height: auto !important;
        padding-top: max(115px, calc(95px + env(safe-area-inset-top, 0px))) !important;
        padding-bottom: 2.25rem !important;
        align-items: flex-start !important;
        overflow: visible !important;
    }

    .hero-bg__media {
        object-position: 52% 40%;
        filter: brightness(1.12) saturate(1.04);
    }

    .hero-content {
        padding-top: clamp(0.5rem, 2.5vmin, 1rem);
        padding-bottom: 1.25rem;
    }

    .hero-eyebrow {
        margin-bottom: 0.35rem;
    }

    .hero-title {
        margin-bottom: 0.35rem !important;
        font-size: clamp(1.35rem, 7vw, 2.35rem) !important;
    }

    .accent-phrase-container {
        margin-bottom: 0.5rem !important;
    }

    .accent-phrase {
        font-size: clamp(0.78rem, 2.8vw, 1rem) !important;
    }

    .hero-body {
        font-size: 0.8125rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.25rem !important;
    }

    .hero-cta {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        gap: 0.45rem 0.6rem !important;
        margin-top: 0.5rem !important;
        width: 100%;
        max-width: min(40rem, 100%);
    }

    .hero-cta .btn-glow,
    .hero-cta .btn-outline--on-dark {
        flex: 1 1 calc(50% - 0.35rem) !important;
        min-width: min(11rem, 42vw) !important;
        width: auto !important;
        max-width: none !important;
        white-space: normal !important;
        font-size: 0.8125rem !important;
        padding: 0.55rem 0.85rem !important;
        line-height: 1.25;
        margin-bottom: env(safe-area-inset-bottom, 0px);
    }
}

.footer-contact-row {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.25rem 0;
    color: rgba(255, 255, 255, 0.78);
}

.footer-contact-row+.footer-contact-row {
    margin-top: 0.45rem;
    margin-left: 0.5rem;
}

.footer-contact-row svg {
    width: 16px;
    height: 16px;
    color: white;
    flex-shrink: 0;
}

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(41, 47, 56, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0;
    padding: 0.9rem 1rem;
    padding-bottom: max(0.9rem, env(safe-area-inset-bottom, 0px));
    z-index: 1200;
    color: rgba(255, 255, 255, 0.88);
    font-family: var(--font-body);
    font-size: 0.9rem;
    line-height: 1.45;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.cookie-banner-actions {
    margin-top: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 0.6rem;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
}

.cookie-btn {
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: transparent;
    color: white;
    border-radius: 0.5rem;
    padding: 0.45rem 0.8rem;
    font-size: 0.875rem;
    cursor: pointer;
}

@media (min-width: 900px) {
    .cookie-banner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding: 0.75rem 1.25rem;
    }
}

@media (max-width: 899px) {
    .cookie-banner {
        font-size: 0.875rem;
    }

    .cookie-banner-actions {
        width: 100%;
        justify-content: flex-start;
        margin-top: 0.55rem;
    }

    .cookie-btn {
        padding: 0.42rem 0.65rem;
        font-size: 0.82rem;
    }
}

.cookie-btn.accept {
    background: var(--primary);
    border-color: transparent;
}

/* Form Validation Error Styles */
.error-message {
    display: block;
    color: #ef4444;
    font-family: var(--font-body);
    font-size: 0.75rem;
    margin-top: 0.35rem;
    min-height: 1rem;
}

.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Formulario contacto: texto de campos un poco más grande */
/* Mapa contacto: carga anticipada + skeleton */
.map-embed {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    height: 16rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    background: color-mix(in srgb, var(--bg-alt-dark) 8%, #e8edf2);
}

.map-embed iframe {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.map-embed.is-loaded iframe {
    opacity: 1;
}

.map-skeleton {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(110deg,
            #e8edf2 8%,
            #f4f7fa 18%,
            #e8edf2 33%);
    background-size: 200% 100%;
    animation: map-shimmer 1.4s ease-in-out infinite;
}

.map-embed.is-loaded .map-skeleton {
    display: none;
}

@keyframes map-shimmer {
    to {
        background-position-x: -200%;
    }
}

.contact-form input:not([type="checkbox"]),
.contact-form textarea {
    color: var(--text-dark) !important;
    font-size: 1rem !important;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: var(--text-dark);
    opacity: 0.65;
    font-size: 0.95rem;
}

/* Móvil/tablet: la flecha iba por encima del overlay (z-index 1250); ocultar del todo con el menú */
@media (max-width: 1024px) {

    body.nav-menu-open .go-top,
    body.nav-menu-open .go-top.visible {
        display: none !important;
    }
}

/* Testimonios: una columna en móvil para leer bien nombre + texto */
@media (max-width: 640px) {
    .testimonials-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .testimonial-card {
        padding: 1.35rem !important;
    }

    .testimonial-name {
        font-size: 0.9rem;
    }
}

/* =====================================================
   PÁGINAS DE ERROR (404 Y 410)
   ===================================================== */
.error-page {
    background-color: var(--bg-hero);
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.error-hero {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(7.5rem + env(safe-area-inset-top, 0px)) 1.5rem 5rem;
    overflow: hidden;
    background: radial-gradient(circle at 50% 38%, color-mix(in srgb, var(--primary) 14%, transparent) 0%, rgba(3, 11, 24, 0) 65%);
}

.error-hero-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.15), transparent),
        radial-gradient(1px 1px at 70px 90px, rgba(56, 189, 248, 0.2), transparent);
    background-size: 100px 100px;
    opacity: 0.35;
}

.error-content {
    position: relative;
    z-index: 2;
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.error-code-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.1rem;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--primary) 14%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary) 32%, transparent);
    color: var(--accent-soft);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.error-code {
    font-family: var(--font-display);
    font-size: clamp(6.5rem, 18vw, 11rem);
    line-height: 0.9;
    letter-spacing: 0.04em;
    color: var(--text-light);
    text-shadow: 0 0 45px color-mix(in srgb, var(--primary) 45%, transparent);
    margin-bottom: 0.75rem;
    user-select: none;
}

.error-title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.25rem;
    line-height: 1.25;
}

.error-description {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 2.2vw, 1.2rem);
    color: color-mix(in srgb, var(--text-light) 82%, transparent);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.error-actions .btn-glow,
.error-actions .btn-outline {
    min-width: 210px;
    padding: 0.85rem 1.75rem;
}