/* PageKit Directory Builder — Styles v3 */
:root {
    --bg: #f8f9fb;
    --surface: #ffffff;
    --surface-hover: #f3f4f6;
    --surface-alt: #f0f4ff;
    --border: #e5e7eb;
    --border-light: #f0f0f3;
    --text: #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --primary: #5b21b6;
    --primary-hover: #4c1d95;
    --primary-light: #ede9fe;
    --primary-ghost: #f5f3ff;
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --success: #059669;
    --success-light: #d1fae5;
    --warning: #d97706;
    --amber: #f59e0b;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.08);
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ── Navbar ─────────────────────────────────── */
.navbar {
    background: rgba(255,255,255,0.85);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.nav-brand {
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand-icon { font-size: 22px; }
.nav-links { display: flex; align-items: center; gap: 12px; }
.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-xs);
    transition: all var(--transition);
}
.nav-links a:hover { color: var(--primary); background: var(--primary-ghost); }

/* Mobile hamburger */
.nav-toggle { display: none; background: none; border: none; font-size: 24px; cursor: pointer; padding: 4px 8px; color: var(--text); }
.nav-toggle:hover { color: var(--primary); }

/* ── Buttons ────────────────────────────────── */
.btn-primary, .btn-outline, .btn-sm, .btn-danger, .btn-ghost, .btn-success {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-ghost); }
.btn-sm { padding: 5px 12px; font-size: 13px; background: var(--surface-hover); color: var(--text); border: 1px solid transparent; }
.btn-sm:hover { border-color: var(--primary); color: var(--primary); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: var(--danger-hover); }
.btn-full { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: var(--radius); }

/* ── Flash messages ─────────────────────────── */
.flash {
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}
.flash-success { background: var(--success-light); color: #065f46; border: 1px solid #a7f3d0; }
.flash-danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flash-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.flash-info    { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }

/* ── Admin pages ────────────────────────────── */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 36px 0 24px;
}
.page-header h1 { font-size: 26px; font-weight: 700; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.directory-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.directory-card .card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.directory-card .card-header h2 { font-size: 18px; font-weight: 600; }
.directory-card .card-header h2 a { text-decoration: none; color: var(--text); }
.directory-card .card-header h2 a:hover { color: var(--primary); }
.card-desc { color: var(--text-muted); font-size: 14px; margin-bottom: 14px; }
.card-meta { display: flex; gap: 14px; font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-sm { font-size: 11px; padding: 2px 8px; }
.empty-state { text-align: center; padding: 64px 20px; }
.empty-state .empty-icon { font-size: 52px; margin-bottom: 16px; display: block; }
.empty-state h2 { font-size: 22px; margin-bottom: 8px; font-weight: 600; }
.empty-state p { color: var(--text-muted); margin-bottom: 24px; font-size: 15px; }
.empty-state.small { padding: 36px; }

/* ── Forms ──────────────────────────────────── */
.form-page { max-width: 720px; margin: 36px auto; }
.form-page h1 { font-size: 24px; margin-bottom: 24px; font-weight: 700; }
.form-page h1 small { font-weight: 400; color: var(--text-muted); font-size: 15px; }
.standard-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow-sm);
}
.form-section { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border-light); }
.form-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.form-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 16px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-group label .hint { font-weight: 400; color: var(--text-muted); font-size: 12px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    background: var(--bg);
    transition: all var(--transition);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91,33,182,0.1);
    background: var(--surface);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; display: block; }
.form-row { display: flex; gap: 16px; }
.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border-light); }
.checkbox-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.checkbox-label input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input { flex: 1; padding: 9px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.category-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.category-row { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--border-light); }
.category-row:hover { background: var(--surface-hover); }
.category-row:last-child { border-bottom: none; }
.category-info { display: flex; align-items: center; gap: 10px; }
.category-name { font-weight: 500; font-size: 14px; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.data-table { width: 100%; background: var(--surface); border-collapse: separate; border-spacing: 0; font-size: 14px; }
.data-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--bg);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--border-light); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-hover); }
.actions-cell { display: flex; gap: 4px; align-items: center; }
.directory-desc { color: var(--text-muted); margin-bottom: 6px; font-size: 14px; }
.directory-url { font-size: 13px; margin-bottom: 24px; }
.directory-url a { color: var(--primary); font-weight: 500; }
.breadcrumb-link { text-decoration: none; color: var(--primary); font-weight: 500; }
.breadcrumb-link:hover { text-decoration: underline; }
.separator { color: var(--text-light); margin: 0 8px; font-weight: 300; }

/* ── Login ──────────────────────────────────── */
.login-page { display: flex; justify-content: center; align-items: center; min-height: 70vh; }
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.login-header { text-align: center; margin-bottom: 32px; }
.login-header .brand-icon { font-size: 44px; color: var(--primary); }
.login-header h1 { font-size: 24px; margin: 10px 0 6px; font-weight: 700; }
.login-header p { color: var(--text-muted); font-size: 14px; }

/* ═══════════════════════════════════════════════ */
/* DIRECTORY WEBSITE (public-facing) */
/* ═══════════════════════════════════════════════ */

/* Hero */
.dir-hero {
    background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #4c1d95 100%);
    color: white;
    padding: 60px 24px 56px;
    text-align: center;
}
.dir-hero-content { max-width: 680px; margin: 0 auto; }
.dir-hero-title { font-size: 40px; font-weight: 800; letter-spacing: -0.04em; margin-bottom: 12px; line-height: 1.2; }
.dir-hero-desc { font-size: 18px; opacity: 0.9; margin-bottom: 20px; line-height: 1.6; max-width: 540px; margin-left: auto; margin-right: auto; }
.dir-hero-stats { display: flex; justify-content: center; gap: 28px; margin-bottom: 28px; font-size: 15px; opacity: 0.85; }
.dir-hero-stats strong { font-weight: 700; }
.dir-hero-search { max-width: 520px; margin: 0 auto 20px; }
.hero-search-row {
    display: flex;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    align-items: center;
}
.hero-search-icon { padding-left: 16px; font-size: 18px; flex-shrink: 0; }
.hero-search-input {
    flex: 1;
    padding: 16px 12px;
    border: none;
    font-size: 16px;
    font-family: var(--font);
    outline: none;
    color: var(--text);
    min-width: 0;
}
.hero-search-input::placeholder { color: var(--text-light); }
.hero-search-row .btn-primary { border-radius: 0 var(--radius) var(--radius) 0; padding: 16px 28px; font-size: 16px; }
.dir-hero-cta { margin-top: 12px; }
.dir-hero-cta .btn-outline {
    background: rgba(255,255,255,0.12);
    color: white;
    border-color: rgba(255,255,255,0.3);
}
.dir-hero-cta .btn-outline:hover {
    background: rgba(255,255,255,0.22);
    border-color: rgba(255,255,255,0.5);
    color: white;
}

/* Layout: sidebar + main */
.dir-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 32px;
    max-width: 1140px;
    margin: 32px auto 0;
    padding: 0 24px;
    align-items: start;
}
.dir-sidebar { position: sticky; top: 72px; }
.dir-main { min-width: 0; }

/* Sidebar blocks */
.sidebar-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.sidebar-title { font-size: 14px; font-weight: 700; margin-bottom: 14px; }
.sidebar-cat-list { list-style: none; padding: 0; margin: 0; }
.sidebar-cat-list li { margin-bottom: 2px; }
.sidebar-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 10px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    text-decoration: none;
    color: var(--text-muted);
    transition: all var(--transition);
}
.sidebar-link:hover { background: var(--primary-ghost); color: var(--primary); }
.sidebar-link-active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.sidebar-count {
    font-size: 11px;
    background: var(--surface-hover);
    color: var(--text-muted);
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 500;
}

/* Alphabet grid */
.alpha-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.alpha-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 0;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-muted);
    background: var(--bg);
    transition: all var(--transition);
}
.alpha-link:hover { background: var(--primary-light); color: var(--primary); }
.alpha-link-active { background: var(--primary); color: white; }
.alpha-link-active:hover { background: var(--primary-hover); color: white; }

/* Directory sections */
.dir-section { margin-bottom: 36px; }
.dir-section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.dir-section-count { font-size: 13px; color: var(--text-muted); font-weight: 400; }

/* Active filters */
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}
.filter-tag a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    margin-left: 2px;
}

/* Listing cards (whole card clickable) */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.listing-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all var(--transition);
    position: relative;
}
.listing-card-link:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary);
}
.listing-card-link.featured { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber), var(--shadow-sm); }
.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--amber);
    color: #7c2d12;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    z-index: 2;
}
.claimed-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--success);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    z-index: 2;
}
.listing-card-link .listing-img {
    width: 100%;
    height: 160px;
    overflow: hidden;
    background: var(--bg);
}
.listing-card-link .listing-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.listing-card-link:hover .listing-img img { transform: scale(1.04); }
.listing-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-ghost), var(--bg));
    color: var(--primary);
    font-size: 48px;
}
.listing-card-link .listing-body { padding: 16px; }
.listing-card-link .listing-body h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
    transition: color var(--transition);
}
.listing-card-link:hover .listing-body h3 { color: var(--primary); }
.listing-category {
    display: inline-block;
    padding: 2px 10px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}
.listing-desc { color: var(--text-muted); font-size: 14px; margin: 6px 0 10px; line-height: 1.5; }
.listing-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.meta-item { font-size: 13px; color: var(--text-muted); }
.stars { display: inline-flex; gap: 2px; align-items: center; }
.star-filled { color: var(--amber); }
.star-empty { color: #d1d5db; }
.review-count { font-size: 13px; color: var(--text-muted); margin-left: 4px; }

/* Bottom CTA */
.dir-bottom-cta {
    background: var(--surface-alt);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 48px 24px;
    text-align: center;
    margin-top: 16px;
}
.dir-bottom-cta-content { max-width: 600px; margin: 0 auto; }
.dir-bottom-cta-content h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.dir-bottom-cta-content p { color: var(--text-muted); font-size: 16px; margin-bottom: 20px; }

/* ── Listing Detail Page ────────────────────── */
.public-listing-detail { max-width: 760px; margin: 0 auto; padding: 28px 24px; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 20px;
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.back-link:hover { text-decoration: underline; }
.detail-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.detail-header { padding: 32px 32px 24px; position: relative; }
.detail-header h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; line-height: 1.3; }
.detail-header-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }
.detail-image img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.detail-body { padding: 28px 32px; }
.detail-body h3 { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.detail-description { margin-bottom: 24px; }
.detail-description p { line-height: 1.7; font-size: 15px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 24px; }
.info-card {
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 16px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}
.info-card:hover { border-color: var(--primary); background: var(--primary-ghost); }
.info-card-icon { font-size: 20px; flex-shrink: 0; }
.info-card-content .info-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: 2px; }
.info-card-content .info-value { font-size: 14px; font-weight: 500; word-break: break-word; }
.info-card-content a { color: var(--primary); text-decoration: none; }
.hours-table { width: 100%; font-size: 14px; margin-bottom: 24px; }
.hours-table tr { border-bottom: 1px solid var(--border-light); }
.hours-table tr:last-child { border-bottom: none; }
.hours-table td { padding: 8px 0; }
.hours-table td:first-child { font-weight: 600; width: 120px; color: var(--text-muted); }
.map-embed { width: 100%; height: 280px; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 24px; border: 1px solid var(--border); }
.map-embed iframe { width: 100%; height: 100%; border: none; }
.social-links { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    transition: all var(--transition);
}
.social-link:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-ghost); }
.claim-banner {
    background: var(--success-light);
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-top: 16px;
    text-align: center;
}
.claim-banner p { font-size: 14px; color: #065f46; margin-bottom: 8px; font-weight: 500; }
.review-section { margin-top: 32px; }
.review-card { padding: 16px 0; border-bottom: 1px solid var(--border-light); }
.review-card:last-child { border-bottom: none; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.review-author { font-weight: 600; font-size: 14px; }
.review-date { font-size: 12px; color: var(--text-light); }
.review-comment { color: var(--text); font-size: 14px; line-height: 1.6; }
.review-form-card {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 24px;
    margin-top: 20px;
}
.rating-input { display: flex; gap: 4px; direction: rtl; font-size: 28px; }
.rating-input input { display: none; }
.rating-input label { cursor: pointer; color: #d1d5db; transition: color var(--transition); }
.rating-input label:hover, .rating-input label:hover ~ label, .rating-input input:checked ~ label { color: var(--amber); }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.related-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    text-decoration: none;
    color: var(--text);
    transition: all var(--transition);
}
.related-card:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.related-card h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.related-cat { font-size: 12px; color: var(--text-muted); }

/* ── Colored initial avatars ───────────────── */
.listing-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.listing-avatar-text {
    font-size: 42px;
    font-weight: 800;
    color: rgba(255,255,255,0.9);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* ── Pagination ─────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.page-link:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-ghost); }
.page-active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    font-weight: 600;
}
.page-active:hover { background: var(--primary-hover); color: white; }
.page-prev, .page-next { padding: 0 16px; font-weight: 500; }
.page-ellipsis { padding: 0 4px; color: var(--text-muted); font-size: 16px; }

/* ── Blog card grid (blog listing page) ───────── */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.blog-card { text-decoration: none; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: all var(--transition); }
.blog-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.blog-card-img { height: 180px; overflow: hidden; background: var(--bg); }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 48px; background: linear-gradient(135deg, var(--primary-ghost), var(--bg)); }
.blog-card-body { padding: 18px; }
.blog-card-body h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.blog-card:hover .blog-card-body h3 { color: var(--primary); }
.blog-card-body p { font-size: 14px; color: var(--text-muted); line-height: 1.5; margin-bottom: 10px; }
.blog-card-date { font-size: 12px; color: var(--text-light); }

/* ── Blog post (single article) ───────────────── */
.blog-post-wrapper { background: var(--bg); min-height: 60vh; padding: 24px 0 48px; }
.blog-post-nav { max-width: 760px; margin: 0 auto 16px; padding: 0 24px; }
.blog-post { max-width: 760px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.blog-post-header { padding: 40px 40px 24px; }
.blog-post-header h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.3; margin-bottom: 12px; }
.blog-post-meta { font-size: 14px; color: var(--text-muted); margin-bottom: 16px; }
.blog-post-excerpt { font-size: 17px; color: var(--text-muted); line-height: 1.6; font-style: italic; border-left: 3px solid var(--primary); padding-left: 16px; margin-top: 16px; }
.blog-post-img img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.blog-post-content { padding: 8px 40px 32px; font-size: 16px; line-height: 1.85; color: var(--text); }
.blog-post-content p { margin-bottom: 18px; }
.blog-post-content h2 { font-size: 22px; font-weight: 700; margin: 36px 0 14px; }
.blog-post-content h3 { font-size: 18px; font-weight: 600; margin: 24px 0 10px; }
.blog-post-content a { color: var(--primary); text-decoration: underline; }
.blog-post-content a:hover { color: var(--primary-hover); }
.blog-post-content hr { border: none; border-top: 1px solid var(--border); margin: 32px 0; }
.blog-post-content strong { font-weight: 600; }
.blog-post-content ul, .blog-post-content ol { margin: 14px 0 18px 24px; }
.blog-post-content li { margin-bottom: 6px; }
.blog-post-footer { display: flex; gap: 12px; padding: 24px 40px; border-top: 1px solid var(--border); background: var(--bg); }

@media (max-width: 768px) {
    .blog-post-header { padding: 24px 20px 16px; }
    .blog-post-header h1 { font-size: 24px; }
    .blog-post-content { padding: 8px 20px 24px; }
    .blog-post-footer { padding: 20px; flex-direction: column; }
}

/* ── Static pages (About, Contact) ──────────── */
.static-page { max-width: 760px; margin: 40px auto; padding: 0 24px; }
.static-page h2 { font-size: 22px; font-weight: 700; margin: 32px 0 12px; }
.static-page p { font-size: 16px; line-height: 1.7; color: var(--text); margin-bottom: 16px; }
.static-page a { color: var(--primary); font-weight: 500; }

/* ── Footer ─────────────────────────────────── */
.footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 64px; }
.footer-main { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding: 48px 0 36px; }
.footer-col h4 { font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.footer-col p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 16px; }
.footer-col a { display: block; font-size: 14px; color: var(--text-muted); text-decoration: none; padding: 4px 0; }
.footer-col a:hover { color: var(--primary); }
.footer-newsletter { display: flex; gap: 8px; }
.footer-newsletter input {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
}
.footer-bottom {
    border-top: 1px solid var(--border-light);
    padding: 20px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
    flex-wrap: wrap;
    gap: 12px;
}

/* ── Responsive ─────────────────────────────── */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px 16px; gap: 4px; box-shadow: var(--shadow-lg); z-index: 99; }
    .nav-links.open { display: flex; }
    .nav-links a { padding: 10px 12px; font-size: 15px; width: 100%; }
    .nav-toggle { display: block; }
    .dir-hero { padding: 40px 16px 36px; }
    .dir-hero-title { font-size: 28px; }
    .dir-hero-desc { font-size: 15px; }
    .hero-search-row { flex-direction: column; }
    .hero-search-icon { display: none; }
    .hero-search-input { width: 100%; padding: 14px; border-bottom: 1px solid var(--border); }
    .hero-search-row .btn-primary { border-radius: 0 0 var(--radius) var(--radius); width: 100%; justify-content: center; }
    .dir-layout { grid-template-columns: 1fr; gap: 20px; padding: 0 16px; }
    .dir-sidebar { position: static; }
    .alpha-grid { grid-template-columns: repeat(7, 1fr); }
    .listings-grid { grid-template-columns: 1fr; }
    .directory-grid { grid-template-columns: 1fr; }
    .info-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr 1fr; }
    .footer-main { grid-template-columns: 1fr; gap: 28px; }
    .form-row { flex-direction: column; gap: 0; }
    .two-col { grid-template-columns: 1fr; }
    .dir-bottom-cta { padding: 32px 16px; }
    .detail-header, .detail-body { padding: 20px; }
    .detail-header h1 { font-size: 22px; }
}
@media (max-width: 480px) {
    .page-header { flex-direction: column; align-items: flex-start; }
    .page-header h1 { font-size: 22px; }
    .login-card { padding: 28px 20px; }
    .footer-bottom { flex-direction: column; text-align: center; }
}