/* --- Glassmorphism & Liquid Style --- */

/* Variables para Glassmorphism */
:root {
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-blur: blur(16px);
    --radius: 24px;
}

/* Fondo "Líquido" */
.bg {
    position: fixed;
    overflow: hidden;
    background: url("asset/fondo/MEfondo.png") center/cover no-repeat;
    /* Image background */
}

.bg::before,
.bg::after {
    content: '';
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 80, 150, 0.2) 0%, rgba(11, 15, 25, 0) 70%);
    /* Lighter blue */
    filter: blur(80px);
    z-index: -1;
    animation: liquid 20s infinite alternate ease-in-out;
}

.bg::before {
    top: -20%;
    left: -10%;
    animation-delay: 0s;
}

.bg::after {
    bottom: -20%;
    right: -10%;
    background: radial-gradient(circle, rgba(0, 50, 120, 0.18) 0%, rgba(11, 15, 25, 0) 70%);
    /* Deeper blue */
    animation-delay: -8s;
}

@keyframes liquid {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, 50px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 30px) scale(0.95);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Clase utilitaria Glass */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: var(--radius);
}

/* --- Navegación Superior --- */
.glass-nav {
    position: fixed;
    top: 20px;
    /* Floating effect */
    left: 50%;
    transform: translateX(-50%);
    width: min(1080px, 92vw);
    z-index: 1000;
    background: rgba(11, 15, 25, 0.6);
    /* Darker semi-transparent */
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    /* Pill shape */
    padding: 10px 24px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-links li a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease, text-shadow 0.2s ease;
    padding: 8px 12px;
    border-radius: 8px;
}

.nav-links li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* Botón hamburguesa (móvil) */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Ajustes para el Hero debido al nav flotante */
.hero {
    padding-top: 140px;
    /* Más espacio */
}

/* --- Responsive Nav --- */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(2, 20, 30, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        max-height: 300px;
        /* Ajustar según contenido */
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links li a {
        display: block;
        padding: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
}

/* --- Actualización de Estilos Existentes a Glass --- */

/* Actualizar Cards (Stats, QS, Cursos, News) */
.stat,
.qs__card,
.acc,
.curso,
.news__panel,
.team-card {
    background: rgba(255, 255, 255, 0.02) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2) !important;
    border-radius: 24px !important;
    /* Rounded corners */
}

/* Hover effects para cards */
.qs__card:hover,
.curso:hover,
.team-card:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-4px);
    transition: all 0.3s ease;
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.3) !important;
}

/* Botones Glassy */
.btn {
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Ajuste de colores de texto para mejor contraste en glass */
.acc__titles small,
.curso__prof {
    color: rgba(255, 255, 255, 0.7);
}