:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --bg-color: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --white: #ffffff;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --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);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-login {
    background: none;
    border: none;
    color: var(--text-main);
    font-weight: 500;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: background 0.3s ease;
}

.btn-login:hover {
    background: var(--bg-color);
}

.btn-post {
    background-color: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s ease, transform 0.2s ease;
}

.btn-post:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: var(--white);
    padding: 6rem 5%;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.search-box {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 9999px;
    display: flex;
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    align-items: center;
    gap: 0.5rem;
}

.search-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1.5rem;
    color: var(--text-main);
    flex: 1;
}

.search-input-group i {
    color: var(--text-muted);
}

.location-group {
    border-right: 1px solid var(--border);
    flex: 0.8;
}

.search-input-group select,
.search-input-group input {
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: inherit;
    width: 100%;
    color: var(--text-main);
    background: transparent;
}

.btn-search {
    background-color: var(--text-main);
    color: var(--white);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-search:hover {
    background-color: #000;
}

.popular-locations {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: background 0.3s;
}

.badge:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 5%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.filter-sort select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    font-family: inherit;
    background: var(--white);
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.ad-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
    cursor: pointer;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.ad-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.ad-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ad-card:hover .ad-image img {
    transform: scale(1.05);
}

.ad-price {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(15, 23, 42, 0.9);
    color: var(--white);
    padding: 0.4rem 1rem;
    border-radius: 9999px;
    font-weight: 700;
    backdrop-filter: blur(4px);
}

.ad-content {
    padding: 1.5rem;
}

.ad-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-location {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.ad-location i {
    margin-top: 0.2rem;
}

.ad-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.load-more {
    text-align: center;
    margin-top: 3rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.75rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Footer */
footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 3rem 5%;
    text-align: center;
    color: var(--text-muted);
}

footer .logo {
    justify-content: center;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
        border-radius: var(--radius);
        padding: 1rem;
    }
    
    .location-group {
        border-right: none;
        border-bottom: 1px solid var(--border);
        width: 100%;
        padding: 1rem 0.5rem;
    }
    
    .keyword-group {
        width: 100%;
        padding: 1rem 0.5rem;
    }
    
    .btn-search {
        width: 100%;
        border-radius: var(--radius);
        margin-top: 0.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }
}
