/*
 * jel-layout.css — theme 2.0.7
 * Shared layout moved from staging wp_block 368 (style#jel-l1, 5001 characters).
 * Each @media query is closed at its own boundary. None are nested.
 * Firm facts (phone, addresses, disclaimer, copyright) are HTML in functions.php.
 */

/* ---------- F2: containers ---------- */
body.page {
	--global-content-width: 1100px;
	--global-content-wide-width: 1100px;
	--global-calc-content-width: 1100px;
	--global-calc-wide-content-width: 1100px;
	--wp--style--global--content-size: 1100px;
	--wp--style--global--wide-size: 1100px;
}
body.single {
	--global-content-width: 680px;
	--global-content-wide-width: 680px;
	--global-calc-content-width: 680px;
	--global-calc-wide-content-width: 680px;
	--wp--style--global--content-size: 680px;
	--wp--style--global--wide-size: 680px;
}

/* Section backgrounds stay full width. Only the inner measure is capped.
   Direct marketing sections cannot use width:100%: Kadence still applies
   its alignfull margins, so the background stays inside the boxed column.
   --scrollbar-offset is Kadence's inline measurement (innerWidth - clientWidth).
   With scripts blocked that variable is unset, so the fallback is the main
   column's container width (100cqi). That is the layout viewport, and it is
   not a hardcoded scrollbar width. Articles keep the 680px cap below. */
body.page #inner-wrap {
	container-type: inline-size;
	container-name: jel-viewport;
}
body.page .entry-content > .alignfull {
	width: calc(100vw - var(--scrollbar-offset, (100vw - 100cqi)));
	max-width: none;
	margin-left: calc(50% - (100vw - var(--scrollbar-offset, (100vw - 100cqi))) / 2);
	margin-right: calc(50% - (100vw - var(--scrollbar-offset, (100vw - 100cqi))) / 2);
}
body.single .alignfull {
	max-width: none;
	width: 100%;
}

body.page .wp-site-blocks .content-container .alignwide:not(.alignfull),
body.page .entry-content .alignwide:not(.alignfull),
body.page .jel-measure {
	box-sizing: border-box;
	width: 100%;
	max-width: 1100px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}
body.single .content-container.site-container,
body.single .wp-site-blocks .content-container .alignwide:not(.alignfull),
body.single .entry-content .alignwide:not(.alignfull),
body.single .jel-measure {
	box-sizing: border-box;
	width: 100%;
	max-width: 680px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* ---------- Title band and section rhythm (from block 368) ---------- */
body:has(.entry-content h1) .entry-hero {
	display: none;
}
body:not(:has(.entry-content h1)) .entry-hero .entry-hero-container-inner {
	padding-top: 1.15rem !important;
	padding-bottom: 1.15rem !important;
	min-height: 0 !important;
}
body:not(:has(.entry-content h1)) .entry-hero .entry-title {
	margin: 0;
	font-size: clamp(1.45rem, 1.1rem + 1vw, 1.8rem);
	line-height: 1.25;
}
.content-area {
	margin-top: 3rem !important;
	margin-bottom: 3.5rem !important;
}
body:has(.entry-hero) .content-area {
	margin-top: 0 !important;
}
.entry-content > .jel-section:first-child:not(.jel-hero) {
	padding-top: 56px !important;
	padding-bottom: 56px !important;
}

/* ---------- Header phone ---------- */
#main-header .site-header-item:has(.jel-header-phone) {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}
#main-header .jel-header-phone {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 650;
	line-height: 1.3;
	white-space: nowrap;
}
#main-header .jel-header-phone a {
	color: #002552;
	font-weight: 650;
	text-decoration: none;
}
#main-header .jel-header-phone a:hover {
	text-decoration: underline;
}
/* Menu item 392 is the same tel link. Hide it on the desktop bar so the hook is the one phone. The drawer copy stays. */
#main-header #primary-menu > li:has(> a[href^="tel:"]) {
	display: none;
}

/* ---------- Footer (real HTML; no generated content) ---------- */
.site-footer {
	background: #001A3B;
	color: #fff;
}
.site-footer .site-bottom-footer-wrap {
	background: #001A3B;
	color: #fff;
	padding: 28px 0 32px;
}
.site-footer a {
	color: #fff;
}
.site-footer .footer-html-inner > p {
	display: none;
}
.jel-site-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem 2.5rem;
	color: #fff;
}
.jel-site-footer-contact {
	flex: 1 1 22rem;
}
.jel-site-footer-phone,
.jel-site-footer-address,
.jel-site-footer-disclaimer,
.jel-site-footer-copy {
	display: block;
	margin: 0 0 0.35rem;
	font-size: 1.0625rem;
	line-height: 1.5;
	font-weight: 500;
}
.jel-site-footer-phone a {
	color: #fff;
	font-weight: 650;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.jel-site-footer-nav {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	margin: 0;
}
.jel-site-footer-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: #fff !important;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.jel-site-footer-disclaimer,
.jel-site-footer-copy {
	flex-basis: 100%;
	max-width: 40rem;
	margin-top: 0.35rem;
	font-size: 0.9375rem;
	line-height: 1.45;
	font-weight: 400;
}
/* Until block 368 is removed, its stylesheet still paints facts and parks a nav. */
.site-footer .footer-html-inner::before,
.site-footer .footer-html-inner::after {
	content: none !important;
	display: none !important;
}
.jel-l1-foot {
	display: none !important;
}

/* ---------- Location, team, offices, Learn ---------- */
.jel-location-header .wp-block-columns {
	align-items: flex-start !important;
}
.jel-location-header .wp-block-column {
	align-self: flex-start;
}
.jel-location-header img {
	max-height: 420px;
	object-fit: cover;
	object-position: center top;
}

.jel-offices .jel-card-grid {
	display: flex !important;
	flex-direction: column;
	gap: 2.5rem;
}
.jel-team-attorneys .jel-attorney,
.jel-team-staff .jel-attorney {
	display: flex;
	flex-direction: column;
	margin: 0;
}
.jel-team-attorneys .jel-attorney > .wp-block-column,
.jel-team-staff .jel-attorney > .wp-block-column {
	flex-basis: auto !important;
	width: 100%;
}
.jel-team-grid .wp-block-image img {
	width: 100%;
	height: auto;
}

body.page-id-60 .jel-learn-articles .is-style-jel-card p {
	margin: 0.45rem 0 0;
	font-size: 0.98rem;
	line-height: 1.45;
}

/* 390: one column. Closed here. */
@media (max-width: 781px) {
	.jel-team-attorneys .alignwide,
	.jel-team-staff .alignwide {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr);
		gap: 1.25rem 1rem;
		align-items: start;
	}
	.jel-team-attorneys .alignwide > h2,
	.jel-team-staff .alignwide > h2 {
		grid-column: 1 / -1;
	}
	body.page-id-60 .jel-learn-articles .jel-card-grid {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: 1rem;
	}
}

/* 820: two columns. The old block nested this inside min-width 1025px, so it never ran. Closed here. */
@media (min-width: 782px) and (max-width: 1024px) {
	.jel-team-attorneys .alignwide,
	.jel-team-staff .alignwide {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.25rem 1rem;
		align-items: start;
	}
	.jel-team-attorneys .alignwide > h2,
	.jel-team-staff .alignwide > h2 {
		grid-column: 1 / -1;
	}
}

/* Bellevue card: text and photos side by side from 782px up, including 820 and 1440. Closed here. */
@media (min-width: 782px) {
	.jel-offices .jel-card-grid > .wp-block-group:nth-child(2) {
		display: grid !important;
		grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
		column-gap: 1.75rem;
		align-items: start;
	}
	.jel-offices .jel-card-grid > .wp-block-group:nth-child(2) > .wp-block-image {
		grid-column: 2;
	}
	.jel-offices .jel-card-grid > .wp-block-group:nth-child(2) > .wp-block-image:first-of-type {
		grid-row: 1 / span 8;
	}
	.jel-offices .jel-card-grid > .wp-block-group:nth-child(2) > :not(.wp-block-image) {
		grid-column: 1;
	}
	.jel-offices img {
		width: 100%;
		max-height: 420px;
		object-fit: cover;
		object-position: center top;
	}
}

/* Learn: two columns through 1100px, including 820. Closed here. */
@media (min-width: 782px) and (max-width: 1100px) {
	body.page-id-60 .jel-learn-articles .jel-card-grid {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 1rem;
	}
}

/* Learn: four columns above 1100px, including 1440. Closed here. */
@media (min-width: 1101px) {
	body.page-id-60 .jel-learn-articles .jel-card-grid {
		display: grid !important;
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
		gap: 1rem;
	}
}

/* Desktop header. Closed here. */
@media (min-width: 1025px) {
	.main-navigation .primary-menu-container > ul > li > a {
		font-size: 1.0625rem;
	}
	.jel-team-attorneys .alignwide,
	.jel-team-staff .alignwide {
		display: grid !important;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 1.25rem 1rem;
		align-items: start;
	}
	.jel-team-attorneys .alignwide > h2,
	.jel-team-staff .alignwide > h2 {
		grid-column: 1 / -1;
	}
	body.page-id-56 .header-button-wrap {
		display: none !important;
	}
}

/* Mobile tap-to-call beside the hamburger. Closed here. Applies at 390 and 820. */
@media (max-width: 1024px) {
	#mobile-header .site-header-main-section-right {
		display: flex !important;
		align-items: center !important;
		justify-content: flex-end !important;
		width: auto !important;
		flex: 0 0 auto !important;
		overflow: visible !important;
	}
	#mobile-header .site-header-item-navgation-popup-toggle {
		display: flex;
		align-items: center;
	}
	#mobile-header .jel-l1b-call {
		display: inline-flex !important;
		flex: 0 0 44px !important;
		align-items: center;
		justify-content: center;
		width: 44px !important;
		min-width: 44px !important;
		height: 44px !important;
		color: #001A3B !important;
		text-decoration: none;
	}
	#mobile-header .jel-l1b-call svg {
		width: 22px !important;
		height: 22px !important;
		display: block !important;
	}
}
