﻿/*====================================================
  Yireh MANÁ HEADER v2.0
====================================================*/

.nc-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    z-index: 9999;
    background: #05111A;
    transition: .35s ease;
}

    .nc-header .container-xl {
        height: 100%;
        display: grid;
        grid-template-columns: 260px 1fr 220px;
        align-items: center;
    }

/*====================================================
  LOGO
====================================================*/

.header-logo {
    display: flex;
    align-items: center;
}

    .header-logo a {
        display: flex;
        align-items: center;
    }

    .header-logo img {
        height: 85px;
        width: auto;
        transition: .35s;
    }

        .header-logo img:hover {
            transform: scale(1.04);
        }

/*====================================================
  MENU DESKTOP
====================================================*/

.main-nav {
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 38px;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .nav-list li {
        position: relative;
        list-style: none;
    }

    .nav-list a {
        color: #fff;
        font-size: .90rem;
        font-weight: 600;
        letter-spacing: .4px;
        text-transform: uppercase;
        transition: .30s;
        position: relative;
        padding: 8px 0;
        text-decoration: none;
    }

        /*====================================================
          HOVER MENU
        ====================================================*/

        .nav-list a::after {
            content: '';
            position: absolute;
            left: 0;
            bottom: -6px;
            width: 100%;
            height: 2px;
            background: #D4AF37;
            transform: scaleX(0);
            transform-origin: left;
            transition: .30s;
        }

        .nav-list a:hover {
            color: #D4AF37;
        }

            .nav-list a:hover::after {
                transform: scaleX(1);
            }

        .nav-list a.active {
            color: #D4AF37;
        }

            .nav-list a.active::after {
                transform: scaleX(1);
            }

/*====================================================
  LOGIN
====================================================*/

.header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
}

.btn-login {
    height: 48px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 8px;
    background: linear-gradient(135deg,#BA8734,#D09935);
    color: #fff;
    font-weight: 700;
    transition: .35s;
    box-shadow: 0 8px 25px rgba(212,175,55,.20);
}

    .btn-login:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 40px rgba(212,175,55,.35);
    }

.mobile-user {
    display: none;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    background: #BA8734;
    color: #fff;
    justify-content: center;
    align-items: center;
    font-size: 18px;
}

.menu-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: none;
    background: transparent;
    color: #FFF;
    font-size: 25px;
    cursor: pointer;
}

/*====================================================
  OVERLAY
====================================================*/

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    opacity: 0;
    visibility: hidden;
    transition: .30s;
}

    .menu-overlay.show {
        opacity: 1;
        visibility: visible;
    }

.mobile-header {
    display: none;
}

.mobile-login {
    display: none;
}

/*====================================================
  TABLET
====================================================*/

@media (max-width:1024px) {

    .nc-header {
        height: 82px;
    }

        .nc-header .container-xl {
            grid-template-columns: 220px auto;
            padding-left: 20px; /* <--- Agrega estas dos líneas si no están */
            padding-right: 20px;
        }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 360px;
        max-width: 85vw; /* Seguridad extra para que no supere la pantalla en pantallas chicas */
        height: 100vh;
        background: #05111A;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        padding: 30px;
        transition: .35s;
        z-index: 10001;
        box-shadow: -10px 0 30px rgba(0,0,0,.30);
    }

        .main-nav.show {
            right: 0;
        }

    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 25px;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .mobile-logo {
        height: 42px;
        width: auto;
    }

    .mobile-close {
        width: 42px;
        height: 42px;
        border: none;
        background: none;
        color: #FFF;
        font-size: 24px;
        cursor: pointer;
    }

    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 22px;
        width: 100%;
    }

        .nav-list li {
            width: 100%;
        }

        .nav-list a {
            display: inline-flex;
            width: auto;
            font-size: 16px;
            padding: 6px 0;
        }

    .mobile-login {
        display: block;
        margin-top: 25px; /* Cambiado de 'auto' a 25px para que quede pegado a los enlaces */
        padding-top: 0;
        width: fit-content; /* <--- SOLO AGREGA ESTA LÍNEA */
    }

    .desktop-login {
        display: none;
    }

    .mobile-user {
        display: flex;
    }

    .menu-toggle {
        width: auto !important; /* Quita los 80px que empujaban el icono hacia la izquierda */
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/*====================================================
  MOBILE (OPTIMIZADO CON TU SOLUCIÓN)
====================================================*/

@media(max-width:767px) {

    .container-xl {
        padding-left: 15px; /* Ligera reducción para evitar empujones en pantallas de 360px */
        padding-right: 15px;
    }

    .nc-header {
        height: 76px;
    }

        .nc-header .container-xl {
            grid-template-columns: 1fr auto;
        }

    .header-logo img {
        height: 80px; /* Un pelito más chico para absorber los 80px del botón sin problemas */
    }

    /* 2. Contenedor de botones a la derecha */
    .header-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 12px !important;
        margin-left: auto !important; /* Empuja todo el bloque a la derecha */
    }

    .mobile-user {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .menu-toggle {
        width: 80px; /* TU SOLUCIÓN: Da el espacio exacto al icono */
        height: 42px;
        font-size: 22px;
        display: inline-flex; /* AÑADIDO: Centra el icono en medio de los 80px */
        align-items: center;
        justify-content: center;
    }

    /* CORRECCIÓN: En celular solo ajustamos ancho y padding, manteniendo position: fixed y top: 0 */
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%; /* Cambiado de -150% a -100% para que no empuje el viewport */
        width: 100%;
        height: 100vh;
        padding: 28px;
    }

        .main-nav.show {
            right: 0;
        }
}

/*====================================================
  DESKTOP
====================================================*/

@media(min-width:1025px) {

    .main-nav {
        position: static;
        width: auto;
        height: auto;
        background: transparent;
        box-shadow: none;
        display: flex;
    }


    .mobile-header {
        display: none;
    }


    .nav-list {
        display: flex;
        flex-direction: row;
        gap: 38px;
        padding: 0;
        margin: 0;
    }


        .nav-list li {
            list-style: none;
        }


    .mobile-login {
        display: none;
    }


    .menu-toggle {
        display: none;
    }
}

/*====================================================
  HEADER STICKY
====================================================*/

.nc-header.sticky {
    height: 74px;
    background: rgba(5,17,26,.96);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
}

    .nc-header.sticky .header-logo img {
        height: 60px;
    }

/*====================================================
  ANIMACIONES
====================================================*/

.btn-login,
.mobile-user,
.menu-toggle,
.nav-list a,
.header-logo img {
    transition: .30s ease;
}

    .menu-toggle:hover {
        color: #D4AF37;
    }

    .mobile-user:hover {
        transform: translateY(-2px);
    }

.mobile-close:hover {
    color: #D4AF37;
}

.nav-list li {
    opacity: 0;
    transform: translateX(20px);
    animation: menuItem .35s forwards;
}

    .nav-list li:nth-child(1) {
        animation-delay: .10s;
    }

    .nav-list li:nth-child(2) {
        animation-delay: .18s;
    }

    .nav-list li:nth-child(3) {
        animation-delay: .26s;
    }

    .nav-list li:nth-child(4) {
        animation-delay: .34s;
    }

    .nav-list li:nth-child(5) {
        animation-delay: .42s;
    }

    .nav-list li:nth-child(6) {
        animation-delay: .50s;
    }

@keyframes menuItem {

    to {
        opacity: 1;
        transform: translateX(0);
    }
}
