/* =====================================================
   MODERN CLASSIFIED ADS STYLES FOR ADSQIK.COM
   Inspired by OLX but with unique design
   ===================================================== */

:root {
    /* Modern Green Theme */
    --primary-green: #00a046;
    --primary-green-dark: #008038;
    --primary-green-light: #00c855;
    --primary-green-hover: #00b84a;
    
    /* Accent Colors */
    --accent-orange: #ff6b35;
    --accent-blue: #007bff;
    --accent-purple: #6f42c1;
    
    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    
    /* Background Colors */
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-gray: #f3f4f6;
    --bg-dark: #1f2937;
    
    /* Border Colors */
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    --border-dark: #9ca3af;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --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-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Typography - Inter/Poppins */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700;800&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

/* Hero Section - Classified Ads Style */
.hero-classified {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hero-classified::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
}

.hero-content-classified {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title-classified {
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero-subtitle-classified {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* Main Search Box */
.main-search-box {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 8px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 2rem;
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.main-search-form {
    display: flex;
    width: 100%;
    gap: 8px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-wrapper {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    z-index: 1;
}

.main-search-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.main-search-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 160, 70, 0.1);
}

.location-input-wrapper {
    position: relative;
    width: 280px;
    display: flex;
    align-items: center;
}

.location-icon-wrapper {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    z-index: 1;
}

.location-search-input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--border-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.location-search-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 160, 70, 0.1);
}

.location-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    margin-top: 4px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
}

.location-list {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.location-item {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition-fast);
    border-bottom: 1px solid var(--border-light);
}

.location-item:last-child {
    border-bottom: none;
}

.location-item:hover {
    background: var(--bg-gray);
}

.location-item i {
    color: var(--primary-green);
    width: 20px;
}

.location-item .ad-count {
    margin-left: auto;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.search-btn-main {
    padding: 16px 32px;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.search-btn-main:hover {
    background: var(--primary-green-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Post Ad CTA Button */
.post-ad-cta {
    text-align: center;
}

.btn-post-ad-large {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: var(--accent-orange);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.btn-post-ad-large:hover {
    background: #ff5722;
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: white;
}

.btn-post-ad-large i {
    font-size: 1.5rem;
}

/* Categories Grid */
.categories-section {
    padding: 60px 0;
    background: var(--bg-white);
}

.section-title-modern {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.categories-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 2rem;
}

.category-card-modern {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 24px 20px;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.category-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-green);
    transform: scaleX(0);
    transition: var(--transition);
}

.category-card-modern:hover {
    border-color: var(--primary-green);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-card-modern:hover::before {
    transform: scaleX(1);
}

.category-icon-modern {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: var(--transition);
}

.category-card-modern:hover .category-icon-modern {
    transform: scale(1.1) rotate(5deg);
}

.category-icon-modern i {
    font-size: 2rem;
    color: white;
}

.category-info-modern h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.category-info-modern p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

.category-arrow {
    position: absolute;
    top: 12px;
    right: 12px;
    color: var(--text-light);
    opacity: 0;
    transition: var(--transition);
}

.category-card-modern:hover .category-arrow {
    opacity: 1;
    color: var(--primary-green);
}

/* Ads Grid */
.ads-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 2rem;
}

.ad-card-modern {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.ad-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-green);
}

.ad-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.ad-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 aspect ratio */
    overflow: hidden;
    background: var(--bg-gray);
}

.ad-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.ad-card-modern:hover .ad-image {
    transform: scale(1.05);
}

.ad-badge-featured,
.ad-badge-top,
.ad-badge-new {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.ad-badge-featured {
    background: var(--accent-orange);
    color: white;
}

.ad-badge-top {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: var(--text-primary);
    top: 48px;
}

.ad-badge-new {
    background: var(--primary-green);
    color: white;
}

.ad-content {
    padding: 16px;
}

.ad-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 8px;
}

.ad-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.ad-location,
.ad-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Section Headers */
.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.view-all-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.view-all-link:hover {
    color: var(--primary-green-dark);
    gap: 10px;
}

/* Featured & Latest Ads Sections */
.featured-ads-section,
.latest-ads-section {
    padding: 60px 0;
    background: var(--bg-white);
}

.featured-ads-section {
    background: var(--bg-light);
}

/* Top Cities Section */
.top-cities-section-modern {
    padding: 60px 0;
    background: var(--bg-white);
}

.cities-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 2rem;
}

.city-card-modern {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 10px;
    padding: 20px;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.city-card-modern:hover {
    border-color: var(--primary-green);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.city-card-modern i {
    font-size: 1.5rem;
    color: var(--primary-green);
    width: 32px;
    text-align: center;
}

.city-card-modern h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.city-card-modern p {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0;
}

/* Why Choose Section */
.why-choose-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

.features-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 2rem;
}

.feature-card-modern {
    background: var(--bg-white);
    padding: 32px;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.feature-card-modern:hover {
    border-color: var(--primary-green);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon-modern {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.feature-card-modern:hover .feature-icon-modern {
    transform: scale(1.1) rotate(-5deg);
}

.feature-icon-modern i {
    font-size: 2.5rem;
    color: white;
}

.feature-card-modern h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card-modern p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* Navigation Post Ad Button */
.btn-post-ad-nav {
    background: var(--accent-orange) !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    box-shadow: var(--shadow) !important;
    transition: var(--transition) !important;
}

.btn-post-ad-nav:hover {
    background: #ff5722 !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--shadow-md) !important;
    color: white !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title-classified {
        font-size: 2rem;
    }
    
    .hero-subtitle-classified {
        font-size: 1rem;
    }
    
    .main-search-form {
        flex-direction: column;
    }
    
    .location-input-wrapper {
        width: 100%;
    }
    
    .categories-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
    
    .ads-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
    
    .cities-grid-modern {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .features-grid-modern {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-classified {
        padding: 40px 0 30px;
    }
    
    .hero-title-classified {
        font-size: 1.75rem;
    }
    
    .categories-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ads-grid-modern {
        grid-template-columns: 1fr;
    }
}
