/* ============================================
   GMBA 621 — Course Page Styling
   Sits on top of the global Brain & Bot design system.
   Uses tokens from /assets/css/style.css.
   ============================================ */

/* ---- Course hero ---- */
.course-hero {
    background: linear-gradient(135deg, #F5F5F5 0%, #E6E6FA 50%, #FFDAB9 100%);
    padding: 4rem 1.5rem 3rem;
    text-align: center;
    border-bottom: 1px solid #E5E7EB;
}
.course-hero .eyebrow {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2563EB;
    margin-bottom: 0.75rem;
}
.course-hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1.15;
    color: #1F2937;
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}
.course-hero .lede {
    font-size: 1.1rem;
    color: #4B5563;
    max-width: 44rem;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}
.course-hero .meta {
    font-size: 0.95rem;
    color: #6B7280;
}
@media (min-width: 768px) {
    .course-hero h1 { font-size: 3rem; }
    .course-hero { padding: 5rem 2rem 4rem; }
}

/* ---- Sub-nav (Hub | Schedule | Topics | Cases) ---- */
.course-subnav {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    position: sticky;
    top: 73px; /* below main nav */
    z-index: 40;
}
.course-subnav-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 1.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.course-subnav a {
    display: inline-block;
    padding: 0.95rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6B7280;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .15s ease, border-color .15s ease;
}
.course-subnav a:hover { color: #1F2937; }
.course-subnav a.active {
    color: #2563EB;
    border-bottom-color: #2563EB;
}

/* ---- Layout container ---- */
.course-container {
    max-width: 60rem;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
}
.course-container.wide { max-width: 72rem; }

/* ---- Section heading ---- */
.section-h {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1F2937;
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.01em;
}
.section-h.first { margin-top: 0; }
.section-sub {
    color: #4B5563;
    margin-bottom: 1rem;
}

/* ---- Schrenk-style accordion ---- */
.acc {
    border-top: 1px solid #E5E7EB;
}
.acc:last-child { border-bottom: 1px solid #E5E7EB; }
.acc summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 0.5rem 1rem 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #1F2937;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    user-select: none;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::before {
    content: "▸";
    color: #2563EB;
    font-size: 0.85rem;
    transition: transform .15s ease;
    display: inline-block;
    width: 1rem;
    text-align: center;
}
.acc[open] > summary::before {
    transform: rotate(90deg);
}
.acc summary:hover { color: #2563EB; }
.acc summary .acc-meta {
    margin-left: auto;
    font-size: 0.8rem;
    font-weight: 500;
    color: #6B7280;
}
.acc-body {
    padding: 0.25rem 0 1.5rem 1.75rem;
    color: #36454F;
    line-height: 1.7;
}
.acc-body p { margin: 0 0 0.85rem; }
.acc-body p:last-child { margin-bottom: 0; }
.acc-body ul, .acc-body ol {
    margin: 0.25rem 0 0.85rem 1.25rem;
    padding-left: 0.75rem;
}
.acc-body li { margin-bottom: 0.35rem; }
.acc-body a {
    color: #2563EB;
    text-decoration: none;
    border-bottom: 1px solid rgba(37, 99, 235, 0.25);
}
.acc-body a:hover { border-bottom-color: #2563EB; }

/* ---- Sub-section inside accordion body ---- */
.acc-subsection {
    margin: 1rem 0 1.25rem;
}
.acc-subsection h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem;
}

/* ---- Resource list with file-type icons ---- */
.resource-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.resource-list li {
    padding: 0.55rem 0;
    border-bottom: 1px dashed #E5E7EB;
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}
.resource-list li:last-child { border-bottom: none; }
.resource-list li::before {
    content: "";
    flex-shrink: 0;
    width: 1.6rem;
    height: 1.25rem;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    margin-top: 0.1rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.25rem;
    color: #FFFFFF;
    border-radius: 3px;
}
.resource-list .pdf::before   { content: "PDF"; background: #DC2626; }
.resource-list .ppt::before   { content: "PPT"; background: #EA580C; }
.resource-list .doc::before   { content: "DOC"; background: #2563EB; }
.resource-list .xls::before   { content: "XLS"; background: #16A34A; }
.resource-list .csv::before   { content: "CSV"; background: #0891B2; }
.resource-list .ipynb::before { content: "PY";  background: #7C3AED; }
.resource-list .zip::before   { content: "ZIP"; background: #6B7280; }
.resource-list .link::before  { content: "↗";   background: #1F2937; font-size: 0.85rem; }
.resource-list .json::before  { content: "{ }"; background: #4B5563; font-size: 0.6rem; }

.resource-list .desc {
    color: #6B7280;
    font-size: 0.85rem;
    display: block;
    margin-top: 0.15rem;
}

/* ---- Decision card (used on hub & topic pages) ---- */
.decision-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    margin: 1.25rem 0;
}
@media (min-width: 640px) { .decision-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .decision-grid { grid-template-columns: 1fr 1fr 1fr; } }

.decision-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.decision-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border-color: #AEC6CF;
}
.decision-card .num {
    font-size: 0.75rem;
    font-weight: 700;
    color: #2563EB;
    letter-spacing: 0.05em;
}
.decision-card .question {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0.35rem 0 0.5rem;
    line-height: 1.3;
}
.decision-card .technique {
    font-size: 0.85rem;
    color: #6B7280;
}
.decision-card .weeks {
    display: inline-block;
    background: #EFF6FF;
    color: #2563EB;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    margin-top: 0.5rem;
}

/* ---- Callout boxes ---- */
.callout {
    background: #F0FAF5;
    border-left: 4px solid #16A34A;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}
.callout.warn { background: #FFF8F0; border-left-color: #F0A58E; }
.callout.info { background: #EFF6FF; border-left-color: #3B82F6; }
.callout h4 { margin: 0 0 0.4rem; font-size: 0.95rem; font-weight: 700; color: #1F2937; }
.callout p { margin: 0; color: #36454F; font-size: 0.95rem; }

/* ---- Schedule week row ---- */
.week-row .acc summary {
    align-items: flex-start;
    flex-wrap: wrap;
}
.week-row .week-label {
    background: #2563EB;
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    flex-shrink: 0;
}
.week-row .week-date {
    font-size: 0.85rem;
    color: #6B7280;
    font-weight: 500;
}
.week-row.no-class summary { color: #9CA3AF; cursor: default; }
.week-row.no-class summary::before { content: "—"; }
.week-row.no-class .week-label { background: #9CA3AF; }

/* ---- Footer breadcrumb / page nav ---- */
.page-pager {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E5E7EB;
    font-size: 0.9rem;
}
.page-pager a {
    color: #2563EB;
    text-decoration: none;
    font-weight: 600;
}
.page-pager a:hover { text-decoration: underline; }
.page-pager .prev::before { content: "← "; }
.page-pager .next::after { content: " →"; }

/* ---- Tables ---- */
.course-container table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.95rem;
}
.course-container th, .course-container td {
    text-align: left;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid #E5E7EB;
}
.course-container th {
    background: #F9FAFB;
    font-weight: 700;
    color: #374151;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---- Two-column layout for topic pages ---- */
.topic-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 900px) {
    .topic-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- Misc ---- */
.muted { color: #6B7280; }
.small { font-size: 0.875rem; }
.tag {
    display: inline-block;
    background: #EFF6FF;
    color: #2563EB;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    margin-right: 0.35rem;
}
.tag.gray { background: #F3F4F6; color: #6B7280; }
.tag.green { background: #F0FAF5; color: #16A34A; }
.tag.amber { background: #FEF3C7; color: #92400E; }
