* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    overflow-x: hidden;
    width: 100%;
}

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700&display=swap');

.custom-navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1400px;
    background: rgba(0, 0, 0, 0.2);
    /* Fondo oscuro mucho más sutil */
    backdrop-filter: blur(20px);
    /* Desenfoque más potente para el efecto cristal */
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-family: 'Outfit', sans-serif;
}

.custom-navbar.scrolled {
    top: 10px;
    background: rgba(0, 0, 0, 0.35);
    /* Suave al hacer scroll */
    width: 92%;
}

.navbar-logo {
    display: flex;
    align-items: center;
}

.navbar-logo img {
    height: 45px;
    width: auto;
}

.navbar-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.navbar-links a {
    color: white !important;
    /* Siempre blanco */
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 1;
    /* Máxima opacidad para mayor nitidez */
    white-space: nowrap;
}

.navbar-links a:hover {
    opacity: 1;
    color: #ff0080;
    /* Color de realce al pasar el cursor */
}

.navbar-cta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cta-button {
    background: linear-gradient(90deg, #ef120a, #be0f08);
    color: white !important;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(33, 37, 41,1);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(33, 37, 41, 0.84);
    filter: brightness(1.1);
}

.mobile-toggle {
    display: none;
    width: 35px;
    height: 35px;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    background: none;
    /* Quitamos el fondo */
    border: none;
    cursor: pointer;
    border-radius: 0;
    /* Quitamos el círculo */
    padding: 5px;
    z-index: 10002;
    transition: all 0.3s ease;
}

.mobile-toggle:hover {
    background: none;
    opacity: 0.7;
    /* Sutil efecto visual al pulsar */
}

.mobile-toggle span {
    width: 100%;
    height: 2px;
    background: white;
    /* Volvemos al blanco */
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Menú lateral eliminado ya que se integró en el navbar principal */

/* Tablet responsive: Botones adaptados como en PC */
@media (max-width: 1100px) and (min-width: 601px) {
    .custom-navbar {
        width: 98%;
        /* Un poco más ancho para dar espacio */
        padding: 8px 15px;
        justify-content: space-between;
        gap: 10px;
    }

    .navbar-logo img {
        height: 30px;
        /* Logo más pequeño en tablet */
    }

    .navbar-links {
        display: flex !important;
        gap: 12px;
        /* Espacio reducido entre links */
    }

    .navbar-links a {
        font-size: 12px;
        /* Fuente ligeramente más pequeña */
        white-space: nowrap;
    }

    .mobile-toggle {
        display: none !important;
    }

    .navbar-cta {
        margin-left: 0;
    }

    .cta-button {
        padding: 8px 16px;
        font-size: 12px;
        white-space: nowrap;
    }
}

/* Mobile responsive (Celular): Navbar estirable tipo cortina */
@media (max-width: 600px) {
    body {
        overflow-x: hidden;
        /* Evita scroll horizontal en el cuerpo */
    }

    .custom-navbar {
        width: auto;
        left: 15px;
        right: 15px;
        top: 15px;
        transform: none;
        /* Eliminamos el transform para evitar desplazamientos raros */
        border-radius: 20px;
        flex-wrap: wrap;
        padding: 10px 15px;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        overflow: hidden;
        max-height: 60px;
    }

    .custom-navbar.active {
        max-height: 450px;
        border-radius: 20px;
        background: rgba(0, 0, 0, 0.5);
        /* Tono medio para móvil */
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    }

    .navbar-logo {
        flex: 1;
    }

    .navbar-logo img {
        height: 35px;
    }

    .navbar-cta {
        flex: 0;
    }

    .cta-button {
        display: none;
        /* Ocultamos el botón principal en la cabecera para ahorrar espacio */
    }

    .mobile-toggle {
        display: flex;
        background: none;
    }

    .navbar-links {
        display: flex;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        order: 3;
        /* Los links aparecen debajo del logo y el toggle */
        padding: 20px 0 10px;
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.4s ease;
        pointer-events: none;
    }

    .custom-navbar.active .navbar-links {
        opacity: 1;
        transform: translateY(0);
        pointer-events: all;
    }

    .navbar-links a {
        width: 100%;
        padding: 12px;
        font-size: 18px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: block;
        color: white !important;
        /* Aseguramos blanco en móvil */
    }

    .navbar-links a:last-child {
        border-bottom: none;
        color: #ff0080;
        /* Resaltamos el último link como CTA en el menú */
        font-weight: 700;
    }
}