/* =====================================================================
   PROGRAMS — Topics Grid & Single Program Page
   =====================================================================
   Styles for the Topics grid and individual program/topic pages.
   Uses CSS custom properties from the existing Bistro Custom theme.

   INSTALL: Upload to wp-content/themes/bistrocustom/assets/css/
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. TOPICS GRID (Compact 2-Column Layout, inspired by 1440.news)
   --------------------------------------------------------------------- */

.topics-grid {
    padding: 0;
}

.topics-grid-title {
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--color--brand, #3B60E4);
}

.topics-group {
    margin-bottom: 1.25rem;
}

.topics-group-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color--brand, #3B60E4);
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e0e0e0;
}

/* 2-column grid for the topic pills */
.topics-items {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

/* Individual topic pill/row */
.topics-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.35rem;
    text-decoration: none;
    color: #222;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease, color 0.15s ease;
    font-size: 0.8rem;
    line-height: 1.3;
}

.topics-pill:hover {
    background-color: #f5f7ff;
    color: var(--color--brand, #3B60E4);
}

.topics-pill-text {
    flex: 1;
    font-weight: 500;
}

.topics-pill-arrow {
    font-size: 0.6rem;
    color: #ccc;
    margin-left: 0.35rem;
    flex-shrink: 0;
    transition: color 0.15s ease;
}

.topics-pill:hover .topics-pill-arrow {
    color: var(--color--brand, #3B60E4);
}

/* When there's an odd number of items, last one spans full width */
.topics-items > .topics-pill:last-child:nth-child(odd) {
    grid-column: span 1;
}

/* -----------------------------------------------------------------------------
   2. SINGLE PROGRAM PAGE
   ----------------------------------------------------------------------------- */

.program-single {
    max-width: 100%;
}

/* Hero */
.program-hero {
    padding: 2.5rem 0 1.5rem;
}

.program-type-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color--brand, #3B60E4);
    margin-bottom: 0.5rem;
}

.program-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
    color: var(--color--font, #1a1a1a);
}

/* Sections */
.program-section {
    padding: 2rem 0;
    border-top: 1px solid #e8e8e8;
}

.program-section:first-of-type {
    border-top: 3px solid var(--color--brand, #3B60E4);
}

.program-section-label {
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color--font, #1a1a1a);
    margin-bottom: 1rem;
}

.program-subsection-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #666;
    margin-bottom: 0.5rem;
}

.program-overview-text p,
.program-landscape-overview p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 1rem;
}


/* -----------------------------------------------------------------------------
   3. ACCORDION (Dive Deeper)
   ----------------------------------------------------------------------------- */

.program-accordion {
    margin-top: 1rem;
}

.program-accordion-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0.625rem 0;
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color--brand, #3B60E4);
    transition: color 0.2s ease;
    font-family: inherit;
}

.program-accordion-trigger:hover {
    color: var(--color--brand-dk, #0A294F);
}

.program-accordion-icon {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.program-accordion-trigger[aria-expanded="true"] .program-accordion-icon {
    transform: rotate(180deg);
}

.program-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.program-accordion-content[aria-hidden="false"] {
    max-height: none;
}

.program-accordion-inner {
    padding: 1rem 0 0.5rem;
    border-top: 1px solid #f0f0f0;
}

.program-accordion-inner p {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 1rem;
}

.program-accordion-inner h3,
.program-accordion-inner h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.program-accordion-inner ul,
.program-accordion-inner ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.program-accordion-inner li {
    margin-bottom: 0.25rem;
    line-height: 1.6;
}

.program-accordion-inner img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1rem 0;
}

.program-accordion-inner a {
    color: var(--color--link, #3B60E4);
    text-decoration: underline;
}

.program-accordion-inner a:hover {
    color: var(--color--link-h, #0A294F);
}


/* -----------------------------------------------------------------------------
   4. FOOTER NAVIGATION
   ----------------------------------------------------------------------------- */

.program-footer-nav {
    padding: 2rem 0;
    border-top: 3px solid var(--color--brand, #3B60E4);
    margin-top: 1rem;
}

.program-footer-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.program-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color--brand, #3B60E4);
    text-decoration: none;
    transition: color 0.2s ease;
}

.program-back-link:hover {
    color: var(--color--brand-dk, #0A294F);
}

.program-related-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #666;
    margin-bottom: 0.5rem;
}

.program-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.program-related-list li {
    margin-bottom: 0.25rem;
}

.program-related-list a {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color--font, #1a1a1a);
    text-decoration: none;
    transition: color 0.2s ease;
}

.program-related-list a:hover {
    color: var(--color--brand, #3B60E4);
}

.program-related-list a i {
    font-size: 0.625rem;
    opacity: 0.4;
}

.program-related-list a:hover i {
    opacity: 1;
}


/* -----------------------------------------------------------------------------
   5. RESPONSIVE
   ----------------------------------------------------------------------------- */

@media (max-width: 768px) {
    .program-title {
        font-size: 1.75rem;
    }

    .program-footer-nav-inner {
        flex-direction: column;
    }

    .program-section-label {
        font-size: 1.125rem;
    }

    .topics-link {
        padding: 0.75rem 0;
        font-size: 1rem;
    }
}
