/* ===== Mobile Drawer ===== */
 

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 26px;
}
.hamburger-icon span {
    display: block;
    height: 2.5px;
    background: #1a1a2e;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Overlay oscuro */
.mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-drawer-overlay.open {
    display: block;
    opacity: 1;
}

/* Drawer lateral */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100%;
    background: #fff;
    z-index: 999;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}
.mobile-drawer.open {
    right: 0;
}

/* Header del drawer */
.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #f8f9ff;
}
.drawer-logo {
    height: 36px;
    width: auto;
}
.drawer-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #555;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}
.drawer-close:hover {
    background: #eee;
    color: #1a1a2e;
}

/* Nav links del drawer */
.drawer-nav {
    flex: 1;
    padding: 12px 0;
}
.drawer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.drawer-nav ul li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    font-family: 'Inter', 'Poppins', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #1a1a2e;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.drawer-nav ul li a i {
    width: 20px;
    font-size: 16px;
    color: #2b358f;
    text-align: center;
}
.drawer-nav ul li a:hover,
.drawer-nav ul li a.active {
    background: #f0f2ff;
    border-left-color: #2b358f;
    color: #2b358f;
}
.drawer-nav ul li a.active i {
    color: #2b358f;
}

/* Footer del drawer con botones CTA */
.drawer-footer {
    padding: 20px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.drawer-btn {
    display: block;
    text-align: center;
    padding: 12px 16px;
    border-radius: 8px;
    font-family: 'Inter', 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.drawer-btn-primary {
    background: #2b358f;
    color: #fff !important;
}
.drawer-btn-primary:hover {
    background: #1e2666;
    color: #fff !important;
    transform: translateY(-1px);
}
.drawer-btn-outline {
    border: 2px solid #2b358f;
    color: #2b358f !important;
    background: transparent;
}
.drawer-btn-outline:hover {
    background: #f0f2ff;
}
 

.menutop-wrap .menu-top .list li {
    padding: 10px 12px;
}

.menutop-wrap .menu-top .list li:hover {
    cursor: pointer;
}

.menutop-wrap .menu-top .list li:hover a {
    color: #fff;
}

.menutop-wrap .menu-top .list li a {
    font-weight: 500;
    font-size: 12px;
    color: #2b358f;
    cursor: pointer;
    font-family: 'Inter', 'Poppins', sans-serif;
    letter-spacing: 0.3px;
    text-transform: none;
    transition: color 0.2s ease;
}


@media (max-width: 768px) {
    /* 1. Forzamos el contenedor a ser visible y ordenado */
    .menutop-wrap {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        height: 70px !important;
        padding: 0 15px !important;
        background: #fff !important;
        position: relative !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* 2. El Logo: Que tenga su espacio a la izquierda */
    .logo-container, .menutop-wrap img {
        max-width: 140px !important;
        height: auto !important;
        display: block !important;
    }

    /* 3. OCULTAMOS solo la lista de palabras (Inmuebles, Venta, etc.) 
       porque eso es lo que causa el choque en móvil */
    .menu-top .list {
        display: none !important; 
    }

    /* 4. CONTENEDOR DE ACCIONES (Derecha) */
    /* Asegúrate de que los botones de 'Publicar' y 'Usuario' estén dentro de un div 
       o se comporten como flex items */
    .menut-top-user, .menut-top-cta {
        display: inline-flex !important;
        vertical-align: middle;
        margin-left: 8px;
    }

    /* 5. BOTÓN USUARIO: Quitamos el texto largo 'Administrador...' */
    .menut-top-user .dropdown-toggle span {
        display: none !important; 
    }

    .menut-top-user .dropdown-toggle {
        width: 40px !important;
        height: 40px !important;
        background: #2b358f !important;
        border-radius: 50% !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 !important;
        color: #fff !important;
    }

    /* 6. BOTÓN PUBLICAR: Lo volvemos un círculo con un signo '+' */
    .menut-top-cta a {
        font-size: 0 !important; /* Borra el texto largo */
        width: 40px !important;
        height: 40px !important;
        background: #49a72a !important;
        border-radius: 50% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 !important;
    }

    .menut-top-cta a::before {
        content: '+';
        font-size: 24px;
        color: #fff;
        font-weight: bold;
    }
}

@media (max-width: 991px) {
    /* 1. Subimos el header que se bajó */
    header.default-header {
        position: relative !important;
        top: 0 !important;
        height: 70px !important;
        background: #fff !important;
        z-index: 1000 !important;
    }

    /* 2. Forzamos la alineación horizontal (Anula el row-reverse) */
    nav.nav-menu {
        display: flex !important;
        flex-flow: row !important; /* Obligatorio para corregir el HTML */
        justify-content: space-between !important;
        align-items: center !important;
        height: 70px !important;
        padding: 0 15px !important;
    }

    /* 3. Quitamos el Absolute del logo que lo mandaba a -55px */
    .logo_img {
        position: static !important; /* Lo regresa a su sitio */
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
        top: 0 !important; /* Anula el -55px */
    }

    .logo_img img {
        height: 40px !important; /* Tamaño visible */
        width: auto !important;
    }

    /* 4. El botón hamburguesa a la derecha */
    #mobileMenuToggle {
        display: flex !important;
        margin: 0 !important;
        position: static !important;
    }

    /* 5. Eliminamos el espacio blanco gigante que se hizo abajo */
    .nav-menu .row {
        display: contents !important; /* Hace que la fila no estorbe */
    }

    /* Ocultamos la barra superior de usuario en móvil para que no empuje todo */
    .menutop-wrap {
        display: none !important;
    }
}

/* ============================================================
   MOBILE DRAWER (ESTILOS MODERNIZADOS)
   ============================================================ */

/* Hamburguesa (Botón de apertura) */
.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 26px;
}

.hamburger-icon span {
    display: block;
    height: 2.5px;
    background: #2b358f;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Overlay oscuro de fondo */
.mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.open {
    display: block;
    opacity: 1;
}

/* Contenedor del Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px; /* Ajustado para ser más sutil */
    width: 280px;
    height: 100%;
    background: #ffffff;
    z-index: 999;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

.mobile-drawer.open {
    right: 0;
}

/* Header del Drawer */
.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #f1f3f9;
    background: #ffffff;
}

.drawer-logo {
    max-height: 28px !important; /* Evita que el logo se vea gigante */
    width: auto;
}

.drawer-close {
    background: #f8f9ff;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #2b358f;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.drawer-close:hover {
    background: #eee;
}

/* Navegación Principal */
.drawer-nav {
    flex: 1;
    padding: 15px 0;
}

.drawer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.drawer-nav ul li a {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    font-family: 'Inter', 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #444;
    text-decoration: none;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

/* Iconos en verde para resaltar */
.drawer-nav ul li a i {
    width: 20px;
    margin-right: 15px;
    font-size: 16px;
    color: #49a72a; 
    text-align: center;
}

.drawer-nav ul li a:hover,
.drawer-nav ul li a.active {
    background: #f4f6ff;
    color: #2b358f;
    border-left-color: #49a72a;
}

/* Footer con Botones de Acción */
.drawer-footer {
    padding: 20px;
    border-top: 1px solid #f1f3f9;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
}

.drawer-btn {
    width: 100%;
    padding: 12px;
    border-radius: 10px; /* Bordes redondeados modernos */
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s, background 0.2s;
}

.drawer-btn:active {
    transform: scale(0.98); /* Feedback táctil */
}

/* Botón Publicar / Principal */
.drawer-btn-primary {
    background: #2b358f;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(43, 53, 143, 0.2);
}

.drawer-btn-primary:hover {
    background: #1e2666;
}

/* Botón Secundario / Outline */
.drawer-btn-outline {
    border: 1.5px solid #2b358f;
    color: #2b358f !important;
    background: transparent;
}

.drawer-btn-outline:hover {
    background: #f4f6ff;
}

/* Ajuste final para el nav en móvil */
@media (max-width: 991px) {
    .logo_img img {
        height: 38px !important; /* Consistencia con el drawer */
    }
}
.drawer-footer {
    padding: 20px 20px 85px 20px !important; /* Añadimos 85px abajo para librar el icono azul */
    border-top: 1px solid #f1f3f9;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
    position: relative;
    z-index: 1000;
}