/* ============================================
   Local Business Ads — Custom Styles
   Light theme, clean professional, high-contrast
   ============================================ */

:root {
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-light: #dbeafe;
    --brand-gradient-start: #2563eb;
    --brand-gradient-end: #1e40af;
    --body-bg: #f8f9fa;
    --section-alt: #ffffff;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --card-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    --card-hover-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

body {
    background: var(--body-bg);
    color: var(--text-dark);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* === Brand Colours === */
.text-brand { color: var(--brand) !important; }
.bg-brand { background-color: var(--brand) !important; }
.bg-brand-subtle { background-color: var(--brand-light) !important; }
.border-brand { border-color: var(--brand) !important; }

.btn-brand {
    background-color: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.btn-brand:hover, .btn-brand:focus {
    background-color: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}
.btn-outline-brand {
    color: var(--brand);
    border-color: var(--brand);
    background: transparent;
}
.btn-outline-brand:hover {
    background-color: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.bg-gradient-brand {
    background: linear-gradient(135deg, var(--brand-gradient-start), var(--brand-gradient-end));
}

/* === Navbar === */
.navbar-brand {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}
.brand-text { color: var(--text-dark); }
.brand-highlight { color: var(--brand); }

.nav-link {
    font-weight: 500;
    color: var(--text-muted) !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--brand) !important;
}

/* === Hero Section === */
.hero-section {
    min-height: 380px;
    display: flex;
    align-items: center;
}
.hero-section .search-form .input-group {
    max-width: 600px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 0.5rem;
    overflow: hidden;
}
.bg-opacity-20 { background-color: rgba(255,255,255,0.2) !important; }

/* === Section Alternation === */
.section-alt {
    background: var(--section-alt);
}

/* === Cards === */
.card {
    border-radius: 0.75rem;
    transition: box-shadow 0.2s ease;
}
.card:hover {
    box-shadow: var(--card-hover-shadow) !important;
}
.category-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover-shadow) !important;
}
.listing-card, .listing-card-sm {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.listing-card:hover {
    transform: translateY(-2px);
}
.category-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 12px;
    background: var(--brand-light);
}
.category-icon-large {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border-radius: 16px;
    background: var(--brand-light);
}

/* === Listing Badge === */
.badge.text-brand {
    color: var(--brand) !important;
}

/* === Ad Containers === */
.ad-container {
    background: var(--section-alt);
    border: 1px dashed var(--border-light);
    border-radius: 0.5rem;
    padding: 0.75rem;
    text-align: center;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ad-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.ad-content {
    width: 100%;
    min-height: 60px;
}

/* === Pagination === */
.page-link {
    color: var(--brand);
    border-color: var(--border-light);
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}
.page-item.active .page-link {
    background-color: var(--brand);
    border-color: var(--brand);
}
.page-item.disabled .page-link {
    color: var(--text-muted);
}

/* === Forms === */
.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15);
}

/* CSS-only validation — red border on :invalid via :focus */
.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: #dc3545;
}
.was-validated .form-control:valid:focus,
.form-control.is-valid:focus {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.15);
}

/* === Footer === */
.footer a:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

/* === Breadcrumb === */
.breadcrumb {
    background: transparent;
    padding: 0;
}
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* === Listing Description === */
.listing-description p {
    line-height: 1.8;
}

/* === Responsive tweaks === */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
        text-align: center;
    }
    .hero-section h1 {
        font-size: 1.75rem;
    }
    .hero-section .search-form .input-group {
        max-width: 100%;
    }
}
