/* ═══════════════════════════════════════════════════════
   A2O People Directories v8 — style.css
   Dark theme · Companies styled like Architizer brands
═══════════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

.a2opd-wrap {
    --accent-authors:   #c9a86a;
    --accent-companies: #4a9eff;
    --accent-firms:     #7c6fcd;

    --bg:        #0b0b0a;
    --bg2:       #141413;
    --bg3:       #1e1e1c;
    --border:    rgba(255,255,255,.08);
    --text:      #f0ede8;
    --muted:     #888880;
    --card-bg:   #161614;
    --card-hover:#1e1e1c;
    --radius:    10px;

    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 80px;
}

/* accent color per directory */
.a2opd-wrap.a2o-pd-authors   { --accent: var(--accent-authors);   }
.a2opd-wrap.a2o-pd-companies { --accent: var(--accent-companies);  }
.a2opd-wrap.a2o-pd-firms     { --accent: var(--accent-firms);      }

/* fallback so --accent is always defined */
.a2opd-wrap { --accent: #4a9eff; }

/* ── Hero ── */
.a2opd-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 32px 32px;
}

.a2opd-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}
.a2opd-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
    transition: color .2s;
}
.a2opd-breadcrumb a:hover { color: var(--text); }
.a2opd-crumb-sep { opacity: .4; }

.a2opd-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 500;
    line-height: 1.05;
    margin: 0 0 12px;
    color: var(--text);
}

.a2opd-subtitle {
    font-size: 15px;
    color: var(--muted);
    margin: 0 0 32px;
    line-height: 1.5;
}
.a2opd-subtitle-sep { opacity: .4; margin: 0 4px; }
.a2opd-count { color: var(--accent); font-weight: 600; }

/* ── Directory Tabs ── */
.a2opd-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.a2opd-tab {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .2s, border-color .2s;
    border-radius: 6px 6px 0 0;
}
.a2opd-tab:hover { color: var(--text); }
.a2opd-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* ── Toolbar ── */
.a2opd-toolbar {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.a2opd-search-wrap {
    position: relative;
    flex: 1;
    max-width: 420px;
}
.a2opd-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--muted);
    pointer-events: none;
}
.a2opd-search {
    width: 100%;
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    padding: 10px 14px 10px 40px;
    outline: none;
    transition: border-color .2s;
}
.a2opd-search::placeholder { color: var(--muted); }
.a2opd-search:focus { border-color: var(--accent); }

.a2opd-total-label {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
}

/* ── Filters Section ── */
.a2opd-filters {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.a2opd-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 200px;
}

.a2opd-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.a2opd-filter-select {
    background: var(--bg3);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 13px;
    padding: 8px 12px;
    outline: none;
    transition: border-color .2s, background .2s;
    cursor: pointer;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.a2opd-filter-select:hover {
    border-color: rgba(255,255,255,.16);
}

.a2opd-filter-select:focus {
    border-color: var(--accent);
    background: var(--bg2);
}

.a2opd-filter-select option {
    background: var(--bg2);
    color: var(--text);
}

.a2opd-toolbar-left {
    flex: 1;
    display: flex;
    align-items: center;
}

/* ── Grid ── */
.a2opd-body {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
}

.a2opd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

/* ════════════════════════════════════════════
   COMPANY CARD — Architizer-style brand card
   ════════════════════════════════════════════ */
.a2opd-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: background .2s, border-color .2s, transform .2s;
}
.a2opd-card:hover {
    background: var(--card-hover);
    border-color: rgba(255,255,255,.16);
    transform: translateY(-2px);
}

/* Banner strip (top image, like Architizer firm covers) */
.a2opd-card-banner {
    width: 100%;
    height: 100px;
    overflow: hidden;
    background: var(--bg3);
    flex-shrink: 0;
}
.a2opd-card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.a2opd-card-banner-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg3) 0%, #1a1a18 100%);
}

/* Logo / avatar row */
.a2opd-card-identity {
    display: flex;
    align-items: flex-end;
    padding: 0 16px;
    margin-top: -24px;
    margin-bottom: 12px;
    gap: 12px;
}

.a2opd-card-logo-wrap {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    border: 2px solid var(--bg);
    overflow: hidden;
    background: var(--bg3);
    flex-shrink: 0;
}
.a2opd-card-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.a2opd-card-monogram {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    font-family: 'Fraunces', serif;
    color: var(--accent);
    background: var(--bg3);
}

/* Card body text */
.a2opd-card-body {
    padding: 0 16px 16px;
    flex: 1;
}

.a2opd-card-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px;
    line-height: 1.3;
    /* clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.a2opd-card-tagline {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Skeletons ── */
@keyframes a2opd-shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position:  600px 0; }
}

.a2opd-skeleton {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.a2opd-skeleton-banner {
    height: 100px;
    background: linear-gradient(90deg, var(--bg3) 25%, #222220 50%, var(--bg3) 75%);
    background-size: 600px 100%;
    animation: a2opd-shimmer 1.4s infinite linear;
}

.a2opd-skeleton-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 12px;
    margin-top: -20px;
}

.a2opd-skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--bg3) 25%, #222220 50%, var(--bg3) 75%);
    background-size: 600px 100%;
    animation: a2opd-shimmer 1.4s infinite linear;
    flex-shrink: 0;
}

.a2opd-skeleton-body { padding: 0 16px 16px; }

.a2opd-skeleton-line {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--bg3) 25%, #222220 50%, var(--bg3) 75%);
    background-size: 600px 100%;
    animation: a2opd-shimmer 1.4s infinite linear;
    margin-bottom: 8px;
}
.a2opd-skeleton-line.s { width: 60%; }

/* ── Empty State ── */
.a2opd-empty {
    grid-column: 1/-1;
    text-align: center;
    padding: 80px 20px;
    color: var(--muted);
}
.a2opd-empty h3 { font-size: 18px; font-weight: 500; margin: 0; }

/* ── Load More ── */
.a2opd-footer {
    max-width: 1280px;
    margin: 40px auto 0;
    padding: 0 32px;
    text-align: center;
}

.a2opd-load-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    padding: 12px 32px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.a2opd-load-more:hover {
    background: var(--bg3);
    border-color: rgba(255,255,255,.2);
}
.a2opd-load-more:disabled { opacity: .5; cursor: default; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .a2opd-hero  { padding: 32px 16px 24px; }
    .a2opd-toolbar { padding: 16px; }
    .a2opd-body  { padding: 0 16px; }
    .a2opd-footer { padding: 0 16px; }

    .a2opd-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 12px;
    }

    .a2opd-title { font-size: 32px; }

    .a2opd-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .a2opd-tab  { white-space: nowrap; }
}
