/* =========================================================
   NAVBAR PRINCIPAL
========================================================= */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 45px 100px;
    background: transparent;
    transition: all 0.3s ease;
    z-index: 100;
}


/* =========================================================
   NAVBAR AL HACER SCROLL
========================================================= */

.navbar.scrolled {
    background: var(--bg);
    border-bottom: 4px solid var(--gold);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 10px 100px;
    min-height: 100px;
}


/* =========================================================
   LOGO
========================================================= */

.logo {
    position: relative;
    display: flex;
    align-items: center;
}

.logo-img {
    height: 75px;
    max-width: 280px;
    transition: all 0.3s ease;
    position: absolute;
    left: 10px;
    top: -40px;
}

.default-logo {
    opacity: 1;
}

.scrolled-logo {
    opacity: 0;
}

/* Logo cuando hace scroll */

.navbar.scrolled .default-logo {
    opacity: 0;
}

.navbar.scrolled .scrolled-logo {
    opacity: 1;
}

.navbar.scrolled .logo-img {
    height: 75px;
    transform: translateY(5px);
}

/* =========================================================
   MENÚ PRINCIPAL
========================================================= */

.nav-links {
    list-style: none;
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-links li a {
    text-decoration: none;
    margin-right: 9px;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    color: white;
    letter-spacing: 1.5px;
    transition: color 0.3s ease;
    position: relative;
}


/* Menú cuando hay scroll */

.navbar.scrolled .nav-links li a {
    color: var(--text);
}

/* =========================================================
   SUBRAYADO
========================================================= */

.nav-links li a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    left: 0;

    bottom: -6px;

    background: var(--gold);

    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: 100%;
}


/* =========================================================
   ELEMENTO ACTIVO
========================================================= */

.nav-links li.active > a {
    color: var(--gold);

    font-weight: 900;
}

.nav-links li.active > a::after {
    width: 100%;
}


/* Cuando hay scroll el activo se vuelve negro */

.navbar.scrolled .nav-links li.active > a {
    color: var(--text);
}


 /* =========================================================
    DROPDOWN
 ========================================================= */

.dropdown {
    position: relative;
}

/* Menú desplegable */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;

    width: 100%;
    min-width: 100%;

    background: rgba(0, 0, 0, 0.95);

    border-radius: 8px;
    padding: 6px 0;
    margin: 0;

    display: none;
    flex-direction: column;

    z-index: 9999;
    list-style: none;

    box-sizing: border-box;
}

/* Elementos */
.dropdown-menu li {
    width: 100%;
    list-style: none;
}

/* Enlaces del dropdown */
.dropdown-menu li a {
    display: block;
    width: 100%;

    box-sizing: border-box;

    padding: 10px 16px;

    color: white;
    font-size: 0.90rem;

    text-decoration: none;
    white-space: nowrap;

    transition: background 0.2s ease, color 0.2s ease;
}

/* Hover */
.dropdown-menu li a:hover {
    background: var(--gold);
    color: white;
}

/* Mostrar dropdown */
.dropdown:hover .dropdown-menu {
    display: flex;
}


/* =========================================================
   DROPDOWN CUANDO HAY SCROLL
 ========================================================= */

.navbar.scrolled .dropdown-menu {
    background: white;
    border: 1px solid #ddd;
}

.navbar.scrolled .dropdown-menu li a {
    color: var(--text);
}

.navbar.scrolled .dropdown-menu li a:hover {
    background: var(--gold);
    color: white;
}

/* =========================================================
   PUENTE INVISIBLE DEL DROPDOWN
========================================================= */

.dropdown::after {
    content: "";

    position: absolute;

    top: 40px;
    left: 0;

    width: 100%;
    height: 20px;
}


/* =========================================================
   BOTÓN MENÚ RESPONSIVE
========================================================= */

.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
}

/* =========================================================
   RESPONSIVE TABLET / CELULAR
========================================================= */

@media (max-width: 1000px) {

    /* =====================================================
       NAVBAR
    ===================================================== */

    .navbar {
        padding: 30px 35px;
        min-height: 95px;
    }

    .navbar.scrolled {
        padding: 15px 35px;
        min-height: 95px;
    }


    /* =====================================================
       LOGO
    ===================================================== */

    .logo {
        position: relative;

        display: flex;
        align-items: center;

        width: 235px;
        height: 70px;

        flex: 0 0 235px;
    }

    .logo-img {
        position: absolute;

        left: 0;

        /* 🔧 Baja un poquito el logo */
        top: 0;

        height: 75px;
        max-width: 235px;

        object-fit: contain;
    }

    .navbar.scrolled .logo-img {
        height: 75px;
        max-width: 235px;

        /* 🔧 También lo mantiene un poco abajo con scroll */
        transform: translateY(5px);
    }


    /* =====================================================
       HAMBURGUESA
    ===================================================== */

    .nav-toggle-label {
        display: flex;

        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 45px;
        height: 45px;
        /* 🔧 Un poquito más separado del logo */
        margin-left: 20px;
        flex: 0 0 45px;
        cursor: pointer;
        z-index: 1001;
    }

    .nav-toggle-label span {
        width: 28px;
        height: 3px;
        margin: 4px 0;
        background: #fff;
        border-radius: 3px;
        transition: all 0.3s ease;
    }

    /* Hamburguesa con scroll */

    .navbar.scrolled .nav-toggle-label span {
        background: #111;
    }


    /* =====================================================
       MENÚ MÓVIL
    ===================================================== */

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 95px;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        padding: 15px 25px;
        gap: 20px;
        width: auto;
        min-width: 190px;
        align-items: flex-start;
    }

    /* Mostrar menú */

    .nav-toggle:checked + .nav-toggle-label + .nav-links {
        display: flex;
    }


    /* =====================================================
       ANIMACIÓN HAMBURGUESA → X
    ===================================================== */

    .nav-toggle:checked + .nav-toggle-label span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle:checked + .nav-toggle-label span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle:checked + .nav-toggle-label span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }


    /* =====================================================
       MENÚ CON SCROLL
    ===================================================== */

    .navbar.scrolled .nav-links {
        background: #fff;
    }

    .navbar.scrolled .nav-links li a {
        color: var(--text);
    }


    /* =====================================================
       DROPDOWN EN CELULAR
    ===================================================== */

    .dropdown-menu {
        position: static;

        background: none;

        border: none;

        box-shadow: none;

        display: none !important;

        padding: 0;
    }

    .dropdown:hover .dropdown-menu {
        display: none !important;
    }
}

/* =========================================================
   ACTIVE MOBILE
========================================================= */

.nav-links a.active {
    color: var(--gold);

    font-weight: 900;
}

.nav-links a.active::after {
    width: 100%;
}


/* =========================================================
   WHATSAPP
========================================================= */

.btn-whatsapp {
    position: fixed;

    right: 25px;

    bottom: 140px;

    width: 58px;
    height: 58px;

    display: flex;

    align-items: center;
    justify-content: center;

    background: #25D366;

    color: #fff;

    border-radius: 50%;

    text-decoration: none;

    font-size: 32px;

    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.25);

    z-index: 9999;

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
}


/* Icono */

.btn-whatsapp i {
    font-size: 32px;

    line-height: 1;
}


/* Hover */

.btn-whatsapp:hover {
    color: #fff;

    background: #20bd5a;

    transform: scale(1.1);

    box-shadow:
        0 7px 22px rgba(0, 0, 0, 0.30);
}


/* =========================================================
   CELULAR
========================================================= */

@media (max-width: 600px) {

    /* -----------------------------------------------------
       NAVBAR
    ----------------------------------------------------- */

    .navbar {
        padding: 18px 18px;

        min-height: 82px;
    }

    .navbar.scrolled {
        padding: 10px 18px;

        min-height: 82px;
    }


    /* -----------------------------------------------------
       LOGO MÁS GRANDE
    ----------------------------------------------------- */

    .logo {
        width: 200px;

        height: 62px;

        flex: 0 0 200px;
    }

    .logo-img {
        left: 0;

        top: -7px;

        height: 65px;

        max-width: 200px;
    }

    .navbar.scrolled .logo-img {
        height: 65px;

        max-width: 200px;

        transform: translateY(3px);
    }


    /* -----------------------------------------------------
       HAMBURGUESA
    ----------------------------------------------------- */

    .nav-toggle-label {
        width: 42px;

        height: 42px;

        flex: 0 0 42px;

        margin-left: auto;
    }

    .nav-toggle-label span {
        width: 28px;

        height: 3px;
    }


    /* -----------------------------------------------------
       MENÚ
    ----------------------------------------------------- */

    .nav-links {
        top: 82px;

        right: 0;

        min-width: 190px;

        padding: 15px 20px;
    }


    /* -----------------------------------------------------
       WHATSAPP
    ----------------------------------------------------- */

    .btn-whatsapp {
        right: 15px;

        bottom: 70px;

        width: 52px;

        height: 52px;

        font-size: 28px;
    }

    .btn-whatsapp i {
        font-size: 28px;
    }

}


/* =========================================================
   CELULARES MUY PEQUEÑOS
========================================================= */

@media (max-width: 400px) {

    .navbar {
        padding-left: 14px;
        padding-right: 14px;
    }

    .navbar.scrolled {
        padding-left: 14px;
        padding-right: 14px;
    }


    /*
     * Reducimos un poco el espacio reservado
     * pero mantenemos el logo grande.
     */

    .logo {
        width: 175px;

        flex: 0 0 175px;
    }

    .logo-img {
        max-width: 175px;

        height: 60px;
    }

    .navbar.scrolled .logo-img {
        max-width: 175px;

        height: 60px;
    }


    .nav-toggle-label {
        width: 40px;

        flex: 0 0 40px;
    }

    .nav-toggle-label span {
        width: 27px;
    }

}