/* ============================================
   HERBEPLAST LANDING - CSS BASE + DESKTOP
   desktop.css
   Archivo 1 de 3 (Desktop / Base compartida)
   ============================================ */

/* ============================================
   1. RESET Y BASE  (COMPARTIDO)
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 72px;
    overflow-x: hidden;
    /* Fix: reservar gutter de scrollbar para evitar empujón al abrir menú móvil */
    scrollbar-gutter: stable;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #706f6f;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 200ms ease-in-out;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ============================================
   2. VARIABLES (tokens de diseño)  (COMPARTIDO)
   ============================================ */

:root {
    /* Colores */
    --color-brand-blue: #0082c2;
    --color-brand-teal: #009ba8;
    --color-black: #000000;
    --color-gray: #706f6f;
    --color-gray-light: #e5e7eb;
    --color-gray-bg: #f9fafb;
    --color-white: #ffffff;

    /* Gradiente marca */
    --gradient-brand: linear-gradient(135deg, #0082c2 0%, #009ba8 100%);
    --gradient-aurora: linear-gradient(
            45deg,
            #0082c2,
            #009ba8,
            #00c2b8,
            #009ba8,
            #0082c2
    );

    /* Espaciado (escala 8px) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --space-9: 96px;
    --space-10: 120px;

    /* Tipografía - Desktop */
    --font-h1: 56px;
    --font-h2: 40px;
    --font-h3: 28px;
    --font-h4: 18px;
    --font-body-l: 18px;
    --font-body-m: 16px;
    --font-caption: 14px;

    /* Line heights */
    --line-height-tight: 1.3;
    --line-height-normal: 1.6;
    --line-height-relaxed: 1.8;

    /* Radios */
    --radius-base: 8px;
    --radius-large: 12px;

    /* Sombras */
    --shadow-base: 0 8px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 40px rgba(0, 130, 194, 0.3);

    /* Duraciones */
    --duration-fast: 150ms;
    --duration-normal: 200ms;
    --duration-slow: 300ms;
    --duration-slower: 400ms;

    /* Contenedor */
    --container-max: 1200px;
    --container-padding: 1rem;

    /* Z-index */
    --z-header: 100;
    --z-mobile-menu: 200;
    --z-whatsapp: 150;
    --z-tooltip: 999;
}

/* ============================================
   3. UTILIDADES GLOBALES  (COMPARTIDO)
   ============================================ */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

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

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

/* Skip Link */
.skip-link {
    position: absolute;
    left: 0;
    top: 0;
    transform: translateY(-200%);
    background: var(--color-brand-blue);
    color: var(--color-white);
    padding: var(--space-2) var(--space-4);
    z-index: 9999;
    border-radius: 0 0 var(--radius-base) 0;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

/* ============================================
   4. TIPOGRAFÍA  (COMPARTIDO)
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--color-black);
    line-height: var(--line-height-tight);
    font-weight: 700;
    margin-bottom: var(--space-4);
}

h1 {
    font-size: 32px;
    font-weight: 800;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 20px;
    font-weight: 600;
}

h4 {
    font-size: 16px !important;
    font-weight: 600;
}

p {
    margin-bottom: var(--space-4);
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: var(--space-4);
}

.section-subtitle {
    font-size: var(--font-body-l);
    color: var(--color-gray);
    margin-bottom: var(--space-6);
}

/* ============================================
   5. BOTONES CON EFECTOS  (COMPARTIDO)
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-weight: 600;
    border-radius: var(--radius-base);
    transition: all var(--duration-normal) ease-in-out;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn:focus-visible {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
}

/* Tamaños */
.btn-s {
    height: 36px;
    padding: 0 var(--space-4);
    font-size: 14px;
}

.btn-m {
    height: 44px;
    padding: 0 var(--space-5);
    font-size: var(--font-body-m);
}

.btn-l {
    height: 56px;
    padding: 0 var(--space-6);
    font-size: var(--font-body-l);
}

.btn-xl {
    height: 60px;
    padding: 0 var(--space-7);
    font-size: var(--font-body-l);
}

/* Variantes */
.btn-primary {
    background: var(--gradient-brand);
    color: var(--color-white);
    box-shadow: var(--shadow-base);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: var(--shadow-base);
}

/* Efecto glow para CTAs principales */
.btn-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%,
    100% {
        box-shadow: 0 8px 30px rgba(0, 130, 194, 0.2);
    }
    50% {
        box-shadow: 0 8px 40px rgba(0, 130, 194, 0.4);
    }
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-brand-teal);
    border: 2px solid var(--color-brand-teal);
}

.btn-secondary:hover {
    background: var(--color-brand-teal);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-base);
}

/* ============================================
   6. HEADER STICKY  (COMPARTIDO)
   ============================================ */

.header {
    position: sticky;
    top: 0;
    width: 100%;
    padding-top: 10px;
    height: 100px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: var(--z-header);
    transition: all var(--duration-normal) ease-in-out;
}

.header.solid {
    background: var(--color-white);
    box-shadow: var(--shadow-base);
}

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

.header-logo img {
    height: 48px;
    width: auto;
}

/* Navegación Desktop */
.header-nav {
    display: none;
}

.nav-menu {
    display: flex;
    gap: var(--space-6);
}

.nav-menu a {
    color: var(--color-black);
    font-weight: 500;
    font-size: 15px;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--color-brand-blue);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-brand-blue);
    transition: width var(--duration-normal) ease-in-out;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.header-cta {
    display: none;
}

/* Menu Toggle (Hamburguesa) */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    padding: var(--space-2);
}

.menu-toggle-icon {
    width: 24px;
    height: 2px;
    background: var(--color-black);
    position: relative;
    transition: all var(--duration-normal) ease-in-out;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--color-black);
    transition: all var(--duration-normal) ease-in-out;
}

.menu-toggle-icon::before {
    top: -7px;
}

.menu-toggle-icon::after {
    top: 7px;
}

.menu-toggle[aria-expanded='true'] .menu-toggle-icon {
    background: transparent;
}

.menu-toggle[aria-expanded='true'] .menu-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle[aria-expanded='true'] .menu-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Menu Móvil */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: var(--z-mobile-menu);
    visibility: hidden;
    opacity: 0;
    transition: all var(--duration-slow) ease-in-out;
}

.mobile-menu[aria-hidden='false'] {
    visibility: visible;
    opacity: 1;
}

.mobile-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.mobile-menu-panel {
    position: absolute;
    right: 0;
    top: 0;
    width: 80vw;
    max-width: 320px;
    height: 100vh;
    background: var(--color-white);
    padding: var(--space-6);
    transform: translateX(100%);
    transition: transform var(--duration-slow) ease-in-out;
}

.mobile-menu[aria-hidden='false'] .mobile-menu-panel {
    transform: translateX(0);
}

.mobile-menu-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--color-black);
}

.mobile-menu-list {
    margin-top: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.mobile-menu-list a {
    font-size: var(--font-body-l);
    font-weight: 600;
    color: var(--color-black);
    display: block;
    padding: var(--space-3) 0;
}

.mobile-menu-list a:hover {
    color: var(--color-brand-blue);
}

/* ============================================
   7. HERO SECTION - ALTURA AUTOMÁTICA SEGÚN IMAGEN
   ============================================ */

.hero {
    position: relative;
    width: 100%;
    /* 👇 CAMBIO CLAVE: Sin altura fija, se adapta al contenido */
    height: auto;
    display: block;
    /*align-items: center;
    justify-content: center;*/
    color: var(--color-white);
    overflow: hidden;
    padding-bottom: max(0px, env(safe-area-inset-bottom));
}


.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    box-shadow:
            inset 0 80px 60px -40px rgba(0, 130, 194, 0.4),
            inset 0 -80px 60px -40px rgba(0, 155, 168, 0.4);
}

/* 👇 CAMBIO: Background con los colores laterales */
.hero-background {
    position: relative;  /* 👈 RELATIVE, no absolute */
    width: 100%;
    /* Sin height definido, se adapta a la imagen */
    display: block;
    /*justify-content: center;
    align-items: center;*/
    background: linear-gradient(
            to right,
            #00283E 0%,
            #00283E 50%,
            #B4AA92 50%,
            #B4AA92 100%
    );
}

/* 👇 La imagen define el alto real del hero */
.hero-image {
    display: block;
    width: 100%;
    height: auto;           /* 👈 AUTO: la imagen define su propio alto */
    max-width: 2560px;      /* 👈 Ancho máximo de tu imagen */
    object-fit: contain;    /* 👈 CONTAIN: se ve completa */
    object-position: center;
    margin: 0 auto;
}

[data-parallax] .hero-image {
    transform: translateY(0);
    transition: none;
}

/* 👇 Overlay debe cubrir el hero completo */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-brand);
    opacity: 0.4;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.hero-aurora {
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: var(--gradient-aurora);
    opacity: 0;
    filter: blur(100px);
    animation: auroraMove 20s ease-in-out infinite;
    pointer-events: none;
}

.hero:hover .hero-aurora {
    opacity: 0.3;
}

@keyframes auroraMove {
    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(10%, -10%) rotate(120deg);
    }
    66% {
        transform: translate(-10%, 10%) rotate(240deg);
    }
}

/* 👇 Contenido debe estar posicionado sobre la imagen */
.hero-content {
    position: absolute;  /* 👈 ABSOLUTE para estar encima */
    inset: 0;           /* 👈 Ocupar todo el hero */
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-6) 0;
}

/* 👇 Container del contenido (limita ancho del texto) */
.hero-content .container {
    width: 100%;
    max-width: 1200px;
    padding: 0 var(--space-4);
    margin: 0 auto;
}

.hero-title {
    font-size: 32px;
    font-weight: 800;
    color: var(--color-white);
    margin-bottom: var(--space-4);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.1;
    animation: fadeInUp 600ms ease-in-out 200ms backwards;
}

.hero-subtitle {
    font-size: var(--font-body-l);
    color: var(--color-white);
    margin-bottom: var(--space-6);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    animation: fadeInUp 600ms ease-in-out 400ms backwards;
}

.hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 600ms ease-in-out 600ms backwards;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-white);
    z-index: 2;
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollBounce {
    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}



/* ============================================
   9. CARRUSEL COMPLETO Y CORREGIDO  (COMPARTIDO)
   ============================================ */

.sectores-section {
    padding: var(--space-7) 0;
    overflow: visible; /* Permitir que las flechas se vean */
}

.sectores-header {
    margin-bottom: var(--space-6);
    padding: 0 var(--container-padding);
    text-align: center;
}

/* Wrapper SIN padding en mobile */
.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-4); /* Mínimo para peek en mobile */
    overflow: hidden; /* CRÍTICO: prevenir scroll horizontal */
}

/* Track alineado al borde izquierdo */
.carousel-track {
    display: flex;
    gap: var(--space-4);
    transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: var(--space-4);
    will-change: transform;
    touch-action: pan-y pinch-zoom;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

/* FLECHAS: Ocultas en mobile, visibles en desktop */
.carousel-control {
    display: none; /* Por defecto ocultas */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    background: var(--color-white);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    color: var(--color-brand-blue);
    z-index: 20;
    transition: all var(--duration-normal) ease-in-out;
    cursor: pointer;
}

.carousel-control:hover {
    background: var(--color-brand-blue);
    color: var(--color-white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 130, 194, 0.4);
}

.carousel-control:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-control:focus-visible {
    outline: 3px solid var(--color-brand-blue);
    outline-offset: 2px;
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

/* CARDS CON EFECTOS EXÓTICOS */
.carousel-card {
    flex: 0 0 85%;
    background: var(--color-white);
    border-radius: var(--radius-large);
    overflow: hidden;
    box-shadow: var(--shadow-base);
    transition: all var(--duration-slow) ease-out;
    position: relative;
    scroll-snap-align: center;
}

/* Estados visuales dinámicos */
.carousel-card.is-visible {
    opacity: 1;
}

.carousel-card.is-hidden {
    opacity: 0.6;
}

/* Hover: efecto 3D suave */
.carousel-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 0 60px rgba(0, 130, 194, 0.15);
    z-index: 10;
}

/* Glow border en hover */
.carousel-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-brand);
    border-radius: var(--radius-large);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--duration-slow) ease-out;
}

.carousel-card:hover::before {
    opacity: 0.4;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%,
    100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

/* Imagen con zoom suave */
.card-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slower) ease-out;
    will-change: transform;
}

.carousel-card:hover .card-image {
    transform: scale(1.1);
}

/* Overlay con gradiente */
.card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            135deg,
            rgba(0, 130, 194, 0.3) 0%,
            rgba(0, 155, 168, 0.5) 100%
    );
    opacity: 0;
    transition: opacity var(--duration-normal) ease-out;
}

.carousel-card:hover .card-overlay {
    opacity: 1;
}

/* Contenido de card */
.card-content {
    padding: var(--space-5);
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: var(--space-2);
}

.card-subtitle {
    font-size: var(--font-body-m);
    color: var(--color-gray);
    margin-bottom: var(--space-4);
}

.card-bullets {
    margin-bottom: var(--space-4);
    padding-left: var(--space-4);
}

.card-bullets li {
    position: relative;
    font-size: 14px;
    color: var(--color-gray);
    margin-bottom: var(--space-2);
    padding-left: var(--space-3);
}

.card-bullets li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-brand-teal);
    font-weight: 700;
}

/* CTA con animación magnética */
.card-cta {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-brand-teal);
    transition: all var(--duration-normal) ease-out;
    position: relative;
}

.card-cta::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-brand-teal);
    transition: width var(--duration-normal) ease-out;
}

.card-cta:hover {
    gap: var(--space-3);
    transform: translateX(4px);
}

.card-cta:hover::after {
    width: calc(100% - var(--space-3));
}

/* Clones: sin interacciones pero con links funcionales */
.carousel-card-clone {
    pointer-events: none;
}

.carousel-card-clone a,
.carousel-card-clone button {
    pointer-events: auto;
}

/* DOTS MEJORADOS */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-6);
    padding: var(--space-3);
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-gray-light);
    border: none;
    cursor: pointer;
    transition: all var(--duration-slow) ease-out;
    position: relative;
}

.carousel-dot.active {
    width: 32px;
    border-radius: 4px;
    background: var(--gradient-brand);
    box-shadow: 0 2px 8px rgba(0, 130, 194, 0.4);
}

.carousel-dot.active::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid var(--color-brand-blue);
    border-radius: 6px;
    opacity: 0.3;
    animation: dotPulse 1.5s ease-out infinite;
}

@keyframes dotPulse {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }
    50% {
        transform: scale(1);
        opacity: 0.1;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Evitar texto oculto por ScrollReveal dentro del carrusel */
.carousel-track .reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

.carousel-dot:hover:not(.active) {
    background: var(--color-brand-blue);
    transform: scale(1.3);
}

/* ============================================
   10. VALOR SECTION  (COMPARTIDO)
   ============================================ */

.valor-section {
    padding: var(--space-7) 0;
    background: var(--color-white);
}

.valor-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.valor-image {
    transform-style: preserve-3d;
    transition: transform var(--duration-slow) ease-out;

    /* ✅ CLAVE: limita el tamaño real del bloque */
    max-width: 420px;          /* ajusta: 420-620 */
    margin: 0 auto;            /* centra en mobile/tablet */
}

.valor-image img {
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-base);
}

.valor-content {
    display: flex;
    flex-direction: column;
}

.valor-paragraph {
    font-size: var(--font-body-l);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--space-5);
}

.valor-list {
    margin-bottom: var(--space-6);
    padding-left: var(--space-5);
}

.valor-list li {
    position: relative;
    font-size: var(--font-body-m);
    line-height: var(--line-height-normal);
    margin-bottom: var(--space-3);
    padding-left: var(--space-4);
}

.valor-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--color-brand-blue);
    font-weight: 700;
    font-size: 20px;
}

/* ============================================
   11. CERTIFICACIONES — DESKTOP (FINAL / LIMPIO)
   Objetivo:
   - 6 certificaciones en UNA sola fila
   - Sin scroll
   - Sin animaciones
   - Uso completo del ancho disponible
   ============================================ */

#certificaciones {
    background: var(--color-gray-bg);
    padding: var(--space-7) 0;
}

/* Fuerza que TODA la cadena use el ancho completo */
#certificaciones .certifications-block,
#certificaciones .certifications-scroll-wrapper,
#certificaciones .certifications-grid {
    width: 100%;
    max-width: none;
}

/* Wrapper sin comportamiento extraño */
#certificaciones .certifications-scroll-wrapper {
    display: block;
    overflow: visible;
}

/* GRID: 6 columnas reales, 1 sola fila */
#certificaciones .certifications-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--space-6);
    align-items: stretch;
    justify-items: stretch;
}

/* Card */
#certificaciones .certification-item {
    background: var(--color-white);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-base);
    padding: var(--space-5) var(--space-4);
    text-align: center;
}

/* Zona del logo — altura fija para alineación perfecta */
#certificaciones .cert-icon {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
}

#certificaciones .cert-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-width: 130px;
    max-height: 220px;
    filter: grayscale(100%);
}

/* SOLO en dispositivos con hover real (mouse/trackpad): gris + hover a color */
@media (hover: hover) and (pointer: fine) {
    #certificaciones .cert-icon img { filter: grayscale(100%); }
    #certificaciones .certification-item:hover .cert-icon img { filter: grayscale(0%); }
}


/* Textos */
#certificaciones .cert-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-black);
    line-height: 1.3;
    min-height: 38px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#certificaciones .cert-description {
    font-size: 13px;
    color: var(--color-gray);
    line-height: 1.4;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Desktop: no hay indicador */
#certificaciones .scroll-indicator {
    display: none;
}


/* ============================================
    CTA
============================================ */

.trust-cta {
    margin-top: var(--space-6);
}

/* ============================================
   12. CTA FINAL  (COMPARTIDO)
   ============================================ */

.cta-final-section {
    padding: var(--space-7) 0;
    background: var(--color-white);
}

.cta-final-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-final-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-black);
    margin-bottom: var(--space-4);
}

.cta-final-subtitle {
    font-size: var(--font-body-l);
    color: var(--color-gray);
    margin-bottom: var(--space-6);
}

.cta-final-note {
    margin-top: var(--space-4);
    font-size: var(--font-body-m);
    color: var(--color-gray);
}

.cta-final-note a {
    color: var(--color-brand-blue);
    text-decoration: underline;
}

/* ============================================
   13. FOOTER  (COMPARTIDO)
   ============================================ */

.footer {
    padding: var(--space-8) 0 var(--space-5);
    background: var(--color-black);
    color: var(--color-white);

}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

.footer-logo {
    filter: brightness(0) invert(1);
    margin-bottom: var(--space-3);
}

.footer-tagline {
    font-size: var(--font-body-m);
    color: rgba(255, 255, 255, 0.7);
}

.footer-title {
    font-size: var(--font-body-l);
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--color-white);
}

.footer-menu,
.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.footer-menu p,
.footer-contact-list p {
    font-size: var(--font-body-m);
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--duration-normal) ease-in-out;
}

.footer-menu a:hover,
.footer-contact-list a:hover {
    color: var(--color-brand-teal);
}

.footer-contact-list li {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-body-m);
    color: rgba(255, 255, 255, 0.8);
}

.footer-contact-list svg {
    flex-shrink: 0;
}

.footer-bottom {
    padding-top: var(--space-5);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-copyright {
    font-size: var(--font-caption);
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.footer-text {
    white-space: pre-line;
}

/* ============================================
   14. WHATSAPP FLOTANTE  (COMPARTIDO)
   ============================================ */

.whatsapp-float {
    position: fixed;
    bottom: var(--space-4);
    right: var(--space-4);
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-white);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: var(--z-whatsapp);
    transition: all var(--duration-normal) ease-in-out;
    animation: whatsappEnter 500ms ease-out 2s backwards;
}

@keyframes whatsappEnter {
    from {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    to {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-8px);
}

.whatsapp-tooltip {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: var(--color-white);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-base);
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-normal) ease-in-out;
    pointer-events: none;
    z-index: var(--z-tooltip);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.9);
}

/* ============================================
   15. ANIMACIONES SCROLL REVEAL  (COMPARTIDO)
   ============================================ */

/* Reveal base (performante) */
.reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 420ms ease, transform 420ms ease;
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        transition: none;
        transform: none;
    }
}

/* ===================================================
   16 y 17 (MOBILE / IPAD) SE MUEVEN A OTROS ARCHIVOS
   =================================================== */

/* ============================================
   18. RESPONSIVE - DESKTOP (1200px+)  (DESKTOP)
   ============================================ */

@media (min-width: 1200px) {
    :root {
        --container-padding: 2rem;
    }

    /* Header Desktop */
    .header-nav {
        display: block;
    }

    .header-cta {
        display: block;
    }

    .menu-toggle {
        display: none;
    }

    /* Tipografía */
    h1 {
        font-size: 48px;
    }
    .section-title {
        font-size: 38px;
    }

    .section-subtitle{
        font-size: 22px;
    }

    /* Hero desktop */
    .hero-content {
        text-align: left;
    }

    .hero-title,
    .hero-subtitle {
        margin-left: 0;
        margin-right: auto;
        max-width: 600px;
    }

    .hero-cta {
        justify-content: flex-start;
    }

    .hero-overlay {
        background: linear-gradient(
                to right,
                rgba(0, 130, 194, 0.8) 0%,
                rgba(0, 130, 194, 0.5) 35%,
                rgba(0, 130, 194, 0.2) 60%,
                rgba(0, 155, 168, 0.1) 100%
        );
    }

    .hero-title {
        font-size: 56px;
    }

    .hero-scroll-indicator {
        bottom: var(--space-8);
    }

    /* Carrusel desktop: FLECHAS FUERA */
    .carousel-wrapper {
        padding: 0; /* Sin padding, flechas afuera */
    }

    .carousel-control {
        display: flex;
        width: 48px;
        height: 48px;
    }

    .carousel-prev {
        left: -24px; /* FUERA del wrapper */
    }

    .carousel-next {
        right: -24px; /* FUERA del wrapper */
    }

    .carousel-card {
        flex: 0 0 calc(33.333% - var(--space-4));
    }

    .carousel-dots {
        gap: var(--space-3);
    }
    /* Valor desktop: imagen al lado del texto */
    .valor-grid {
        display: grid;
        grid-template-columns: minmax(360px, 520px) 1fr; /* 👈 imagen limitada, texto libre */
        gap: var(--space-8);
        align-items: start; /* 👈 centra verticalmente ambos */
    }

    .valor-image {
        height: 650px;        /* 👈 alto máximo del módulo de imagen */
        overflow: hidden;     /* 👈 recorta lo que sobre (abajo) */
        margin: 0;
        max-width: none;
        border-radius: var(--radius-large); /* para que el recorte respete el radio */
        box-shadow: var(--shadow-base);
    }

    .valor-image img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* Certificaciones desktop: 4 columnas centradas */
    .certifications-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-5);
        max-width: 1100px;
    }

    /* Clientes en línea */
    .clients-logos {
        grid-template-columns: repeat(6, 1fr);
        gap: var(--space-4);
    }

    /* Footer */
    .footer {
        padding: var(--space-10) 0 var(--space-6);
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    /* WhatsApp */
    .whatsapp-float {
        bottom: var(--space-6);
        right: var(--space-6);
    }

    /* CTA Final */
    .cta-final-title {
        font-size: 44px;
    }

}

/* ============================================
   19. RESPONSIVE - LARGE DESKTOP (1200px+) (DESKTOP)
   ============================================ */

@media (min-width: 1200px) {
    /* Carrusel 4 cards */
    .carousel-card {
        flex: 0 0 calc(25% - var(--space-4));
    }

    /* Flechas más separadas */
    .carousel-wrapper {
        padding: 0 40px; /* Padding para flechas más anchas */
    }

    .carousel-prev {
        left: 0;
    }

    .carousel-next {
        right: 0;
    }
}

/* ============================================
   20. RESPONSIVE - XL DESKTOP (1400px+) (DESKTOP)
   ============================================ */

@media (min-width: 1400px) {

    :root {
        --container-max: 1280px;
    }

    /* Limitar ancho máximo de cards */
    .carousel-card {
        max-width: 400px;
    }

}

/* ============================================
   21. MOTION REDUCIDO (Accesibilidad)  (COMPARTIDO)
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .hero-image {
        transform: none !important;
        will-change: auto !important;
    }

    .hero-aurora,
    .hero-scroll-indicator,
    .whatsapp-float,
    [data-float],
    .btn-glow,
    .carousel-card::before,
    .carousel-dot.active::after {
        animation: none !important;
    }
}

/* ============================================
   22. FOCUS VISIBLE (Accesibilidad)  (COMPARTIDO)
   ============================================ */

:focus-visible {
    outline: 2px solid var(--color-brand-blue);
    outline-offset: 2px;
}

.carousel-wrapper:focus-visible {
    outline: 3px solid var(--color-brand-blue);
    outline-offset: 4px;
    border-radius: var(--radius-base);
}

/* ============================================
   23. PRINT STYLES  (COMPARTIDO)
   ============================================ */

@media print {
    .header,
    .whatsapp-float,
    .carousel-control,
    .carousel-dots,
    .mobile-menu,
    .hero-scroll-indicator,
    .hero-aurora {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

    a {
        text-decoration: underline;
    }

    h1,
    h2,
    h3 {
        page-break-after: avoid;
    }
}

/* ============================================
   24. UTILIDADES ADICIONALES  (COMPARTIDO)
   ============================================ */

.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden;
}

.overflow-hidden {
    overflow: hidden;
}


/* ============================================
   8. VIDEO SECTION (COMPARTIDO / BASE)
   Objetivo (UX):
   - Video completo (sin recorte)
   - Centrado
   - Si sobra espacio: negro a los lados (letterboxing)
   - Mantener fades superior/inferior
   - Sin reglas duplicadas ni contradictorias
   ============================================ */

:root {
    --fade-color: rgba(0, 0, 0, 0.55);
    --fade-height: 40px;
}

/* Contenedor del módulo */
.video-section {
    position: relative;
    width: 100%;
    background: var(--color-black);
    overflow: hidden;

    /*
      Altura “bonita” y estable:
      - 56.25vw = 16:9 basado en ancho (evita que en ultra-wide quede “tira”)
      - clamp limita: mínimo 320px, ideal 16:9, máximo 70vh
    */
    height: clamp(100%, 56.25vw, 70vh);
    /*height: 100dvh;*/
}

/* Caja del video ocupa toda la sección */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Video: completo, centrado, sin recortar */
.institutional-video {
    width: 100%;
    height: 100%;
    display: block;

    object-fit: contain;   /* ✅ NO recorta, muestra todo */
    object-position: center;


    background: var(--color-black); /* bandas negras si sobran */
}

/* Fades (arriba y abajo) */
.video-section::before,
.video-section::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: var(--fade-height);
    pointer-events: none;
    z-index: 2;
}

.video-section::before {
    top: 0;
    background: linear-gradient(to bottom, var(--fade-color), transparent);
}

.video-section::after {
    bottom: 0;
    background: linear-gradient(to top, var(--fade-color), transparent);
}

/* (Opcional) Si todavía tienes un overlay extra en HTML (video-gradient-overlay),
   lo puedes usar, pero si ya usas ::before/::after realmente NO lo necesitas.
   Si NO lo usas en HTML, puedes borrar este bloque sin problema.
*/
.video-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.20) 0%,
            rgba(0, 0, 0, 0.00) 50%,
            rgba(0, 0, 0, 0.20) 100%
    );
    pointer-events: none;
    z-index: 1;
}



/* ============================================
   FIN ARCHIVO 1/3 - DESKTOP + BASE
   ============================================ */