/* GetBusiness pSEO — Frontend Styles
   Designed to integrate with TownHub's existing palette */

:root {
    --pseo-primary:   #1a3c5e;
    --pseo-accent:    #e8531a;
    --pseo-green:     #17a864;
    --pseo-bg:        #f5f7fa;
    --pseo-card-bg:   #ffffff;
    --pseo-border:    #e2e8f0;
    --pseo-text:      #1a202c;
    --pseo-muted:     #718096;
    --pseo-radius:    10px;
    --pseo-shadow:    0 2px 12px rgba(0,0,0,.08);
    --pseo-shadow-lg: 0 4px 24px rgba(0,0,0,.12);
    --pseo-max-w:     1200px;
}

/* ── Wrap ── */
.gb-pseo-wrap { font-family: inherit; color: var(--pseo-text); }

/* ── Container ── */
.gb-pseo-container {
    max-width: var(--pseo-max-w);
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ── Hero ── */
.gb-pseo-hero {
    background: linear-gradient(135deg, var(--pseo-primary) 0%, #0f2744 100%);
    color: #fff;
    padding: 56px 20px 48px;
    text-align: center;
}
.gb-pseo-hero--index { padding: 80px 20px 64px; }
.gb-pseo-hero__title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.2;
}
.gb-pseo-hero__sub {
    font-size: 1.1rem;
    opacity: .88;
    max-width: 680px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* ── Stat Pills ── */
.gb-pseo-stat-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}
.gb-pseo-stat-pill {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 100px;
    padding: 6px 16px;
    font-size: .9rem;
    backdrop-filter: blur(4px);
}
.gb-pseo-stat-pill--verified { background: rgba(23,168,100,.25); border-color: rgba(23,168,100,.5); }
.gb-pseo-stat-pill strong { font-weight: 700; }

/* ── Breadcrumb ── */
.gb-pseo-breadcrumb {
    background: var(--pseo-bg);
    border-bottom: 1px solid var(--pseo-border);
    padding: 12px 20px;
}
.gb-pseo-breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; max-width: var(--pseo-max-w); margin: 0 auto; }
.gb-pseo-breadcrumb__item { font-size: .875rem; color: var(--pseo-muted); }
.gb-pseo-breadcrumb__item a { color: var(--pseo-primary); text-decoration: none; }
.gb-pseo-breadcrumb__item a:hover { text-decoration: underline; }
.gb-pseo-breadcrumb__item--current { color: var(--pseo-text); font-weight: 500; }
.gb-pseo-breadcrumb__sep { margin: 0 4px; color: var(--pseo-border); }

/* ── Sections ── */
.gb-pseo-section {
    margin-top: 48px;
}
.gb-pseo-section__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--pseo-primary);
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--pseo-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* ── Count Badge ── */
.gb-pseo-count-badge {
    font-size: .8rem;
    font-weight: 500;
    background: var(--pseo-bg);
    border: 1px solid var(--pseo-border);
    border-radius: 100px;
    padding: 3px 10px;
    color: var(--pseo-muted);
}

/* ── Category Grid (index) ── */
.gb-pseo-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 32px;
}
.gb-pseo-cat-card {
    background: var(--pseo-card-bg);
    border: 1px solid var(--pseo-border);
    border-radius: var(--pseo-radius);
    padding: 24px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--pseo-text);
    transition: box-shadow .2s, transform .2s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.gb-pseo-cat-card:hover { box-shadow: var(--pseo-shadow-lg); transform: translateY(-2px); }
.gb-pseo-cat-card__name { font-weight: 600; font-size: 1rem; }
.gb-pseo-cat-card__count { font-size: .82rem; color: var(--pseo-muted); }

/* ── City Grid ── */
.gb-pseo-city-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.gb-pseo-city-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pseo-card-bg);
    border: 1px solid var(--pseo-border);
    border-radius: 100px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--pseo-primary);
    font-size: .9rem;
    font-weight: 500;
    transition: background .15s, border-color .15s;
}
.gb-pseo-city-pill:hover { background: var(--pseo-primary); color: #fff; border-color: var(--pseo-primary); }
.gb-pseo-city-pill__count {
    background: var(--pseo-bg);
    border-radius: 100px;
    padding: 1px 7px;
    font-size: .78rem;
    color: var(--pseo-muted);
}
.gb-pseo-city-pill:hover .gb-pseo-city-pill__count { background: rgba(255,255,255,.2); color: #fff; }

/* ── Listing Grid ── */
.gb-pseo-listing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.gb-pseo-listing-card {
    background: var(--pseo-card-bg);
    border: 1px solid var(--pseo-border);
    border-radius: var(--pseo-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}
.gb-pseo-listing-card:hover { box-shadow: var(--pseo-shadow-lg); }
.gb-pseo-listing-card__thumb { aspect-ratio: 16/9; overflow: hidden; }
.gb-pseo-listing-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.gb-pseo-listing-card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.gb-pseo-listing-card__header { display: flex; align-items: flex-start; gap: 8px; }
.gb-pseo-listing-card__title { font-size: 1rem; font-weight: 600; margin: 0; flex: 1; }
.gb-pseo-listing-card__title a { text-decoration: none; color: var(--pseo-text); }
.gb-pseo-listing-card__title a:hover { color: var(--pseo-accent); }
.gb-pseo-listing-card__rating { display: flex; align-items: center; gap: 6px; font-size: .88rem; color: #e67e00; }
.gb-pseo-listing-card__loc, .gb-pseo-listing-card__phone { font-size: .84rem; color: var(--pseo-muted); }
.gb-pseo-listing-card__phone a { color: var(--pseo-primary); text-decoration: none; }
.gb-pseo-listing-card__cta { margin: 0 16px 16px; text-align: center; }

/* ── Top 5 ── */
.gb-pseo-top5-list { display: flex; flex-direction: column; gap: 16px; }
.gb-pseo-top5-card {
    background: var(--pseo-card-bg);
    border: 1px solid var(--pseo-border);
    border-radius: var(--pseo-radius);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: box-shadow .2s;
}
.gb-pseo-top5-card:hover { box-shadow: var(--pseo-shadow); }
.gb-pseo-top5-card:first-child { border-color: #f0c040; background: #fffbeb; }
.gb-pseo-top5-card__rank {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--pseo-primary);
    opacity: .35;
    min-width: 36px;
    line-height: 1;
}
.gb-pseo-top5-card:first-child .gb-pseo-top5-card__rank { color: #b8860b; opacity: 1; }
.gb-pseo-top5-card__thumb img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; }
.gb-pseo-top5-card__body { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.gb-pseo-top5-card__header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gb-pseo-top5-card__name { font-size: 1.05rem; font-weight: 600; margin: 0; }
.gb-pseo-top5-card__name a { text-decoration: none; color: var(--pseo-text); }
.gb-pseo-top5-card__name a:hover { color: var(--pseo-accent); }
.gb-pseo-top5-card__rating { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: #e67e00; }
.gb-pseo-top5-card__address, .gb-pseo-top5-card__phone { font-size: .84rem; color: var(--pseo-muted); display: flex; align-items: center; gap: 4px; }
.gb-pseo-top5-card__phone a { color: var(--pseo-primary); text-decoration: none; }
.gb-pseo-top5-card__action { align-self: center; }

/* ── Market Insights ── */
.gb-pseo-insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
}
.gb-pseo-insight-card {
    background: var(--pseo-card-bg);
    border: 1px solid var(--pseo-border);
    border-radius: var(--pseo-radius);
    padding: 24px 20px;
    text-align: center;
}
.gb-pseo-insight-card--accent { border-color: var(--pseo-green); }
.gb-pseo-insight-card__value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--pseo-primary);
    line-height: 1.1;
}
.gb-pseo-insight-card__value--sm { font-size: 1.3rem; }
.gb-pseo-insight-card__star { color: #e67e00; }
.gb-pseo-insight-card--accent .gb-pseo-insight-card__value { color: var(--pseo-green); }
.gb-pseo-insight-card__label { font-weight: 600; margin-top: 6px; font-size: .95rem; }
.gb-pseo-insight-card__note { font-size: .8rem; color: var(--pseo-muted); margin-top: 4px; }

/* ── FAQ ── */
.gb-pseo-faq-list { display: flex; flex-direction: column; gap: 8px; }
.gb-pseo-faq-item {
    background: var(--pseo-card-bg);
    border: 1px solid var(--pseo-border);
    border-radius: var(--pseo-radius);
    overflow: hidden;
}
.gb-pseo-faq-item[open] { border-color: var(--pseo-primary); }
.gb-pseo-faq-item__q {
    padding: 16px 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.gb-pseo-faq-item__q::-webkit-details-marker { display: none; }
.gb-pseo-faq-item__q::after { content: '+'; font-size: 1.3rem; color: var(--pseo-primary); transition: transform .2s; }
.gb-pseo-faq-item[open] .gb-pseo-faq-item__q::after { transform: rotate(45deg); }
.gb-pseo-faq-item__a {
    padding: 0 20px 16px;
    color: var(--pseo-muted);
    line-height: 1.7;
}

/* ── Internal Links ── */
.gb-pseo-link-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.gb-pseo-link-pill {
    display: inline-block;
    background: var(--pseo-bg);
    border: 1px solid var(--pseo-border);
    border-radius: 6px;
    padding: 7px 14px;
    text-decoration: none;
    color: var(--pseo-primary);
    font-size: .9rem;
    transition: all .15s;
}
.gb-pseo-link-pill:hover { background: var(--pseo-primary); color: #fff; border-color: var(--pseo-primary); }

/* ── Badges ── */
.gb-pseo-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}
.gb-pseo-badge--verified { background: #e6faf2; color: var(--pseo-green); border: 1px solid #b2ead4; }

/* ── Buttons ── */
.gb-pseo-btn {
    display: inline-block;
    background: var(--pseo-accent);
    color: #fff;
    border-radius: 6px;
    padding: 10px 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: .9rem;
    transition: background .15s, transform .1s;
    border: none;
    cursor: pointer;
}
.gb-pseo-btn:hover { background: #c9450f; color: #fff; transform: translateY(-1px); }
.gb-pseo-btn--sm { padding: 7px 14px; font-size: .84rem; }
.gb-pseo-btn--outline {
    background: transparent;
    border: 2px solid var(--pseo-primary);
    color: var(--pseo-primary);
}
.gb-pseo-btn--outline:hover { background: var(--pseo-primary); color: #fff; }

/* ── Pagination ── */
.gb-pseo-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; justify-content: center; }
.gb-pseo-pagination__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--pseo-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--pseo-primary);
    font-weight: 500;
    transition: all .15s;
}
.gb-pseo-pagination__item:hover { background: var(--pseo-primary); color: #fff; border-color: var(--pseo-primary); }
.gb-pseo-pagination__item--current { background: var(--pseo-primary); color: #fff; border-color: var(--pseo-primary); }

/* ── View All ── */
.gb-pseo-view-all { text-align: center; margin-top: 28px; }

/* ── Empty State ── */
.gb-pseo-empty { text-align: center; padding: 60px 20px; color: var(--pseo-muted); }
.gb-pseo-empty a { margin-top: 16px; }

/* ── Misc ── */
.gb-pseo-muted { color: var(--pseo-muted); }
.gb-pseo-stars { color: #e67e00; letter-spacing: 1px; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .gb-pseo-hero { padding: 40px 16px 32px; }
    .gb-pseo-container { padding: 0 16px 40px; }
    .gb-pseo-listing-grid { grid-template-columns: 1fr; }
    .gb-pseo-insights-grid { grid-template-columns: 1fr 1fr; }
    .gb-pseo-top5-card { flex-wrap: wrap; }
    .gb-pseo-top5-card__action { width: 100%; text-align: right; }
}

/* ── WhatsApp Button ── */
.gb-pseo-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #25D366;
    color: #fff;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    margin-top: 2px;
}
.gb-pseo-wa-btn:hover { background: #1da855; color: #fff; }
.gb-pseo-wa-btn svg { flex-shrink: 0; }
.gb-pseo-listing-card__wa,
.gb-pseo-top5-card__wa { line-height: 1; }

/* ── Widgets & Shortcodes ── */
.gb-pseo-widget { margin: 24px 0; }
.gb-pseo-widget__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--pseo-primary);
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pseo-border);
}

/* Pills style */
.gb-pseo-widget-pills { display: flex; flex-wrap: wrap; gap: 10px; }
.gb-pseo-widget-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--pseo-card-bg);
    border: 1px solid var(--pseo-border);
    border-radius: 100px;
    padding: 8px 16px;
    text-decoration: none;
    color: var(--pseo-primary);
    font-size: .9rem;
    font-weight: 500;
    transition: all .15s;
}
.gb-pseo-widget-pill:hover { background: var(--pseo-primary); color: #fff; border-color: var(--pseo-primary); }
.gb-pseo-widget-pill__count {
    background: var(--pseo-bg);
    border-radius: 100px;
    padding: 1px 7px;
    font-size: .75rem;
    color: var(--pseo-muted);
}
.gb-pseo-widget-pill:hover .gb-pseo-widget-pill__count { background: rgba(255,255,255,.2); color: #fff; }

/* Grid style */
.gb-pseo-widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.gb-pseo-widget-card {
    background: var(--pseo-card-bg);
    border: 1px solid var(--pseo-border);
    border-radius: var(--pseo-radius);
    padding: 16px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--pseo-text);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow .2s, transform .2s;
}
.gb-pseo-widget-card:hover { box-shadow: var(--pseo-shadow-lg); transform: translateY(-2px); }
.gb-pseo-widget-card__icon { font-size: 1.5rem; }
.gb-pseo-widget-card__name { font-weight: 600; font-size: .9rem; }
.gb-pseo-widget-card__count { font-size: .78rem; color: var(--pseo-muted); }

/* List style */
.gb-pseo-widget-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gb-pseo-widget-list__item a { text-decoration: none; color: var(--pseo-primary); font-size: .95rem; }
.gb-pseo-widget-list__item a:hover { text-decoration: underline; }
.gb-pseo-widget-list__count { color: var(--pseo-muted); font-size: .85rem; }

/* Search Widget */
.gb-pseo-search-widget { background: var(--pseo-card-bg); border: 1px solid var(--pseo-border); border-radius: var(--pseo-radius); padding: 20px; }
.gb-pseo-search-widget__inner { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.gb-pseo-search-widget__select {
    flex: 1;
    min-width: 180px;
    padding: 10px 14px;
    border: 1px solid var(--pseo-border);
    border-radius: 6px;
    font-size: .95rem;
    color: var(--pseo-text);
    background: var(--pseo-bg);
    cursor: pointer;
}
.gb-pseo-search-widget__select:focus { outline: 2px solid var(--pseo-primary); border-color: var(--pseo-primary); }
.gb-pseo-search-widget__btn { white-space: nowrap; padding: 10px 24px; }
@media (max-width: 600px) {
    .gb-pseo-search-widget__inner { flex-direction: column; }
    .gb-pseo-search-widget__select,
    .gb-pseo-search-widget__btn { width: 100%; }
}

/* ── Top Categories Grid (Homepage Shortcode) ── */
.gb-pseo-topcats-grid {
    display: grid;
    grid-template-columns: repeat(var(--cols, 4), 1fr);
    gap: 16px;
}
.gb-pseo-topcats-card {
    background: var(--pseo-card-bg);
    border: 1px solid var(--pseo-border);
    border-radius: var(--pseo-radius);
    padding: 24px 16px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--pseo-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: box-shadow .2s, transform .2s, border-color .2s;
}
.gb-pseo-topcats-card:hover {
    box-shadow: var(--pseo-shadow-lg);
    transform: translateY(-3px);
    border-color: var(--pseo-primary);
    color: var(--pseo-primary);
}
.gb-pseo-topcats-card__icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #e8f0fe, #d2e3fc);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.gb-pseo-topcats-card:hover .gb-pseo-topcats-card__icon {
    background: linear-gradient(135deg, var(--pseo-primary), #0f2744);
    color: #fff;
}
.gb-pseo-topcats-card__icon i { font-size: 1.4rem; color: var(--pseo-primary); }
.gb-pseo-topcats-card:hover .gb-pseo-topcats-card__icon i { color: #fff; }
.gb-pseo-topcats-card__name { font-weight: 600; font-size: .95rem; line-height: 1.3; }
.gb-pseo-topcats-card__count { font-size: .78rem; color: var(--pseo-muted); }

/* ── Category Index Page Icons ── */
.gb-pseo-cat-card__icon {
    font-size: 1.6rem;
    color: var(--pseo-primary);
    margin-bottom: 4px;
}
.gb-pseo-cat-card:hover .gb-pseo-cat-card__icon { color: var(--pseo-accent); }

/* ── Widget pill icons ── */
.gb-pseo-widget-pill i,
.gb-pseo-widget-list__item i { margin-right: 5px; }

/* ── Responsive top cats grid ── */
@media (max-width: 1024px) {
    .gb-pseo-topcats-grid { grid-template-columns: repeat(min(var(--cols, 4), 3), 1fr); }
}
@media (max-width: 768px) {
    .gb-pseo-topcats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .gb-pseo-topcats-card { padding: 16px 10px; }
    .gb-pseo-topcats-card__icon { width: 42px; height: 42px; }
    .gb-pseo-topcats-card__icon i { font-size: 1.2rem; }
}
@media (max-width: 400px) {
    .gb-pseo-topcats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Category Index — FA Icon Cards ── */
.gb-pseo-cat-card__icon {
    font-size: 2rem;
    color: var(--pseo-primary);
    margin-bottom: 4px;
    line-height: 1;
    display: block;
}
.gb-pseo-cat-card:hover .gb-pseo-cat-card__icon { color: var(--pseo-accent); }

/* ── Sub-locations Grid ── */
.gb-pseo-subloc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.gb-pseo-subloc-card {
    background: var(--pseo-card-bg);
    border: 1px solid var(--pseo-border);
    border-radius: var(--pseo-radius);
    padding: 16px 14px;
    text-align: center;
    text-decoration: none;
    color: var(--pseo-text);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: box-shadow .2s, border-color .2s, transform .15s;
}
.gb-pseo-subloc-card:hover {
    box-shadow: var(--pseo-shadow-lg);
    border-color: var(--pseo-primary);
    transform: translateY(-2px);
}
.gb-pseo-subloc-card__icon { font-size: 1.3rem; }
.gb-pseo-subloc-card__name { font-weight: 600; font-size: .95rem; color: var(--pseo-primary); }
.gb-pseo-subloc-card__count { font-size: .78rem; color: var(--pseo-muted); }

/* ── AI Summary block on single listing page ── */
.gb-pseo-ai-summary {
    background: #f8fafc;
    border-left: 3px solid #1a3c5e;
    border-radius: 0 8px 8px 0;
    padding: 20px 24px;
    margin: 24px 0;
}
.gb-pseo-ai-summary__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a3c5e;
    margin: 0 0 10px;
}
.gb-pseo-ai-summary__text {
    font-size: .95rem;
    line-height: 1.7;
    color: #444;
    margin: 0;
}
