/**
 * Glacial Blocks — shared front-end + editor-canvas styles for Holmdel Eye Center.
 * Design tokens come from css/webflow.css (Holmdel export): --light-blue, --logo-blue, --bluegrey,
 * --dark-bg-color, --gold; Playfair Display headings, Google Sans Flex body, 5px radii,
 * letter-spaced grey eyebrows (.header_text). Collapse point for two-column layouts = 767px.
 *
 * Markup class names (button c-12, card, h4-orange, icon-div, img-div/txt-div _48) are shared with
 * the block library's save() output — they are styled here, not renamed.
 */

:root {
	--gl-tint: #eff2f5;
	--gl-sky: #eaf2fc;
	--gl-line: rgb(18 41 75 / 12%);
	--gl-radius: 8px;
	--gl-shadow: 0 10px 30px rgb(18 41 75 / 8%);
}

/* ---------- Device visibility ---------- */
@media (min-width: 992px) { .gl-hide-desktop { display: none !important; } }
@media (min-width: 768px) and (max-width: 991px) { .gl-hide-tablet { display: none !important; } }
@media (max-width: 767px) { .gl-hide-mobile { display: none !important; } }

/* ---------- Page wrapper: pages built from sections carry their own rhythm ---------- */
.innerpage_section:has(> .gl-section) { padding: 0; }
.innerpage_section:has(> .gl-section) > .related-pages-bottom:empty { display: none; }

/* ---------- Section ---------- */
.gl-section {
	position: relative;
	padding-top: clamp(56px, 7vw, 104px);
	padding-bottom: clamp(56px, 7vw, 104px);
}

.gl-section > .gl-section__inner {
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 5%;
	padding-right: 5%;
}

.gl-section.gl-space-none { padding-top: 0; padding-bottom: 0; }
.gl-section.gl-space-small { padding-top: clamp(32px, 4vw, 56px); padding-bottom: clamp(32px, 4vw, 56px); }
.gl-section.gl-space-large { padding-top: clamp(72px, 10vw, 140px); padding-bottom: clamp(72px, 10vw, 140px); }

.gl-section--tint { background-color: var(--gl-tint); }
.gl-section--sky { background-color: var(--gl-sky); }
.gl-section--navy {
	background-color: var(--dark-bg-color, #182333);
	background-image: radial-gradient(circle at 85% 0%, rgb(15 108 214 / 28%), transparent 55%);
	color: #e6ecf5;
}

.gl-section--navy h2,
.gl-section--navy h3,
.gl-section--navy h4,
.gl-section--navy strong { color: #fff; }
.gl-section--navy .eyebrow { color: #d7e9ff; }
.gl-section--navy a:not(.button) { color: #9cc7ff; }
.gl-section--navy a:not(.button):hover { color: #fff; }

.gl-section__inner > :last-child,
.gl-split__text > :last-child,
.gl-col > :last-child,
.gl-card__body > :last-child,
.gl-faq-item__a > :last-child { margin-bottom: 0; }

.entry .gl-section p, .entry .gl-section li { line-height: 175%; }

/* ---------- Section heading ---------- */
.gl-sec-head { margin-bottom: 32px; }

.gl-sec-head .eyebrow {
	margin-bottom: 12px;
	color: #7b8087;
	font-size: .85em;
	letter-spacing: 5px;
	text-transform: uppercase;
}

.entry .gl-sec-head > h2, .entry .gl-sec-head > h3, .entry .gl-sec-head > h4,
.gl-sec-head > h2, .gl-sec-head > h3, .gl-sec-head > h4 { margin-top: 0; margin-bottom: 0; }

.gl-sec-head > h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.2; }
.gl-sec-head > h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); line-height: 1.3; }

/* Accent rule under every section heading */
.gl-sec-head::after {
	content: "";
	display: block;
	width: 56px;
	height: 3px;
	margin-top: 18px;
	border-radius: 3px;
	background: var(--light-blue, #0f6cd6);
}

.gl-sec-head--center { text-align: center; max-width: 860px; margin-left: auto; margin-right: auto; }
.gl-sec-head--center::after { margin-left: auto; margin-right: auto; }
.gl-sec-head--center + .gl-buttons, .gl-sec-head--center ~ .gl-buttons:last-child { justify-content: center; }
.gl-section--navy .gl-sec-head::after { background: var(--gold, #ffe6b1); }
.gl-sec-head .gl-h-small { font-size: 1.5em; }
.gl-card + .gl-sec-head, .gl-grid + .gl-sec-head, .gl-faq + .gl-sec-head, p + .gl-sec-head, .wp-block-list + .gl-sec-head { margin-top: 56px; }

/* Centered section intros: the copy that follows sits centred too */
.gl-section__inner > .gl-sec-head--center ~ p { max-width: 820px; margin-left: auto; margin-right: auto; text-align: center; }
.gl-section__inner > .gl-sec-head--center ~ .gl-buttons { justify-content: center; }

/* ---------- Split (photo + text) ---------- */
.gl-split {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 6%;
	margin-bottom: 56px;
}

.gl-split:last-child { margin-bottom: 0; }
.gl-split > .img-div._48 { width: 44%; }
.gl-split > .txt-div._48 { width: 50%; }

.gl-split > .img-div {
	position: relative;
	align-self: stretch;
	min-height: 360px;
}

/* Offset blue frame behind the photo */
.gl-split > .img-div::before {
	content: "";
	position: absolute;
	inset: 22px -22px -22px 22px;
	border: 2px solid var(--light-blue, #0f6cd6);
	border-radius: var(--gl-radius);
	opacity: .35;
}

.gl-split > .img-div .img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: var(--gl-radius);
	box-shadow: var(--gl-shadow);
}

.gl-split.gl-swap-desktop > .img-div::before { inset: 22px 22px -22px -22px; }

/* Portrait photos (flagged in includes/holmdel.php): keep the face in frame */
.gl-split > .img-div.gl-portrait .img { object-position: 50% 15%; }
.gl-section--navy .gl-split > .img-div::before { border-color: var(--gold, #ffe6b1); }
.gl-split > .txt-div { display: flex; flex-direction: column; justify-content: center; }

@media (min-width: 768px) {
	.gl-split.gl-swap-desktop > :first-child { order: 2; }
	.gl-split.gl-swap-desktop > :last-child { order: 1; }
}

@media (max-width: 767px) {
	.gl-split { flex-direction: column; gap: 40px; }
	.gl-split > .img-div._48, .gl-split > .txt-div._48 { width: 100%; }
	.gl-split > .img-div { min-height: 260px; width: calc(100% - 22px) !important; }
	.gl-split.gl-swap-desktop > .img-div::before { inset: 22px -22px -22px 22px; }
	.gl-split.gl-swap-mobile > :first-child { order: 2; }
	.gl-split.gl-swap-mobile > :last-child { order: 1; }
	.gl-split > .img-div.gl-portrait { aspect-ratio: 4 / 5; max-height: 520px; }
}

/* ---------- Grid / column / card ---------- */
.gl-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
	margin-bottom: 32px;
}

.gl-grid--3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 991px) {
	.gl-grid--3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
	.gl-grid, .gl-grid--3 { grid-template-columns: 1fr; }
}

.gl-card.card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 32px 28px;
	border-radius: var(--gl-radius);
	border-top: 4px solid var(--light-blue, #0f6cd6);
	background: #fff;
	box-shadow: var(--gl-shadow);
	transition: transform .25s ease, box-shadow .25s ease;
}

.gl-card.card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgb(18 41 75 / 12%); }
.gl-section--white .gl-card.card { background: var(--gl-tint); box-shadow: none; }
.gl-section--white .gl-card.card:hover { box-shadow: var(--gl-shadow); }

.gl-section--navy .gl-card.card {
	background: rgb(255 255 255 / 6%);
	border-top-color: var(--gold, #ffe6b1);
	box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%);
}

.entry .gl-card .h4-orange, .gl-card .h4-orange {
	margin: 0 0 12px;
	color: var(--logo-blue, #12294b);
	font-family: Playfair Display, sans-serif;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.3;
}

.gl-section--navy .gl-card .h4-orange { color: #fff; }

.gl-card .icon-div {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin-bottom: 18px;
	border-radius: 50%;
	background: var(--light-blue, #0f6cd6);
	color: #fff;
	font-weight: 600;
}

.gl-section--navy .gl-card .icon-div { background: var(--gold, #ffe6b1); color: var(--logo-blue, #12294b); }
.gl-card__body { width: 100%; }
.gl-card .gl-card__body > .gl-buttons { margin-top: 10px; margin-bottom: 0; }

/* ---------- Buttons ---------- */
.gl-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.gl-sec-head + .gl-buttons { margin-top: 0; }

.button.gl-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	overflow: hidden;
	isolation: isolate;
	padding: 15px 26px;
	border-radius: 5px;
	background-color: var(--light-blue, #0f6cd6);
	color: #fff;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
}

.entry a.button.gl-btn, .entry a.button.gl-btn:hover { color: #fff; }

.gl-btn .btn-bg {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--logo-blue, #12294b);
	transform: translate3d(-101%, 0, 0);
	transition: transform .35s ease;
}

.gl-btn:hover .btn-bg, .gl-btn:focus-visible .btn-bg { transform: none; }
.gl-btn .btn-icon-wrapper { display: inline-flex; }
.gl-btn .btn-icon-wrapper svg { width: 1.1rem; height: 1.1rem; transition: transform .25s ease; }
.gl-btn:hover .btn-icon-wrapper svg { transform: translateX(3px); }
.gl-btn:focus-visible { outline: 2px solid var(--logo-blue, #12294b); outline-offset: 3px; }

.gl-section--navy .button.gl-btn { background-color: #fff; }
.gl-section--navy .gl-btn .btn-bg { background: var(--gold, #ffe6b1); }
.entry .gl-section--navy a.button.gl-btn, .entry .gl-section--navy a.button.gl-btn:hover { color: var(--logo-blue, #12294b); }
.gl-section--navy .gl-btn:focus-visible { outline-color: #fff; }

/* ---------- Lists inside designed sections: blue check bullets ---------- */
.gl-section ul.wp-block-list, .gl-section .gl-checklist { list-style: none; padding-left: 0; }
.gl-section ul.wp-block-list > li { position: relative; padding-left: 32px; margin-bottom: 10px; }

.gl-section ul.wp-block-list > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: .35em;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--gl-sky) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f6cd6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.gl-section--sky ul.wp-block-list > li::before { background-color: #fff; }
.gl-section--navy ul.wp-block-list > li::before {
	background-color: rgb(255 255 255 / 12%);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffe6b1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* Long symptom/risk lists read better in two columns on wide screens */
@media (min-width: 768px) {
	.gl-section .gl-col ul.wp-block-list:has(> li:nth-child(7)),
	.gl-section__inner > ul.wp-block-list:has(> li:nth-child(7)) { columns: 2; column-gap: 40px; }
	.gl-section ul.wp-block-list:has(> li:nth-child(7)) > li { break-inside: avoid; }
}

/* ---------- FAQ ---------- */
.gl-faq { margin-bottom: 32px; border-top: 1px solid var(--gl-line); }

.gl-faq-item { border-bottom: 1px solid var(--gl-line); }

.gl-faq-item__q {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	padding: 22px 0;
	cursor: pointer;
	list-style: none;
}

.gl-faq-item__q::-webkit-details-marker { display: none; }

.gl-faq-item__q::after {
	content: "+";
	flex: 0 0 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--light-blue, #0f6cd6);
	color: #fff;
	font-size: 22px;
	line-height: 36px;
	text-align: center;
	transition: transform .2s ease, background-color .2s ease;
}

.gl-faq-item[open] > .gl-faq-item__q::after { transform: rotate(45deg); background: var(--logo-blue, #12294b); }
.gl-faq-item__q:focus-visible { outline: 2px solid var(--light-blue, #0f6cd6); outline-offset: 2px; }

.entry .gl-faq-item__title, .gl-faq-item__title {
	margin: 0;
	color: var(--logo-blue, #12294b);
	font-family: Google Sans Flex, sans-serif;
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.4;
}

.gl-faq-item__a { padding: 0 56px 22px 0; }
.gl-section--navy .gl-faq, .gl-section--navy .gl-faq-item { border-color: rgb(255 255 255 / 15%); }
.gl-section--navy .gl-faq-item__title { color: #fff; }

@media (prefers-reduced-motion: reduce) {
	.gl-btn .btn-bg, .gl-btn .btn-icon-wrapper svg, .gl-faq-item__q::after, .gl-card.card { transition: none; }
	.gl-card.card:hover { transform: none; }
}

/* ---------- Editor only ---------- */
.editor-styles-wrapper .gl-hide-desktop,
.editor-styles-wrapper .gl-hide-tablet,
.editor-styles-wrapper .gl-hide-mobile { display: revert !important; opacity: .55; }

.editor-styles-wrapper .gl-faq-item__a { display: block; }
.editor-styles-wrapper .gl-split > .img-div .img { cursor: pointer; }
.editor-styles-wrapper .gl-img-placeholder { margin: auto; }

/* ---------- Testimonials (core/quote inside designed sections) ---------- */
.gl-section .wp-block-quote {
	position: relative;
	height: 100%;
	margin: 0;
	padding: 56px 30px 30px;
	border: 0;
	border-radius: var(--gl-radius);
	background: #fff;
	box-shadow: var(--gl-shadow);
	color: #333;
	font-style: normal;
}

.gl-section .wp-block-quote::before {
	content: "\201C";
	position: absolute;
	top: 6px;
	left: 26px;
	color: var(--light-blue, #0f6cd6);
	font-family: Playfair Display, serif;
	font-size: 4.5rem;
	line-height: 1;
	opacity: .35;
}

.gl-section .wp-block-quote p { font-size: 1.05rem; line-height: 175%; }

.gl-section .wp-block-quote cite {
	display: block;
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid var(--gl-line);
	color: var(--logo-blue, #12294b);
	font-weight: 600;
	font-style: normal;
}

.gl-section .wp-block-quote cite::before { content: "\2605\2605\2605\2605\2605"; display: block; margin-bottom: 6px; color: #f5b301; letter-spacing: 2px; }

/* Numbered steps (core ordered list) */
.gl-section ol.wp-block-list { counter-reset: gl-step; list-style: none; padding-left: 0; }
.gl-section ol.wp-block-list > li { counter-increment: gl-step; position: relative; padding-left: 48px; margin-bottom: 16px; min-height: 34px; }
.gl-section ol.wp-block-list > li::before {
	content: counter(gl-step);
	position: absolute;
	left: 0;
	top: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--light-blue, #0f6cd6);
	color: #fff;
	font-weight: 600;
	line-height: 34px;
	text-align: center;
}

.gl-col > .gl-card + .gl-card { margin-top: 24px; height: auto; }
.gl-col > .gl-card { height: auto; }

/* Full-width cards holding a long list (e.g. accepted insurance plans): spread it out */
@media (min-width: 768px) {
	.gl-section__inner > .gl-card .gl-card__body > ul.wp-block-list:has(> li:nth-child(7)) { columns: 3; column-gap: 40px; }
	.gl-section__inner > .gl-card .gl-card__body > ul.wp-block-list > li { break-inside: avoid; }
}
