/* Learn.aspx - the discovery flow: grade, then subject, then how to learn. Colors come only from
   CSS\tokens.css, so light and dark both follow the theme. The grade step reuses
   CSS\curriculum-picker.css. */

.learn-container {
    max-width: 960px;
    margin: 100px auto 50px;
    padding: 0 20px;
}

/* ---- Step indicator: الصف › المادة › طريقة التعلم ---- */

.learn-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.learn-steps li + li::before {
    content: '›';
    margin-inline-end: 6px;
    color: var(--text-muted);
}

.learn-steps li.current {
    color: var(--text-heading);
    font-weight: 700;
}

.learn-steps a {
    color: var(--brand-ink);
    font-weight: 600;
    text-decoration: none;
}

.learn-steps a:hover {
    text-decoration: underline;
}

.learn-context {
    margin: 0 0 22px;
    color: var(--text-body);
    font-size: 0.92rem;
}

.learn-context a {
    color: var(--brand-ink);
    font-weight: 600;
}

.learn-header {
    margin-bottom: 20px;
}

.learn-header h2 {
    color: var(--text-heading);
    font-size: 1.4rem;
    margin-bottom: 6px;
}

.learn-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.learn-card {
    background: var(--surface-card);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    box-shadow: var(--shadow-card);
}

/* ---- Step 2: subject tiles ---- */

.learn-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.learn-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 96px;
    padding: 16px 12px;
    text-align: center;
    text-decoration: none;
    background: var(--surface-card);
    border: 1.5px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.learn-tile:hover,
.learn-tile:focus-visible {
    border-color: var(--brand);
    background: var(--brand-wash);
    transform: translateY(-2px);
}

.learn-tile:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.learn-tile .subj-ico {
    margin-bottom: 4px;
}

.learn-tile-name {
    color: var(--text-heading);
    font-weight: 700;
    font-size: 1rem;
}

.learn-tile-counts {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ---- Step 3: path cards ----
   An illustrated banner (inline SVG from Learn.aspx.cs, coloured here with theme tokens) with a
   round icon over its lower edge, then the title, description, lines and the button. */

.learn-paths {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 20px;
}

.learn-path {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
    background: var(--surface-card);
    border: 1.5px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

a.learn-path:hover,
a.learn-path:focus-visible {
    border-color: var(--brand);
    transform: translateY(-2px);
}

a.learn-path:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

.learn-path-banner {
    position: relative;
    display: block;
    height: 170px;
}

.learn-art {
    display: block;
    width: 100%;
    height: 100%;
}

.learn-path-icon {
    position: absolute;
    bottom: -28px;
    inset-inline-start: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 4px solid var(--surface-card);
}

.learn-path-groups .learn-path-icon { background: var(--slot-group); color: var(--surface-card); }
.learn-path-solo .learn-path-icon { background: var(--brand); color: var(--text-on-brand); }

.learn-path-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 40px 24px 24px;
}

.learn-path-title {
    color: var(--text-heading);
    font-weight: 800;
    font-size: 1.25rem;
}

.learn-path-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.learn-path-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-body);
    font-size: 0.92rem;
}

.learn-path-line svg { color: var(--text-muted); flex-shrink: 0; }

.learn-path-btn {
    margin-top: 8px;
    padding: 10px 22px;
    border-radius: 10px;
    background: var(--surface-inverse);
    color: var(--text-on-inverse);
    font-weight: 700;
    font-size: 0.95rem;
}

/* Banner art. Groups: the purple group family; one-to-one: gold. */
.learn-art .a-board, .learn-art .a-screen, .learn-art .a-bubble { fill: var(--surface-card); stroke-width: 3; }
.learn-art .a-chalk { fill: none; stroke-width: 4; stroke-linecap: round; }
.learn-path-groups .a-wash { fill: var(--slot-group-wash); }
.learn-path-groups .a-tint { fill: var(--slot-group); fill-opacity: .1; }
.learn-path-groups .a-board, .learn-path-groups .a-chalk { stroke: var(--slot-group); }
.learn-path-groups .a-lead { fill: var(--brand); }
.learn-path-groups .a-p1 { fill: var(--slot-group); }
.learn-path-groups .a-p2 { fill: var(--slot-group-ink); fill-opacity: .75; }
.learn-path-solo .a-wash { fill: var(--subj-gold-wash); }
.learn-path-solo .a-tint { fill: var(--brand); fill-opacity: .12; }
.learn-path-solo .a-screen { stroke: var(--text-heading); }
.learn-path-solo .a-base { fill: var(--text-heading); }
.learn-path-solo .a-bubble, .learn-path-solo .a-chalk { stroke: var(--brand); }
.learn-path-solo .a-p1 { fill: var(--slot-group); }
.learn-path-solo .a-lead { fill: var(--brand); }

/* Nothing on offer: the same card, faded, with no button. */
.learn-path-empty {
    background: var(--surface-sunken);
    border-style: dashed;
    box-shadow: none;
    cursor: default;
}

.learn-path-empty .learn-path-banner {
    height: 110px;
    filter: grayscale(1);
    opacity: .55;
}

.learn-path-empty .learn-path-icon { display: none; }
.learn-path-empty .learn-path-body { padding-top: 18px; }

.learn-path-empty .learn-path-title,
.learn-path-empty .learn-path-desc,
.learn-path-empty .learn-path-line {
    color: var(--text-muted);
}

.learn-path-note {
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
}

/* ---- Empty / error state ---- */

.learn-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    background: var(--surface-card);
    border: 1.5px dashed var(--border);
    border-radius: 14px;
}

.learn-empty i {
    font-size: 1.8rem;
    color: var(--text-muted);
}

.learn-btn {
    display: inline-block;
    padding: 9px 22px;
    border-radius: 10px;
    background: var(--surface-inverse);
    color: var(--text-on-inverse);
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    transition: opacity 0.2s;
}

.learn-btn:hover {
    opacity: 0.9;
}

@media (max-width: 768px) {
    .learn-container {
        margin-top: 90px;
    }

    .learn-card {
        padding: 16px;
    }
}
