/*
Theme Name: Masjid Imam Bukhari
Description: Tema satu halaman untuk Masjid Imam Bukhari CMS.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.1
Text Domain: mib-masjid
*/

:root {
    --ivory: #faf7ee;
    --paper: #fffdf7;
    --cream: #f2eddf;
    --green: #0b5354;
    --deep: #083b3b;
    --ink: #173a37;
    --muted: #4e6460;
    --gold: #e9c777;
    --ochre: #76551f;
    --line: #ded8c8;
    --display: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 1rem/1.65 system-ui, sans-serif; overflow-wrap: anywhere; }
a { color: inherit; }
a:focus-visible, summary:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0 0 .85rem; }
h1, h2, h3 { margin: 0; line-height: 1.12; font-family: var(--display); font-weight: 500; }
h2 { font-size: clamp(2.05rem, 4.1vw, 3.65rem); letter-spacing: -.035em; }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
.shell { width: min(100% - 3rem, 70rem); margin-inline: auto; }
.section { padding-block: clamp(3.25rem, 7vw, 6rem); }
.skip-link { position: absolute; z-index: 2; top: 1rem; left: 1rem; padding: .5rem 1rem; transform: translateY(-200%); background: var(--paper); color: var(--deep); }
.skip-link:focus { transform: none; }

.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-layout { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.15rem 2rem; }
.brand { display: flex; align-items: center; gap: .7rem; font: 600 1.1rem/1.2 var(--display); text-decoration: none; }
.brand-mark { flex: none; color: var(--ochre); }
.brand-logo { width: 2.7rem; height: 2.7rem; object-fit: contain; }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem clamp(.7rem, 2vw, 1.6rem); }
.site-nav a { display: inline-flex; align-items: center; min-height: 2.75rem; font-size: .85rem; font-weight: 650; text-decoration: none; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: .25em; }

.hero {
    background: radial-gradient(ellipse at 83% 40%, #136365, transparent 60%), var(--deep);
    color: var(--ivory);
    border-bottom: 1px solid #b99b59;
}
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(0, .92fr); align-items: center; gap: clamp(1.5rem, 4vw, 4rem); padding-block: clamp(3.2rem, 7vw, 6rem) clamp(5.3rem, 9vw, 7.5rem); }
.hero h1 { max-width: 10ch; margin-bottom: 1.25rem; font-size: clamp(3.55rem, 7.6vw, 7rem); line-height: .93; letter-spacing: -.055em; }
.eyebrow { margin: 0 0 .75rem; color: var(--ochre); font-size: .73rem; font-weight: 760; letter-spacing: .16em; text-transform: uppercase; }
.hero .eyebrow, .finance-band .eyebrow { color: var(--gold); }
.hero .eyebrow span { margin-inline: .25em; }
.hero-text { max-width: 29rem; font-size: clamp(1rem, 1.7vw, 1.18rem); color: #e3eee9; }
.hero-actions { display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 1.6rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .7rem; padding: .68rem 1.05rem; min-height: 2.9rem; border: 1px solid transparent; border-radius: .25rem; font-weight: 700; font-size: .87rem; text-decoration: none; }
.button-gold { background: var(--gold); color: #24332a; }
.button-light { border-color: #9cb2aa; }
.button:hover { text-decoration: underline; text-underline-offset: .2em; }
.hero-art img { margin-inline: auto; }

.prayer-card { position: relative; margin-top: -2.75rem; background: var(--paper); padding: clamp(1rem, 3.5vw, 2.35rem); border: 1px solid var(--line); border-top: 3px solid #c09a53; border-radius: .4rem; box-shadow: 0 1rem 2.5rem #163a3610; }
.section-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: .85rem 1.5rem; margin-bottom: clamp(1.2rem, 3vw, 2rem); }
.prayer-head { align-items: center; }
.prayer-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.55rem); }
.date-chip { background: var(--cream); border-radius: .25rem; padding: .35rem .65rem; font-size: .87rem; font-weight: 650; }
.date-chip span { margin-left: .15rem; color: var(--ochre); font-size: .72rem; }
.prayer-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.prayer-table th, .prayer-table td { text-align: left; padding: .5rem clamp(.35rem, 2vw, 1.1rem); border-bottom: 1px solid var(--line); }
.prayer-table thead { background: var(--green); color: #fffdf7; font-size: .85rem; }
.prayer-table thead th:nth-child(2) { white-space: nowrap; }
.prayer-table th[scope="row"] { width: 39%; }
.prayer-table td.fixed-time { color: var(--green); font-weight: 800; }
.fine-print { color: var(--muted); font-size: .82rem; margin: .65rem 0 0; }

.empty { margin: 0; padding: .95rem 1rem; border: 1px dashed #a9a58f; border-radius: .25rem; color: var(--muted); }
.agenda-row { display: grid; grid-template-columns: minmax(8.75rem, 1fr) 3fr; gap: 1rem; padding: 1.25rem 0; border-top: 1px solid var(--line); }
.agenda-row:last-child { border-bottom: 1px solid var(--line); }
.agenda-row time { font-size: .9rem; }
.agenda-row time strong { display: block; color: var(--ochre); }
.agenda-row h3 + p { margin: .25rem 0; }
.agenda-row p:last-child, figure p:last-child { margin-bottom: 0; }
.cream-band { background: var(--cream); }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.video-card { background: var(--paper); border: 1px solid var(--line); border-radius: .3rem; overflow: hidden; }
.video-link { display: block; text-decoration: none; }
.video-link:focus-visible { outline-offset: -4px; }
.video-link:hover h3 { text-decoration: underline; }
.video-cover { position: relative; aspect-ratio: 16 / 9; background: var(--deep); color: var(--ivory); }
.video-cover img { width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; inset: 0; margin: auto; width: 2.65rem; height: 2.65rem; display: grid; place-items: center; border-radius: 50%; color: var(--deep); background: var(--gold); }
.video-caption, .video-description { padding: .85rem; }
.video-caption span { display: inline-block; margin-top: .3rem; color: var(--ochre); font-size: .85rem; }
.video-description { padding-top: 0; }
.video-description p:last-child { margin-bottom: 0; }

.finance-band { background: var(--deep); color: var(--ivory); }
.finance-band .section-head { margin-bottom: .7rem; }
.finance-intro { color: #e3eee9; margin-bottom: 1.35rem; }
.finance-band .empty { color: var(--ivory); border-color: #9cb2aa; }
.report { border: 1px solid #7e9b93; border-radius: .35rem; margin-top: .6rem; }
summary { cursor: pointer; padding: .8rem 1rem; font-weight: 700; }
.report summary::marker { color: var(--gold); }
.report-figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.report-figures div { padding: .9rem 1rem; border-top: 1px solid #7e9b93; }
.report-figures div + div { border-left: 1px solid #7e9b93; }
.report-figures dt { font-size: .85rem; }
.report-figures dd { margin: .12rem 0 0; color: var(--gold); font: 1.45rem/1.15 var(--display); }

.gallery-group { border-top: 1px solid var(--line); }
.gallery-group:last-child { border-bottom: 1px solid var(--line); }
.gallery-group summary { padding-left: 0; }
.gallery-group summary::marker { color: var(--ochre); }
.gallery-group .media-grid:not(:empty), .gallery-group .empty { margin: .15rem 0 1rem; }
figure { margin: 0; }
figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: .25rem; background: var(--cream); }
figcaption { margin-top: .4rem; font-weight: 650; }
.profile-layout { display: grid; grid-template-columns: 1.4fr 1fr; align-items: start; gap: clamp(1.4rem, 5vw, 4rem); }
.profile-layout h2 { margin-bottom: .85rem; }
.profile-text > :last-child { margin-bottom: 0; }
.contact-card { background: var(--paper); border: 1px solid var(--line); border-top: 2px solid #c09a53; border-radius: .25rem; padding: 1.2rem; }
.contact-card h3 { margin-bottom: .7rem; }
.contact-card p:last-child { margin-bottom: 0; }
.contact-card address { font-style: normal; margin-bottom: .5rem; }
.text-link { color: var(--green); font-weight: 700; text-underline-offset: .2em; }
.site-footer { background: var(--deep); color: var(--ivory); }
.footer-layout { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; padding-block: 1.3rem; font-size: .9rem; }
.footer-layout a { text-underline-offset: .2em; }

@media (max-width: 48rem) {
    .shell { width: min(100% - 2rem, 70rem); }
    .header-layout { flex-direction: column; align-items: flex-start; gap: .15rem; padding-block: .6rem; }
    .hero-layout { grid-template-columns: 1.15fr .85fr; gap: 1rem; }
    .hero h1 { font-size: clamp(2.7rem, 8.1vw, 4.4rem); }
    .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .report-figures div:nth-child(odd) { border-left: none; }
}

@media (max-width: 34rem) {
    .hero-layout { grid-template-columns: 1fr; }
    .hero-art img { width: min(60%, 13rem); }
    .media-grid, .profile-layout { grid-template-columns: 1fr; }
    .agenda-row { grid-template-columns: 1fr; gap: .4rem; }
    .agenda-row time strong { display: inline; margin-right: .35rem; }
    .prayer-table th, .prayer-table td { font-size: .87rem; }
    .prayer-table th[scope="row"] { width: 33%; }
}
