/* Study material pages */

.sm-page {
    --sm-ink: #142033;
    --sm-muted: #5b6b7c;
    --sm-line: #e4e9f0;
    --sm-navy: #1e3a5f;
    --sm-teal: #0f766e;
    --sm-orange: #c2410c;
    max-width: 1140px;
    margin: 0 auto;
    padding: 1.25rem 1rem 3rem;
}

.sm-breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.sm-breadcrumb a {
    color: var(--sm-teal);
    text-decoration: none;
}

.sm-breadcrumb a:hover {
    text-decoration: underline;
}

.sm-hero {
    border-radius: 18px;
    padding: 2.25rem 2rem;
    margin-bottom: 2rem;
    color: #fff;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 45%),
        linear-gradient(120deg, var(--sm-navy) 0%, var(--sm-teal) 100%);
    text-align: center;
}

.sm-hero--left {
    text-align: left;
}

.sm-hero__eyebrow {
    margin: 0 0 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.85;
}

.sm-hero h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    line-height: 1.25;
}

.sm-hero p {
    margin: 0 auto;
    max-width: 40rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1rem;
    line-height: 1.6;
}

.sm-hero--left p {
    margin: 0;
}

.sm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.1rem;
}

.sm-card {
    background: #fff;
    border: 1px solid var(--sm-line);
    border-radius: 16px;
    padding: 1.6rem 1.4rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 24px rgba(20, 32, 51, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.sm-card:hover {
    transform: translateY(-4px);
    border-color: #b6c6d8;
    box-shadow: 0 16px 36px rgba(20, 32, 51, 0.1);
}

.sm-card__icon {
    width: 66px;
    height: 66px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
    background: #eef6f5;
    color: var(--sm-teal);
}

.sm-card:nth-child(3n + 2) .sm-card__icon {
    background: #fff3ea;
    color: var(--sm-orange);
}

.sm-card:nth-child(3n) .sm-card__icon {
    background: #eef2fa;
    color: var(--sm-navy);
}

.sm-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--sm-ink);
    line-height: 1.4;
}

.sm-card p {
    margin: 0 0 1rem;
    color: var(--sm-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.sm-card__btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.3rem;
    border-radius: 999px;
    border: 1.5px solid var(--sm-teal);
    color: var(--sm-teal);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.sm-card__btn:hover {
    background: var(--sm-teal);
    color: #fff;
}

/* PDF material cards */
.sm-material {
    background: #fff;
    border: 1px solid var(--sm-line);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 8px 24px rgba(20, 32, 51, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sm-material:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(20, 32, 51, 0.1);
}

.sm-material__thumb {
    height: 200px;
    background: #f4f6fb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sm-material__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sm-material__thumb i {
    font-size: 3.2rem;
    color: #dc2626;
}

.sm-material__body {
    padding: 1.1rem 1.15rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sm-material__body h3 {
    margin: 0 0 0.45rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--sm-ink);
    line-height: 1.4;
}

.sm-material__body p {
    margin: 0 0 0.9rem;
    color: var(--sm-muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.sm-material__actions {
    margin-top: auto;
    display: flex;
    gap: 0.55rem;
}

.sm-material__actions a {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 0.5rem;
    border-radius: 10px;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.sm-material__actions .sm-view {
    background: var(--sm-teal);
    color: #fff;
}

.sm-material__actions .sm-view:hover {
    background: #115e59;
    color: #fff;
}

.sm-material__actions .sm-download {
    border: 1.5px solid #cbd5e1;
    color: var(--sm-ink);
}

.sm-material__actions .sm-download:hover {
    border-color: var(--sm-orange);
    color: var(--sm-orange);
}

.sm-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    color: var(--sm-muted);
}

.sm-empty i {
    font-size: 2.6rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    display: block;
}

.sm-empty p {
    margin: 0;
    font-size: 0.95rem;
}

@media (max-width: 575px) {
    .sm-hero {
        padding: 1.6rem 1.25rem;
    }
}
