/*
Theme Name: Shamsul Huda Foundation
Theme URI: https://shamsulhuda.org
Author: Shamsul Huda Foundation
Author URI: https://shamsulhuda.org
Description: Theme for shamsulhuda.org. Pages are built from ordinary WordPress blocks plus the "Shamsul Huda" patterns (hero, cards, stats, bank accounts, list, latest news).
Version: 1.2.0
Requires at least: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: shf
*/

:root{--red:#c64a36;--gold:#c9b06b;--teal:#348c88;--sage:#96afa1;--sky:#8cbeff;--ink:#222;--bg:#faf8f3}
*{box-sizing:border-box}
body{margin:0;font:17px/1.65 system-ui,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg);min-height:100vh;display:flex;flex-direction:column}
#content{flex:1}
a{color:var(--teal)}
h1,h2,h3{line-height:1.2}
h2{color:var(--red);font-size:2rem;margin:0 0 .6rem}
img{max-width:100%;height:auto}

/* Header and menu */
.site-header{background:#fff;border-bottom:4px solid var(--gold);position:sticky;top:0;z-index:5}
.admin-bar .site-header{top:32px}
@media (max-width:782px){.admin-bar .site-header{top:0;position:relative}}
.site-nav{max-width:1000px;margin:auto;padding:.8rem 1rem;display:flex;flex-wrap:wrap;gap:1rem;align-items:center}
.site-brand{margin-right:auto;color:var(--red);font-size:1.15rem;font-weight:700}
.site-brand a{color:inherit;text-decoration:none}
.site-brand img{height:40px;width:auto;vertical-align:middle;margin-right:.5rem}
.site-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:1rem;align-items:center}
.site-nav li a{text-decoration:none;font-weight:600}
.site-nav li.nav-donate a{background:var(--teal);color:#fff;padding:.4rem 1.2rem;border-radius:2rem}

/* Classic themes get an extra wrapper inside every Group block on the front
   end. Taking it out of the layout lets grids and flex sections see their
   real children, the same as in the editor. */
.wp-block-group__inner-container{display:contents}

/* Page content: each top-level section is centred at 1000px, except the
   full-width hero and coloured band. */
.entry > *{max-width:1000px;margin-left:auto;margin-right:auto;padding-left:1rem;padding-right:1rem}
.entry > .w{padding-top:3rem;padding-bottom:3rem}
.entry > .hero,.entry > .band{max-width:none}
.w{max-width:1000px;margin:auto;padding:3rem 1rem}

/* Hero */
.hero{background:linear-gradient(rgba(20,60,58,.55),rgba(20,60,58,.55)),url(images/banner.jpg) center/cover no-repeat;text-align:center;min-height:380px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding-top:3rem;padding-bottom:3rem}
.hero::before{content:"";display:block;width:min(260px,70%);aspect-ratio:2180/1673;margin:0 auto 1rem;background:url(images/logo.png) center/contain no-repeat}
.hero h1{font-size:clamp(2.2rem,7vw,4.5rem);color:#fff;margin:.2rem 0;letter-spacing:.04em;text-transform:uppercase}
.hero p{font-style:italic;font-size:1.2rem;max-width:36rem;margin:1rem auto;color:#fff}
.hero .wp-block-buttons{justify-content:center}

/* Buttons */
.btn,.entry .wp-block-button__link,.entry .wp-element-button{display:inline-block;background:var(--red);color:#fff;padding:.7rem 1.4rem;border-radius:2rem;text-decoration:none;font-weight:700;border:0}

/* Grids of cards, stats and bank accounts */
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:1rem}
.grid > *,.grid > .wp-block-group__inner-container > *{margin:0 !important;max-width:none}
.card{background:#e9e9e9;border-radius:1.2rem;padding:1.2rem}
.card > :first-child,.card > .wp-block-group__inner-container > :first-child{margin-top:0}
.card > :last-child,.card > .wp-block-group__inner-container > :last-child{margin-bottom:0}
.card.sage{background:var(--sage);color:#fff}
.card.sage a{color:#fff}
.card-link{position:relative;text-align:center}
.card-link h3{margin:0;font-size:1rem}
.card-link h3 a{color:var(--red);text-decoration:none}
.card-link h3 a::after{content:"";position:absolute;inset:0}
.card-link p{margin:.3rem 0 0}

.band{background:var(--red);color:#fff;padding:3rem 1rem}
.band .w{padding:0 1rem}
.band h2{color:#fff}
.stat{text-align:center}
.stat p{margin:0}
.stat .stat-figure{font-size:2rem;font-weight:700;line-height:1.3}

.bank{border-radius:1.2rem;padding:1.2rem;color:#fff;font-size:1.2rem;background:var(--teal)}
.bank:nth-child(even){background:#a8913f}
.bank p{margin:0}

ul.cols,ol.cols{columns:2 240px;column-gap:3rem;margin:0;padding-left:2rem}
.cols li{break-inside:avoid}

/* News */
.wp-block-latest-posts,.news-list{padding-left:1.2rem}
.wp-block-latest-posts.wp-block-latest-posts__list{list-style:disc}
.pagination{display:flex;gap:1rem;margin-top:1.5rem}

/* Footer */
.site-footer{background:#222;color:#ddd;text-align:center;padding:2rem 1rem}
.site-footer p{margin:.2rem}
.site-footer a{color:var(--gold)}
