/* ─────────────────────────────────────────────────────────────────
   pages.css — Page-specific styles.
   Sections that only appear on a single page or template.
   Organized by page; each section is namespaced to a body class
   or a unique class prefix to avoid bleed.
   ───────────────────────────────────────────────────────────────── */

/* ════════════════════════════════════════════════════════════════
   HOME PAGE  (body.home — index.php)
   ════════════════════════════════════════════════════════════════ */

.home .hero {
    background: linear-gradient(180deg, var(--color-cream) 0%, #fff 100%);
    padding: 80px 0 64px;
}
.home .hero h1 { max-width: 18ch; margin-bottom: 16px; }
.home .hero p.lead {
    font-size: 1.15rem;
    color: var(--color-mute);
    max-width: 56ch;
    margin-bottom: 32px;
}
.home .hero-search {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 8px;
    display: flex;
    gap: 8px;
    max-width: 640px;
    box-shadow: var(--shadow-card);
}
.home .hero-search input {
    flex: 1;
    border: 0;
    padding: 12px 16px;
    font: inherit;
    outline: none;
    min-width: 0;
}
.home .hero-search button { white-space: nowrap; }

/* Generic section wrappers used on the home page */
.home section.block { padding: 72px 0; }
.home section.block.alt { background: var(--color-cream); }

/* Value props */
.home .vp {
    background: var(--color-bg);
    padding: 32px 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
}
.home .vp h3 { margin-top: 0; }
.home .vp .icon {
    width: 40px;
    height: 40px;
    background: var(--color-honey);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-bottom: 16px;
    font-weight: 700;
}

/* About teaser (Nate portrait + intro copy) */
.home .about-teaser {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
@media (max-width: 800px) {
    .home .about-teaser { grid-template-columns: 1fr; gap: 32px; }
}
.home .about-teaser .photo {
    aspect-ratio: 4/5;
    background: var(--color-line) center top / cover no-repeat;
    border-radius: var(--radius-md);
}

/* Sellers CTA band (dark) */
.home .sellers-cta {
    background: var(--color-ink);
    color: #fff;
    text-align: center;
    padding: 80px 0;
}
.home .sellers-cta h2 { color: #fff; }
.home .sellers-cta p {
    color: #d6d3cb;
    max-width: 52ch;
    margin: 0 auto 28px;
    font-size: 1.1rem;
}

/* ════════════════════════════════════════════════════════════════
   COMMUNITIES HUB  (body.communities-hub — communities/index.php)
   ════════════════════════════════════════════════════════════════ */

.communities-hub .ch-hero {
    background: var(--color-cream);
    padding: 80px 0 56px;
}
.communities-hub .ch-hero h1 { max-width: 22ch; margin-bottom: 16px; }
.communities-hub .ch-hero p.lead {
    font-size: 1.15rem;
    color: var(--color-mute);
    max-width: 64ch;
}

/* States overview */
.communities-hub .ch-states { padding: 64px 0 16px; }
.communities-hub .ch-state-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
@media (max-width: 720px) {
    .communities-hub .ch-state-grid { grid-template-columns: 1fr; }
}

.communities-hub .ch-state-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 220px;
    border-radius: var(--radius-md);
    overflow: hidden;
    color: #fff;
    background: var(--color-ink) center/cover no-repeat;
    padding: 28px 32px;
    transition: transform var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease);
}
.communities-hub .ch-state-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.20) 0%, rgba(0,0,0,0.78) 100%);
    z-index: 1;
}
.communities-hub .ch-state-card > * { position: relative; z-index: 2; }
.communities-hub .ch-state-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-pop);
    text-decoration: none;
}
.communities-hub .ch-state-card h2 {
    color: #fff;
    margin: 0 0 4px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.communities-hub .ch-state-card .tag {
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 0 0 16px;
}
.communities-hub .ch-state-card .meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    opacity: 0.85;
}

/* Directory section (county groupings) */
.communities-hub .ch-directory { padding: 56px 0; }
.communities-hub .ch-directory h2 { margin-bottom: 8px; }
.communities-hub .ch-directory > .container > p.intro {
    color: var(--color-mute);
    margin-bottom: 32px;
    max-width: 64ch;
}
.communities-hub .ch-county {
    padding: 28px 0;
    border-top: 1px solid var(--color-border);
}
.communities-hub .ch-county:first-of-type {
    border-top: 0;
    padding-top: 0;
}
.communities-hub .ch-county-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.communities-hub .ch-county-head h3 { margin: 0; font-size: 1.25rem; }
.communities-hub .ch-county-head h3 a { color: var(--color-ink); }
.communities-hub .ch-county-head h3 a:hover {
    color: var(--color-honey-dark);
    text-decoration: none;
}
.communities-hub .ch-county-head .count {
    color: var(--color-mute);
    font-size: 0.85rem;
}
.communities-hub .ch-city-list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 16px;
}
@media (max-width: 800px) { .communities-hub .ch-city-list { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .communities-hub .ch-city-list { grid-template-columns: 1fr; } }
.communities-hub .ch-city-list a {
    padding: 6px 0;
    color: var(--color-ink);
    font-weight: 500;
}
.communities-hub .ch-city-list a:hover {
    color: var(--color-honey-dark);
    text-decoration: none;
}

/* ════════════════════════════════════════════════════════════════
   COMMUNITY PAGE  (body.place — communities/place.php)
   Renders state, county, city, district, and neighborhood pages.
   ════════════════════════════════════════════════════════════════ */

.place .pl-hero {
    position: relative;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    padding: 56px 0 40px;
    /* Use individual properties — NOT the `background:` shorthand —
       so we don't overwrite the per-page background-image set inline. */
    background-color: var(--color-cream);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    color: #fff;
}
.place .pl-hero .container { width: 100%; }
.place .pl-hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    margin-bottom: 8px;
}
.place .pl-hero .tagline {
    font-size: 1.05rem;
    opacity: 0.92;
    margin: 0;
    max-width: 56ch;
}
.place .pl-hero .meta {
    display: inline-flex;
    gap: 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    opacity: 0.9;
    margin-bottom: 12px;
}

/* Body: description + highlights two-up */
.place .pl-body { padding: 64px 0; }
.place .pl-body .layout {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 56px;
    align-items: start;
}
@media (max-width: 900px) {
    .place .pl-body .layout { grid-template-columns: 1fr; gap: 32px; }
}
.place .pl-body p {
    font-size: 1.05rem;
    line-height: 1.7;
}
.place .pl-body .btn-row {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* Highlights sidebar */
.place .pl-highlights {
    background: var(--color-cream);
    padding: 28px 32px;
    border-radius: var(--radius-md);
}
.place .pl-highlights h3 {
    margin-top: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--color-honey-dark);
}
.place .pl-highlights ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.place .pl-highlights li {
    padding: 10px 0;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.place .pl-highlights li:last-child { border-bottom: 0; }
.place .pl-highlights li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-honey);
    flex-shrink: 0;
}

/* Gallery section */
.place .pl-gallery { padding: 56px 0; }
.place .pl-gallery .head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.place .pl-gallery h2 { margin: 0; }
.place .pl-gallery .count {
    color: var(--color-mute);
    font-size: 0.9rem;
}

/* Children grid (counties under state, cities under county, etc.) */
.place .pl-children {
    padding: 56px 0;
    background: var(--color-cream);
}
.place .pl-children .head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.place .pl-children h2 { margin: 0; }
.place .pl-children .count {
    color: var(--color-mute);
    font-size: 0.9rem;
}
.place .pl-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
@media (max-width: 1000px) { .place .pl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .place .pl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px)  { .place .pl-grid { grid-template-columns: 1fr; } }

.place .pl-card {
    display: block;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    color: var(--color-ink);
    transition: transform var(--dur-fast) var(--ease),
                box-shadow var(--dur-fast) var(--ease);
}
.place .pl-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-pop);
    text-decoration: none;
}
.place .pl-card-img {
    aspect-ratio: 4/3;
    background: var(--color-cream) center/cover no-repeat;
}
.place .pl-card-body { padding: 16px 18px 20px; }
.place .pl-card-body h3 { font-size: 1.05rem; margin: 0 0 4px; }
.place .pl-card-body .tagline {
    font-size: 0.85rem;
    color: var(--color-mute);
    margin: 0;
    line-height: 1.4;
}

/* Listings (IDX showcase placeholder area) */
.place .pl-listings { padding: 56px 0; }
.place .pl-listings .head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

/* Bottom CTA band */
.place .pl-cta { padding: 72px 0; text-align: center; }
.place .pl-cta p {
    max-width: 56ch;
    margin: 0 auto 24px;
    color: var(--color-mute);
}

/* Siblings strip */
.place .pl-siblings {
    padding: 56px 0;
    border-top: 1px solid var(--color-border);
}
.place .pl-siblings h3 { margin-bottom: 20px; }
.place .pl-siblings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 800px) { .place .pl-siblings-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .place .pl-siblings-grid { grid-template-columns: 1fr; } }
.place .pl-sibling {
    display: block;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    color: var(--color-ink);
    transition: all var(--dur-fast) var(--ease);
}
.place .pl-sibling:hover {
    border-color: var(--color-honey);
    transform: translateY(-1px);
    text-decoration: none;
}
.place .pl-sibling .nm { font-weight: 600; }
.place .pl-sibling .tg {
    font-size: 0.8rem;
    color: var(--color-mute);
    display: block;
    margin-top: 2px;
}
