/**
 * Annuaire Pro - CSS Principal
 * Mobile-first responsive design
 */

/* ==========================================================================
   VARIABLES & RESET
   ========================================================================== */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f8fafc;
    --dark: #1e293b;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --border-radius: 8px;
    --box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark);
    background: #fff;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-white { color: #fff; }

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-fluid {
    width: 100%;
    padding: 0 1rem;
}

.main-content {
    min-height: calc(100vh - 400px);
}

/* Grids */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.col {
    flex: 1;
    padding: 0 0.5rem;
}

.col-md-6 {
    flex: 0 0 100%;
    padding: 0 0.5rem;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
    }
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
    background: #fff;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: var(--box-shadow-lg);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.header-logo {
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-left: 0.5rem;
}

.desktop-nav {
    display: none;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
        gap: 1rem;
    }
}

.nav-link {
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    color: var(--gray-700);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background: var(--gray-100);
    color: var(--primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark);
    cursor: pointer;
}

@media (min-width: 768px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}

.user-menu-btn:hover {
    background: var(--gray-200);
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    min-width: 200px;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.user-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.user-menu-dropdown a:last-child {
    border-bottom: none;
}

.user-menu-dropdown a:hover {
    background: var(--gray-50);
}

.dropdown-divider {
    height: 1px;
    background: var(--gray-200);
    margin: 0.5rem 0;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    background: #fff;
    border-top: 1px solid var(--gray-200);
    padding: 1rem;
}

.mobile-nav.show {
    display: block;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
}

.mobile-nav-link:hover {
    background: var(--gray-100);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-block {
    display: flex;
    width: 100%;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ==========================================================================
   FORMS
   ========================================================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.invalid-feedback {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-text {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.form-group-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   ALERTS
   ========================================================================== */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--info);
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.5;
}

.btn-close:hover {
    opacity: 1;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
}

/* ==========================================================================
   SEARCH FORM
   ========================================================================== */
.search-form {
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

.search-form-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .search-form-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-group-keyword {
        grid-column: span 2;
    }
}

.btn-search {
    height: 100%;
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    color: var(--gray-600);
    font-size: 1.1rem;
}

.section-footer {
    text-align: center;
    margin-top: 3rem;
}

.bg-light {
    background: var(--gray-50);
}

.bg-primary {
    background: var(--primary);
}

/* ==========================================================================
   CATEGORIES
   ========================================================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.category-card {
    background: #fff;
    padding: 2rem 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 2px solid var(--gray-200);
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.category-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.category-name {
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.category-count {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* ==========================================================================
   LISTINGS
   ========================================================================== */
.listings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .listings-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.listing-card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    position: relative;
}

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

.listing-card-link {
    display: block;
    color: inherit;
}

.listing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    z-index: 10;
}

.badge-featured {
    background: var(--warning);
    color: #fff;
}

.listing-card-image {
    height: 200px;
    overflow: hidden;
    background: var(--gray-100);
}

.listing-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Nouveau design d'en-tête de carte avec avatar minimaliste */
.listing-card-header {
    padding: 1.5rem;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.listing-card-logo {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border-radius: 8px;
    overflow: hidden;
}

.listing-logo-full {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.listing-card-avatar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem 0;
    background: #fff;
}

.listing-avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.listing-card-body {
    padding: 1.5rem;
}

.listing-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.listing-card-category,
.listing-card-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.listing-card-description {
    color: var(--gray-700);
    font-size: 0.9rem;
    margin: 1rem 0;
}

.listing-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.listing-card-phone {
    font-weight: 600;
    color: var(--primary);
}

.listing-card-views {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ==========================================================================
   STATS
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 3rem;
    opacity: 0.8;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
}

.stat-label {
    opacity: 0.9;
}

/* ==========================================================================
   CTA
   ========================================================================== */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-text {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

.footer-col h3,
.footer-col h4 {
    color: #fff;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--gray-300);
}

.footer-links a:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-800);
    border-radius: 50%;
    color: var(--gray-300);
}

.social-link:hover {
    background: var(--primary);
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* ==========================================================================
   AUTH PAGES
   ========================================================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--gray-50);
    padding: 2rem 0;
}

.auth-box {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--gray-600);
}

.auth-form {
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination-wrapper {
    margin-top: 3rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-link,
.pagination-number {
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    color: var(--gray-700);
    transition: var(--transition);
}

.pagination-link:hover,
.pagination-number:hover {
    background: var(--gray-100);
}

.pagination-number.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.pagination-ellipsis {
    padding: 0.75rem 0.5rem;
}

.pagination-info {
    text-align: center;
    margin-top: 1rem;
    color: var(--gray-600);
}

/* ==========================================================================
   SCROLL TO TOP
   ========================================================================== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    box-shadow: var(--box-shadow-lg);
    z-index: 999;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-5px);
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }

.link-sm {
    font-size: 0.875rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 1rem 0;
    list-style: none;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 0.5rem;
    color: var(--gray-400);
}

.breadcrumb-item.active {
    color: var(--gray-600);
}

/* ==========================================================================
   LISTING DETAIL PAGE - AVATAR SYSTEM
   ========================================================================== */
.listing-header {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    padding: 2rem;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.listing-logo-container {
    flex-shrink: 0;
}

.listing-logo-full {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 8px;
    background: var(--gray-50);
    padding: 0.5rem;
}

.listing-avatar-detail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.listing-header-content {
    flex: 1;
    min-width: 0;
}

.listing-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--gray-600);
}

.listing-category,
.listing-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.listing-meta-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.listing-meta-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.listing-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.listing-section {
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.contact-info {
    display: grid;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-item i {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    flex-shrink: 0;
}

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

.contact-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   CATEGORY PAGE
   ========================================================================== */
.category-page {
    padding: 2rem 0;
}

.category-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.category-icon-large {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.category-header-content {
    flex: 1;
}

.category-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.category-description {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.category-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    font-weight: 600;
}

.category-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.category-main {
    min-width: 0;
}

.category-section {
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.category-section .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

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

.city-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    border: 2px solid transparent;
}

.city-card:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary-dark);
    transform: translateY(-3px);
}

.city-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.city-count {
    font-size: 0.875rem;
    opacity: 0.8;
}

.category-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.related-categories-list {
    list-style: none;
    padding: 0;
}

.related-categories-list li {
    margin-bottom: 0.75rem;
}

.related-category-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.related-category-link:hover {
    background: var(--primary);
    color: #fff;
}

.related-category-link .count {
    margin-left: auto;
    font-size: 0.875rem;
    opacity: 0.7;
}

/* ==========================================================================
   LOCATION PAGES (City & Governorate)
   ========================================================================== */
.location-page {
    padding: 2rem 0;
}

.location-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.location-icon {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    flex-shrink: 0;
}

.location-header-content {
    flex: 1;
}

.location-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.location-breadcrumb {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.location-breadcrumb a {
    color: #fff;
    text-decoration: underline;
}

.location-breadcrumb a:hover {
    opacity: 0.8;
}

.location-stats {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.location-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
}

.location-main {
    min-width: 0;
}

.location-section {
    background: #fff;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.location-section .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.categories-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.category-card-compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    border: 2px solid transparent;
}

.category-card-compact:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary-dark);
    transform: translateY(-3px);
}

.category-icon-small {
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.category-card-compact:hover .category-icon-small {
    background: rgba(255,255,255,0.2);
}

.category-card-compact .category-name {
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    margin-bottom: 0.25rem;
}

.category-card-compact .category-count {
    font-size: 0.75rem;
    opacity: 0.8;
}

.location-sidebar {
    position: sticky;
    top: 2rem;
    height: fit-content;
}

.nearby-locations-list {
    list-style: none;
    padding: 0;
}

.nearby-locations-list li {
    margin-bottom: 0.75rem;
}

.nearby-location-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.nearby-location-link:hover {
    background: #10b981;
    color: #fff;
}

.nearby-location-link .fa-map-marker-alt {
    opacity: 0.7;
}

.nearby-location-link .count {
    margin-left: auto;
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Cities grid for governorate pages */
.cities-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.25rem;
}

.city-card-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
    border: 2px solid transparent;
}

.city-card-large:hover {
    background: #10b981;
    color: #fff;
    border-color: #059669;
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}

.city-card-large .city-name {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.city-card-large .city-count {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Avatar responsive */
    .listing-card-header {
        padding: 1rem;
    }
    
    .listing-avatar {
        width: 56px;
        height: 56px;
    }
    
    .listing-card-avatar-container {
        padding: 1.5rem 0;
    }
    
    /* Listing detail responsive */
    .listing-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .listing-logo-full {
        width: 100px;
        height: 100px;
    }
    
    .listing-avatar-detail {
        width: 72px;
        height: 72px;
    }
    
    .listing-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .listing-section {
        padding: 1.5rem;
    }
    
    /* Category page responsive */
    .category-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .category-content {
        grid-template-columns: 1fr;
    }
    
    .category-sidebar {
        position: static;
    }
    
    .cities-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    /* Location page responsive */
    .location-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    
    .location-title {
        font-size: 1.5rem;
    }
    
    .location-content {
        grid-template-columns: 1fr;
    }
    
    .location-sidebar {
        position: static;
    }
    
    .categories-grid-compact {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
    
    .cities-grid-large {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
