@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Brand Colors */
    --primary: #FA8C16;
    --primary-gradient: linear-gradient(135deg, #FA8C16 0%, #FFBB33 100%);
    --secondary: #1890FF;
    --accent: #FF4D4F;

    /* Neutral Colors */
    --text-main: #1F2937;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --bg-body: #F3F4F6;
    --bg-surface: #FFFFFF;

    /* UI Elements */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-colored: 0 10px 25px -5px rgba(250, 140, 22, 0.3);

    /* Layout */
    /* Layout */
    --header-height: 90px;
    /* Massive header for huge logo */
    --mobile-nav-height: 65px;
}

.mobile-only {
    display: none;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-body);
    line-height: 1.6;
    padding-bottom: var(--mobile-nav-height);
    /* Mobile nav space */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* --- Layout Wrappers --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Header --- */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: var(--header-height);
    /* Reduced from 180px */
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0 1.5rem;
    justify-content: space-between;
    transition: height 0.3s ease;
}

/* --- Logo Styles (Forced Stretch & Interaction Fix) --- */
.logo {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    width: 300px !important;
    /* FIXED WIDTH */
    min-width: 300px !important;
}

/* Main Logo Image Style */
.logo img {
    height: 60px !important;
    /* FIXED HEIGHT */
    width: 100% !important;
    /* FILL CONTAINER */
    max-width: 100% !important;
    object-fit: fill !important;
    /* STRETCH */
    transform-origin: left center;
}

/* Prevent Click Expansion */
.logo a,
.logo a:active,
.logo a:focus {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    /* DISALLOW WEIRD TRANSFORMS */
}

.logo a {
    display: flex;
    align-items: center;
    height: 100%;
    text-decoration: none;
}

/* Mobile Responsive Logo - Prevent Overflow */
@media (max-width: 768px) {
    .logo img {
        height: 50px;
        /* Scale down for mobile screens */
    }
}

.logo img.icon {
    display: none;
    /* Hide legacy icon class if present */
}

/* Pure CSS Gradient Text Logo */
.brand-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 900;
    /* Ultra Black */
    font-size: 3.5rem;
    /* ~56px, Very Large */
    line-height: 1;
    margin-left: 5px;
    margin-top: -4px;
    /* Optical adjustment */

    /* Deep Green to Vibrant Orange */
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 30%, #ff6d00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Fallback */
    color: #ff6d00;

    letter-spacing: -2px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    cursor: pointer;
    transition: transform 0.2s ease;
}

.brand-text:hover {
    transform: scale(1.02);
}

/* Cleanup old classes */
.logo img.text {
    display: none !important;
}

.logo-fallback {
    display: none !important;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.highlight-btn {
    background: var(--primary-gradient);
    color: white !important;
    padding: 0.5rem 1.25rem !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 10px rgba(250, 140, 22, 0.2);
    border: none !important;
}

.highlight-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(250, 140, 22, 0.3);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 500px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3)), url('https://images.unsplash.com/photo-1518732688008-65e317454845?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 800px;
}

.search-box {
    background: white;
    padding: 0.5rem;
    border-radius: 50px;
    display: flex;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.search-box input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    font-family: 'Inter', sans-serif;
    outline: none;
    border-radius: 50px 0 0 50px;
}

.search-box button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-box button:hover {
    transform: scale(1.05);
}

/* --- Cards --- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding-bottom: 2rem;
}

.card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    height: 220px;
    background-color: #e5e7eb;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.card-like {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.card-like:hover {
    transform: scale(1.1);
}

.card-body {
    padding: 1.25rem;
}

.card-price {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.card-price small {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 400;
}

.card-loc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.card-specs {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.spec {
    font-size: 0.9rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* --- Lang Switch --- */
.lang-switch button {
    background: none;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-switch button.active {
    background: rgba(24, 144, 255, 0.1);
    color: var(--secondary);
}

/* --- Mobile Nav --- */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 900;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-items {
    display: flex;
    justify-content: space-around;
    padding: 0.75rem 0;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-light);
    gap: 4px;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    font-size: 1.4rem;
    margin-bottom: 2px;
}

/* --- Responsiveness --- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-nav {
        display: block;
    }

    .mobile-only {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

    .hero {
        height: 350px;
        margin-bottom: 2rem;
        border-radius: 0 0 24px 24px;
    }

    .hero h1 {
        font-size: 2rem;
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .search-box {
        width: 90%;
    }
}

/* --- Ad Banners --- */
/* --- Ad Banners (Premium) --- */
.ad-banner {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    border: 1px dashed #d1d5db;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #9ca3af;
    font-weight: 500;
    margin-bottom: 2rem;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

/* --- Image Upload Area --- */
.upload-area {
    width: 100%;
    height: 200px;
    border: 2px dashed #d1d5db;
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    background: #f9fafb;
    transition: all 0.2s;
    overflow: hidden;
    position: relative;
}

.upload-area:hover {
    border-color: var(--primary);
    background: #fff7ed;
    /* Light orange tint */
}

/* --- Auth Buttons --- */
.login-btn {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.login-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.ad-banner::before {
    content: "Advertisement";
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 0.65rem;
    color: #cbd5e1;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ad-banner:hover {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* --- Refined Filter Sidebar (Floating Card) --- */
.filters-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    height: fit-content;
    max-height: calc(100vh - var(--header-height) - 40px);
    /* Prevent cutoff */
    overflow-y: auto;
    /* Allow scrolling if too tall */
    border: 1px solid rgba(0, 0, 0, 0.03);
    z-index: 100;
}

/* Filter Inputs & Dropdowns */
.filter-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-sm);
    background-color: #f9fafb;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.2s;
    outline: none;
    cursor: pointer;
}

.filter-group select:hover,
.filter-group input:hover {
    background-color: white;
    border-color: #d1d5db;
}

.filter-group select:focus,
.filter-group input:focus {
    background-color: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(250, 140, 22, 0.1);
}

/* Deal Type Toggle (Rent/Buy) */
.deal-type-toggle {
    display: flex;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 50px;
    margin-bottom: 1.5rem;
}

.deal-type-btn {
    flex: 1;
    border: none;
    background: none;
    padding: 0.6rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.deal-type-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
/* --- Auth Modal Styles --- */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.auth-modal {
    background: white;
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
    margin: 20px;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.auth-header {
    background: #f9fafb;
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    position: relative;
}

.auth-logo {
    height: 40px;
    margin-bottom: 10px;
}

.auth-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
}

.auth-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    color: #6b7280;
    transition: all 0.2s;
}

.auth-tab.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    background: #fff;
}

.auth-body {
    padding: 2rem;
}

.auth-form-group {
    margin-bottom: 1.2rem;
}

.auth-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.auth-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s;
}

.auth-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(250, 140, 22, 0.1);
    outline: none;
}

.auth-btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 1rem;
    transition: transform 0.1s;
}

.auth-btn-primary:active {
    transform: scale(0.98);
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider span {
    background: white;
    padding: 0 10px;
    color: #9ca3af;
    font-size: 0.85rem;
    position: relative;
}

.google-btn {
    width: 100%;
    padding: 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background 0.2s;
}

.google-btn:hover {
    background: #f9fafb;
}

.auth-links {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}
