/**
 * SOUTHGATE MOSQUE | Modern Journal (archive B) + Split Detail (single C).
 * Deliberately scoped: no global typography, header, footer or theme overrides.
 * Adjust variables below for theme-consistent site-wide tuning.
 */
.sgm-ed {
    --sgm-ed-teal: #064f4c;
    --sgm-ed-deep: #073f3f;
    --sgm-ed-gold: #fbbf54;
    --sgm-ed-gold-muted: #b18437;
    --sgm-ed-cream: #f9f7ee;
    --sgm-ed-ink: #232835;
    --sgm-ed-muted: #596e68;
    --sgm-ed-line: #e1e8e3;
    --sgm-ed-container: 1280px;
    --sgm-ed-space: clamp(20px, 4vw, 44px);
    color: var(--sgm-ed-ink);
    background: #fff;
    font-family: 'Rajdhani', 'Nunito Sans', sans-serif;
    font-size: 18px;
    line-height: 1.5;
    overflow: clip;
}
.sgm-ed *, .sgm-ed *::before, .sgm-ed *::after { box-sizing: border-box; }
.sgm-ed__shell { width: min(100% - 2 * var(--sgm-ed-space), var(--sgm-ed-container)); margin-inline: auto; }
.sgm-ed img { display: block; max-width: 100%; height: auto; }
.sgm-ed a { text-decoration: none; transition: color .22s ease, background-color .22s ease, border-color .22s ease, transform .22s ease; }
.sgm-ed a:focus-visible { outline: 3px solid var(--sgm-ed-gold); outline-offset: 4px; }
.sgm-ed p { line-height: 1.55 !important; }
.sgm-ed h1, .sgm-ed h2, .sgm-ed h3, .sgm-ed h4 { font-family: 'Rajdhani', 'Nunito Sans', sans-serif !important; line-height: 1.08 !important; color: var(--sgm-ed-ink); margin-block: 0; }
.sgm-ed__gold { color: #c6963d; }
.sgm-ed__eyebrow { display: inline-flex; align-items: center; gap: 14px; font-size: 13px; line-height: 1.3; letter-spacing: .21em; text-transform: uppercase; color: var(--sgm-ed-teal); font-weight: 800; }
.sgm-ed__eyebrow::before { content: ''; width: 34px; height: 2px; background: var(--sgm-ed-gold); flex: 0 0 34px; }
.sgm-ed .sgm-ed__heading { font-size: clamp(44px, 5.1vw, 78px) !important; color: var(--sgm-ed-deep) !important; font-weight: 900 !important; letter-spacing: -.042em; line-height: 1 !important; margin: 15px 0 16px; overflow-wrap: anywhere; }
.sgm-ed__lead { max-width: 720px; font-size: clamp(18px, 1.55vw, 23px); color: var(--sgm-ed-muted); margin: 0; font-weight: 500; }
.sgm-ed__meta, .sgm-ed__card-meta { color: #957037; font-size: 13px; letter-spacing: .13em; text-transform: uppercase; font-weight: 800; }
.sgm-ed__button { display: inline-flex; align-items: center; justify-content: space-between; gap: 26px; min-height: 51px; width: fit-content; padding: 12px 20px; background: var(--sgm-ed-teal); color: #fff !important; border-radius: 2px; border: 1px solid var(--sgm-ed-teal); font-size: 15px; font-weight: 800; text-transform: uppercase; letter-spacing: .065em; }
.sgm-ed__button:hover { color: #fff !important; background: var(--sgm-ed-deep); border-color: var(--sgm-ed-deep); transform: translateY(-2px); }
.sgm-ed__button--wide { display: flex; width: 100%; margin-top: 23px; }
.sgm-ed__image { width: 100%; height: 100% !important; display: block; object-fit: cover; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.sgm-ed__image-placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg,#e1ede7,#96b8a9 52%,#0e5754); }

/* ARCHIVE B: editorial masthead, large asymmetric feature, compact story grid */
.sgm-ed__archive-intro { padding: clamp(43px, 5.5vw, 88px) 0 37px; }
.sgm-ed__featured { display: grid; grid-template-columns: minmax(0,1.02fr) minmax(0,1fr); align-items: center; column-gap: clamp(26px, 5vw, 74px); padding: clamp(20px, 2.5vw, 35px); background: var(--sgm-ed-cream); border: 1px solid #efeee7; min-height: 415px; }
.sgm-ed__featured-copy { min-width: 0; padding: 12px 0 14px 10px; }
.sgm-ed__featured-copy h2 { margin: 15px 0 14px; font-size: clamp(36px, 3.2vw, 51px) !important; font-weight: 900 !important; color: var(--sgm-ed-deep) !important; letter-spacing: -.023em; }
.sgm-ed__featured-copy h2 a, .sgm-ed__card-copy h3 a { color: inherit; }
.sgm-ed__featured-copy h2 a:hover, .sgm-ed__card-copy h3 a:hover { color: var(--sgm-ed-teal); }
.sgm-ed__featured-copy p { max-width: 520px; font-size: 18px; font-weight: 500; color: var(--sgm-ed-muted); margin: 0 0 28px; }
.sgm-ed__featured-photo { display: block; min-width: 0; overflow: hidden; aspect-ratio: 1.25 / 1; background: #d8e8e0; box-shadow: 0 18px 46px rgba(18,49,45,.09); }
.sgm-ed__featured-photo:hover .sgm-ed__image, .sgm-ed__card-photo:hover .sgm-ed__image { transform: scale(1.045); }
.sgm-ed__stories { padding: 42px 0 18px; }
.sgm-ed__section-heading { display: flex; align-items: center; gap: 20px; margin: 0 0 25px; }
.sgm-ed__section-heading h2 { white-space: nowrap; font-size: 19px !important; font-weight: 900 !important; letter-spacing: .12em; text-transform: uppercase; color: var(--sgm-ed-deep) !important; }
.sgm-ed__section-rule { height: 1px; width: 100%; background: var(--sgm-ed-line); }
.sgm-ed__filters { display: flex; flex-wrap: wrap; gap: 9px; margin: -3px 0 29px; }
.sgm-ed__filter { font-size: 15px; font-weight: 750; letter-spacing: .02em; padding: 7px 17px; border: 1px solid #d9e5de; border-radius: 40px; color: #4d6159; background: #fff; }
.sgm-ed__filter:hover, .sgm-ed__filter[aria-current="page"] { color: #fff; background: var(--sgm-ed-teal); border-color: var(--sgm-ed-teal); }
.sgm-ed__card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px; }
.sgm-ed__card { min-width: 0; min-height: 220px; display: grid; grid-template-columns: 42% minmax(0,1fr); background: #fff; border: 1px solid var(--sgm-ed-line); transition: box-shadow .25s ease, transform .25s ease; }
.sgm-ed__card:hover { box-shadow: 0 14px 35px rgba(4,41,37,.085); transform: translateY(-3px); }
.sgm-ed__card-photo { display: block; position: relative; min-width: 0; height: 100%; min-height: 215px; overflow: hidden; background: #e4eee8; }
.sgm-ed__card-copy { min-width: 0; padding: 22px 22px 19px; display: flex; flex-direction: column; align-items: flex-start; }
.sgm-ed__card-meta { font-size: 11px; letter-spacing: .105em; }
.sgm-ed__card-meta span { padding: 0 5px; }
.sgm-ed__card-copy h3 { font-size: clamp(23px, 1.6vw, 28px) !important; color: var(--sgm-ed-ink) !important; font-weight: 900 !important; line-height: 1.13 !important; margin: 12px 0 8px; overflow-wrap: anywhere; }
.sgm-ed__card-copy p { margin: 0 0 16px; color: var(--sgm-ed-muted); font-weight: 500; font-size: 16px; }
.sgm-ed__text-link { color: var(--sgm-ed-teal); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 900; margin-top: auto; }
.sgm-ed__text-link span { padding-left: 6px; }
.sgm-ed__text-link:hover { color: var(--sgm-ed-gold-muted); }
.sgm-ed__empty { padding: 60px 20px; margin: 20px 0; text-align: center; background: var(--sgm-ed-cream); }
.sgm-ed__empty h2 { font-size: 36px !important; }
.sgm-ed__empty p { color: var(--sgm-ed-muted); }
.sgm-ed__empty a { color: var(--sgm-ed-teal); text-decoration: underline; }

/* Archive pagination, powered by WordPress's paginate_links() */
.sgm-ed__pagination { display: flex; justify-content: center; padding: 34px 0 76px; }
.sgm-ed__pagination ul.page-numbers { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; padding: 0; margin: 0; list-style: none; }
.sgm-ed__pagination li { list-style: none; margin: 0; padding: 0; }
.sgm-ed__pagination .page-numbers a, .sgm-ed__pagination .page-numbers span { display: inline-flex; justify-content: center; align-items: center; min-width: 44px; min-height: 44px; padding: 9px 12px; border: 1px solid var(--sgm-ed-line); background: white; color: var(--sgm-ed-deep); border-radius: 2px; text-decoration: none; font-size: 16px; font-weight: 800; }
.sgm-ed__pagination .page-numbers .current, .sgm-ed__pagination .page-numbers a:hover { background: var(--sgm-ed-teal); color: #fff; border-color: var(--sgm-ed-teal); }

/* Dedicated Ramadan category variant: image-led grid rather than long list */
.sgm-ed__card-grid--ramadan { grid-template-columns: repeat(3, minmax(0,1fr)); }
.sgm-ed__card--ramadan { display: flex; flex-direction: column; }
.sgm-ed__card--ramadan .sgm-ed__card-photo { height: auto; aspect-ratio: 1.25 / 1; min-height: 0; }
.sgm-ed__card--ramadan .sgm-ed__card-copy { flex: 1; }

/* SINGLE C: editorial split hero and roomy longform text */
.sgm-ed__accent { height: 7px; background: linear-gradient(90deg,var(--sgm-ed-deep),#83b1a5 53%,var(--sgm-ed-gold)); }
.sgm-ed__single-hero { display: grid; grid-template-columns: minmax(0,1.07fr) minmax(0,.93fr); gap: clamp(28px, 4.4vw, 67px); align-items: stretch; padding: clamp(35px, 4.5vw, 65px) 0 clamp(40px, 5vw, 76px); }
.sgm-ed__single-photo { height: clamp(445px, 41.5vw, 620px); min-width: 0; overflow: hidden; background: #e4eee8; }
.sgm-ed__single-intro { min-width: 0; align-self: center; padding: 14px 0; }
.sgm-ed__single-intro .sgm-ed__heading { font-size: clamp(44px, 4.1vw, 67px) !important; line-height: 1.01 !important; }
.sgm-ed__single-intro .sgm-ed__lead { font-size: 19px; }
.sgm-ed__facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 23px; padding: 23px 25px; background: var(--sgm-ed-cream); margin: 26px 0 25px; }
.sgm-ed__fact { min-width: 0; }
.sgm-ed__fact > span { display: block; font-size: 12px; line-height: 1.3; color: #937039; letter-spacing: .12em; text-transform: uppercase; font-weight: 800; }
.sgm-ed__fact > strong { display: block; font-size: 17px; line-height: 1.28; margin-top: 5px; color: var(--sgm-ed-ink); overflow-wrap: anywhere; }
.sgm-ed__single-body { display: grid; grid-template-columns: minmax(0,.38fr) minmax(0,.62fr); gap: clamp(28px,4vw,65px); border-top: 1px solid #e9eae5; padding: clamp(40px, 4.5vw, 66px) 0 65px; }
.sgm-ed__body-heading h2 { margin-top: 13px; color: var(--sgm-ed-deep) !important; font-size: clamp(29px,3vw,46px) !important; font-weight: 900 !important; }
.sgm-ed__body-main { display: grid; gap: 32px; align-content: start; min-width: 0; }
.sgm-ed__prose { min-width: 0; font-size: 19px; line-height: 1.72; font-weight: 500; color: #465852; overflow-wrap: anywhere; }
.sgm-ed__prose > :first-child { margin-top: 0 !important; }
.sgm-ed__prose p, .sgm-ed__prose li { font-size: 19px; line-height: 1.68 !important; margin-bottom: 18px; }
.sgm-ed__prose h2, .sgm-ed__prose h3 { margin-top: 30px; margin-bottom: 15px; color: var(--sgm-ed-deep) !important; font-weight: 800 !important; }
.sgm-ed__prose h2 { font-size: 32px !important; }
.sgm-ed__prose h3 { font-size: 26px !important; }
.sgm-ed__prose a { text-decoration: underline; color: var(--sgm-ed-teal); text-underline-offset: .13em; }
.sgm-ed__prose ul, .sgm-ed__prose ol { padding-left: 1.5em; margin-bottom: 23px; }
.sgm-ed__prose blockquote { border-left: 3px solid var(--sgm-ed-gold); background: var(--sgm-ed-cream); margin: 30px 0; padding: 22px 25px; color: var(--sgm-ed-deep); }
.sgm-ed__prose blockquote p { margin-bottom: 0; font-weight: 750; }
.sgm-ed__prose figure, .sgm-ed__prose img { max-width: 100%; height: auto; }
.sgm-ed__prose iframe { max-width: 100%; }
.sgm-ed__prose .wp-block-image { margin: 20px 0; }
.sgm-ed__prose table { display: block; max-width: 100%; overflow-x: auto; }
.sgm-ed__page-links { display: flex; gap: 8px; margin-top: 20px; }
.sgm-ed__aside { background: var(--sgm-ed-cream); border: 1px solid #ecece4; padding: 30px; }
.sgm-ed__aside h3 { font-size: 28px !important; font-weight: 900 !important; color: var(--sgm-ed-deep) !important; margin: 0 0 13px; }
.sgm-ed__aside-row { padding: 13px 0; border-bottom: 1px solid #dfe4da; }
.sgm-ed__aside-row small { display: block; font-size: 12px; text-transform: uppercase; color: #96713b; letter-spacing: .12em; font-weight: 800; }
.sgm-ed__aside-row strong { display: block; font-size: 20px; line-height: 1.35; color: var(--sgm-ed-deep); margin-top: 6px; font-weight: 700; }
.sgm-ed__aside-row a, .sgm-ed__resource a { color: var(--sgm-ed-teal); text-decoration: underline; word-break: break-word; }
.sgm-ed__resource { margin-top: 20px; }
.sgm-ed__resource h4 { font-size: 21px !important; margin: 0 0 12px; }
.sgm-ed__embed iframe { display: block; width: 100%; max-width: 100%; }
.sgm-ed__related { padding: 5px 0 80px; }
.sgm-ed__related .sgm-ed__card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }

@media (max-width: 1060px) {
    .sgm-ed__featured { column-gap: 30px; }
    .sgm-ed__card-grid { gap: 17px; }
    .sgm-ed__card { grid-template-columns: 43% minmax(0,1fr); }
    .sgm-ed__card-copy { padding: 17px; }
    .sgm-ed__card-copy h3 { font-size: 23px !important; }
    .sgm-ed__single-hero { gap: 30px; }
    .sgm-ed__single-intro .sgm-ed__heading { font-size: clamp(42px,5vw,56px) !important; }
}
@media (max-width: 760px) {
    .sgm-ed { --sgm-ed-space: 22px; }
    .sgm-ed__archive-intro { padding: 48px 0 30px; }
    .sgm-ed .sgm-ed__heading { font-size: clamp(40px, 9vw, 59px) !important; }
    .sgm-ed__featured { grid-template-columns: 1fr; gap: 19px; }
    .sgm-ed__featured-copy { padding: 8px 4px 0; }
    .sgm-ed__featured-copy h2 { font-size: clamp(30px, 7vw, 40px) !important; }
    .sgm-ed__featured-photo { aspect-ratio: 1.5/1; }
    .sgm-ed__card-grid, .sgm-ed__related .sgm-ed__card-grid { grid-template-columns: 1fr; }
    .sgm-ed__card { grid-template-columns: minmax(0,.41fr) minmax(0,.59fr); min-height: 200px; }
    .sgm-ed__card-photo { min-height: 195px; }
    .sgm-ed__card-copy h3 { font-size: 24px !important; }
    .sgm-ed__single-hero { grid-template-columns: 1fr; padding: 28px 0 44px; }
    .sgm-ed__single-photo { height: auto; aspect-ratio: 1.45 / 1; }
    .sgm-ed__single-intro { padding: 0; }
    .sgm-ed__single-body { grid-template-columns: 1fr; padding: 40px 0; gap: 25px; }
    .sgm-ed__related { padding-bottom: 55px; }
    .sgm-ed__card-grid--ramadan { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .sgm-ed__card--ramadan { display: flex; }
    .sgm-ed__card--ramadan .sgm-ed__card-copy { padding: 16px; }
}
@media (max-width: 480px) {
    .sgm-ed { --sgm-ed-space: 18px; }
    .sgm-ed__eyebrow { letter-spacing: .12em; font-size: 12px; }
    .sgm-ed__featured { padding: 17px; }
    .sgm-ed__featured-copy p { font-size: 16px; }
    .sgm-ed__card { display: flex; flex-direction: column; }
    .sgm-ed__card-photo { min-height: 0; aspect-ratio: 1.63 / 1; }
    .sgm-ed__card-copy { padding: 19px; }
    .sgm-ed__card-copy h3 { font-size: 27px !important; }
    .sgm-ed__card-grid--ramadan { grid-template-columns: 1fr; }
    .sgm-ed__facts { padding: 19px; gap: 18px; }
    .sgm-ed__fact > strong { font-size: 16px; }
    .sgm-ed__aside { padding: 23px; }
    .sgm-ed__pagination .page-numbers a, .sgm-ed__pagination .page-numbers span { min-width: 38px; min-height: 40px; padding: 7px 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .sgm-ed *, .sgm-ed *::before, .sgm-ed *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
