/* Course List Page Styles */

.category-description {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Category Grid (for categories page) */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.category-card {
    background-color: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
}

    .category-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

.category-card-image {
    height: 160px;
    background-color: #e9ecef;
    background-size: cover;
    background-position: center;
}

    .category-card-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.category-card-body {
    padding: 1rem;
}

.category-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #333;
}

.category-card-description {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Search results styling */
.search-results-header {
    background-color: #f0f0f0;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

    .search-results-header .search-term {
        font-weight: 600;
    }

    .search-results-header .result-count {
        font-weight: 600;
    }

/* ============================
   Sidebar Layout (course list / categories pages)
   ============================ */

.courses-inner {
    gap: 2rem;
}

.courses-list-left {
    flex: 1;
    min-width: 0;
}

.courses-sidebar {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

@media (max-width: 991px) {
    .courses-inner {
        flex-direction: column;
    }

    .courses-sidebar {
        width: 100%;
        order: -1;
    }
}

/* ============================
   Sidebar Cards
   ============================ */

.sidebar-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    overflow: hidden;
}

.sidebar-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    padding: 0.75rem 1rem;
    background-color: #397FCC;
    color: #fff;
}

.sidebar-card-body {
    padding: 1rem;
}

.sidebar-card-cta {
    border-color: #28a745;
}

    .sidebar-card-cta .sidebar-card-title {
        background-color: #28a745;
    }

    .sidebar-card-cta p {
        font-size: 0.9rem;
        color: #555;
        margin-bottom: 0.75rem;
    }

/* Sidebar Video Thumbnail */
.sidebar-video-link {
    display: block;
    position: relative;
}

.sidebar-video-thumb {
    border-radius: 0.25rem;
}

.sidebar-video-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: color 0.2s ease;
}

.sidebar-video-link:hover .sidebar-video-play {
    color: #fff;
}

/* ============================
   Filter Checkboxes
   ============================ */

.filter-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    margin: 0;
}

    .filter-checkbox input[type="checkbox"] {
        width: 1rem;
        height: 1rem;
        accent-color: #397FCC;
        cursor: pointer;
    }

.sidebar-filter-actions {
    display: flex;
    flex-direction: column;
}

/* ============================
   Filter Status Bar
   ============================ */

.btn-subscribe {
    background: #f1c05b !important;
}

.filter-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ============================
   CLS reservations for course-page images
   ============================ */

/* xxl-only hero image on ViewCourse banner (right column). Modern course
   photos are 1024x683 (3:2) — reserve that ratio so the banner doesn't
   reflow when the image bytes arrive on wide screens. */
.banner-course-image {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

/* Course description body contains user-uploaded HTML from the legacy CMS
   where <img> tags rarely have width/height attributes. `aspect-ratio: auto`
   tells the browser to use the image's intrinsic ratio once known; the
   fallback 3/2 reserves space in the meantime so scrolling doesn't trip CLS
   as each inline image streams in. */
.course-description img,
.course-long-desc img,
.course-epilogue img {
    max-width: 100%;
    height: auto;
    aspect-ratio: auto 3 / 2;
}

/* ── Course pricing sidebar: "$X /week" payment breakdown ───────────────── */

.course-price-hero {
    padding: 0.75rem 0 1rem;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 1rem;
}

/* Match the legacy course price <h1>: Baloo Chettan 2, bold, dark-blue #0b435c. */
.price-hero-aud {
    color: #0b435c;
    font-family: 'Baloo Chettan 2', cursive;
    font-size: 1rem;
    vertical-align: middle;
    margin-right: 0.125rem;
}

.price-hero-amount {
    font-family: 'Baloo Chettan 2', cursive;
    font-size: 45px;
    font-weight: bold;
    line-height: 1;
    color: #0b435c;
}

.price-hero-unit {
    font-size: 1.25rem;
    font-weight: 600;
    color: #6c757d;
}

.price-hero-sub {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.course-pay-methods {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.pay-method {
    border: 1px solid #e9ecef;
    border-left-width: 4px;
    border-radius: 0.5rem;
    padding: 0.75rem 0.875rem;
    background-color: #fff;
}

.pay-method.pay-acs {
    border-left-color: #1b5e20;
}

.pay-method.pay-afterpay {
    border-left-color: #b2fce4;
}

.pay-method.pay-upfront {
    border-left-color: #003087;
    background-color: #f6faf7;
}

.pay-method-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    background-color: #1b5e20;
    border-radius: 1rem;
    padding: 0.125rem 0.625rem;
    white-space: nowrap;
}

.pay-method-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.pay-method-name {
    font-weight: 700;
    color: #212529;
}

.pay-method-weekly {
    font-weight: 700;
    color: #1b5e20;
    white-space: nowrap;
}

.pay-method-detail {
    font-size: 0.9375rem;
    color: #343a40;
    margin-top: 0.125rem;
}

.pay-method-total {
    font-size: 0.8125rem;
    color: #6c757d;
}

.pay-method-note {
    font-size: 0.75rem;
    color: #868e96;
    margin-top: 0.25rem;
    font-style: italic;
}

.course-price-disclaimer {
    font-size: 0.75rem;
    color: #868e96;
    margin-bottom: 1rem;
}

.pay-info {
    color: #6c757d;
    cursor: help;
    font-size: 0.875em;
    vertical-align: middle;
}

    .pay-info:hover,
    .pay-info:focus {
        color: #1b5e20;
    }
