/*
Theme Name: SGI-USA DFW
Description: Child theme of Twenty Twenty-Five for the SGI-USA DFW Buddhist Center.
Template: twentytwentyfive
Version: 1.1.5
Requires at least: 6.6
Text Domain: sgi-dfw
*/

/* Aliases so content saved with the v1.0.0 size names still renders correctly */
.has-h1-font-size{font-size:clamp(40px,5vw,64px)!important}
.has-h2-font-size{font-size:clamp(30px,3vw,40px)!important}
.has-h3-font-size{font-size:26px!important}

header.wp-block-template-part{position:sticky;top:0;z-index:20;background:var(--wp--preset--color--paper)}
.wp-block-button.is-style-outline .wp-block-button__link{border:1px solid currentColor;background:transparent;color:inherit}
.wp-block-image img{display:block}
main.wp-block-group{margin-top:0!important;padding-top:0!important;padding-bottom:0!important}
.wp-block-post-content > * + *{margin-block-start:0}
.wp-site-blocks > footer, footer.wp-block-template-part{margin-block-start:0!important}
footer.wp-block-template-part > * + *, header.wp-block-template-part > * + *{margin-block-start:0}
.is-style-pill .wp-block-button.is-style-outline .wp-block-button__link{padding:9px 18px;border-width:2px;font-size:15px}
.is-style-pill .wp-block-button__link{padding:15px 24px}
.has-yellow-background-color .wp-block-image img{border-radius:28px;aspect-ratio:4/3;object-fit:cover;width:100%}
.has-yellow-background-color p{margin-block:0 .6rem}
.sgi-bud-logo{height:30px;width:auto;vertical-align:middle;margin-right:10px}
footer .has-ink-background-color a{text-decoration:none}
footer .has-ink-background-color a:hover{color:var(--wp--preset--color--gold-light)}
footer .wp-block-social-links .wp-social-link{color:var(--wp--preset--color--stone)!important;background:none!important}
footer .wp-block-social-links .wp-social-link:hover{color:var(--wp--preset--color--gold-light)!important}
footer .wp-block-navigation__container{gap:4px!important}
footer .wp-block-navigation{font-size:15px}

/* v1.0.4: dividers + spacing to match mockup */
header.wp-block-template-part > .wp-block-group{border-bottom:1px solid var(--wp--preset--color--line)}
.wp-block-post-content > .wp-block-group:first-child:not(.alignfull){position:relative;padding-bottom:var(--wp--preset--spacing--50)!important}
.wp-block-post-content > .wp-block-group:first-child:not(.alignfull)::after{content:"";position:absolute;left:50%;bottom:0;width:100vw;transform:translateX(-50%);border-bottom:1px solid var(--wp--preset--color--line)}
.has-subsection-font-size,.has-h3-font-size{line-height:1.3}
.sgi-hours{max-width:520px}
.sgi-hours div{display:flex;justify-content:space-between;gap:16px;padding:10px 0;border-bottom:1px solid #e0d9cc}
.sgi-hours span:last-child{text-align:right}
.sgi-hours small{display:block;font-size:13.5px;color:#8a8175}

/* v1.0.6: header + visit image to match mockup */
.sgi-topbar{font-size:12.5px}
.sgi-topbar p{margin:0}
.sgi-topbar a{text-decoration:none}
.sgi-topbar ul{display:flex;gap:10px;list-style:none;margin:0;padding:0}
.sgi-topbar .lang-item a{font-weight:600;text-transform:uppercase;color:#a39a8b;text-decoration:none}
.sgi-topbar .lang-item.current-lang a{color:var(--wp--preset--color--ink)}
.sgi-brand{gap:12px!important}
.sgi-brand-text{gap:4px!important}
.sgi-brand .wp-block-site-title{font-family:var(--wp--preset--font-family--newsreader);font-size:21px;font-weight:400;line-height:1;letter-spacing:0}
.sgi-brand .wp-block-site-title a{text-decoration:none}
.sgi-brand .wp-block-site-tagline{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#8a8175;line-height:1;margin:0}
.sgi-mainbar .wp-block-navigation{font-size:14.5px;gap:28px}
.sgi-mainbar .wp-block-navigation a{text-decoration:none}
.sgi-mainbar .wp-block-navigation .wp-block-navigation__submenu-icon{width:9px;height:9px;color:#8a8175;margin-left:4px}
.sgi-mainbar .wp-block-navigation .current-menu-item > a,.sgi-mainbar .wp-block-navigation a:hover{box-shadow:inset 0 -1px 0 currentColor}
.sgi-mainbar .wp-block-button__link{padding:11px 18px;font-size:14.5px;white-space:nowrap}
.sgi-mainbar > .wp-block-group:last-child{gap:28px}
#address > .wp-block-columns{align-items:stretch}
#address > .wp-block-columns > .wp-block-column:last-child{flex-basis:57%!important}
#address > .wp-block-columns > .wp-block-column:last-child .wp-block-image{height:100%;margin:0}
#address > .wp-block-columns > .wp-block-column:last-child .wp-block-image img{width:100%;height:100%;min-height:420px;object-fit:cover}
@media (max-width:781px){#address > .wp-block-columns > .wp-block-column:last-child .wp-block-image img{min-height:260px}}

/* v1.0.7: Fluent Forms styled to match mockup */
.fluentform{font-family:var(--wp--preset--font-family--public-sans)}
.fluentform .ff-el-group{margin-bottom:22px}
.fluentform .ff-el-input--label label{font-size:14px;font-weight:500;color:var(--wp--preset--color--ink)}
.fluentform .ff-el-is-required.asterisk-right label:after{color:var(--wp--preset--color--gold)}
.fluentform .ff-el-form-control{border:1px solid var(--wp--preset--color--stone)!important;border-radius:0!important;background:#fff!important;padding:14px 16px!important;font-size:15px!important;color:var(--wp--preset--color--ink)!important;box-shadow:none!important;min-height:0}
.has-sand-background-color .fluentform .ff-el-form-control{background:var(--wp--preset--color--paper)!important}
.fluentform .ff-el-form-control:focus{border-color:var(--wp--preset--color--gold)!important;outline:1px solid var(--wp--preset--color--gold)}
.fluentform select.ff-el-form-control{height:auto!important}
.fluentform .ff-el-input--content:has(.ff-el-form-check){display:flex;flex-wrap:wrap;gap:8px}
.fluentform .ff-el-form-check{display:inline-block;margin:0!important}
.fluentform .ff-el-form-check-label{display:inline-flex;align-items:center;padding:9px 15px;border:1px solid var(--wp--preset--color--ink);border-radius:30px;font-size:14px;cursor:pointer;transition:background .15s,color .15s}
.fluentform .ff-el-form-check-label:hover{background:rgba(33,30,26,.06)}
.fluentform .ff-el-form-check-input{position:absolute;opacity:0;width:1px;height:1px}
.fluentform .ff-el-form-check-label:has(input:checked){background:var(--wp--preset--color--ink);color:var(--wp--preset--color--paper)}
.fluentform .ff-el-form-check-label:has(input:focus-visible){outline:2px solid var(--wp--preset--color--gold);outline-offset:2px}
.fluentform .ff-btn-submit{background:var(--wp--preset--color--ink)!important;color:var(--wp--preset--color--paper)!important;border:0!important;border-radius:2px!important;padding:16px 28px!important;font-size:15px!important;font-weight:400!important;box-shadow:none!important}
.fluentform .ff-btn-submit:hover{background:var(--wp--preset--color--gold)!important;opacity:1!important}
.fluentform .ff-message-success{border:0;background:var(--wp--preset--color--paper);padding:28px;box-shadow:none;font-size:16px}

/* v1.0.9: whole header (top bar + main bar) sticky; compact mobile header */
.wp-site-blocks > header.wp-block-template-part,header.wp-block-template-part{position:sticky;top:0;z-index:20;background:var(--wp--preset--color--paper)}
body.admin-bar header.wp-block-template-part{top:32px}
.sgi-brand .wp-block-site-title{white-space:nowrap}
@media (max-width:782px){
body.admin-bar header.wp-block-template-part{top:46px}
.sgi-topbar{font-size:11.5px;padding-top:8px!important;padding-bottom:8px!important;row-gap:4px!important}
.sgi-topbar > p{flex-basis:100%}
.sgi-topbar > .wp-block-group{width:100%;justify-content:space-between}
.sgi-mainbar{padding-top:14px!important;padding-bottom:14px!important}
.sgi-mainbar .wp-block-buttons{display:none}
.sgi-brand .wp-block-site-logo img{width:34px!important;height:auto}
.sgi-brand .wp-block-site-title{font-size:19px}
.sgi-brand .wp-block-site-tagline{font-size:10px}
}
@media (max-width:600px){body.admin-bar header.wp-block-template-part{top:0}}

/* v1.1.0: language-specific blocks. Add class sgi-en or sgi-es to any block; only the current language shows. */
html[lang^="es"] .sgi-en{display:none!important}
html:not([lang^="es"]) .sgi-es{display:none!important}
footer.wp-block-template-part > .sgi-en > * + *,footer.wp-block-template-part > .sgi-es > * + *{margin-block-start:0}

/* v1.1.1: footer logo + bottom breathing room */
.sgi-foot-name{display:flex;align-items:center;gap:10px}
.sgi-foot-logo{width:32px;height:32px;flex:none}
footer.wp-block-template-part .wp-block-group.has-ink-background-color{padding-bottom:clamp(56px,8vw,96px)!important}
footer.wp-block-template-part .wp-block-button__link.has-ink-background-color{padding-bottom:16px!important}

/* v1.1.2: Buddhability buttons never stretch; headline spacing */
.has-yellow-background-color .wp-block-buttons{align-items:center!important}
.has-yellow-background-color .wp-block-button{width:auto!important;flex:0 0 auto!important;align-self:center!important}
.has-yellow-background-color .wp-block-button__link{display:inline-block!important;height:auto!important;min-height:0!important;line-height:1.2!important;white-space:nowrap}
.has-yellow-background-color h2{margin-bottom:20px!important}

/* v1.1.3: harder reset for Buddhability CTA buttons; sticky-safe overflow */
html,body{overflow-x:clip}
footer.wp-block-template-part .wp-block-buttons .wp-block-button,footer.wp-block-template-part .wp-block-buttons .wp-block-button__link{height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;width:auto!important}
footer.wp-block-template-part .wp-block-buttons .wp-block-button__link{padding:16px 26px!important;display:inline-flex!important;align-items:center!important}
footer.wp-block-template-part .wp-block-buttons .is-style-outline .wp-block-button__link{padding:9px 18px!important}

/* v1.1.4: mobile, remove the rows above the logo; EN/ES sits beside the menu button */
@media (max-width:782px){
.sgi-topbar{padding:0!important;height:0;min-height:0;overflow:visible;border:0!important}
.sgi-topbar > p,.sgi-topbar > .wp-block-group > p{display:none!important}
.sgi-topbar ul{position:absolute;z-index:2;top:24px;right:calc(var(--wp--preset--spacing--gutter) + 44px);gap:10px;font-size:12px}
body.admin-bar .sgi-topbar ul{top:24px}
}

/* v1.1.5: tighter form layout, short fields in two columns (matches mockup) */
.fluentform form fieldset{display:contents}
.fluentform form{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);column-gap:14px;row-gap:18px}
.fluentform form > *,.fluentform form fieldset > *{grid-column:1 / -1;margin:0!important}
.fluentform .ff-el-group:has(> .ff-el-input--content > input[type="text"]:not([name*="message"]),> .ff-el-input--content > input[type="email"],> .ff-el-input--content > input[type="tel"],> .ff-el-input--content > select){grid-column:auto}
.fluentform input[type="hidden"],.fluentform .ff_hidden_field{display:none}
.fluentform .ff-el-input--label{margin-bottom:7px!important;padding:0!important}
.fluentform .ff-el-input--label label{margin:0}
.fluentform .ff-el-is-required.asterisk-right label:after{margin-left:2px!important}
.fluentform .ff-el-form-control{padding:13px 15px!important;min-height:0!important}
.fluentform .ff_submit_btn_wrapper{margin-top:6px!important}
.fluentform .ff-el-group + .ff-el-group:has(.ff-el-form-check){margin-top:4px!important}
@media (max-width:640px){.fluentform form{grid-template-columns:minmax(0,1fr)}.fluentform .ff-el-group{grid-column:1 / -1!important}}
