/* =============================================================
   The Collective Counseling — Trainings Page
   Brand palette:
     Terracotta  #c8896a  (primary accent, buttons)
     Peach       #e8c3a8  (secondary buttons, highlights)
     Cream       #fbf4ef  (page background)
     Charcoal    #3d3b39  (headings, primary text)
     Steel       #6b6c6f  (body text, meta)
   ============================================================= */

/* ── Reset & base ─────────────────────────────────────────── */
.trainings-page *,
.trainings-page *::before,
.trainings-page *::after {
    box-sizing: border-box;
}

.trainings-page {
    background-color: #fbf4ef;
    color: #3d3b39;
    font-family: inherit; /* inherits your Elementor theme font */
    line-height: 1.65;
}

/* ── Container ────────────────────────────────────────────── */
.trainings-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Hero ─────────────────────────────────────────────────── */
.trainings-hero {
    background-color: #3d3b39;
    color: #fbf4ef;
    padding: 64px 24px 56px;
    text-align: center;
}

.trainings-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin: 0 0 12px;
    color: #fbf4ef;
    letter-spacing: -0.01em;
}

.trainings-hero-sub {
    font-size: 1.1rem;
    color: #e8c3a8;
    margin: 0;
    max-width: 560px;
    margin-inline: auto;
}

/* ── Grid section ─────────────────────────────────────────── */
.trainings-grid-section {
    padding: 56px 0 80px;
}

.trainings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

/* Third card spans both columns */
.course-card-full {
    grid-column: 1 / -1;
}

/* ── Course card ──────────────────────────────────────────── */
.course-card {
    background: #ffffff;
    border: 1px solid #e8c3a8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(61, 59, 57, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.course-card:hover {
    box-shadow: 0 6px 24px rgba(61, 59, 57, 0.12);
    transform: translateY(-2px);
}

.course-card-inner {
    padding: 32px 32px 28px;
}

/* ── Course tag (badge) ───────────────────────────────────── */
.course-tag {
    display: inline-block;
    background-color: #fbf4ef;
    border: 1px solid #e8c3a8;
    color: #c8896a;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
}

/* ── Course title & subtitle ──────────────────────────────── */
.course-title {
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    font-weight: 700;
    color: #3d3b39;
    margin: 0 0 6px;
    line-height: 1.3;
}

.course-subtitle {
    font-size: 0.95rem;
    color: #c8896a;
    font-style: italic;
    margin: 0 0 14px;
}

/* ── Brief description ────────────────────────────────────── */
.course-brief {
    font-size: 0.92rem;
    color: #6b6c6f;
    margin: 0 0 18px;
    line-height: 1.7;
}

/* ── Meta (date, format) ──────────────────────────────────── */
.course-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: #6b6c6f;
    margin-bottom: 18px;
}

/* ── Price row ────────────────────────────────────────────── */
.course-price-row {
    margin-bottom: 20px;
}

.course-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3d3b39;
}

.course-price small {
    font-size: 0.75rem;
    font-weight: 400;
    color: #6b6c6f;
    margin-left: 2px;
}

.dual-price {
    display: flex;
    align-items: center;
    gap: 12px;
}

.price-divider {
    color: #e8c3a8;
    font-size: 1.2rem;
}

/* ── Action buttons ───────────────────────────────────────── */
.course-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.dual-buy-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.btn-learn-more {
    background: transparent;
    border: 1px solid #c8896a;
    color: #c8896a;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
}

.btn-learn-more:hover {
    background: #fbf4ef;
    color: #3d3b39;
}

.btn-buy {
    background-color: #c8896a;
    color: #ffffff;
    border: none;
    padding: 11px 22px;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.18s, transform 0.12s;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.btn-buy:hover {
    background-color: #b5775a;
    transform: translateY(-1px);
}

.btn-buy:active {
    transform: translateY(0);
}

.btn-buy-secondary {
    background-color: #e8c3a8;
    color: #3d3b39;
}

.btn-buy-secondary:hover {
    background-color: #d9ae91;
}

.btn-collapse {
    background: transparent;
    border: none;
    color: #6b6c6f;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 8px 0;
    text-decoration: underline;
    display: block;
    margin-top: 20px;
}

.btn-collapse:hover {
    color: #3d3b39;
}

/* ── Expanded section ─────────────────────────────────────── */
.course-card-expanded {
    display: none;
    border-top: 1px solid #e8c3a8;
    background-color: #fbf4ef;
}

.expanded-content {
    padding: 32px 32px 36px;
}

.expanded-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #3d3b39;
    margin: 28px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e8c3a8;
}

.expanded-content h3:first-child {
    margin-top: 0;
}

.expanded-content p {
    color: #6b6c6f;
    font-size: 0.93rem;
    margin: 0 0 14px;
}

.expanded-content ul {
    padding-left: 20px;
    margin: 0 0 16px;
    color: #6b6c6f;
    font-size: 0.93rem;
}

.expanded-content ul li {
    margin-bottom: 6px;
    line-height: 1.6;
}

.details-list {
    list-style: none;
    padding-left: 0;
}

.details-list li {
    padding: 6px 0;
    border-bottom: 1px solid #e8c3a8;
}

.details-list li:last-child {
    border-bottom: none;
}

/* ── Options grid (virtual vs in-person) ──────────────────── */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.option-box {
    background: #ffffff;
    border: 1px solid #e8c3a8;
    border-radius: 10px;
    padding: 22px;
}

.option-box h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #3d3b39;
    margin: 0 0 12px;
}

.option-box ul {
    margin-bottom: 18px;
}

/* ── Expanded buy CTA ─────────────────────────────────────── */
.expanded-buy {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e8c3a8;
    border-radius: 10px;
}

/* ── Checkout loading overlay ─────────────────────────────── */
#checkout-loading {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(251, 244, 239, 0.92);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.checkout-spinner-box {
    text-align: center;
}

.checkout-spinner-box p {
    color: #3d3b39;
    font-size: 1rem;
    margin-top: 16px;
}

.checkout-spinner-ring {
    width: 48px;
    height: 48px;
    border: 4px solid #e8c3a8;
    border-top-color: #c8896a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Thank You page ───────────────────────────────────────── */
.thankyou-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    padding: 60px 0;
}

.thankyou-card {
    background: #ffffff;
    border: 1px solid #e8c3a8;
    border-radius: 16px;
    padding: 56px 48px;
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 4px 24px rgba(61, 59, 57, 0.08);
}

.thankyou-check {
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
}

.thankyou-check svg {
    width: 100%;
    height: 100%;
}

.thankyou-card h1 {
    font-size: 2rem;
    color: #3d3b39;
    margin: 0 0 24px;
}

.thankyou-content {
    text-align: left;
    color: #6b6c6f;
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 32px;
}

.thankyou-footer {
    margin-top: 8px;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
    .trainings-grid {
        grid-template-columns: 1fr;
    }

    .course-card-full {
        grid-column: auto;
    }

    .course-card-inner,
    .expanded-content {
        padding: 24px 20px;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .dual-price {
        flex-wrap: wrap;
    }

    .thankyou-card {
        padding: 36px 24px;
    }

    .course-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-learn-more,
    .btn-buy {
        text-align: center;
    }

    .dual-buy-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .trainings-hero {
        padding: 40px 16px 36px;
    }

    .trainings-grid-section {
        padding: 36px 0 56px;
    }
}
