/* =====================================================
   Inmobiliaria Regueira — Header
   Header oscuro premium, sin rojo dominante
   ===================================================== */

   :root {
    --header-scroll-bg: rgba(17, 17, 17, 0.97);
    --accent: #CC0000;
    --white: #FFFFFF;
    --light-gray: #f5f5f5;
    --nav-text: rgba(255, 255, 255, 0.88);
    --nav-text-hover: #ffffff;
}

/* ─── Base ─── */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
}

.main-header.scrolled {
    background-color: var(--header-scroll-bg);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ─── Header top (oculto, info en menú móvil) ─── */
.header-top {
    display: none;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.contact-info a,
.social-links a {
    color: var(--white);
    margin-right: 15px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:last-child,
.social-links a:last-child {
    margin-right: 0;
}

.contact-info a i,
.social-links a i {
    margin-right: 5px;
}

.contact-info a:hover,
.social-links a:hover {
    color: var(--light-gray);
}

/* ─── Header main ─── */
.header-main {
    padding: 0;
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    background: transparent;
    border-radius: 0;
}

/* ─── Logo ─── */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.logo img {
    height: 110px;
    width: auto;
    border-radius: 8px;
    display: block;
    transition: height 0.3s ease;
}

.logo-container {
    display: flex;
    align-items: center;
    position: relative;
}

.flag-wrapper {
    margin-left: 10px;
    display: flex;
    align-items: center;
}

.flag-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.uruguay-flag {
    width: 24px;
    height: auto;
    border-radius: 2px;
    opacity: 0.85;
}

/* ─── Nav ─── */
.main-nav {
    display: flex;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.nav-item {
    position: relative;
}

.nav-item a {
    display: block;
    padding: 8px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--nav-text);
    text-decoration: none;
    text-shadow: none;
    transition: color 0.2s ease, background 0.2s ease;
    border-radius: 6px;
}

.nav-item a:hover,
.nav-item.active a {
    color: var(--nav-text-hover);
    background: rgba(255, 255, 255, 0.08);
}

.nav-item.active a::after {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
    margin: 3px auto 0;
    position: static;
}

/* ─── Dropdown ─── */
.dropdown-toggle {
    display: flex;
    align-items: center;
}

.dropdown-toggle i {
    margin-left: 5px;
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.nav-item:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1a1a1a;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    min-width: 200px;
    z-index: 1000;
    padding: 6px 0;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-item:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown-menu li {
    list-style-type: none;
}

.dropdown-menu li a {
    color: rgba(255, 255, 255, 0.82);
    display: block;
    padding: 9px 16px;
    font-weight: 500;
    font-size: 0.88rem;
    text-shadow: none;
    text-transform: none;
    letter-spacing: 0;
    border-radius: 0;
}

.dropdown-menu li a:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: var(--white);
}

/* ─── Mobile toggle button ─── */
.mobile-menu-toggle {
    display: none;
}

#mobile-menu-btn {
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--white);
    border-radius: 8px;
    transition: background 0.2s ease;
}

#mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

#mobile-menu-btn i {
    font-size: 22px;
    pointer-events: none;
    color: var(--white);
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .nav-item a {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .header-main .container {
        padding: 0 16px;
        height: 64px;
    }

    .logo img {
        height: 70px !important;
        max-height: 100px !important;
    }

    .uruguay-flag {
        width: 20px;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 70px !important;
        max-height: 70px !important;
    }

    .flag-wrapper,
    .flag-container {
        display: none;
    }
}