/* Header CSS */
html {
    overflow-x: hidden;
}

:root {
    --header-bg: #ffffff;
    --text-primary: #333333;
    --text-secondary: #555555;
    --primary-blue: #1d70b8;
    --primary-blue-hover: #155a96;
    --brand-red: #ea4335;
    --badge-yellow: #fbbc04;
    --border-color: #e5e5e5;
    --font-inter: 'Inter', sans-serif;
    --transition: color 0.2s ease, background-color 0.2s ease;
}

body {
    margin: 0;
    font-family: var(--font-inter);
    background: #ffffff;
    overflow-x: hidden;
}

.main-header {
    background-color: var(--header-bg);
    border-bottom: 5px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Logo Section */
.header-left {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
}

.logo-icon {
    font-size: 28px;
    color: var(--brand-red);
}

.logo-text {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-blue);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--brand-red);
}

.location-dropdown {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding-left: 20px;
    border-left: 1px solid var(--border-color);
}

.location-dropdown i {
    font-size: 12px;
    color: #888;
}

.location-dropdown:hover {
    color: var(--primary-blue);
}

/* Navigation Section */
.header-nav {
    display: flex;
    align-items: center;
}

.header-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.nav-item a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.nav-item a i {
    font-size: 10px;
    color: #999;
}

.nav-item a:hover {
    color: var(--primary-blue);
}

.nav-item a:hover i {
    color: var(--primary-blue);
}

/* Action Section */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.post-property-btn {
    position: relative;
    background-color: var(--primary-blue);
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    transition: var(--transition);
}

.post-property-btn:hover {
    background-color: var(--primary-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(29, 112, 184, 0.3);
}

.badge-free {
    position: absolute;
    top: -10px;
    right: 10px;
    background-color: var(--badge-yellow);
    color: #000;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    text-transform: uppercase;
}

.help-icon {
    color: var(--text-secondary);
    font-size: 20px;
    transition: var(--transition);
}

.help-icon:hover {
    color: var(--primary-blue);
}

.signin-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border-left: 1px solid var(--border-color);
    padding-left: 20px;
    transition: var(--transition);
}

.signin-btn i {
    font-size: 22px;
    color: var(--text-secondary);
}

.signin-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.main-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-blue);
}

.sub-text {
    font-size: 12px;
    color: #888;
}

.signin-btn:hover i {
    color: var(--primary-blue);
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
}

.mobile-nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1050;
}

.mobile-nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

body.menu-open {
    overflow: hidden;
}

.mobile-nav-header,
.mobile-nav-footer {
    display: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .header-nav {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: min(320px, 100%);
        height: 100vh;
        background: #ffffff;
        padding: 20px 22px 24px;
        box-shadow: -12px 0 40px rgba(0, 0, 0, 0.16);
        border-left: 1px solid var(--border-color);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 1100;
        overflow-y: auto;
    }

    .header-nav.active {
        transform: translateX(0);
    }

    .mobile-menu-btn {
        display: block;
    }

    .header-nav ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
        margin-top: 8px;
    }

    .header-nav .nav-item {
        width: 100%;
        border-bottom: 1px solid #f1f5f9;
    }

    .header-nav .nav-item > a {
        justify-content: space-between;
        width: 100%;
        padding: 14px 0;
        color: #0f172a;
        font-size: 15px;
    }

    .header-nav .nav-item .dropdown {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: transparent;
        min-width: auto;
        padding: 0 0 6px 14px;
        border-radius: 0;
    }

    .header-nav .nav-item.open .dropdown {
        display: flex;
    }

    .header-nav .nav-item.open > a i {
        transform: rotate(180deg);
    }

    .location-dropdown {
        display: none;
    }

    .mobile-nav-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 16px;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 8px;
    }

    .mobile-sidebar-logo {
        display: flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
        color: var(--primary-blue);
        font-size: 17px;
        font-weight: 700;
    }

    .mobile-sidebar-logo i {
        color: var(--brand-red);
        font-size: 20px;
    }

    .mobile-nav-close {
        width: 40px;
        height: 40px;
        border: 0;
        border-radius: 999px;
        background: #f3f3f3;
        color: #334155;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }

    .mobile-nav-footer {
        margin-top: 18px;
        padding-top: 16px;
        border-top: 1px solid #e5e7eb;
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .mobile-nav-footer .post-property-btn {
        display: inline-flex;
        justify-content: center;
        width: 100%;
    }

    .mobile-nav-link {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 14px;
        font-weight: 600;
    }
}

@media (min-width: 1025px) {
    .mobile-nav-overlay {
        display: none !important;
    }

    .header-nav {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        background: transparent;
        box-shadow: none;
        border-left: 0;
        transform: none;
        overflow: visible;
    }

    .header-nav ul {
        display: flex;
        flex-direction: row;
        gap: 25px;
    }

    .header-nav .nav-item {
        width: auto;
        border-bottom: 0;
    }

    .header-nav .nav-item > a {
        justify-content: flex-start;
        padding: 0;
        color: var(--text-secondary);
        font-size: 15px;
    }

    .header-nav .nav-item .dropdown {
        position: absolute;
        display: flex;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        background: #fff;
        min-width: 200px;
        padding: 10px 0;
        border-radius: 8px;
    }

    .mobile-nav-header,
    .mobile-nav-footer {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .header-actions {
        gap: 10px;
    }
    .post-property-btn {
        padding: 8px 12px;
        font-size: 13px;
    }
    .signin-text {
        display: none;
    }
    .signin-btn {
        padding-left: 10px;
    }
    .logo-text span {
        display: none; /* Hide 'India' on mobile for space */
    }
}

/* Dropdown Navigation Styles */
.nav-item.has-dropdown {
    position: relative;
}

.nav-item .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    z-index: 1001;
    display: flex;
    flex-direction: column;
}

.nav-item.has-dropdown:hover .dropdown,
.nav-item.has-dropdown.open .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-item .dropdown li {
    margin: 0;
}

.nav-item .dropdown li a {
    padding: 10px 20px;
    color: #555;
    font-size: 14px;
    display: block;
    transition: background 0.2s, color 0.2s;
}

.nav-item .dropdown li a:hover {
    background: #f0f7fc;
    color: var(--primary-blue);
}

/* Global Click Ripple Animation */
.click-ripple {
    position: fixed;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-anim 0.6s linear;
    background: rgba(29, 112, 184, 0.4);
    pointer-events: none;
    z-index: 9999;
}

@keyframes ripple-anim {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Property Ticker Styles */
.property-ticker-wrap {
    width: 100%;
    background-color: #1a1a1a;
    color: #fff;
    padding: 6px 0;
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid var(--primary-blue);
    display: flex;
    align-items: center;
}

.property-ticker {
    display: flex;
    white-space: nowrap;
    overflow: hidden;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-right: 50px;
    font-size: 16px;
    font-weight: 500;
}

.ticker-item img {
    width: 45px;
    height: 45px;
    border-radius: 6px;
    object-fit: cover;
}

.ticker-item strong {
    color: var(--badge-yellow);
}

/* Star Click Animation */
.nav-item {
    position: relative;
}

.nav-item.star-anim-active::after {
    content: '✨🌟✨';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    white-space: nowrap;
    animation: stars-spin 3s linear;
    pointer-events: none;
    z-index: 2000;
}

@keyframes stars-spin {
    0% { transform: translateX(-50%) rotate(0deg) scale(1); opacity: 1; }
    50% { transform: translateX(-50%) rotate(180deg) scale(1.5); opacity: 0.8; }
    100% { transform: translateX(-50%) rotate(360deg) scale(0); opacity: 0; }
}