/* =====================================================
   Inmobiliaria Regueira — Mobile Header / Menu
   Menú lateral oscuro, coherente con el header
   ===================================================== */

   :root {
    --mobile-menu-bg: #141414;
    --mobile-border: rgba(255, 255, 255, 0.07);
    --mobile-text: rgba(255, 255, 255, 0.85);
    --mobile-text-hover: #ffffff;
    --accent: #CC0000;
    --white: #FFFFFF;
}

/* ─── Toggle button (solo visible en móvil vía header.css) ─── */
.mobile-menu-toggle {
    display: none;
}

#mobile-menu-btn {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.4em;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

#mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

#mobile-menu-btn i {
    pointer-events: none;
    font-size: 22px;
}

/* ─── Panel lateral ─── */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background-color: var(--mobile-menu-bg);
    z-index: 2000;
    transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    right: 0;
}

/* ─── Header del menú ─── */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 16px 20px;
    border-bottom: 1px solid var(--mobile-border);
}

.mobile-menu-header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-menu-header .logo img {
    height: 38px;
    width: auto;
    border-radius: 8px;
}

.close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.3em;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.25s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    transform: rotate(90deg);
}

.close-btn i {
    pointer-events: none;
}

/* ─── Overlay oscuro detrás del menú ─── */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ─── Bloquear scroll cuando el menú está abierto ─── */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ─── Nav list ─── */
.mobile-nav-list {
    list-style-type: none;
    padding: 12px 0;
    margin: 0;
    flex: 1;
}

.mobile-nav-item {
    border-bottom: 1px solid var(--mobile-border);
}

.mobile-nav-item a {
    display: block;
    padding: 14px 20px;
    color: var(--mobile-text);
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
}

.mobile-nav-item a:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--mobile-text-hover);
}

.mobile-nav-item.active a {
    color: var(--white);
    font-weight: 600;
    background-color: rgba(204, 0, 0, 0.12);
    border-left: 3px solid var(--accent);
    padding-left: 17px;
}

/* ─── Dropdown móvil ─── */
.mobile-dropdown {
    position: relative;
}

.mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.mobile-dropdown-toggle i {
    transition: transform 0.3s ease;
    font-size: 0.85rem;
    opacity: 0.6;
}

.mobile-dropdown.active .mobile-dropdown-toggle i {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(0, 0, 0, 0.25);
}

.mobile-dropdown.active .mobile-dropdown-menu {
    max-height: 300px;
}

.mobile-dropdown-menu li {
    list-style-type: none;
}

.mobile-dropdown-menu li a {
    padding: 11px 20px 11px 32px;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.65);
}

.mobile-dropdown-menu li a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
}

/* ─── Footer del menú (contacto) ─── */
.mobile-menu-footer {
    padding: 20px;
    border-top: 1px solid var(--mobile-border);
    margin-top: auto;
}

.mobile-contact-info {
    margin-bottom: 16px;
}

.mobile-contact-info a {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.86rem;
    transition: color 0.2s ease;
}

.mobile-contact-info a:hover {
    color: var(--white);
}

.mobile-contact-info a i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--accent);
    flex-shrink: 0;
}

/* ─── Social links en el footer del menú ─── */
.mobile-social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.mobile-social-links a {
    color: var(--white);
    font-size: 1.1em;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.07);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, transform 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-social-links a:hover {
    background-color: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* ─── Responsive: mostrar toggle solo en móvil ─── */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
    }

    .header-top {
        display: none;
    }
}