/* ============================================================
   materiales.css — Styles for the Materiales Educativos page
   Pura Vida Atitlán
   ============================================================ */

/* ── Page intro block ─────────────────────────────────────── */
.mat-page-intro {
    margin: 2rem 0 3rem;
    padding: 2rem;
    background: var(--bone);
    border-left: 4px solid var(--jade);
    border-radius: 0 6px 6px 0;
}

.mat-main-title {
    font-family: 'Charter', Georgia, serif;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    color: var(--jungle);
    margin: 0.3rem 0 0.8rem;
    font-weight: 700;
    line-height: 1.15;
}

.mat-page-intro p {
    font-size: 1rem;
    color: var(--muted);
    margin: 0;
    max-width: 60ch;
    line-height: 1.7;
}

/* ── Section spacing & alternating backgrounds ────────────── */
.mat-section {
    margin-bottom: 1rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--stone);
}

.mat-section:last-of-type {
    border-bottom: none;
}

.mat-bg-light {
    background: var(--bone);
    padding: 2.5rem clamp(1.5rem, 5%, 3rem);
    margin: 2rem -8%;
    padding-left: 8%;
    padding-right: 8%;
}

/* ── Instruction line ─────────────────────────────────────── */
.mat-instruction {
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 1.5rem;
    max-width: none;
}

/* ── Figure + caption ─────────────────────────────────────── */
.mat-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.mat-caption {
    font-size: 0.78rem;
    color: var(--muted);
    font-style: italic;
    text-align: center;
    letter-spacing: 0.04em;
}

/* ── Images ───────────────────────────────────────────────── */
.mat-img {
    width: 100%;
    height: auto;
    display: block;
    border: 1px solid var(--stone);
    border-radius: 4px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    filter: saturate(0.9);
}

.mat-img.clickable {
    cursor: zoom-in;
}

.mat-img:hover {
    transform: scale(1.02);
    box-shadow: 4px 6px 18px rgba(0,0,0,0.14);
    filter: saturate(1);
}

/* ── Centered single-image wrapper ───────────────────────── */
.mat-center {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0;
}

.mat-center .mat-figure {
    width: 100%;
    max-width: 500px;
}

/* ── Grid layouts ─────────────────────────────────────────── */
.mat-grid {
    display: grid;
    gap: 1.5rem;
    margin: 1.5rem 0;
    align-items: start;
}

.mat-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mat-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* ── Scribd embed wrapper ─────────────────────────────────── */
.mat-embed-wrapper {
    width: 100%;
    max-width: 500px;
    margin: 1.5rem auto 0;
    border: 1px solid var(--stone);
    border-radius: 6px;
    overflow: hidden;
}

.mat-embed-label {
    font-size: 0.82rem;
    padding: 0.6rem 1rem;
    background: var(--bone);
    border-bottom: 1px solid var(--stone);
    margin: 0;
    max-width: none;
}

.mat-embed-label a {
    color: var(--jade);
    text-decoration: underline;
    font-weight: 600;
}

.mat-iframe {
    display: block;
    width: 100%;
    border: none;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .mat-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .mat-grid-2,
    .mat-grid-3  { grid-template-columns: 1fr; }
    .mat-bg-light { margin: 2rem -5%; padding-left: 5%; padding-right: 5%; }
}