/* Shared responsive refinements for the GiveWise design and WordPress shell. */
:where(.hero__copy,.page-hero-grid>div,.page-card,.gf-col,.gf-brand,.gf-connect){min-width:0}
:where(.button,.text-link,.book-detail-primary,.book-detail-secondary){max-width:100%;overflow-wrap:anywhere}
:where(.text-link,.book-detail-secondary){min-height:44px;align-items:center}
.page-prose :where(img,video,iframe){max-width:100%}
.page-prose :where(img,video){height:auto}
.page-prose :where(pre,table){max-width:100%;overflow-x:auto}
.page-nav a{display:inline-flex;align-items:center;min-height:44px}
#program-book-dialog .book-detail-close{min-height:44px}
#program-book-dialog .book-detail-primary{padding-block:12px}
#program-book-dialog .book-detail-secondary{display:inline-flex}
.menu-content-wrapper{padding-bottom:max(30px,env(safe-area-inset-bottom))}

@media(max-width:767px){
 #program-details .book-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:calc(100% - 40px);max-width:none;overflow:visible}
 #program-details .book-tab{min-width:0;min-height:44px;padding:8px 4px;white-space:normal;overflow-wrap:anywhere;font-size:clamp(8px,2.1vw,10px);line-height:1.4;letter-spacing:0}
 #program-details .book-caption-title{height:auto;min-height:2.5em}
 #program-details .book-caption-description{height:auto;min-height:5.1em}
 #program-book-dialog .book-detail-copy{min-width:0}
 #program-book-dialog .book-detail-actions{align-items:flex-start;gap:12px}
 #program-book-dialog .book-detail-title{font-size:clamp(38px,9vw,58px)}
 #givwise-footer .gf-link-list a{display:flex;align-items:center;min-height:44px}
 #givwise-footer .gf-volunteer-link{min-height:44px;display:inline-flex;align-items:center}
}

/* Natural document height keeps every hero action reachable on short screens.
   app.js omits the pinned scene at these same breakpoints. */
@media(max-width:359px),(max-height:600px){
 .hero--portal .hero__stage{height:auto}
 .hero--portal .hero__panel{height:auto;min-height:100svh}
 .hero__manifesto{position:relative;inset:auto;min-height:0}
}
@media(max-width:720px) and (max-height:600px),(max-width:359px){
 .hero--portal .hero__grid{position:relative;inset:auto;display:block;width:auto;height:auto;margin:0 20px;padding:clamp(240px,41svh,330px) 0 36px}
 .hero--portal .hero__avatar{top:76px;right:4vw;width:58vw;height:clamp(155px,28svh,230px)}
 .hero--portal .hero__well{top:-12vh;height:78vh}
 .hero--portal .hero__copy .button-row{gap:10px 16px;flex-wrap:wrap}
 .hero--portal .hero__footnote{max-width:100%}
}
@media(min-width:721px) and (max-height:600px){
 .hero--portal .hero__panel{min-height:660px}
 .hero--portal .hero__grid{height:auto;min-height:660px;padding-top:120px;padding-bottom:110px}
 .hero--portal .hero__avatar{top:115px;bottom:80px;height:auto}
 .hero--portal .hero__well{top:-12%;height:140%}
 .hero__manifesto{padding:70px 0}
}
@media(max-width:360px){
 #navigation .nav__brand{font-size:22px}
 #navigation .nav__brand img{width:44px;height:44px}
 #navigation .nav__brand small{font-size:7px}
 #program-book-dialog .book-detail-top{gap:10px;padding-inline:14px}
 #program-book-dialog .book-detail-logo{font-size:21px}
 .page-hero .button-row>.button{width:100%;justify-content:space-between}
}

/* Show the entire original logo at the available header height. Its PNG has
   transparent margins; positioning the square image centers the visible artwork
   without stretching it or changing the 84px/72px navigation rows. */
#navigation .nav__brand{--logo-art-height:76px;position:relative;display:block;flex:none;width:76px;height:80px;overflow:hidden}
#navigation .nav__brand img{position:absolute;left:50%;top:50%;width:calc(var(--logo-art-height)*1.706485);height:calc(var(--logo-art-height)*1.706485);max-width:none;object-fit:contain;transform:translate(-50%,-48.1%)}
@media(max-width:760px){
 #navigation .nav__brand{--logo-art-height:64px;width:64px;height:68px}
}
