/* ============================================================
   All American Tradesman CE — Course Page Layout
   Hero (photo + purchase) → Tabs → Reviews → Cities
   ============================================================ */

/* === Hero === */
.course-hero {
    background: transparent;
    padding: 0;
    box-shadow: none;
    margin-bottom: 28px;
}

.course-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: stretch;
}

.course-hero-image {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.course-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    display: block;
}
.course-hero-image .spanish-link {
    display: inline-block;
    padding: 8px 18px;
    background: #6c757d;
    color: #fff;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    align-self: flex-start;
    transition: background 0.2s;
}
.course-hero-image .spanish-link:hover {
    background: #5a6268;
}

.course-hero-purchase {
    background: #fff;
    padding: 26px 28px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    border: 1px solid #ececec;
    display: flex;
    flex-direction: column;
}
.course-hero-purchase h1.hero-title {
    margin: 0 0 18px;
    line-height: 1.2;
    color: #004080;
    font-weight: 500;
    /* keep one h1 element (semantic + SEO) — sub-line is a child <span> */
}
.course-hero-purchase .hero-title-main {
    display: block;
    font-size: 1.55rem;
    font-weight: 800;
    color: #004080;
    margin-bottom: 6px;
}
.course-hero-purchase .hero-title-sub {
    display: block;
    font-size: 1.05rem;
    font-weight: 500;
    color: #004080;
}

/* Two-column course-highlights variant (used for "Who This Course Is For") */
.course-highlights.course-highlights-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 24px;
    list-style: none;
    padding-left: 0;
}
@media (max-width: 540px) {
    .course-highlights.course-highlights-2col {
        grid-template-columns: 1fr;
    }
}
.course-hero-purchase .course-price-box {
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 8px;
    padding: 14px 16px;
    text-align: center;
    margin: 0 0 14px;
}
.course-hero-purchase .original-price-main { display: inline; }
.course-hero-purchase .crossed-out {
    text-decoration: line-through;
    color: #999;
    font-size: 1rem;
    margin-right: 10px;
}
.course-hero-purchase .sale-price-main { display: inline; }
.course-hero-purchase .price {
    color: #B22222;
    font-size: 1.7rem;
    font-weight: 800;
}
.course-hero-purchase .price small { font-size: 0.95rem; color: #666; font-weight: 600; }
.course-hero-purchase .save-badge {
    display: inline-block;
    background: #B22222;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 4px;
    margin-left: 8px;
    vertical-align: middle;
}
.course-hero-purchase .sale-text {
    text-align: center;
    color: #555;
    font-size: 0.9rem;
    margin: 0 0 16px;
}
.course-hero-purchase .cta-button {
    width: 100%;
    margin: 6px 0 6px;
    padding: 14px;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    border-radius: 7px;
    background: linear-gradient(to right, #B22222, #8b1a1a);
    color: #fff;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: opacity 0.2s, transform 0.1s;
}
.course-hero-purchase .cta-button:hover {
    opacity: 0.93;
    transform: translateY(-1px);
}
.course-hero-purchase .existing-account-note {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin: 8px 0 0;
}
.course-hero-purchase .existing-account-note a { color: #004080; }

.hero-quick-info {
    list-style: none;
    padding: 16px 0 0;
    margin: 16px 0 0;
    border-top: 1px solid #eee;
    font-size: 0.92rem;
    color: #444;
}
.hero-quick-info li {
    padding: 5px 0;
    display: flex;
    align-items: center;
}
.hero-quick-info li i {
    color: #2e7d32;
    margin-right: 9px;
    font-size: 0.95rem;
}

/* === Tabs === */
.course-tabs {
    background: #fff;
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin-bottom: 28px;
}

.tabs-nav {
    display: flex;
    background: #f5f5f7;
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
    scrollbar-width: thin;
}
.tab-btn {
    background: none;
    border: none;
    padding: 15px 20px;
    font-size: 0.94rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
    flex: 1 1 auto;
    min-width: max-content;
    font-family: inherit;
}
.tab-btn:hover { color: #B22222; background: #fafafa; }
.tab-btn.active {
    color: #B22222;
    border-bottom-color: #B22222;
    background: #fff;
}
.tab-btn i { margin-right: 7px; }

.tab-panel { display: none; padding: 30px 28px; }
.tab-panel.active { display: block; }
.tab-panel h2 { margin-top: 0; color: #1a1a1a; }
.tab-panel h3 { color: #1a1a1a; margin-top: 22px; }
.tab-panel .course-highlights { padding-left: 0; }

/* Embedded FAQ tiles inside a tab */
.tab-panel .faq-horizontal-tiles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tab-panel .faq-tile {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}
.tab-panel .faq-tile-header {
    background: #fafafa;
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.tab-panel .faq-tile-header h3 {
    margin: 0;
    font-size: 0.98rem;
    color: #333;
    font-weight: 600;
}
.tab-panel .faq-tile-header.active { background: #f0e6e6; color: #B22222; }
.tab-panel .faq-tile-header.active h3 { color: #B22222; }
.tab-panel .faq-tile-content {
    display: none;
    padding: 16px 18px;
    background: #fff;
    border-top: 1px solid #eee;
}
.tab-panel .faq-tile-content.show { display: block; }
.tab-panel .faq-tile-content p { margin: 0; line-height: 1.7; }

/* Resources tab styling */
.resources-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 16px;
}
.resources-card {
    background: #fafafa;
    padding: 20px 22px;
    border-radius: 8px;
    border-left: 4px solid #B22222;
}
.resources-card h3 { margin: 0 0 12px; font-size: 1.05rem; }
.resources-card ul { padding-left: 0; list-style: none; margin: 0; }
.resources-card li { padding: 6px 0; }
.resources-card li i { color: #B22222; margin-right: 8px; }
.resources-card li a { color: #1a1a1a; text-decoration: none; font-weight: 500; }
.resources-card li a:hover { color: #B22222; text-decoration: underline; }

/* === Collapsible reviews === */
.reviews-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 16px auto 0;
    padding: 10px 22px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #B22222;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-family: inherit;
}
.reviews-toggle-btn:hover {
    background: #B22222;
    color: #fff;
    border-color: #B22222;
}
.reviews-toggle-icon {
    transition: transform 0.25s ease;
    font-size: 0.85rem;
}
.reviews-toggle-btn[aria-expanded="true"] .reviews-toggle-icon {
    transform: rotate(180deg);
}
.reviews-list {
    display: none;
    margin-top: 16px;
}
.reviews-list.expanded {
    display: block;
}

/* === City section (below reviews) === */
.course-cities-section {
    background: #f9f9f9;
    padding: 32px 28px;
    border-radius: 10px;
    margin: 28px 0;
}
.course-cities-section h2 {
    margin: 0 0 8px;
    color: #1a1a1a;
}
.course-cities-section > p {
    margin: 0 0 18px;
    color: #555;
}
.course-cities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.course-cities-grid li a {
    display: flex;
    align-items: center;
    padding: 13px 16px;
    background: #fff;
    border-radius: 6px;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 500;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}
.course-cities-grid li a i {
    color: #B22222;
    margin-right: 10px;
}
.course-cities-grid li a:hover {
    background: #B22222;
    color: #fff;
    border-color: #B22222;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(178, 34, 34, 0.15);
}
.course-cities-grid li a:hover i { color: #fff; }

/* === Mobile === */
@media (max-width: 820px) {
    .course-hero-grid { grid-template-columns: 1fr; gap: 22px; }
    .course-hero-purchase h1 { font-size: 1.25rem; }
    .resources-grid { grid-template-columns: 1fr; }
    .tab-btn { padding: 13px 16px; font-size: 0.88rem; }
    .tab-panel { padding: 22px 18px; }
    .course-cities-section { padding: 22px 18px; }
}
