/* ============================================================
   1. VARIABLES Y BASE (ORIGINAL)
   ============================================================ */
:root {
    --bg-dark: #050835;
    --accent-cyan: #63F2FA;
    --text-light: #E0F2FE;
    --overlay-blue: rgba(5, 8, 53, 0.75);
    --font-titles: 'Bruno Ace SC', sans-serif;
    --font-body: 'Titillium Web', sans-serif;
}

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

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

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
}

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

/* ============================================================
   2. HEADER Y NAV (ORIGINAL)
   ============================================================ */
header {
    position: fixed;
    width: 100%;
    z-index: 1000;
    background: rgba(5, 8, 53, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(99, 242, 250, 0.2);
    padding: 10px 0;
}

.nav-container {
    max-width: 1500px;
    width: 92%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 55px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-menu a {
    color: var(--text-light);
    text-decoration: none;
    font-family: var(--font-titles);
    font-size: 0.75rem;
    text-transform: uppercase;
    transition: 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
}

/* ============================================================
   3. HERO Y SECCIONES (ORIGINAL)
   ============================================================ */
.hero {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.hero-content {
    position: relative;
    z-index: 3; /* Encima de la capa azul */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}
.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1; /* Al fondo */
}
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--overlay-blue);
    z-index: 2; /* Encima del video */
}

.hero h1 {
    font-family: var(--font-titles);
    color: var(--accent-cyan);
    font-size: clamp(0.7rem, 4vw, 2.5rem);
    text-align: center;
    text-shadow: 0 0 20px rgba(99, 242, 250, 0.5);
}

h2 {
    color: var(--accent-cyan) !important;
    font-family: var(--font-titles);
    text-transform: uppercase;
}

/* ============================================================
   4. CAJAS LÁSER Y GRILLAS (ORIGINAL)
   ============================================================ */
.laser-section {
    padding: 80px 0;
    width: 100%;
}

.nav-container-wide {
    max-width: 1700px;
    width: 94%;
    margin: 0 auto;
}

.laser-card {
    position: relative;
    background: rgba(99, 242, 250, 0.03);
    border-radius: 4px;
    overflow: hidden;
    padding: 2px;
    transition: 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
}

.laser-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(99, 242, 250, 0.2);
}

.laser-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, transparent, transparent, var(--accent-cyan));
    animation: rotate-laser 4s linear infinite;
    opacity: 0;
    transition: 0.3s;
}

.laser-card:hover::before {
    opacity: 1;
}

.laser-content {
    position: relative;
    background: var(--bg-dark);
    padding: 40px;
    border-radius: 3px;
    z-index: 5;
    height: 100%;
}

@keyframes rotate-laser {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.info-grid-four {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.defense-dual-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 40px;
}

.flex-center {
    display: flex;
    justify-content: center;
    width: 100%;
}

.center-card {
    max-width: 950px;
    width: 100%;
}

/* ============================================================
   5. ECOSISTEMA, TERMINAL Y PARTNERS (ORIGINAL)
   ============================================================ */
.central-align {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.standards-label {
    font-size: 1.1rem !important;
    color: var(--accent-cyan) !important;
    text-shadow: 0 0 10px var(--accent-cyan);
    letter-spacing: 3px;
    margin-bottom: 25px;
    font-family: var(--font-titles);
}

.central-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.standard-btn {
    border: 1px solid rgba(99, 242, 250, 0.4);
    padding: 10px 20px;
    font-size: 0.8rem;
    font-family: var(--font-titles);
    color: var(--accent-cyan);
    background: rgba(99, 242, 250, 0.05);
    border-radius: 4px;
    transition: 0.4s;
}

.standard-btn:hover {
    transform: translateY(-8px);
    background: rgba(99, 242, 250, 0.15);
    border-color: var(--accent-cyan);
    box-shadow: 0 10px 20px rgba(99, 242, 250, 0.3);
}

.cyber-icon-small {
    height: 65px;
    margin-bottom: 20px;
    filter: invert(82%) sepia(51%) saturate(452%) hue-rotate(135deg) brightness(101%) contrast(102%) drop-shadow(0 0 10px var(--accent-cyan)) !important;
}

.stack-terminal-pro {
    background: rgba(5, 8, 53, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 6px;
    overflow: hidden;
    width: 100%;
}

.terminal-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(99, 242, 250, 0.2);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red {
    background: #ff5f56;
}

.yellow {
    background: #ffbd2e;
}

.green {
    background: #27c93f;
}

.terminal-title {
    font-family: var(--font-titles);
    font-size: 0.7rem;
    color: var(--accent-cyan);
    margin-left: 10px;
}

.terminal-body {
    padding: 30px;
}

.stack-row {
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stack-label {
    color: var(--accent-cyan);
    font-family: var(--font-titles);
    font-size: 0.8rem;
}

.stack-value {
    color: var(--text-light);
    font-size: 0.95rem;
    padding-left: 12px;
    border-left: 1px solid rgba(99, 242, 250, 0.3);
}

.final-row-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 50px;
    border-top: 1px solid rgba(99, 242, 250, 0.1);
}

.partner-names {
    font-family: var(--font-titles);
    color: var(--text-light);
    font-size: 1.4rem;
    letter-spacing: 3px;
}

.cert-grid {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 25px !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
}

.cert-img {
    height: 85px !important;
    width: auto !important;
    filter: grayscale(100%) brightness(0.7);
}

.cert-img:hover {
    filter: grayscale(0%) brightness(1) drop-shadow(0 0 15px var(--accent-cyan));
    transform: scale(1.1);
}

/* ============================================================
   6. TIPOGRAFÍA, BOTONES Y FORMULARIOS (ORIGINAL)
   ============================================================ */
.section-main-title {
    font-family: var(--font-titles);
    color: var(--accent-cyan);
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.2rem;
}

.card-h3 {
    font-family: var(--font-titles);
    color: var(--accent-cyan);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.body-text {
    font-size: 1.5rem;
    font-weight: 300;
}

.body-text-small {
    font-size: 1.15rem;
    font-weight: 400;
}

.cyan-glow {
    color: var(--accent-cyan);
    text-shadow: 0 0 10px var(--accent-cyan);
    font-weight: 700;
}

.btn-cta {
    display: inline-block;
    padding: 16px 45px;
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    font-family: var(--font-titles);
    text-decoration: none;
    transition: 0.4s;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-cta:hover {
    background: var(--accent-cyan) !important;
    color: var(--bg-dark) !important;
    box-shadow: 0 0 30px var(--accent-cyan);
    transform: translateY(-3px);
}

.cyber-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group.floating {
    position: relative;
    margin-bottom: 25px;
}

.form-group.floating input,
.form-group.floating textarea {
    width: 100%;
    padding: 15px;
    background: rgba(99, 242, 250, 0.05);
    border: 1px solid rgba(99, 242, 250, 0.2);
    color: var(--text-light);
    border-radius: 4px;
    font-size: 1rem;
    transition: 0.3s ease all;
}

.form-group.floating label {
    position: absolute;
    left: 15px;
    top: 15px;
    color: rgba(99, 242, 250, 0.6);
    pointer-events: none;
    transition: 0.3s ease all;
    font-family: var(--font-titles);
    font-size: 0.8rem;
}

.form-group.floating input:focus ~ label,
.form-group.floating input:not(:placeholder-shown) ~ label,
.form-group.floating textarea:focus ~ label,
.form-group.floating textarea:not(:placeholder-shown) ~ label {
    top: -20px;
    left: 5px;
    font-size: 0.7rem;
    color: var(--accent-cyan);
    text-shadow: 0 0 5px var(--accent-cyan);
}

.form-group textarea {
    resize: none;
}

.main-footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid rgba(99, 242, 250, 0.1);
    background-color: var(--bg-dark) !important;
}

.main-footer p,
.main-footer p a {
    font-size: 1.4rem !important;
    color: var(--accent-cyan) !important;
    text-decoration: none;
    font-family: var(--font-body);
    letter-spacing: 1px;
}

/* --- Restauración Enlace Directo --- */
.email-link {
    font-size: 1.5rem;
    color: var(--accent-cyan);
    text-shadow: 0 0 10px rgba(99, 242, 250, 0.4);
    text-decoration: none;
    font-family: var(--font-titles);
    transition: 0.3s;
    display: inline-block;
    border-bottom: 1px solid transparent;
}

.email-link:hover {
    text-shadow: 0 0 20px var(--accent-cyan);
    transform: scale(1.05);
    border-bottom: 1px solid var(--accent-cyan);
    letter-spacing: 1px;
}

/* Ocultar botón menú en PC */
.menu-toggle {
    display: none;
}

/* ============================================================
   WEB RESPONSIVE MASTER - UNIFICADO Y FINAL
   ============================================================ */
@media (max-width: 1050px) {
    /* 1. SISTEMA DE NAVEGACIÓN (Rescate y Blindaje) */
    .menu-toggle {
        display: flex !important;
        position: fixed !important;
        right: 20px !important;
        top: 25px !important;
        z-index: 100000 !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 35px;
        height: 35px;
        cursor: pointer;
        background: rgba(5, 8, 53, 0.5);
        border-radius: 4px;
        padding: 5px;
    }

    .bar {
        display: block;
        width: 25px;
        height: 3px;
        margin: 3px auto;
        background-color: var(--accent-cyan) !important;
    }

    header {
        height: auto !important;
        min-height: 70px;
        overflow: visible !important;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background: rgba(5, 8, 53, 0.98);
        width: 100%;
        height: 100vh;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
        z-index: 9000 !important;
        visibility: visible;
    }

    .nav-menu.active {
        left: 0;
    }

    /* 2. DESBLOQUEO DE CONTENIDO (Solución Crítica Ecosistema) */
    main,
    #ecosistema-content,
    .laser-section,
    .nav-container,
    .nav-container-wide {
        display: block !important;
        height: auto !important;
        min-height: min-content !important;
        overflow: visible !important;
        clear: both !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .laser-section {
        padding: 20px 0 !important;
    }

    .laser-content {
        padding: 20px 15px !important;
        height: auto !important;
    }

    .laser-card {
        margin-bottom: 15px !important;
        height: auto !important;
    }

    /* 3. COMPACTACIÓN QUIRÚRGICA PÁGINAS INTERNAS */
    section.hero[style*="height: 30vh"] {
        height: auto !important;
        min-height: 160px !important;
        padding: 85px 0 25px 0 !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }

    .hero h1 {
        font-size: 1.1rem !important;
        padding: 0 20px !important;
        line-height: 1.3 !important;
        text-align: center !important;
    }

    .hero h3.card-h3 {
        font-size: 0.85rem !important;
        margin-top: 0 !important;
        opacity: 0.9;
    }

    .cyan-title,
    .laser-content h3.card-h3 {
        font-size: 1.1rem !important;
        margin-bottom: 12px !important;
    }

    /* --- AJUSTE DE TÍTULOS (CIBERCRIMEN Y ANTICIPAR) --- */
    .section-main-title {
        font-size: 1.2rem !important; /* Tamaño reducido para móvil */
        line-height: 1.3 !important;
        margin-bottom: 25px !important;
        padding: 0 10px !important;
    }

    /* REDUCCIÓN DE TEXTOS GRANDES (ANTICIPACIÓN/MÉXICO) */
    .body-text,
    .laser-content p.body-text {
        font-size: 1.05rem !important; /* Equilibrado para lectura */
        line-height: 1.45 !important;
        text-align: center !important;
        font-weight: 400 !important;
    }

    .body-text-small {
        font-size: 0.88rem !important;
        line-height: 1.4 !important;
    }

    /* --- RECUADRO DE EMAIL COMPACTO --- */
    .laser-card:has(.email-link) {
        max-width: 320px !important; /* Cuadro pequeño */
        margin: 15px auto !important;
    }

    .laser-card:has(.email-link) .laser-content {
        padding: 15px !important; /* Reduce espacio interno */
    }

    .email-link {
        font-size: 1.1rem !important; /* Ajuste al ancho del cuadro */
    }

    /* 4. TERMINAL STACK Y ECOSISTEMA (ORIGINAL) */
    .terminal-body {
        padding: 15px !important;
    }

    .stack-label {
        font-size: 0.75rem !important;
        display: block;
        margin-bottom: 5px;
    }

    .stack-value {
        font-size: 0.85rem !important;
        word-break: break-all !important;
        padding-left: 0 !important;
        border-left: none !important;
        display: block;
        color: var(--accent-cyan);
    }

    .stack-row {
        margin-bottom: 20px;
        border-bottom: 1px solid rgba(99, 242, 250, 0.1);
        padding-bottom: 10px;
    }

    /* 5. PARTNERS Y CERTIFICACIONES */
    .final-row-layout,
    .final-col-left,
    .final-col-center,
    .final-col-right {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
    }

    .partner-names {
        font-size: 1.2rem !important;
        letter-spacing: 2px;
        margin: 10px 0 !important;
        display: block !important;
        width: 100%;
    }

    .cert-grid {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 15px !important;
        flex-wrap: nowrap !important;
        margin-bottom: 20px;
    }

    .cert-img {
        height: 45px !important;
        width: auto !important;
    }

    /* 6. GRILLAS Y FORMULARIOS */
    .info-grid-four,
    .defense-dual-grid,
    .form-row-dual {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .cyber-form {
        gap: 15px !important;
    }

    .form-group.floating {
        margin-bottom: 15px !important;
    }

    div[style*="margin-top: 60px"],
    div[style*="margin-top: 80px"] {
        margin-top: 30px !important;
    }
}