/* R13.1: shared, restrained section surfaces. Content/query/image dimensions stay intact. */
:root{--madar-section-surface:#f1f7f1;--madar-section-border:#50742524;}
.madar-main,.madar-home-about,.madar-home-news,.madar-home-videos,.madar-home-join,.madar-site-footer{--madar-section-space:clamp(3rem,4.5vw,4.5rem);}
html{scroll-behavior:smooth;}
.madar-header{position:relative;background:#fff;border-block-end:1px solid #052b601a;box-shadow:0 4px 18px #052b6010;border-end-start-radius:1.25rem;border-end-end-radius:1.25rem;z-index:2;}
.madar-header-inner{min-block-size:7rem;gap:1rem;}
.madar-header-inner .madar-brand{gap:.75rem;align-items:center;flex-shrink:0;}
.madar-header-inner .madar-brand-mark{inline-size:6rem;flex:none;margin:0;}
.madar-header-inner .madar-brand-mark a{display:block;border-radius:.25rem;}
.madar-header-inner .madar-brand-mark img{inline-size:100%;block-size:auto;object-fit:contain;clip-path:none;}
.madar-header-inner .madar-brand-name{inline-size:13rem;font-size:1.0625rem;line-height:1.65;font-weight:700;text-wrap:balance;overflow-wrap:normal;margin:0;}
.madar-brand-name a{display:block;text-decoration:none;color:var(--madar-navy);}
.madar-brand :is(a):focus-visible{outline:3px solid var(--madar-green);outline-offset:4px;border-radius:.25rem;}
.madar-main{background:#fff;}
.madar-hero{background:#f7fbf8;}
.madar-programs{background:#fff;border-block:1px solid var(--madar-section-border);}
.madar-home-about{background:var(--madar-section-surface);border-block-end:1px solid var(--madar-section-border);}
.madar-home-about .madar-impact{background:#fff;border:1px solid #50742533;border-inline-start:4px solid var(--madar-green);box-shadow:0 6px 18px #052b6005;}
.madar-home-news{background:#fff;border-block-end:1px solid var(--madar-section-border);}
.madar-home-news .madar-news-heading,.madar-home-about .madar-about-heading{margin-block-end:var(--madar-heading-space);}
.madar-section-heading::before,.madar-home-news .madar-news-heading::before,.madar-home-about .madar-about-heading::before{inline-size:4.5rem;block-size:4px;border-radius:4px;margin-block-end:.75rem;}
.madar-home-videos{padding-block:var(--madar-section-space);}
.madar-home-join{border-block-start:1px solid #ffffff30;padding-block:var(--madar-section-space);}
.madar-home-join h2::before{content:"";display:block;inline-size:4.5rem;block-size:4px;border-radius:4px;background:#9dbb72;margin:0 auto .75rem;}
.madar-site-footer{border-block-start:1px solid var(--madar-section-border);background:#fff;}
/* Empty media is decorative brand geometry, not an article photograph. */
.madar-home-news .madar-news-media:not(:has(img)),.madar-news-listing .madar-list-media:not(:has(img)){display:grid;place-items:center;position:relative;aspect-ratio:16/9;inline-size:100%;flex:none;background:#eef5ee;overflow:hidden;}
.madar-home-news .madar-news-media:not(:has(img))::before,.madar-news-listing .madar-list-media:not(:has(img))::before{content:"";inline-size:4.5rem;block-size:4.5rem;border:1px solid #50742545;border-radius:50%;box-shadow:0 0 0 .9rem #5074250c,0 0 0 1.8rem #052b6005;}
.madar-home-news .madar-news-media:not(:has(img))::after,.madar-news-listing .madar-list-media:not(:has(img))::after{content:"";position:absolute;inline-size:2.5rem;block-size:3px;background:var(--madar-green);border-radius:3px;}
.madar-video-listing .madar-list-media:has(img){position:relative;}
.madar-video-listing .madar-list-media:has(img)::before{content:"";position:absolute;inset:0;margin:auto;inline-size:3.25rem;block-size:3.25rem;border-radius:50%;border:2px solid #fff;background:#052b60c9;pointer-events:none;z-index:1;}
.madar-video-listing .madar-list-media:has(img)::after{content:"";position:absolute;inset:0;margin:auto;inline-size:0;block-size:0;border-block:8px solid transparent;border-inline-start:12px solid #fff;transform:scaleX(-1);pointer-events:none;z-index:2;}
.madar-scroll-top{position:fixed;inset-inline-end:max(1rem,env(safe-area-inset-left));inset-block-end:calc(max(1rem,env(safe-area-inset-bottom)) + var(--madar-top-offset,0px));inline-size:2.875rem;block-size:2.875rem;border:1px solid #ffffffb3;border-radius:.875rem;background:var(--madar-navy);color:#fff;box-shadow:0 3px 12px #052b6024;font:700 1.5rem/1 'Alexandria Variable',sans-serif;display:grid;place-items:center;cursor:pointer;z-index:20;}
.madar-scroll-top[hidden],.editor-styles-wrapper .madar-scroll-top{display:none!important;}
.madar-scroll-top:hover{background:var(--madar-green);}
.madar-scroll-top:focus-visible{outline:3px solid var(--madar-green);outline-offset:4px;}
@media(max-width:1199px){.madar-header-inner{min-block-size:6.5rem;}.madar-header-inner .madar-brand-mark{inline-size:5.5rem;}}
@media(max-width:767px){.madar-header{border-radius:0;}.madar-header-inner{min-block-size:6rem;gap:.625rem;}.madar-header-inner .madar-brand{gap:.625rem;}.madar-header-inner .madar-brand-mark{inline-size:4.5rem;}.madar-header-inner .madar-brand-name{inline-size:clamp(8.5rem,43vw,10.5rem);font-size:.875rem;line-height:1.65;}.madar-home-videos,.madar-home-join{padding-block:var(--madar-section-space);}.madar-scroll-top{inset-inline-end:max(.75rem,env(safe-area-inset-left));}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto;}.madar-scroll-top{transition:none;}}
/* The standalone Header editor uses the same balanced cluster. */
body.editor-styles-wrapper .madar-header-inner .madar-brand-name{inline-size:13rem;font-size:1.0625rem;line-height:1.65;}
@media(max-width:767px){body.editor-styles-wrapper .madar-header-inner .madar-brand-name{inline-size:clamp(8.5rem,43vw,10.5rem);font-size:.875rem;}}
/* Native anchor targets also clear the WordPress toolbar in logged-in previews. */
main [id]{scroll-margin-block-start:1rem;}
body.admin-bar main [id]{scroll-margin-block-start:calc(var(--wp-admin--admin-bar--height,32px) + 1rem);}
/* Centre the desktop links on the container once both outer tracks comfortably fit. */
@media(min-width:1400px){.madar-header-inner{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);column-gap:1.5rem;}.madar-header-inner .madar-brand{justify-self:start;}.madar-header-inner .madar-desktop-nav{justify-self:center;}.madar-header-inner .madar-contact{justify-self:end;}}

