/* ===========================
   SYLLABUS-SPECIFIC STYLES ONLY
   Base styles loaded from: variables.css, base.css, header.css, hero.css, etc.
   =========================== */

/* Syllabus Page Content Overrides */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* Offset anchor scrolling for sticky header */
section[id] {
    scroll-margin-top: 100px;
}

section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 0.75rem;
}

section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Belt Rank Cards */
.belt-rank {
    background-color: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-left: 6px solid;
    scroll-margin-top: 100px;
    /* For sticky header offset */
}

.belt-rank.white {
    border-left-color: var(--white-belt);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.belt-rank.red {
    border-left-color: var(--red-belt);
}

.belt-rank.blue {
    border-left-color: var(--blue-belt);
}

.belt-rank.yellow {
    border-left-color: var(--yellow-belt);
}

.belt-rank.green {
    border-left-color: var(--green-belt);
}

.belt-rank.brown {
    border-left-color: var(--brown-belt);
}

.belt-rank.black {
    border-left-color: var(--black-belt);
}

.belt-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.belt-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    color: white;
    flex-shrink: 0;
}

.belt-icon.white {
    background-color: var(--white-belt);
    color: var(--ink);
    border: 3px solid var(--ink);
}

.belt-icon.red {
    background-color: var(--red-belt);
}

.belt-icon.blue {
    background-color: var(--blue-belt);
}

.belt-icon.yellow {
    background-color: var(--yellow-belt);
    color: var(--ink);
}

.belt-icon.green {
    background-color: var(--green-belt);
}

.belt-icon.brown {
    background-color: var(--brown-belt);
}

.belt-icon.black {
    background-color: var(--black-belt);
}

.belt-title h3 {
    margin: 0;
    font-size: 1.75rem;
}

.belt-level {
    color: #666;
    font-size: 1rem;
    margin-top: 0.25rem;
}

.requirements {
    margin-top: 1rem;
}

.requirements h4 {
    font-size: 1.1rem;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.requirements ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.requirements li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Technique Lists */
.technique-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.technique-card {
    background-color: var(--muted);
    border-radius: 8px;
    padding: 1.5rem;
}

.technique-card h4 {
    margin-top: 0;
    color: var(--primary);
    font-size: 1.1rem;
}

.technique-card ul {
    list-style-type: none;
    margin-left: 0;
}

.technique-card li {
    padding: 0.25rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.technique-card li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* Info Box */
.info-box {
    background-color: var(--muted);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.info-box h4 {
    margin-top: 0;
    color: var(--primary);
}

.info-box p {
    margin-bottom: 0.75rem;
}

/* Table */
.syllabus-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: var(--surface);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.syllabus-table th {
    background-color: var(--primary);
    color: var(--surface);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.syllabus-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--muted);
}

.syllabus-table tr:last-child td {
    border-bottom: none;
}

.syllabus-table tr:hover {
    background-color: var(--ivory);
}

/* ===========================
   SYLLABUS LAYOUT (SIDEBAR + CONTENT)
   =========================== */

.syllabus-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    position: relative;
}

.syllabus-sidebar {
    position: sticky;
    top: 100px;
    /* Adjust based on header height */
    height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 1rem;
    border-right: 1px solid var(--muted);
}

.syllabus-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.syllabus-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--ink);
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
    border-left: 3px solid transparent;
}

.syllabus-nav-link:hover {
    background-color: var(--muted);
    color: var(--primary);
}

.syllabus-nav-link.active {
    background-color: var(--muted);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.syllabus-content {
    min-width: 0;
    /* Prevents grid blowout */
}

/* Mobile Sidebar Override */
@media (max-width: 900px) {
    .syllabus-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .syllabus-sidebar {
        position: sticky;
        top: 70px;
        /* Below header */
        height: auto;
        z-index: 900;
        background-color: var(--surface);
        border-right: none;
        border-bottom: 1px solid var(--muted);
        padding: 0.5rem 0;
        margin-bottom: 1rem;
        overflow-x: auto;
        white-space: nowrap;
        width: 100vw;
        margin-left: -1.5rem;
        padding-left: 1.5rem;
        /* Hide scrollbar */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .syllabus-sidebar::-webkit-scrollbar {
        display: none;
    }

    .syllabus-nav-list {
        flex-direction: row;
        gap: 0.5rem;
        padding-right: 1.5rem;
    }

    .syllabus-nav-link {
        padding: 0.5rem 1rem;
        background-color: var(--ivory);
        border: 1px solid var(--muted);
        border-left: 1px solid var(--muted);
        /* Reset border */
    }

    .syllabus-nav-link.active {
        background-color: var(--primary);
        color: white;
        border-color: var(--primary);
    }
}