/* Shared HealthCore design tokens - import at the top of public page stylesheets. */
:root {
  --hc-navy: #1E2A44;
  --hc-navy-dark: #0B1220;
  --hc-accent: #E30613;
  --hc-accent-dark: #C50510;
  --hc-ink: #111827;
  --hc-muted: #6B7280;
  --hc-line: #E5E7EB;
  --hc-bg: #f8fafc;
  --hc-navy-hover: #243255;
  --hc-white: #ffffff;
  --hc-radius: 12px;
  --hc-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);

  /* Legacy aliases used across existing page CSS */
  --navy: var(--hc-navy);
  --navy2: var(--hc-navy-dark);
  --accent: var(--hc-accent);
  --accent2: var(--hc-accent-dark);
  --ink: var(--hc-ink);
  --muted: var(--hc-muted);
  --line: var(--hc-line);
  --bg: var(--hc-bg);
  --red: var(--hc-accent);
  --blue: var(--hc-navy);
  --divider: rgba(17, 24, 39, 0.12);
}

/* Course page overrides ported from legacy courses.php inline styles */

.hero-wrapper {
    position: relative;
    overflow: hidden;
    color: #fff;
    min-height: 340px;
}

.hero-wrapper .hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: center center / cover no-repeat;
}

.hero-wrapper .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(30, 42, 68, 0.60) 0%, rgba(14, 30, 64, 0.9) 100%);
}

.hero-wrapper .hero-header,
.hero-wrapper .hero-breadcrumbs,
.hero-wrapper .inner-hero {
    position: relative;
    z-index: 2;
}

.hero-breadcrumbs { display: none !important; }
.hero-header { background: transparent !important; box-shadow: none !important; }
.inner-hero { background: transparent !important; border-bottom: none !important; padding-top: 20px !important; }

.hero-wrapper .site-header .bar {
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 28px;
}

.hero-wrapper .site-header .bar .muted {
    color: #CFE3FF;
    font-weight: 600;
}

.hero-wrapper h1 {
    color: #fff !important;
}

.hero-wrapper .lead {
    color: #e5e7eb !important;
}

.hero-wrapper .rating-display {
    color: #facc15 !important;
}

.hero-wrapper .feat-grid {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0;
    grid-template-columns: unset;
    min-height: unset;
    padding-right: 0;
}

.hero-wrapper .feat-item {
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    backdrop-filter: blur(4px);
    line-height: 1.2;
    width: max-content;
    max-width: 100%;
}

.hero-wrapper .feat-item--price {
    font-weight: 600;
    background: rgba(52, 211, 153, 0.2);
    border-color: rgba(52, 211, 153, 0.4);
}

.hero-wrapper .feat-check {
    color: #34d399;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.hero-wrapper .hero-location {
    font-size: 80%;
    font-weight: 400;
}

.hero-wrapper .title-row {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.hero-wrapper .title-content {
    flex: 1;
    min-width: 300px;
    max-width: 750px;
    padding-top: 30px;
    padding-bottom: 30px;
}

.hero-wrapper .cat-wrap {
    flex-shrink: 0;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.4));
    background: #fff;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    overflow: hidden;
}

.hero-wrapper .cat-wrap picture {
    display: contents;
}

.hero-wrapper .cat-logo {
    max-width: 75%;
    max-height: 75%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.hero-wrapper .inner-hero {
    padding-bottom: 60px;
}

.hero-divider {
    height: 6px;
    background: var(--red);
    width: 100%;
}

@media (max-width: 770px) {
    .hero-wrapper .cat-wrap {
        transform: translateY(20px) !important;
    }
}

@media (max-width: 445px) {
    .title-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
    .cat-wrap {
        margin-left: 0 !important;
        margin-top: 20px !important;
        width: 120px !important;
        height: 120px !important;
    }
    .hero-wrapper .cat-wrap {
        transform: translateY(-10px) !important;
    }
    .title-content {
        min-width: 0 !important;
        width: 100% !important;
        flex: none !important;
    }
    h1 {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
}

@media (max-width: 380px) {
    .site-header .bar .muted {
        display: none !important;
    }
    .cat-wrap { display: none !important; }
    .hero-section .feat-grid { padding-right: 0 !important; }
}

.price-trainer-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.trainer-names-text { display: none !important; }
.trainer-avatars { display: flex; margin-left: 8px; }
.trainer-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    margin-left: -8px;
    background: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #6b7280;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .price-trainer-row { justify-content: center; }
    .trainer-names-text { display: none !important; }
}

/* Index listing */
.courses-index-main {
    background: #fff;
    padding-top: 40px;
    padding-bottom: 60px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.courses-index-intro h1 {
    margin-top: 0;
    font-size: clamp(2rem, 4vw, 2.5rem);
    color: #111827;
}

.courses-index-intro .lead {
    margin-bottom: 0;
    color: #4b5563;
    font-size: 1.1rem;
    line-height: 1.65;
    max-width: none;
}

.courses-index-catalog {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 1.5rem;
}

.courses-index-course {
    padding: 2rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.courses-index-course:last-child {
    border-bottom: 0;
}

.courses-index-course-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1.2fr) minmax(220px, 0.9fr);
    grid-template-areas: "icon copy outline";
    gap: 1.25rem 1.5rem;
    align-items: start;
    margin-bottom: 1.25rem;
}

/* picture[display:contents] would otherwise let <source> steal a grid column */
.courses-index-course-head > picture {
    display: contents;
}

.courses-index-course-head > picture > source {
    display: none;
}

.courses-index-course-icon {
    grid-area: icon;
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 50%;
    background: #ffffff;
    padding: 10px;
    border: 1px solid #e2e8f0;
}

.courses-index-course-copy {
    grid-area: copy;
    min-width: 0;
}

.courses-index-course-title {
    margin: 0 0 0.5rem;
    font-size: 1.65rem;
    color: var(--navy);
}

.courses-index-course-title a {
    color: inherit;
    text-decoration: none;
}

.courses-index-course-title a:hover {
    color: var(--red);
}

.courses-index-feats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0 0 0.85rem;
}

.courses-index-feat {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: var(--navy);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
}

.courses-index-feat-check {
    width: 14px;
    height: 14px;
    color: var(--red);
    flex-shrink: 0;
}

.courses-index-course-desc {
    margin: 0 0 0.75rem;
    color: #4b5563;
    font-size: 1.02rem;
    line-height: 1.65;
}

.courses-index-course-actions {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

.courses-index-course-actions a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--red);
    text-underline-offset: 3px;
}

.courses-index-outline {
    grid-area: outline;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
}

.courses-index-outline-title {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.courses-index-outline ul {
    margin: 0;
    padding-left: 1rem;
    color: #374151;
    line-height: 1.45;
    font-size: 0.8rem;
}

.courses-index-outline li + li {
    margin-top: 0.25rem;
}

.courses-index-dates {
    margin-top: 0.5rem;
}

.courses-index-location {
    margin: 1rem 0 0.5rem;
    font-size: 1rem;
    color: #111827;
}

.courses-index-course .date-card {
    background: #fafafa;
    border-color: #e5e7eb;
    box-shadow: none;
}

.courses-index-header .bar .muted {
    color: #CFE3FF;
    font-weight: 600;
}

@media (max-width: 900px) {
    .courses-index-course-head {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "icon copy"
            "outline outline";
    }
}

@media (max-width: 600px) {
    .courses-index-course-head {
        grid-template-columns: 1fr;
        grid-template-areas:
            "icon"
            "copy"
            "outline";
    }

    .courses-index-course-icon {
        width: 60px;
        height: 60px;
        padding: 8px;
    }
}

/* Legacy class kept for cached markup/tests until fully removed */
.course-group-card {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    box-shadow: none;
}
.course-group-header {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.course-group-header picture {
    display: contents;
}
.course-group-icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    background: #f8fafc;
    padding: 12px;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.course-group-content { flex: 1; min-width: 250px; }
.course-group-title { margin: 0 0 10px 0; font-size: 1.75rem; color: var(--navy); }
.course-group-desc { margin: 0 0 15px 0; color: #4b5563; font-size: 1.05rem; line-height: 1.6; }

@media (max-width: 600px) {
    .course-group-header { flex-direction: column; gap: 15px; }
    .course-group-icon { width: 60px; height: 60px; padding: 8px; }
}

