/*
Theme Name: Malamulo
Theme URI: https://malamulohospital.org/
Author: Malamulo 2.0
Description: Lightweight block theme for Malamulo Adventist Hospital.
Version: 0.6.2
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: malamulo
*/

/* Small number of deliberate behaviors that are clearer in CSS than theme.json. */
:root :where(.malamulo-card) {
    border: 1px solid var(--wp--preset--color--line);
    border-radius: 8px;
    background: var(--wp--preset--color--surface);
    transition: transform 160ms ease, border-color 160ms ease;
}
:root :where(.malamulo-card:hover) {
    transform: translateY(-2px);
    border-color: var(--wp--preset--color--forest);
}
:root :where(.malamulo-eyebrow) {
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 700;
}
:root :where(.malamulo-editorial-serif) {
    font-family: var(--wp--preset--font-family--serif);
    font-weight: 400;
    letter-spacing: -.012em;
}
:root :where(.malamulo-caption) {
    font-family: var(--wp--preset--font-family--serif);
    font-size: var(--wp--preset--font-size--sm);
    font-style: italic;
    line-height: 1.55;
    color: var(--wp--preset--color--muted);
}
:root :where(.malamulo-hero) {
    min-height: clamp(28rem, 62vh, 42rem);
}
:root :where(.malamulo-hero .wp-block-cover__image-background) {
    object-position: center 48%;
}
:root :where(.malamulo-hero .wp-block-cover__background) {
    background: linear-gradient(90deg, rgba(20,30,18,.86) 0%, rgba(20,30,18,.65) 38%, rgba(20,30,18,.10) 72%) !important;
}
:root :where(.malamulo-page-hero) {
    border-radius: 8px;
    overflow: hidden;
}
:root :where(.malamulo-page-hero .wp-block-cover__background) {
    background: linear-gradient(90deg, rgba(20,30,18,.82), rgba(20,30,18,.24)) !important;
}
:root :where(.malamulo-photo) {
    border-radius: 8px;
    overflow: hidden;
}
:root :where(.malamulo-photo img) {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
:root :where(.malamulo-photo-grid) {
    align-items: stretch;
}
:root :where(.malamulo-photo-grid figure) {
    height: 100%;
    min-height: 18rem;
}
:root :where(.malamulo-photo-grid img) {
    height: 100%;
    object-fit: cover;
}
:root :where(.malamulo-link-list a) {
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
}
:root :where(.malamulo-stat) { text-align: center; }
:root :where(.malamulo-header) { position: relative; z-index: 20; }
:root :where(.malamulo-header a) { text-decoration: none; }
:root :where(.malamulo-footer a) { color: var(--wp--preset--color--line); }
:root :where(.malamulo-footer .wp-block-site-title) {
    font-family: var(--wp--preset--font-family--serif);
    letter-spacing: -.015em;
}
:root :where(.malamulo-section-muted) {
    border-top: 1px solid var(--wp--preset--color--line);
    border-bottom: 1px solid var(--wp--preset--color--line);
}
:root :where(.malamulo-practical) {
    border-left: 4px solid var(--wp--preset--color--brick);
}
:root :where(.malamulo-academic-panel) {
    position: relative;
    overflow: hidden;
}
:root :where(.malamulo-academic-panel::before) {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--wp--preset--color--gold);
}
:root :where(.malamulo-academic-panel .malamulo-caption),
:root :where(.malamulo-footer .malamulo-caption) {
    color: var(--wp--preset--color--line);
}
:root :where(.malamulo-rule-label) {
    display: flex;
    align-items: center;
    gap: .8rem;
}
:root :where(.malamulo-rule-label::after) {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: currentColor;
    opacity: .25;
}
:root :where(.malamulo-chip-row) {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
}
:root :where(.malamulo-chip) {
    display: inline-block;
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: .38rem .72rem;
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 650;
    letter-spacing: .035em;
}
:root :where(.malamulo-update-grid) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}
:root :where(.malamulo-related-updates) {
    margin-top: var(--wp--preset--spacing--16);
    padding-top: var(--wp--preset--spacing--8);
    border-top: 1px solid var(--wp--preset--color--line);
}
:root :where(.malamulo-update-card) {
    border-top: 1px solid var(--wp--preset--color--line);
    padding: 1.25rem 0 0;
}
:root :where(.malamulo-update-card .malamulo-update-kicker) {
    margin: 0 0 .35rem;
    color: var(--wp--preset--color--muted);
    font-family: var(--wp--preset--font-family--serif);
    font-size: var(--wp--preset--font-size--sm);
    font-style: italic;
}
:root :where(.malamulo-update-card h3) {
    margin: .35rem 0 .65rem;
    font-family: var(--wp--preset--font-family--serif);
    font-size: var(--wp--preset--font-size--xl);
    line-height: 1.2;
}
:root :where(.malamulo-update-card h3 a) {
    color: var(--wp--preset--color--forest-dark);
    text-decoration: none;
}
:root :where(.malamulo-update-card h3 a:hover) {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
}
:root :where(.malamulo-update-meta) {
    margin: 0;
    color: var(--wp--preset--color--brick);
    font-size: var(--wp--preset--font-size--xs);
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
:root :where(.malamulo-updates-empty) {
    border-top: 1px solid var(--wp--preset--color--line);
    padding-top: 1rem;
    color: var(--wp--preset--color--muted);
    font-style: italic;
}
:root :where(.malamulo-service-band) {
    border-top: 1px solid var(--wp--preset--color--line);
    padding-top: var(--wp--preset--spacing--8);
}
:root :where(.malamulo-service-band h3) {
    margin-bottom: .55rem;
}
:root :where(.malamulo-timeline) {
    position: relative;
    padding-left: 2rem;
}
:root :where(.malamulo-timeline::before) {
    content: "";
    position: absolute;
    top: .5rem;
    bottom: .5rem;
    left: .4rem;
    width: 1px;
    background: var(--wp--preset--color--line);
}
:root :where(.malamulo-timeline-item) {
    position: relative;
    border-top: 1px solid var(--wp--preset--color--line);
    padding: var(--wp--preset--spacing--6) 0 var(--wp--preset--spacing--8);
}
:root :where(.malamulo-timeline-item::before) {
    content: "";
    position: absolute;
    top: 1.7rem;
    left: -1.98rem;
    width: .72rem;
    height: .72rem;
    border: 3px solid var(--wp--preset--color--canvas);
    border-radius: 50%;
    background: var(--wp--preset--color--brick);
}
:root :where(.malamulo-placeholder) {
    border: 1px dashed var(--wp--preset--color--line);
    background: transparent;
}
:root :where(.malamulo-partner-mark) {
    border-left: 3px solid var(--wp--preset--color--gold);
    padding-left: var(--wp--preset--spacing--6);
}
:root :where(.wp-block-button.is-style-outline .wp-block-button__link) {
    background: transparent;
    color: var(--wp--preset--color--forest);
    border-color: currentColor;
}
:root :where(.malamulo-hero .wp-block-button.is-style-outline .wp-block-button__link) {
    color: var(--wp--preset--color--surface);
}
@media (prefers-reduced-motion: reduce) {
    :root :where(.malamulo-card) { transition: none; }
}
@media (max-width: 781px) {
    :root :where(.malamulo-hero) { min-height: 36rem; }
    :root :where(.malamulo-hero .wp-block-cover__image-background) { object-position: 58% center; }
    :root :where(.malamulo-hero .wp-block-cover__background) {
        background: linear-gradient(90deg, rgba(20,30,18,.91), rgba(20,30,18,.52)) !important;
    }
    :root :where(.malamulo-update-grid) { grid-template-columns: 1fr; }
}

/* Approved Visit composition and relationship-grid spacing. */
.malamulo-visit-feature *{box-sizing:border-box}.malamulo-visit-feature{margin:0;background:#f7f4ec;color:#1e2d1b;font:18px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif}.malamulo-visit-feature h1,.malamulo-visit-feature h2,.malamulo-visit-feature h3{font-family:"Iowan Old Style",Baskerville,Georgia,"Times New Roman",serif;line-height:1.12;font-weight:600;text-wrap:balance}.malamulo-visit-feature h1{font-size:clamp(3rem,7vw,6rem);margin:0 0 20px}.malamulo-visit-feature h2{font-size:clamp(2rem,4vw,3.4rem);margin:0 0 24px}.malamulo-visit-feature h3{font-size:1.6rem;margin:0 0 16px}.malamulo-visit-feature a{color:inherit;text-underline-offset:.25em}.malamulo-visit-feature a:focus-visible,.malamulo-visit-feature summary:focus-visible{outline:3px solid #9c4a2f;outline-offset:5px}.malamulo-visit-feature img{display:block;width:100%;height:auto}.malamulo-visit-feature figure{margin:0}.malamulo-visit-feature figcaption{font-size:.82rem;color:#66705f;margin-top:10px}.malamulo-visit-feature p{margin:0 0 24px}.malamulo-visit-feature .notice{padding:12px 24px;background:#eee7d5;font-size:14px;line-height:1.5}.malamulo-visit-feature .frame{max-width:1248px;margin:auto;padding-inline:32px}.malamulo-visit-feature .masthead{padding-block:22px;display:flex;justify-content:space-between;gap:24px;align-items:center}.malamulo-visit-feature .brand{font-family:Georgia,serif;font-size:21px;line-height:1.1;font-variant:small-caps}.malamulo-visit-feature .masthead span{font-size:13px;color:#66705f}.malamulo-visit-feature .hero{position:relative;isolation:isolate;min-height:550px;display:flex;align-items:end;color:#fff;background:#2f4a2b}.malamulo-visit-feature .hero>img{position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;object-position:center 47%}.malamulo-visit-feature .hero:after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(15,27,15,.78),rgba(15,27,15,.22) 75%)}.malamulo-visit-feature .hero .frame{width:100%;padding-block:70px}.malamulo-visit-feature .hero p{max-width:34rem;font-size:1.2rem;margin:0}.malamulo-visit-feature .eyebrow{text-transform:uppercase;letter-spacing:.15em;font-size:.75rem;font-weight:600;margin-bottom:20px}.malamulo-visit-feature .caption-band{border-bottom:1px solid #d9d6cb;padding-block:10px;font-size:.8rem;color:#66705f}.malamulo-visit-feature .plan{padding-block:64px}.malamulo-visit-feature .routes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0;border-block:1px solid #d9d6cb}.malamulo-visit-feature .route{padding:30px 26px 30px 0;min-width:0}.malamulo-visit-feature .route+.route{padding-left:26px;border-left:1px solid #d9d6cb}.malamulo-visit-feature .route p{font-size:1rem}.malamulo-visit-feature .route a{font-size:.95rem;font-weight:600}.malamulo-visit-feature .campus{background:#eee7d5;padding-block:80px}.malamulo-visit-feature .campus-grid{display:grid;grid-template-columns:4fr 6fr;gap:64px;align-items:start}.malamulo-visit-feature .portrait img{aspect-ratio:3/4;object-fit:cover}.malamulo-visit-feature .campus-copy{padding-top:35px}.malamulo-visit-feature .campus-copy p{max-width:36rem}.malamulo-visit-feature .campus-copy figure{margin-top:42px}.malamulo-visit-feature .campus-copy img{aspect-ratio:3/2;object-fit:cover}.malamulo-visit-feature .region{padding-block:80px}.malamulo-visit-feature .region-grid{display:grid;grid-template-columns:6fr 4fr;gap:56px;align-items:center}.malamulo-visit-feature .region img{aspect-ratio:3/2;object-fit:cover}.malamulo-visit-feature .region h2{font-size:clamp(2rem,3vw,2.8rem)}.malamulo-visit-feature .closing{padding:36px;background:#f1e5dd;border-left:4px solid #9c4a2f;margin-bottom:64px;display:flex;justify-content:space-between;gap:32px;align-items:center}.malamulo-visit-feature .closing p{margin:0;max-width:45rem}.malamulo-visit-feature .closing a{white-space:nowrap;font-weight:600}.malamulo-visit-feature .footer{background:#1e2d1b;color:#f7f4ec;padding:25px 32px;font-size:14px}.malamulo-visit-feature .footer .frame{padding:0}
@media(max-width:800px){.malamulo-visit-feature .frame{padding-inline:24px}.malamulo-visit-feature .hero{min-height:480px}.malamulo-visit-feature .hero .frame{padding-block:48px}.malamulo-visit-feature .routes{grid-template-columns:1fr}.malamulo-visit-feature .route,.malamulo-visit-feature .route+.route{padding:24px 0;border-left:0}.malamulo-visit-feature .route+.route{border-top:1px solid #d9d6cb}.malamulo-visit-feature .campus-grid,.malamulo-visit-feature .region-grid{grid-template-columns:1fr;gap:28px}.malamulo-visit-feature .portrait img{aspect-ratio:4/3;object-position:center 55%}.malamulo-visit-feature .campus-copy{padding-top:0}.malamulo-visit-feature .campus,.malamulo-visit-feature .region{padding-block:48px}.malamulo-visit-feature .closing{display:block;padding:24px}.malamulo-visit-feature .closing a{display:inline-block;margin-top:18px}.malamulo-visit-feature .masthead span{display:none}}

.wp-block-post-content:has(.malamulo-visit-feature){max-width:none!important}.wp-site-blocks main:has(.malamulo-visit-feature)>h1.wp-block-post-title{display:none}.malamulo-visit-feature .hero>.wp-block-image{position:absolute;inset:0;z-index:-2;width:100%;height:100%;margin:0}.malamulo-visit-feature .hero>.wp-block-image img{width:100%;height:100%;object-fit:cover;object-position:center 47%}.malamulo-visit-feature .wp-block-group{margin-block-start:0}.malamulo-visit-feature .hero .frame{margin-top:auto}.malamulo-visit-feature .frame{width:100%}

.wp-block-post-content:has(a[href="https://malamulo.ac.mw/"]){max-width:78rem!important}.wp-block-post-content .is-layout-grid:has(a[href="https://malamulo.ac.mw/"]){grid-template-columns:repeat(auto-fit,minmax(min(100%,18rem),1fr));gap:1.5rem;letter-spacing:normal!important;font-weight:400!important}.wp-block-post-content .is-layout-grid:has(a[href="https://malamulo.ac.mw/"])>.wp-block-group{padding:1.5rem;border-left:3px solid #a98a43;min-width:0}.wp-block-post-content .is-layout-grid:has(a[href="https://malamulo.ac.mw/"]) h3{font-size:clamp(1.4rem,2vw,1.75rem);overflow-wrap:normal;word-break:normal}
