/* Header y Navegación */
header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5986 100%);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-container img {
    height: 60px;
    width: auto;
    filter: brightness(1.1);
    transition: transform 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
    color: #fff;
}

.logo-text .main-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin: 0;
}

.logo-text .subtitle {
    font-size: 0.85rem;
    font-weight: 300;
    color: #b8d4f1;
    margin: 0;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

nav ul li {
    position: relative;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    padding: 0.8rem 1.2rem;
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #4a9eff, #7cb8ff);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

nav ul li a:hover::before {
    width: 80%;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

nav ul li a.active {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.3);
}

/* Botón especial para Certificados */
nav ul li a.btn-certificados {
    background: linear-gradient(135deg, #4a9eff 0%, #357abd 100%);
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(74, 158, 255, 0.4);
}

nav ul li a.btn-certificados:hover {
    background: linear-gradient(135deg, #357abd 0%, #2d5986 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(74, 158, 255, 0.5);
}

/* Menu móvil */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

@media (max-width: 1024px) {
    .header-container {
        padding: 1rem;
    }

    nav ul {
        gap: 0.3rem;
    }

    nav ul li a {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #1e3a5f;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    nav.active {
        max-height: 500px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    }

    nav ul {
        flex-direction: column;
        padding: 1rem;
        gap: 0;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        padding: 1rem;
        border-radius: 0;
    }

    .logo-text .main-title {
        font-size: 1.2rem;
    }

    .logo-text .subtitle {
        font-size: 0.75rem;
    }

    .logo-container img {
        height: 45px;
    }
}