/* ============================================
   PILLAR LANDING PAGE
   Loaded conditionally via functions.php when
   page template is page-pillar.php.

   Reuses site color tokens (from style.css :root):
     --gold-primary: #C9A227
     --gold-light:   #E8D48A
     --navy-deep:    #1B2838
     --navy-medium:  #2D4156
   ============================================ */

/* -----------------------------------------------
   Fix: GP's header.php opens #content.site-content
   as display:flex. Our template_include bypass skips
   GP's .content-area wrapper, leaving <main> as a
   bare flex child that shrinks to content width.
   Restoring full-width behaviour here since this CSS
   only loads on pillar pages (conditional enqueue).
   ----------------------------------------------- */
#main-content {
    width: 100%;
}

/* -----------------------------------------------
   Hero — override .section's generous clamp padding
   ----------------------------------------------- */
.pillar-hero.section {
    padding: 3rem 0 2.5rem;
}

.pillar-page-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 1.25rem 0;
    line-height: 1.2;
    text-align: center;
}

.pillar-page-intro {
    max-width: 760px;
    margin: 0 auto;
    font-family: 'Libre Franklin', 'Inter', system-ui, sans-serif;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.pillar-page-intro h2,
.pillar-page-intro h3,
.pillar-page-intro h4,
.pillar-page-intro h5 {
    color: #fff;
    font-weight: 600;
}

.pillar-page-intro ul,
.pillar-page-intro ol,
.pillar-page-intro li {
    color: inherit;
}

.pillar-page-intro a {
    color: var(--gold-light);
    text-underline-offset: 3px;
}

.pillar-page-intro a:hover {
    color: #fff;
}

/* Center the lead tagline paragraph under the pillar title.
   Scoped to the first <p> so downstream editorial content
   (lists, headings, nested paragraphs) stays left-aligned. */
.pillar-page-intro > p:first-child {
    text-align: center;
}

/* -----------------------------------------------
   Illuminate video embed — portrait sizing
   Overrides GP's `video { display: inline-block }`
   via a more-specific `.illuminate-video-wrap video`
   selector so margin: auto centering works reliably.
   ----------------------------------------------- */
.illuminate-video-wrap {
    max-width: 360px;
    margin: 2rem auto;
    display: block;
}

.illuminate-video-wrap video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.illuminate-video-caption {
    text-align: center;
}

/* -----------------------------------------------
   Cards section — override .section padding
   ----------------------------------------------- */
.pillar-cards-section.section {
    padding: 2.5rem 0 3.5rem;
}

/* -----------------------------------------------
   Card grid
   auto-fit: empty tracks collapse, so a single card
   stays capped at 380px and rows with fewer cards
   remain centered rather than stretching.
   240px min allows 5 columns within 1200px max-width:
   5 × 240 + 4 × 20 = 1280px → wraps to 4+1 at ~1200px.
   ----------------------------------------------- */
.plc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 380px));
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* -----------------------------------------------
   Card — mirrors .hmb-mission-card on the homepage
   ----------------------------------------------- */
.plc-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.75rem 1.5rem 1.6rem;
    background: var(--navy-deep);
    border: 1px solid var(--gold-primary);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: #fff;
    transition:
        background var(--transition-base),
        border-color var(--transition-base),
        transform var(--transition-fast),
        box-shadow var(--transition-base);
}

.plc-card:hover {
    background: var(--navy-medium);
    border-color: var(--gold-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(201, 162, 39, 0.25);
}

.plc-card:focus-visible {
    outline: 2px solid var(--gold-light);
    outline-offset: 3px;
    background: var(--navy-medium);
}

.plc-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
}

/* WCAG AA: rgba(255,255,255,0.65) on #1B2838 ≈ 9:1 contrast */
.plc-card-sub {
    font-family: 'Libre Franklin', 'Inter', system-ui, sans-serif;
    font-size: clamp(0.8rem, 1.2vw, 0.875rem);
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.4;
}

/* -----------------------------------------------
   Responsive — Mobile < 768px
   ----------------------------------------------- */
@media (max-width: 767px) {
    .pillar-hero.section {
        padding: 2rem 0 1.75rem;
    }

    .pillar-cards-section.section {
        padding: 1.75rem 0 2.5rem;
    }

    .illuminate-video-wrap {
        max-width: 100%;
    }

    /* auto-fit with minmax(260px) naturally goes single-column
       below ~580px. No forced column override needed. */
    .plc-grid {
        gap: 14px;
    }

    .plc-card {
        padding: 1.35rem 1.1rem;
    }

    .plc-card-title {
        font-size: 1.1rem;
    }

    .plc-card-sub {
        font-size: 0.8rem;
    }
}

/* -----------------------------------------------
   Coming-Soon card variant
   Rendered as a non-clickable <div> when a pillar
   child page has _pillar_card_show_as_coming_soon=1
   and post_status != 'publish'. Visual cue: dim the
   card + gold pill badge in the top-right corner.
   Badge visuals mirror .mdaa-stock-badge.coming-soon
   in inc/store/ for family resemblance.
   ----------------------------------------------- */
.plc-card.plc-card--coming-soon {
    opacity: 0.65;
    cursor: default;
    position: relative;
    padding-top: 2.25rem; /* room for badge */
}

.plc-card.plc-card--coming-soon:hover,
.plc-card.plc-card--coming-soon:focus,
.plc-card.plc-card--coming-soon:focus-visible {
    background: var(--navy-deep);
    border-color: var(--gold-primary);
    transform: none;
    box-shadow: none;
    outline: none;
}

.plc-card-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    display: inline-block;
    background: var(--gold-primary);
    color: #fff;
    font-family: 'Libre Franklin', 'Inter', system-ui, sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

@media (max-width: 767px) {
    .plc-card.plc-card--coming-soon {
        padding-top: 2rem;
    }

    .plc-card-badge {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
}
