/* =====================================================
   MOBILE-STYLES.CSS — Garsan
   Carga DESPUÉS de styles.css en todas las páginas.
   Objetivo: máxima fidelidad visual al escritorio en
   dispositivos móviles y tablets.
   ===================================================== */

/* =====================================================
   1. VÍDEO HERO — SIN PÉRDIDA DE CALIDAD
   La clave es NO escalar el vídeo en la dirección
   corta: siempre object-fit:cover + dimensiones al
   100% del contenedor, sin transformaciones adicionales
   que degraden la nitidez.
   ===================================================== */
.hero-video {
    /* Ocupa el 100% del contenedor y nunca se distorsiona */
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;

    /* Renderizado de alta calidad en GPU */
    will-change: transform;           /* habilita capa GPU */
    transform: translateZ(0);         /* fuerza composición GPU */
    -webkit-transform: translateZ(0); /* Safari */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;

    /* Evita interpolación de baja calidad */
    image-rendering: -webkit-optimize-contrast; /* Chrome */
    image-rendering: crisp-edges;               /* Firefox */

    /* Sin filtros que quiten nitidez */
    filter: none;
    opacity: 1;
    animation: none !important;
}

/* En portrait móvil: cover + object-position centrado en el barco.
   Sin bandas negras, sin recorte de la zona de interés. */
@media (max-width: 768px) and (orientation: portrait) {
    .hero-video {
        object-fit: cover !important;
        /* Centra en el barco: 58% horizontal (ligeramente a la derecha)
           55% vertical (mitad inferior donde está el casco) */
        object-position: 58% 55% !important;
        width: 100% !important;
        height: 100% !important;
        transform: translateZ(0) !important;
        background-color: transparent;
    }
    .hero-fusion {
        background-color: #00050F !important;
    }
    .hero-overlay {
        background: linear-gradient(
            to top,
            rgba(0, 5, 15, 0.90) 0%,
            rgba(0, 5, 15, 0.40) 30%,
            rgba(0, 5, 15, 0.05) 60%,
            transparent 80%
        ) !important;
    }
}

/* Landscape móvil / tablet: igualar al escritorio */
@media (max-width: 1050px) and (orientation: landscape) {
    .hero-video {
        object-position: center 35%;
    }
}

/* Imagen de respaldo del logo final — misma calidad */
.hero-logo-end-img {
    object-fit: cover;
    object-position: center center;
    width: 100%;
    height: 100%;
    image-rendering: -webkit-optimize-contrast;
}

/* =====================================================
   2. HERO SECTION — LAYOUT FIEL AL ESCRITORIO
   ===================================================== */

/* El hero siempre ocupa la pantalla completa */
.hero-fusion {
    height: 100svh;
    min-height: 500px;
}

/* ── Móvil portrait: hero compacto, el vídeo no domina
   toda la pantalla — solo la parte superior ── */
@media (max-width: 1050px) {
    .hero-fusion {
        height: auto !important;
        min-height: unset !important;
    }

    /* El vídeo ocupa una altura fija, no toda la pantalla */
    .hero-video {
        position: absolute !important;
        height: 100% !important;
    }
}

@media (max-width: 768px) and (orientation: portrait) {
    .hero-fusion {
        height: 56svh !important;
        min-height: 420px !important;
    }
}

@media (max-width: 480px) and (orientation: portrait) {
    .hero-fusion {
        height: 52svh !important;
        min-height: 380px !important;
    }
}

@media (max-width: 380px) and (orientation: portrait) {
    .hero-fusion {
        height: 50svh !important;
        min-height: 340px !important;
    }
}

/* Overlay adaptado a móvil: más oscuro abajo para
   que el texto flote sobre el vídeo */
@media (max-width: 1050px) {
    .hero-overlay {
        background: linear-gradient(
            to top,
            rgba(0, 16, 58, 0.88) 0%,
            rgba(0, 16, 58, 0.50) 30%,
            rgba(0, 16, 58, 0.10) 60%,
            transparent 80%
        ) !important;
    }

    /* Contenido del hero — alineado abajo-izquierda
       como en escritorio */
    .hero-content-fusion.container {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-end !important;
        padding: 0 24px 60px !important;
        gap: 12px !important;
        transform: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    /* Portrait móvil: contenido compacto dentro del hero reducido */
    @media (max-width: 768px) and (orientation: portrait) {
        .hero-content-fusion.container {
            padding: 0 20px 40px !important;
            gap: 8px !important;
        }
        .hero-desc {
            margin-bottom: 10px !important;
            font-size: 0.88rem !important;
            display: -webkit-box !important;
            -webkit-line-clamp: 3 !important;
            -webkit-box-orient: vertical !important;
            overflow: hidden !important;
        }
        .hero-line1 {
            font-size: 0.68rem !important;
            letter-spacing: 2.5px !important;
        }
        .text-highlight {
            font-size: clamp(2rem, 9.5vw, 2.8rem) !important;
            line-height: 0.9 !important;
        }
        .hero-btn-primary,
        .hero-btn-secondary {
            padding: 10px 18px !important;
            font-size: 0.68rem !important;
        }
        .hero-stats-col {
            display: none !important; /* ocultar stats en hero muy compacto */
        }
        .hero-scroll-indicator {
            bottom: 4px !important;
        }
        .hero-scroll-indicator span {
            font-size: 0.55rem !important;
            letter-spacing: 2px !important;
        }
        .scroll-mouse {
            width: 18px !important;
            height: 28px !important;
        }
    }

    @media (max-width: 480px) and (orientation: portrait) {
        .hero-content-fusion.container {
            padding: 0 16px 36px !important;
        }
    }

    /* Columna izquierda: texto completo */
    .hero-left-col {
        flex: none;
        width: 100%;
        max-width: 520px;
        align-items: flex-start;
    }

    /* Título */
    .text-highlight {
        font-size: clamp(2.4rem, 9vw, 3.8rem) !important;
        white-space: normal;
        line-height: 0.95;
        color: #ffffff;
    }

    .hero-line1 {
        font-size: clamp(0.72rem, 2.5vw, 0.95rem);
        letter-spacing: 3px;
        margin-bottom: 4px;
        opacity: 1;
        animation: none;
        transform: none;
    }
    .hero-line1.gs-animate {
        animation: garsanFadeUp 0.9s ease forwards 0.5s;
    }

    /* Descripción */
    .hero-desc {
        font-size: clamp(0.85rem, 2.8vw, 1rem);
        max-width: 100%;
        margin-bottom: 16px;
        color: rgba(255,255,255,0.82);
    }

    /* Botones de acción — en fila compacta */
    .hero-cta-row {
        flex-direction: row !important;
        gap: 10px;
        flex-wrap: wrap;
    }

    .hero-btn-primary,
    .hero-btn-secondary {
        padding: 12px 22px;
        font-size: 0.72rem;
        letter-spacing: 1.5px;
    }

    /* Stats: fila horizontal compacta */
    .hero-stats-col {
        flex: none;
        width: 100%;
        flex-direction: row;
        gap: 8px;
        align-self: auto;
        padding-bottom: 0;
        margin-right: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }
    .hero-stats-col::-webkit-scrollbar { display: none; }

    .hero-stat-card {
        flex: 1;
        min-width: 90px;
        padding: 8px 12px;
    }

    .stat-number {
        font-size: clamp(1.2rem, 4vw, 1.6rem);
        letter-spacing: -0.5px;
    }
    .stat-label { font-size: 0.52rem; }
    .stat-text  { font-size: 0.52rem; }
}

@media (max-width: 600px) {
    .hero-content-fusion.container {
        padding: 0 16px 70px !important;
    }

    .text-highlight {
        font-size: clamp(2rem, 10vw, 2.8rem) !important;
    }

    .hero-cta-row {
        flex-direction: column !important;
        gap: 8px;
        width: 100%;
    }
    .hero-btn-primary,
    .hero-btn-secondary {
        width: 100%;
        text-align: center;
        display: block;
    }

    /* Stats: scroll horizontal en móvil pequeño */
    .hero-stats-col {
        gap: 6px;
    }
    .hero-stat-card {
        min-width: 80px;
        padding: 7px 10px;
    }
}

/* Scroll indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

/* En móvil: scroll indicator más abajo */
@media (max-width: 768px) {
    .hero-scroll-indicator {
        bottom: 8px !important;
    }
}

/* =====================================================
   3. HEADER / NAVEGACIÓN
   ===================================================== */
@media (max-width: 1050px) {

    /* Barra utilitaria más compacta */
    .utility-bar {
        min-height: 32px;
        padding: 4px 0;
    }
    .utility-right {
        gap: 8px;
        flex-wrap: nowrap;
        justify-content: center;
        width: 100%;
    }
    .utility-link {
        font-size: 0.68rem !important;
        white-space: nowrap;
    }
    /* Ocultar separadores para ganar espacio */
    .divider-small { display: none !important; }

    /* Logo: ligeramente más pequeño */
    .logo svg { height: 28px; }

    /* Menú móvil desplegable */
    .desktop-nav {
        max-height: calc(100dvh - 68px);
        overflow-y: auto;
    }

    /* Ítems del menú: área de toque de 48px */
    .nav-list > li > a {
        min-height: 48px;
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    /* Submenú inclinado adaptado */
    .dropdown-menu-multi {
        width: 180px !important;
        margin: 8px auto 12px auto !important;
    }
    .dropdown-slanted-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* =====================================================
   4. TIPOGRAFÍA — ESCALADO PROGRESIVO
   ===================================================== */
@media (max-width: 768px) {
    .hero-title-serious,
    .section-title-modern {
        font-size: clamp(1.6rem, 6vw, 2.4rem) !important;
        letter-spacing: -0.8px;
        line-height: 1.15;
    }
    .hero-subtitle-serious {
        font-size: clamp(0.9rem, 3vw, 1.1rem) !important;
        line-height: 1.55;
    }
    .team-intro-text-modern,
    .body-text-large {
        font-size: clamp(0.9rem, 2.8vw, 1.05rem) !important;
        line-height: 1.7;
    }
    .eyebrow-tag {
        font-size: 0.68rem !important;
        padding: 5px 13px !important;
        letter-spacing: 0.8px;
    }
}

/* =====================================================
   5. SECCIÓN "QUIÉNES SOMOS" — LAYOUT COLUMNAS
   ===================================================== */
@media (max-width: 768px) {
    /* corporate-hero tiene margin-top:-110px en el CSS base.
       El padding-top debe compensar ese margen + la altura del header
       para que el título no quede tapado por la barra fija. */
    .corporate-hero {
        padding-top: 160px !important;
        padding-bottom: 60px !important;
    }

    .quienes-somos-section {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    .quienes-wrapper {
        flex-direction: column !important;
        gap: 24px !important;
        align-items: flex-start !important;
    }

    .quienes-left {
        padding-top: 0 !important;
        width: 100%;
    }
    .quienes-right {
        width: 100%;
        gap: 14px;
    }

    /* Cifras clave: 3 columnas en tablets, 2 en móvil */
    .cifras-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 18px 10px !important;
    }
    .cifra-num  { font-size: clamp(1.7rem, 5vw, 2.4rem) !important; }
    .cifra-text { font-size: 0.63rem !important; line-height: 1.4; }
}

@media (max-width: 480px) {
    .cifras-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px 8px !important;
    }
}

/* =====================================================
   6. SERVICIOS INCLINADOS (QUÉ HACEMOS)
   ===================================================== */
@media (max-width: 900px) {
    .slanted-grid {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    .slanted-col {
        flex: 0 0 calc(50% - 20px) !important;
        min-height: 320px;
        padding: 40px 24px;
    }
}

@media (max-width: 540px) {
    .slanted-col {
        flex: 0 0 100% !important;
    }
}

/* =====================================================
   7. BENTO GRID — 2 COLUMNAS EN TABLET
   ===================================================== */
@media (min-width: 481px) and (max-width: 900px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 16px !important;
    }
    /* Bento grande sigue span 2 */
    .bento-large,
    .bento-wide,
    .contact-grid {
        grid-column: span 2 !important;
    }
    .bento-medium {
        grid-column: span 1 !important;
    }
}

@media (max-width: 480px) {
    .bento-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .bento-large,
    .bento-medium,
    .bento-wide,
    .contact-grid,
    [class*="bento-"] {
        grid-column: span 1 !important;
    }
    .bento-item {
        padding: 22px 16px !important;
        border-radius: 16px !important;
    }
}

/* Tarjetas de mercado — legibles en móvil */
@media (max-width: 768px) {
    .market-data-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    .market-card { padding: 10px 8px; border-radius: 8px; }
    .market-price { font-size: 1.2rem; }
    .market-name  { font-size: 0.68rem; }
    .market-trend { font-size: 0.72rem; }
}

@media (max-width: 480px) {
    .market-data-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =====================================================
   8. FLIP CARDS — TOUCH EXPERIENCE
   ===================================================== */
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: 1fr !important; gap: 20px !important; }

    /* ── Anular 3D flip completamente ── */
    .flip-card       { height: auto !important; min-height: 0 !important; cursor: pointer; }
    .flip-card-inner {
        transform: none !important;
        transform-style: flat !important;
        transition: none !important;
        height: auto !important;
        min-height: 0 !important;
        position: relative !important;
    }
    .flip-card:hover .flip-card-inner,
    .flip-card.mobile-flipped .flip-card-inner { transform: none !important; }

    /* ── FRENTE visible por defecto ── */
    .flip-card-front {
        position: relative !important;
        transform: none !important;
        backface-visibility: visible !important;
        -webkit-backface-visibility: visible !important;
        display: block !important;
        height: 350px !important;
        min-height: 300px !important;
        padding: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
        border-radius: 16px !important;
    }
    .logo-wrap,
    .flip-card-front.logo-front .logo-wrap {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important; height: 100% !important;
        margin: 0 !important;
        display: flex !important; align-items: center !important; justify-content: center !important;
        background: #FFFFFF !important;
        border-radius: 16px !important; padding: 28px !important;
        box-sizing: border-box !important;
    }
    .logo-wrap img,
    .flip-card-front.logo-front .logo-wrap img {
        width: auto !important; height: auto !important;
        max-width: 75% !important; max-height: 55% !important;
        object-fit: contain !important;
    }
    .front-overlay {
        position: absolute !important;
        inset: 0 !important;
        display: flex !important; flex-direction: column !important;
        align-items: center !important; justify-content: flex-end !important;
        text-align: center !important; width: 100% !important;
        background: linear-gradient(to top, rgba(0,16,58,0.95) 0%, rgba(0,16,58,0.4) 45%, transparent 70%) !important;
        padding: 20px 16px !important;
        box-sizing: border-box !important;
        z-index: 2 !important;
        border-radius: 16px !important;
    }
    .front-icon  { font-size: 2.8rem !important; margin-bottom: 10px !important; }
    .front-title { font-size: 1.5rem !important; margin: 0 0 14px !important; color: white !important; font-weight: 700 !important; }
    .front-hint  { font-size: 0.85rem !important; padding: 8px 20px !important; color: rgba(255,255,255,0.75) !important; display: block !important; }

    /* Al tocar: ocultar frente */
    .flip-card.touched .flip-card-front { display: none !important; }

    /* ── REVERSO: oculto, sin rotación ── */
    .flip-card-back {
        position: relative !important;
        transform: none !important;
        backface-visibility: visible !important;
        -webkit-backface-visibility: visible !important;
        display: none !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 36px 28px 32px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        gap: 14px !important;
    }
    /* Al tocar: mostrar reverso */
    .flip-card.touched .flip-card-back { display: flex !important; }

    .flip-card-back .flip-icon { font-size: 2.8rem !important; opacity: 0.25 !important; line-height: 1 !important; width: 64px !important; height: 64px !important; }
    .flip-card-back h3 { font-size: 1.3rem !important; margin: 0 !important; color: white !important; font-weight: 800 !important; }
    .flip-card-back p  { font-size: 1.05rem !important; line-height: 1.6 !important; margin: 0 !important; color: rgba(255,255,255,0.85) !important; }
    /* Indicador volver */
    .flip-card.touched .front-hint-back {
        display: block; font-size: 0.78rem; color: rgba(255,255,255,0.4);
        margin-top: 8px; text-align: center;
    }
}

@media (max-width: 540px) {
    .grid-3   { grid-template-columns: 1fr !important; gap: 16px !important; }
    .front-title { font-size: 1.3rem !important; }
}

/* =====================================================
   9. TIMELINE (QUIÉNES SOMOS → HISTORIA)
   ===================================================== */
@media (max-width: 768px) {
    .timeline {
        padding-left: 24px !important;
    }
    .timeline-item {
        margin-bottom: 32px;
    }
    .timeline-item::before {
        left: -24px !important;
        width: 10px;
        height: 10px;
    }
    .timeline-year { font-size: 0.7rem; }
    .timeline-title { font-size: 1.1rem; }
    .timeline-desc { font-size: 0.9rem; line-height: 1.6; }
}

/* =====================================================
   10. VALORES GRID
   ===================================================== */
@media (max-width: 768px) {
    .valores-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
}

@media (max-width: 480px) {
    .valores-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =====================================================
   11. TRAZABILIDAD
   ===================================================== */
@media (max-width: 768px) {
    .traz-static-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        text-align: center;
    }
    .traz-arrow {
        transform: rotate(90deg) !important;
        display: block !important;
        margin: 0 auto !important;
        font-size: 1.5rem;
    }
    .traz-card {
        padding: 20px 16px !important;
        border-radius: 12px;
    }
}

/* =====================================================
   12. MAPA CORPORATIVO
   ===================================================== */
@media (max-width: 768px) {
    #corporate-map {
        height: 280px !important;
        border-radius: 14px;
    }
}

@media (max-width: 480px) {
    #corporate-map { height: 240px !important; }
}

/* =====================================================
   13. RSC GRID
   ===================================================== */
@media (max-width: 768px) {
    .rsc-grid {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .rsc-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* =====================================================
   14. CONTACTO — FORMULARIO
   ===================================================== */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .input-field.full-width { grid-column: span 1 !important; }
    .form-submit-btn {
        width: 100% !important;
        padding: 14px !important;
        font-size: 0.95rem !important;
    }
    .contact-grid {
        grid-template-columns: 1fr !important;
    }
    .contact-details-list { gap: 14px; }
}

/* =====================================================
   15. GRUPO (DASHBOARD GRID)
   ===================================================== */
@media (max-width: 1050px) {
    .gd-container {
        flex-direction: column !important;
        gap: 20px !important;
    }
    .gd-grid-area {
        width: 100% !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    /* Tarjetas: altura fija razonable para logos */
    .gd-card { height: 200px !important; }

    /* Panel: en móvil los paneles son estáticos, no absolutos */
    .gd-panel-area {
        width: 100% !important;
        position: static !important;
    }
    .gd-panel-sticky {
        min-height: 0 !important;
        padding: 28px 24px !important;
        position: relative !important;
    }
    /* Todos los paneles ocultos por defecto */
    .gd-panel {
        position: static !important;
        opacity: 0 !important;
        visibility: hidden !important;
        height: 0 !important;
        overflow: hidden !important;
        transform: none !important;
        transition: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    /* Solo el activo visible y con altura automática */
    .gd-panel.active {
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
        overflow: visible !important;
    }
    .gd-panel-title { font-size: 1.6rem !important; margin-bottom: 12px !important; padding-bottom: 10px !important; }
    .gd-panel-desc  { font-size: 1rem !important; line-height: 1.6 !important; margin-bottom: 20px !important; }
    .gd-panel-link  { font-size: 0.85rem !important; padding: 10px 20px !important; display: inline-block !important; }
    /* Stats en móvil: fila con wrap */
    .gd-panel-stats { flex-wrap: wrap !important; gap: 16px !important; margin-bottom: 20px !important; }
    .gd-p-val       { font-size: 1.6rem !important; }
    .gd-logo-organovatech { max-width: 72% !important; max-height: 45% !important; transform: translateY(-25px) !important; }
}

@media (max-width: 540px) {
    .gd-grid-area {
        grid-template-columns: 1fr !important;
    }
    .gd-card { height: 180px !important; }
    .gd-logo-organovatech { max-width: 68% !important; max-height: 40% !important; transform: translateY(-25px) !important; }
}

/* =====================================================
   16. PARTNERS SLIDER — VELOCIDAD ADAPTADA
   ===================================================== */
@media (max-width: 768px) {
    .partner-logo {
        width: 110px;
        height: 48px;
    }
    .partners-track {
        gap: 40px;
        animation-duration: 20s;
    }
}

/* =====================================================
   17. FOOTER BRUTALISTA
   ===================================================== */
@media (max-width: 1050px) {

    .footer-brutal__grid {
        grid-template-columns: 1fr !important;
    }

    .footer-brutal__left {
        padding: 28px 20px !important;
        text-align: center !important;
        align-items: center !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        flex-wrap: wrap !important;
        gap: 14px !important;
    }

    .footer-brutal__left > div:first-child {
        order: 0;
    }

    .footer-brutal__logo-link {
        order: 1;
        margin-bottom: 0 !important;
    }

    .footer-brutal__socials {
        order: 2;
        margin-top: 0 !important;
    }

    .footer-brutal__right {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        padding: 24px 20px !important;
        text-align: left !important;
    }

    .footer-brutal__bottom {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center !important;
        padding: 14px 16px !important;
    }

    .footer-legal-links {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 6px !important;
    }
}

@media (max-width: 480px) {
    .footer-brutal__left {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    .footer-brutal__bignum { font-size: 60px; }
    .footer-brutal__right {
        grid-template-columns: 1fr !important;
    }
}

/* =====================================================
   18. PÁGINAS LEGALES
   ===================================================== */
@media (max-width: 768px) {
    .legal-box {
        padding: 32px 20px !important;
        border-radius: 16px !important;
        margin: 0 0 40px !important;
    }
    .legal-box h2 {
        font-size: 1.2rem !important;
        margin: 36px 0 14px !important;
    }
    .legal-box p,
    .legal-box ul li { font-size: 0.93rem !important; line-height: 1.7; }
    .legal-info-card { padding: 16px 14px !important; }

    .table-container { border-radius: 8px; }
    .legal-table th,
    .legal-table td { padding: 12px 14px; font-size: 0.82rem; }
}

/* =====================================================
   19. HEADER HERO CORPORATIVO (QUIÉNES/QUÉ/GRUPO)
   ===================================================== */
@media (max-width: 768px) {
    .corporate-hero {
        padding: 80px 0 50px !important;
    }

    .corporate-header {
        flex-direction: column !important;
        gap: 20px !important;
        margin-bottom: 30px !important;
        padding-bottom: 24px !important;
    }
    .header-left,
    .header-right { flex: none; width: 100%; }
    .header-right { flex-direction: column; gap: 16px; }
}

/* =====================================================
   20. MISIÓN & VISIÓN (dos columnas)
   ===================================================== */
@media (max-width: 768px) {
    .mv-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .mv-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* =====================================================
   21. SCROLL SUAVE & ÁNCORAS
   (La barra fija puede ocultar el target del ancla)
   ===================================================== */
[id] {
    scroll-margin-top: 120px;
}
@media (max-width: 768px) {
    [id] { scroll-margin-top: 90px; }
}

/* =====================================================
   22. MICRO-INTERACCIONES TÁCTILES
   ===================================================== */

/* Quita el efecto hover en dispositivos sin cursor fino */
@media (hover: none), (pointer: coarse) {

    /* Botones: feedback visual al tocar */
    .hero-btn-primary:active,
    .hero-btn-secondary:active,
    .form-submit-btn:active,
    .gd-panel-link:active,
    .cert-btn:active {
        transform: scale(0.97);
        opacity: 0.9;
    }

    /* Bento items: sin levitación en hover */
    .bento-item:hover {
        transform: none !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2) !important;
    }
}

/* =====================================================
   23. ACCESIBILIDAD — FOCUS VISIBLE
   ===================================================== */
:focus-visible {
    outline: 2px solid var(--brand-red);
    outline-offset: 3px;
    border-radius: 4px;
}
button:focus-visible,
a:focus-visible {
    outline: 2px solid #DA291C;
    outline-offset: 3px;
}

/* =====================================================
   24. SAFE AREA — iPhone con notch / Dynamic Island
   ===================================================== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .hero-content-fusion.container {
        padding-bottom: calc(
            80px + env(safe-area-inset-bottom)
        ) !important;
    }
    .footer-brutal__bottom {
        padding-bottom: calc(12px + env(safe-area-inset-bottom)) !important;
    }
}

/* ── Utility bar en móvil pequeño ≤480px ── */
@media (max-width: 480px) {
    .utility-right {
        gap: 6px;
    }
    .utility-link {
        font-size: 0.62rem !important;
        padding: 2px 6px !important;
        border: 1px solid rgba(255,255,255,0.15);
        border-radius: 4px;
    }
    /* Ocultar el texto largo y mostrar versión corta */
    [data-translate="btn_clientes"],
    [data-translate="btn_brokers"] { font-size: 0.62rem !important; }
}

/* =====================================================
   SERVICIOS — Flechas hacia abajo en móvil
   ===================================================== */
@media (max-width: 900px) {
    /* Espacio para la flecha en la parte baja */
    .slanted-content {
        padding-bottom: 48px !important;
        position: relative !important;
    }
    /* Reposicionar la flecha: centrada abajo, girada 90° */
    .arrow-between {
        position: absolute !important;
        bottom: 8px !important;
        top: auto !important;
        right: auto !important;
        left: 50% !important;
        transform: translateX(-50%) rotate(90deg) !important;
        width: 32px !important;
        height: 32px !important;
    }
    /* Última tarjeta no necesita flecha */
    .slanted-col:last-child .arrow-between {
        display: none !important;
    }
}

/* ── Desplegable de idiomas — posición y espaciado en móvil ── */
@media (max-width: 1050px) {
    .lang-content-multi {
        left: 0 !important;
        right: auto !important;
        transform: none !important;
        min-width: 180px !important;
    }
    /* Sobreescribir la animación de styles.css que usa translateX(-50%) */
    .lang-content-multi.show {
        animation: dropFadeMobileFixed 0.2s ease forwards !important;
    }
    @keyframes dropFadeMobileFixed {
        from { opacity: 0; transform: translateY(-5px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    .lang-content-multi a {
        padding: 16px 20px !important;
        font-size: 1rem !important;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
    .lang-content-multi a:last-child {
        border-bottom: none;
    }
}