/*
Theme Name: Monway Child
Description: Monway customizations, preserved independently of Mesmerize PRO updates.
Author: Monway Woodfuel
Template: mesmerize-pro
Version: 1.0.21
Text Domain: monway-child
Update URI: false
*/

/* Contact forms remain parallel on desktop and stack in reading order on mobile. */
.monway-contact-grid { display:flex; align-items:flex-start; gap:3rem; }
.monway-contact-grid > .monway-contact-panel { flex:1 1 0; min-width:0; }
.monway-contact-panel .wpforms-container .wpforms-field-medium { max-width:100%; width:100%; }
.monway-contact-panel h2 { margin-top:0; }
@media (max-width:781px) {
 .monway-contact-grid { flex-direction:column; gap:2.5rem; }
 .monway-contact-grid > .monway-contact-panel { width:100%; flex-basis:auto !important; }
}

/* Product and sawmill photography: editable WordPress blocks, no carousel dependency. */
.monway-image-row { display:flex; align-items:center !important; gap:2.8rem; margin:2.75rem 0 3.5rem; }
.monway-image-row > .wp-block-column { min-width:0; }
.monway-image-row h2:first-child { margin-top:0; }
.monway-photo-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.monway-photo-grid .wp-block-image { margin:0 !important; min-width:0; }
.monway-photo-grid img { display:block; width:100%; height:auto; border-radius:4px; }
.monway-photo-count-1 { grid-template-columns:1fr; }
.monway-photo-count-1 img { max-height:450px; object-fit:contain; }
.monway-photo-count-3 .wp-block-image:first-child { grid-column:1 / -1; }
.monway-photo-count-3 .wp-block-image:first-child img { max-height:350px; object-fit:contain; }
.monway-photo-count-3 .wp-block-image:not(:first-child) img { height:210px; object-fit:contain; }
.monway-text-section { margin:2.75rem 0; }
@media (max-width:781px) {
 .monway-image-row { flex-direction:column; align-items:stretch !important; gap:1.4rem; margin:2rem 0 2.5rem; }
 .monway-image-row > .wp-block-column { flex-basis:auto !important; width:100%; }
 .monway-photo-grid { gap:.75rem; }
 .monway-photo-count-1 img { max-height:420px; }
 .monway-photo-count-3 .wp-block-image:not(:first-child) img { height:180px; }
}

.monway-photo-grid > .wp-block-group__inner-container { display:contents; }

/* Keep primary navigation white before and after the header becomes sticky. */
.navigation-bar #main_menu > li > a,
.navigation-bar #main_menu > li > a:hover,
.navigation-bar #main_menu > li > a:focus {
 color:#fff;
}

/* Give the newsletter usable space instead of the theme's three narrow widget slots. */
.footer-content:has(#block-10) > .gridContainer > .row > .col-sm-9 {
 flex-basis:100%; max-width:100%; width:100%;
}
.footer-content:has(#block-10) > .gridContainer > .row > .col-sm-3:not(:has(a)) { display:none; }
.footer-content .row:has(> .col-sm-4 > #block-10) {
 display:grid; grid-template-columns:1fr; gap:2rem; align-items:center;
 max-width:1100px; margin-left:auto; margin-right:auto;
}
.footer-content .row:has(> .col-sm-4 > #block-10) > .col-sm-4 {
 width:100%; max-width:100%; min-width:0; padding:0;
}
.footer-content .row:has(> .col-sm-4 > #block-10) > .col-sm-4:not(:has(.widget)) { display:none; }
.footer-content #block-11 { max-width:240px; margin:0 auto; }
.footer-content #block-10 { width:100%; margin:0; }
.footer-content #block-10 iframe { display:block; width:100%; max-width:100%; box-sizing:border-box; }
@media (min-width:900px) {
 .footer-content .row:has(> .col-sm-4 > #block-10) { grid-template-columns:280px minmax(0,1fr); gap:3rem; }
 .footer-content #block-11 { max-width:280px; }
}

/* Match paired photo frames while keeping each subject in view. Originals remain intact. */
.monway-photo-count-2 img { aspect-ratio:4 / 5; height:auto; object-fit:cover; }
.monway-photo-count-2 img.wp-image-190 { object-position:50% 45%; }
.monway-photo-count-2 img.wp-image-191 { object-position:50% 38%; }
.monway-photo-count-2 img.wp-image-188 { object-position:50% 55%; }
.monway-photo-count-2:has(.wp-image-198) img { aspect-ratio:3 / 2; object-position:center; }
.monway-photo-count-2:has(.wp-image-199) img { aspect-ratio:1 / 1; }
.monway-photo-count-2 img.wp-image-199 { object-position:50% 52%; }
.monway-photo-count-2 img.wp-image-200 { object-position:50% 60%; }
/* Packaging needs its full outline, so use equal frames without clipping the boxes. */
.monway-photo-count-2:has(.wp-image-192) img { aspect-ratio:4 / 3; object-fit:contain; background:#fff; }

/* Smaller certificates, centred beneath their labels. */
.monway-certificates .wp-block-image { width:70%; margin-left:auto; margin-right:auto; }
.monway-certificates h3 { text-align:center; }

/* Delivery map sizing */
.wp-block-image.monway-delivery-map { width:70%; max-width:726px; margin-left:auto; margin-right:auto; }
.monway-delivery-map img { width:100%; height:auto; }

@media (max-width: 781px) {
 .wp-block-image.monway-delivery-map { width:100%; max-width:100%; }
}

/* Align contact introductions and form starts across desktop columns. */
@media (min-width:782px) {
 .monway-contact-grid { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:3rem; row-gap:0; align-items:stretch; }
 .monway-contact-grid > .monway-contact-panel { display:grid; grid-template-rows:subgrid; grid-row:1 / span 4; row-gap:0; align-items:start; }
 .monway-contact-grid > .monway-contact-panel:first-child { grid-column:1; }
 .monway-contact-grid > .monway-contact-panel:last-child { grid-column:2; }
}

.monway-contact-panel > .wpforms-container { width:100%; box-sizing:border-box; margin-left:0; margin-right:0; }

/* Keep customer contact details in normal flow below the aligned forms. */
@media (min-width:782px) {
 .monway-contact-panel > h2 { grid-row:1; }
 .monway-contact-panel > p { grid-row:2; }
 .monway-contact-panel > .wpforms-container { grid-row:3; }
 .monway-contact-panel > .monway-contact-details { grid-row:4; }
}
.monway-contact-details { display:block; }

/* Match standalone section insets to the desktop image rows. */
@media (min-width:782px) {
 .page-id-63 .monway-text-section,
 .page-id-63 .monway-certificates,
 .page-id-109 .monway-text-section { padding-left:2.8rem; padding-right:2.8rem; }
}

/* Sprucey's family introduction, October 2026. */
@font-face { font-family:'Monway Hand'; src:url('assets/sprucey/patrick-hand.ttf') format('truetype'); font-style:normal; font-weight:400; font-display:swap; }
.monway-sprucey { background:#fff8e8; color:#48301e; border-top:1px solid #eadfc8; border-bottom:1px solid #eadfc8; padding:34px 24px; scroll-margin-top:150px; }
.monway-sprucey-inner { max-width:1000px; margin:0 auto; display:flex; align-items:center; gap:56px; }
.monway-sprucey-image { display:block; flex:0 0 260px; width:260px; height:auto; max-width:100%; }
.monway-sprucey-copy { flex:1; min-width:0; text-align:left; }
.monway-sprucey #sprucey-title { font-family:'Monway Hand',cursive; font-size:46px; font-weight:400; line-height:1.12; color:#426c35; margin:0 0 16px; letter-spacing:0; }
.monway-sprucey-copy p { font-size:18px; line-height:1.7; color:#48301e; margin:0 0 16px; }
.monway-sprucey-copy .monway-sprucey-credit { font-family:'Monway Hand',cursive; font-size:25px; line-height:1.3; color:#426c35; margin:0; }
@media(max-width:600px) {
 .monway-sprucey { padding:28px 24px 32px; scroll-margin-top:100px; }
 .monway-sprucey-inner { flex-direction:column; gap:16px; }
 .monway-sprucey-image { flex-basis:auto; width:190px; }
 .monway-sprucey-copy { text-align:center; }
 .monway-sprucey #sprucey-title { font-size:38px; }
 .monway-sprucey-copy p { font-size:16px; line-height:1.65; }
 .monway-sprucey-copy .monway-sprucey-credit { font-size:24px; }
}

/* Occasional cameos occupy their own space, never overlay controls or copy. */
.sprucey-cameo-slot { display:flex; justify-content:flex-end; max-width:1100px; margin:12px auto 24px; padding:0 24px; clear:both; box-sizing:border-box; }
.sprucey-cameo { display:inline-flex; flex-direction:column; align-items:center; width:112px; color:#426c35 !important; text-decoration:none !important; border-radius:10px; padding:4px; }
.sprucey-cameo img { display:block; width:104px; height:104px; object-fit:contain; transition:transform .18s ease; }
.sprucey-cameo span { font-family:'Monway Hand',cursive; font-size:20px; line-height:1.3; }
.sprucey-cameo:hover img { transform:translateY(-3px) rotate(-3deg); }
.sprucey-cameo:focus-visible { outline:3px solid #426c35; outline-offset:4px; background:#fff8e8; }
@media(max-width:600px) { .sprucey-cameo-slot { margin:8px auto 20px; padding:0 16px; } }
@media(prefers-reduced-motion:reduce) { .sprucey-cameo img { transition:none; } .sprucey-cameo:hover img { transform:none; } }
/* The homepage theme applies a negative overlap margin to every direct div. */
#overlappable-1 > .sprucey-cameo-slot { margin-top:12px !important; }

/* Monway newsletter promo. Signup remains hosted by the existing beehiiv form. */
.footer-content .monway-newsletter { position:relative;isolation:isolate;overflow:hidden;border:1px solid #35523c;border-radius:14px;background:radial-gradient(ellipse at 100% 100%,#8b67362b,transparent 62%),linear-gradient(120deg,#142f25,#244635);color:#fff8e8;padding:30px 32px;box-shadow:0 9px 25px #19372a12;text-align:left;min-height:300px; }
.monway-news-eyebrow { font-size:11px;letter-spacing:2.1px;font-weight:700;color:#c5d3be;margin-bottom:16px; }
.footer-content #monway-news-title { font-family:Arial,sans-serif;font-size:37px;font-weight:700;line-height:1.08;letter-spacing:-1px;margin:0 0 15px;color:#fff8e8;max-width:410px; }
#monway-news-title em { font-style:normal;color:#f3c267; }
.footer-content .monway-news-description { font-size:15px;line-height:1.65;max-width:385px;color:#d9e3d5;margin:0 160px 23px 0; }
.footer-content .monway-news-cta { display:inline-flex;gap:28px;align-items:center;position:relative;z-index:2;border-radius:6px;background:#f2bd5d;color:#23372a !important;font-size:15px;font-weight:700;padding:13px 23px;text-decoration:none; }
.monway-news-cta:hover { background:#ffce79; }
.monway-news-cta:focus-visible { outline:3px solid #fff8e8;outline-offset:4px; }
.monway-news-logs { position:absolute;width:183px;height:200px;right:11px;top:30px;z-index:-1;opacity:.9; }
.footer-content #block-11 img { border-radius:12px; }
.monway-news-dialog { border:0;border-radius:14px;padding:24px;width:560px;max-width:calc(100vw - 32px);max-height:90vh;overflow:auto;background:#fff8e8;color:#23372a; }
.monway-news-dialog::backdrop { background:rgba(15,35,25,.65); }
.footer-content .monway-news-dialog h2 { color:#23372a;font-size:22px;line-height:1.3;margin:10px 30px 20px 0; }
.monway-news-close { position:absolute;right:10px;top:6px;width:44px;height:44px;background:transparent;border:0;color:#23372a;font-size:30px;cursor:pointer; }
@media(max-width:900px) { .footer-content .monway-newsletter { padding:26px 24px; } .monway-news-logs { width:130px;right:-12px;opacity:.25; } .footer-content .monway-news-description { margin-right:0; } }
@media(max-width:600px) { .footer-content #monway-news-title { font-size:34px; } .footer-content .monway-news-cta { display:flex;justify-content:space-between; } .monway-news-dialog { padding:20px 12px; } }

.footer-content #block-10 .monway-news-inline { height:64px;border:0;margin:0;background:transparent;border-radius:6px;position:relative;z-index:2; }
.footer-content #monway-news-title { color:#fff8e8 !important; }

/* Desktop cameos sit beneath the section copy, within its existing column. */
@media(min-width:782px) {
 .monway-image-row .sprucey-cameo-slot.sprucey-cameo-inline { justify-content:flex-start; padding:0; margin:14px 0 0; max-width:none; }
 .sprucey-cameo-inline .sprucey-cameo { width:96px; }
 .sprucey-cameo-inline .sprucey-cameo img { width:88px; height:88px; }
 .sprucey-cameo-inline .sprucey-cameo span { font-size:18px; }
}
