/* Beomakeup theme: the parts theme.json cannot express. Values are measured from the
   Divi site (plans/20261117-1149-divi-to-native-wp/ref/header-footer-geometry.json).
   Breakpoint 980px = Divi's desktop/tablet switch. */

/* ---------- Base (Divi resets) ---------- */
*, *::before, *::after { box-sizing: border-box; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
:where(h1, h2, h3, h4, h5, h6) { margin: 0; padding-bottom: 10px; }
:where(p) { margin: 0; }
a { transition: opacity .4s ease-in-out; }
.wp-site-blocks > * { margin-block: 0; }

/* Divi icon-font glyphs, extracted to SVG and drawn with a mask so they take currentColor. */
.beo-topbar__phone::before, .beo-topbar__email::before,
.beo-nav .wp-block-navigation__responsive-container-open::before,
.beo-nav .wp-block-navigation__responsive-container-close::before {
	content: ""; position: absolute; left: 0; background: currentColor;
	-webkit-mask: var(--beo-icon) center / contain no-repeat; mask: var(--beo-icon) center / contain no-repeat;
}

/* ---------- Top bar (phone + email) ---------- */
.beo-topbar { background: #cd5c5c; color: #fff; font-size: 12px; position: relative; z-index: 2; }
.beo-topbar__info { padding: 9px 0; line-height: 13px; font-weight: 600; }
.beo-topbar a { color: #fff; }
.beo-topbar a:hover { opacity: .7; }
.beo-topbar__phone, .beo-topbar__email { position: relative; }
.beo-topbar__phone { margin-right: 13px; padding-left: 14px; }
.beo-topbar__email { padding-left: 16px; }
/* glyph box = 12px em; Divi draws the phone 2px lower (top:2px) */
.beo-topbar__phone::before { --beo-icon: url(icons/phone.svg); top: 3.6px; width: 12px; height: 12px; }
.beo-topbar__email::before { --beo-icon: url(icons/envelope.svg); top: 1.6px; width: 12px; height: 12px; }

/* ---------- Main header (logo + menu) ---------- */
.beo-header { background: #fff; position: relative; z-index: 1; transition: box-shadow .4s ease-in-out; }
.beo-header__inner { position: relative; height: 90px; align-items: flex-start; transition: height .4s ease-in-out; }
/* .beo-header__inner > : beats core's `.is-layout-flex > * { margin: 0 }`. 3.6px = the whitespace before Divi's logo link. */
.beo-header__inner > .beo-logo { margin: 18px 0 0 3.6px; line-height: 0; transition: margin .4s ease-in-out; }
/* aspect-ratio auto: use the file's 401x128, not the rounded width/height attributes */
.beo-logo img { height: 54px !important; width: auto !important; aspect-ratio: auto !important; max-width: none; transition: height .4s ease-in-out; }

/* nav.beo-nav: core copies the class onto the inner <ul> too */
nav.beo-nav { color: rgba(0, 0, 0, .6); padding-top: 20px; font-size: 14px; transition: padding .4s ease-in-out; }
.beo-nav .wp-block-navigation__container { gap: 23.64px; padding-right: 10px; align-items: flex-start; }
nav.beo-nav .wp-block-navigation-item__content {
	display: block; margin-top: 11px; padding: 0 0 45px; font-size: 16px; font-weight: 600; line-height: 14px;
	transition: all .4s ease-in-out; /* colour comes from nav.beo-nav: core forces color:inherit on links */
}
.beo-nav .wp-block-navigation-item__content:hover { opacity: .7; }
.beo-nav .current-menu-item > .wp-block-navigation-item__content,
.home .beo-nav .beo-nav-about > .wp-block-navigation-item__content { color: #cd5c5c; }

/* CALL NOW pill */
.beo-nav .beo-nav-call > .wp-block-navigation-item__content {
	margin-top: 0; padding: 13px 16px; font-size: 12px; line-height: 9px; text-transform: uppercase;
	color: #cc9e94; border: 2px solid #cc9e94; border-radius: 50px; transition: all .5s ease;
}
.beo-nav .beo-nav-call > .wp-block-navigation-item__content:hover { opacity: 1; color: #fff; background: #cc9e94; }

/* ---------- Desktop: fixed header that shrinks on scroll (header.js sets body.beo-scrolled) ---------- */
@media (min-width: 981px) {
	.beo-site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 99999; }
	.beo-main { padding-top: 121px; }
	.admin-bar .beo-site-header { top: 32px; }

	.beo-scrolled .beo-header { box-shadow: 0 0 30px rgba(7, 51, 84, .17); }
	.beo-scrolled .beo-header__inner { height: 58px; }
	.beo-scrolled .beo-header__inner > .beo-logo { margin-top: 11.6px; }
	.beo-scrolled .beo-logo img { height: 34.8px !important; }
	.beo-scrolled nav.beo-nav { padding-top: 10px; }
	.beo-scrolled .beo-nav .wp-block-navigation-item__content { font-size: 15px; padding-bottom: 23px; }
	.beo-scrolled .beo-nav .beo-nav-call > .wp-block-navigation-item__content {
		font-size: 12px; padding: 13px 16px; color: #fff; background: #cc9e94; box-shadow: 0 5px 20px #d6dee4;
	}
	.beo-scrolled .beo-nav .beo-nav-call > .wp-block-navigation-item__content:hover { box-shadow: 0 5px 20px #aab9c3; }
}

/* ---------- Tablet + phone: header scrolls away, menu collapses to the hamburger ---------- */
@media (max-width: 980px) {
	.beo-site-header { position: relative; z-index: 99999; margin-bottom: -1px; } /* Divi overlaps content by 1px */
	.beo-header__inner { height: 76px; }
	.beo-header__inner > .beo-logo { margin-top: 17.5px; }
	.beo-logo img { height: 41px !important; }

	/* core collapses at 600px; Divi at 980px */
	.beo-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: block; }
	.beo-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
	nav.beo-nav { position: static; padding-top: 0; }

	/* hamburger: ETmodules "a" glyph, 32px, Divi red */
	.beo-nav .wp-block-navigation__responsive-container-open,
	.beo-nav .wp-block-navigation__responsive-container-close {
		position: relative; width: 32px; height: 32px; margin: 20px 0 0; padding: 0; color: #cd5c5c; background: none; border: 0; cursor: pointer;
	}
	.beo-nav .wp-block-navigation__responsive-container-open svg,
	.beo-nav .wp-block-navigation__responsive-container-close svg { display: none; }
	.beo-nav .wp-block-navigation__responsive-container-open::before { --beo-icon: url(icons/menu.svg); top: 0; width: 32px; height: 32px; }

	/* open menu: Divi dropdown under the header (not core's full-screen overlay) */
	html.has-modal-open { overflow: visible; }
	.beo-nav .wp-block-navigation__responsive-container.is-menu-open {
		position: absolute; top: 100%; left: 0; right: 0; bottom: auto; height: auto; overflow: visible;
		padding: 5%; background: #fff; border-top: 3px solid #cd5c5c; box-shadow: 0 2px 5px rgba(0, 0, 0, .1); animation: none;
	}
	.beo-nav .is-menu-open .wp-block-navigation__responsive-close,
	.beo-nav .is-menu-open .wp-block-navigation__responsive-dialog { max-width: none; margin: 0; padding: 0; position: static; }
	/* close button sits exactly over the hamburger so the same spot toggles the menu */
	.beo-nav .is-menu-open .wp-block-navigation__responsive-container-close { position: absolute; top: calc(-76px + 20px - 3px); right: 0; margin: 0; }
	.beo-nav .wp-block-navigation__responsive-container-close::before { --beo-icon: url(icons/menu.svg); top: 0; width: 32px; height: 32px; }
	.beo-nav .is-menu-open .wp-block-navigation__responsive-container-content { padding: 0; align-items: stretch; }
	.beo-nav .is-menu-open .wp-block-navigation__container { flex-direction: column; align-items: stretch; gap: 0; padding: 0; }
	.beo-nav .is-menu-open .wp-block-navigation-item { display: block; width: 100%; text-align: center; }
	/* Divi dropdown items: #666, no divider, no red current item (that is desktop-only) */
	.beo-nav .is-menu-open .wp-block-navigation-item .wp-block-navigation-item__content {
		display: block; width: 100%; margin: 0; padding: 10px 5%; text-align: center; font-size: 14px; font-weight: 600; line-height: 23px; color: #666; border: 0;
	}
	.beo-nav .is-menu-open .wp-block-navigation-item .wp-block-navigation-item__content:hover { opacity: .7; background: transparent; }
	.beo-nav .is-menu-open .beo-nav-call > .wp-block-navigation-item__content {
		padding: 13px 16px; font-size: 12px; line-height: 9px; color: #cc9e94; border: 2px solid #cc9e94;
	}

	.beo-footer__info { text-align: center; }
}

@media (max-width: 767px) {
	.beo-topbar__info { text-align: center; }
}

/* ---------- Footer ---------- */
/* #222 under rgba(0,0,0,.32) in Divi = #171717 */
.beo-footer { background: #171717; padding-top: 15px; padding-bottom: 5px; }
.beo-footer__info { color: #666; padding-bottom: 10px; line-height: 23.8px; }
