/* =========================================
   RESET Y ESTILOS BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* =========================================
   VARIABLES CSS
   ========================================= */
:root {
    --primary: #31a1ce;
    --primary-dark: #2581a5;
    --dark: #2c3e50;
    --white: #ffffff;
    --light-gray: #f5f7fa;
    --gray: #e0e0e0;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --radius: 10px;
}

/* =========================================
   HEADER Y NAVEGACIÓN PRINCIPAL
   ========================================= */
.header {
    background-color: var(--white);
    padding: 0 5%;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.header-content img {
    height: 60px;
    width: auto;
    display: block;
    transition: var(--transition);
}

/* NAVEGACIÓN */
.nav {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
}

/* ESTILOS PARA TODOS LOS ENLACES DEL NAV */
.nav a {
    color: var(--dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 0 15px;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
    transition: var(--transition);
    white-space: nowrap;
}

/* Línea inferior azul solo para enlaces principales (excluyendo dropdown) */
.nav a:not(.platform-options a)::after {
    content: '';
    position: absolute;
    bottom: 20px;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--primary);
    transition: var(--transition);
    transform: translateX(-50%);
    border-radius: 10px;
    opacity: 0;
}

.nav a:hover {
    color: var(--primary);
}

/* Solo aplicar el efecto hover a enlaces principales */
.nav a:not(.platform-options a):hover::after {
    width: 60%;
    opacity: 1;
}

.nav a.active {
    color: var(--primary);
}

.nav a.active::after {
    width: 60%;
    opacity: 1;
    background-color: var(--primary);
}

/* =========================================
   BOTÓN HAMBURGUESA
   ========================================= */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 10px;
    z-index: 1100;
    position: relative;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background-color: var(--dark);
    border-radius: 5px;
    transition: var(--transition);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background-color: var(--primary);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background-color: var(--primary);
}

/* =========================================
   OVERLAY - OCULTO EN DESKTOP
   ========================================= */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* =========================================
   PLATAFORMA CON DROPDOWN
   ========================================= */
.nav-platform {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.platform-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    position: relative;
    color: var(--dark);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 0 15px;
    height: 100%;
    user-select: none;
}

.platform-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.platform-options {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    min-width: 240px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 10px 0;
    margin-top: 10px;
    border: 1px solid var(--gray);
}

/* =========================================
   COMPORTAMIENTO DROPDOWN DESKTOP
   ========================================= */
@media (min-width: 851px) {
    /* Hover para abrir */
    .nav-platform:hover .platform-options {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(5px);
    }
    
    .nav-platform:hover .platform-toggle i {
        transform: rotate(180deg);
    }
    
    /* También cuando está activado por clic (JavaScript) */
    .nav-platform.active .platform-options {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(5px);
    }
    
    .nav-platform.active .platform-toggle i {
        transform: rotate(180deg);
    }
}

/* Opciones dentro del dropdown - ESTILOS ESPECÍFICOS */
.platform-options a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
    font-size: 14px;
    font-weight: 500;
    height: auto;
    border-left: 3px solid transparent;
    border-radius: 0;
    margin: 0;
    width: 100%;
    position: relative;
}

/* ELIMINAR COMPLETAMENTE EL ::after PARA LAS OPCIONES DEL DROPDOWN */
.platform-options a::after {
    content: none !important;
    display: none !important;
}

.platform-options a:hover {
    background: rgba(49, 161, 206, 0.08);
    color: var(--primary);
    padding-left: 25px;
    border-left: 3px solid var(--primary);
    text-decoration: none;
}

.platform-options a i {
    width: 20px;
    text-align: center;
    color: #666;
    font-size: 16px;
}

.platform-options a:hover i {
    color: var(--primary);
}

/* =========================================
   RESPONSIVE - MÓVIL
   ========================================= */
@media (max-width: 850px) {
    .hamburger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 320px;
        max-width: 85%;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 100px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
        gap: 0;
        overflow-y: auto;
    }

    .nav.active {
        right: 0;
    }

    .nav a, .platform-toggle {
        height: auto;
        padding: 20px 25px;
        width: 100%;
        justify-content: flex-start;
        font-size: 18px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        color: var(--dark);
    }

    /* Eliminar línea azul en móvil para todos los enlaces del nav */
    .nav a::after {
        display: none;
    }
    
    .nav a.active {
        background-color: rgba(49, 161, 206, 0.1);
        color: var(--primary);
        font-weight: 600;
    }
    
    .nav a:hover {
        background-color: rgba(49, 161, 206, 0.05);
        text-decoration: none;
    }
    
    /* PLATAFORMA EN MÓVIL */
    .nav-platform {
        width: 100%;
        height: auto;
        flex-direction: column;
        align-items: stretch;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
    
    .platform-toggle {
        justify-content: space-between;
        padding: 20px 25px;
    }
    
    .platform-toggle i {
        transition: transform 0.3s ease;
        font-size: 14px;
    }
    
    .platform-options {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.02);
        border: none;
        border-radius: 0;
        width: 100%;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .nav-platform.active .platform-options {
        max-height: 300px;
    }
    
    .platform-options a {
        padding: 18px 45px;
        font-size: 16px;
        border-left: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
        color: #555;
        text-decoration: none;
        position: relative;
    }
    
    /* Asegurar que no haya línea azul en móvil para dropdown */
    .platform-options a::after {
        content: none !important;
        display: none !important;
    }
    
    .platform-options a:hover {
        padding-left: 50px;
        border-left: none;
        background: rgba(49, 161, 206, 0.1);
        text-decoration: none;
    }
    
    .platform-options a:last-child {
        border-bottom: none;
    }
    
    .platform-options a i {
        width: 24px;
        font-size: 18px;
    }
    
    /* OVERLAY SOLO EN MÓVIL */
    .overlay {
        display: block;
        opacity: 0;
        pointer-events: none;
    }
    
    .overlay.active {
        opacity: 1;
        pointer-events: all;
    }
}

/* =========================================
   ESTILOS DE SEGURIDAD CONTRA TACHADO
   ========================================= */
/* Previene cualquier tachado en todos los estados de los enlaces */
a:link, a:visited, a:hover, a:active, a:focus {
    text-decoration: none;
}

/* Asegura que los enlaces de plataforma nunca se tachen */
.platform-options a,
.platform-options a:link,
.platform-options a:visited,
.platform-options a:hover,
.platform-options a:active,
.platform-options a:focus {
    text-decoration: none !important;
}

/* =========================================
   ESTILOS ESPECÍFICOS PARA VISIBILIDAD
   ========================================= */
/* Asegura que todo el texto sea visible */
.nav a,
.platform-toggle,
.platform-options a {
    color: var(--dark) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Asegura que los íconos sean visibles */
.platform-options a i {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Hover states visibles */
.platform-options a:hover,
.platform-options a:hover i {
    color: var(--primary) !important;
    opacity: 1 !important;
}