/**
 * Glacial Blocks — shared front-end + editor-canvas styles.
 * Design values come from css/webflow.css (Dignity Health / Agave Surgery export); this file only
 * lays out the composable blocks. Collapse point for two-column layouts = 767px (the export's
 * .par-48 / .grid-6 breakpoint).
 */

/* ---------- 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; } }

/* ---------- Section ---------- */
.gl-section {
	padding-top: clamp(48px, 7vw, 110px);
	padding-bottom: clamp(48px, 7vw, 110px);
}

.gl-section > .gl-section__inner {
	max-width: var(--gl-max-width, 1350px);
}

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

.gl-section--tint { background-color: #0000000d; }
.gl-section--peach { background-color: var(--color-6); }
.gl-section--teal { background-color: var(--color-3); color: var(--color); }

.gl-section--teal h2,
.gl-section--teal h3,
.gl-section--teal h4,
.gl-section--teal .eyebrow,
.gl-section--teal a:not(.button) { color: var(--color); }

/* Pages built from sections: the bands carry their own rhythm, so the inner wrapper's padding goes
   (an empty .related-pages-bottom div precedes the content, hence :has() rather than :first-child). */
.standard-inner-wrapper:has(> .gl-section) { padding-top: 0; padding-bottom: 0; }

.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; }

/* ---------- Section heading ---------- */
.gl-sec-head { margin-bottom: 30px; }
.gl-sec-head .eyebrow { margin-bottom: 8px; }
.gl-sec-head > h2, .gl-sec-head > h3, .gl-sec-head > h4 { margin-top: 0; margin-bottom: 0; }
.gl-sec-head--center { text-align: center; max-width: 900px; margin-left: auto; margin-right: auto; }
.gl-sec-head--center + .gl-buttons { justify-content: center; }
.gl-card + .gl-sec-head { margin-top: 50px; }
.gl-sec-head .gl-h-small { font-size: 1.5em; }

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

.gl-split:last-child { margin-bottom: 0; }
.gl-split > .img-div._48, .gl-split > .txt-div._48 { width: 48%; }
.gl-split > .img-div { min-height: 320px; align-self: stretch; }
.gl-split > .img-div .img { position: absolute; inset: 0; }
.gl-split > .txt-div { 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: 24px; }
	.gl-split > .img-div._48, .gl-split > .txt-div._48 { width: 100%; }
	.gl-split > .img-div { min-height: 240px; }
	.gl-split.gl-swap-mobile > :first-child { order: 2; }
	.gl-split.gl-swap-mobile > :last-child { order: 1; }
}

/* ---------- Grid / column / card ---------- */
.gl-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px 4%;
	margin-bottom: 30px;
}

.gl-grid--3 { grid-template-columns: 1fr 1fr 1fr; gap: 24px; }

@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 {
	display: flex;
	justify-content: flex-start;
	padding: 30px 24px;
}

.gl-card .h4-orange { margin-top: 0; margin-bottom: 12px; font-size: 1.3em; }
.gl-card__body { width: 100%; }
.gl-card__body ul, .gl-card__body ol { text-align: left; }
.gl-section--peach .gl-card.card { background-color: var(--color); }

/* ---------- Buttons ---------- */
.gl-buttons { flex-wrap: wrap; gap: 10px; margin-bottom: 30px; }
.gl-section--teal .gl-buttons .button.c-12, .gl-sec-head + .gl-buttons { margin-top: 0; }

.button.gl-btn {
	position: relative;
	display: inline-flex;
	overflow: hidden;
	isolation: isolate;
	color: var(--color);
}

.entry a.button.gl-btn, .entry a.button.gl-btn:hover { color: var(--color); }

.gl-btn .btn-bg {
	z-index: -1;
	transform: translate3d(-100%, 0, 0);
	transition: transform .35s ease;
}

.gl-btn:hover .btn-bg, .gl-btn:focus-visible .btn-bg { transform: none; }
.gl-btn .btn-icon-wrapper svg { width: 1.2rem; height: 1.2rem; transition: transform .25s ease; }
.gl-btn:hover .btn-icon-wrapper svg { transform: translateX(3px); }
.gl-btn:focus-visible { outline: 2px solid var(--color-4); outline-offset: 3px; }
.gl-section--teal .gl-btn { background-color: var(--color-4); }

/* ---------- Lists inside designed sections: orange check bullets ---------- */
.gl-section ul.wp-block-list { list-style: none; padding-left: 0; }
.gl-section ul.wp-block-list > li { position: relative; padding-left: 30px; margin-bottom: 8px; }
.gl-section ul.wp-block-list > li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: .55em;
	width: 14px;
	height: 8px;
	border-left: 2px solid var(--color-4);
	border-bottom: 2px solid var(--color-4);
	transform: rotate(-45deg);
}

.gl-section--teal ul.wp-block-list > li::before { border-color: var(--color); }

/* ---------- FAQ ---------- */
.gl-faq { margin-bottom: 30px; }

.gl-faq-item {
	border-bottom: 1px solid #0000001a;
}

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

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

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

.gl-faq-item[open] > .gl-faq-item__q::after { transform: rotate(45deg); }
.gl-faq-item__q:focus-visible { outline: 2px solid var(--color-4); outline-offset: 2px; }
.entry .gl-faq-item__title, .gl-faq-item__title { margin: 0; font-size: 1.25em; }
.gl-faq-item__a { padding-bottom: 20px; }

@media (prefers-reduced-motion: reduce) {
	.gl-btn .btn-bg, .gl-btn .btn-icon-wrapper svg, .gl-faq-item__q::after { transition: 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 { position: absolute; inset: 0; cursor: pointer; }
.editor-styles-wrapper .gl-img-placeholder { margin: auto; }

/* ---------- Offices ([glacial_location], [glacial_locations] — data from the locations CPT) ---------- */
.gl-location { align-items: center; }
.gl-location__map { width: 48%; border-radius: 15px; overflow: hidden; align-self: stretch; min-height: 300px; }
.gl-location__map iframe, .gl-locations__card .gl-location__map iframe { display: block; width: 100%; height: 100%; min-height: inherit; border: 0; }
.gl-location__address { font-size: 1.15em; }
.gl-location__contact a, .gl-locations__providers a { color: var(--color-3); }

.gl-locations { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 30px; }
.gl-locations__card { display: flex; flex-direction: column; background: var(--color-6); border-radius: 15px; overflow: hidden; }
.gl-locations__card .gl-location__map { width: 100%; min-height: 220px; border-radius: 0; }
.gl-locations__body { padding: 24px; display: flex; flex-direction: column; flex: 1; }
.gl-locations__body .gl-buttons { margin: auto 0 0; }
.entry .gl-location__name { margin: 0 0 12px; }
.gl-location__name a { color: inherit; }
.gl-location__name a:hover { color: var(--color-4); }
.gl-locations__providers { font-size: .9em; line-height: 1.6em; }

/* Appointments page: one full card per office ([glacial_offices]). */
.gl-offices { display: grid; gap: 32px; margin-top: 30px; }
.gl-office { display: grid; grid-template-columns: 1fr 1fr; background: var(--color); border: 1px solid #0000001a; border-radius: 15px; overflow: hidden; box-shadow: 0 8px 24px #0000000d; scroll-margin-top: 120px; }
.gl-office__info { padding: 36px; }
.entry .gl-office__name { margin: 0 0 18px; }
.gl-office__facts, .entry .gl-office__facts { list-style: none; margin: 0 0 24px; padding: 0; display: grid; gap: 12px; }
.gl-office__facts li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5em; }
.gl-office__icon { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--color-4); }
.gl-office__facts a { color: var(--color-3); font-weight: 600; }
.gl-office .gl-buttons { margin-bottom: 0; }
.gl-office .gl-location__map { width: 100%; min-height: 320px; border-radius: 0; }
.gl-office__team { grid-column: 1 / -1; padding: 24px 36px 30px; background: var(--color-6); }
.entry .gl-office__team-head { margin: 0 0 16px; font-size: 1.1em; }
.gl-office__providers, .entry .gl-office__providers { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 28px; }
.gl-office__provider { display: flex; align-items: center; gap: 12px; color: var(--color-2); }
.gl-office__provider img { width: 72px; height: 72px; flex: none; border-radius: 50%; object-fit: cover; object-position: 50% 15%; border: 3px solid var(--color); box-shadow: 0 2px 8px #0000001f; transition: transform .25s ease; }
.gl-office__provider:hover img, .gl-office__provider:focus-visible img { transform: scale(1.06); }
.gl-office__provider-name { display: block; font-weight: 600; line-height: 1.3em; }
.gl-office__provider:hover .gl-office__provider-name { color: var(--color-4); }
.gl-office__provider-cred { display: block; font-size: .85em; line-height: 1.3em; opacity: .75; }
.gl-office__provider:focus-visible { outline: 2px solid var(--color-4); outline-offset: 4px; border-radius: 4px; }

/* Secondary (outline) design button. */
.button.gl-btn--ghost { background-color: transparent; color: var(--color-3); box-shadow: inset 0 0 0 2px var(--color-3); }
.entry a.button.gl-btn--ghost { color: var(--color-3); }
.entry a.button.gl-btn--ghost:hover, .entry a.button.gl-btn--ghost:focus-visible { color: var(--color); box-shadow: inset 0 0 0 2px var(--color-4); }

@media (max-width: 991px) {
	.gl-locations { grid-template-columns: 1fr 1fr; }
	.gl-office { grid-template-columns: 1fr; }
	.gl-office .gl-location__map { min-height: 260px; }
}
@media (max-width: 767px) {
	.gl-office__info { padding: 24px 20px; }
	.gl-office__team { padding: 20px; }
	.gl-office .gl-buttons .button { width: 100%; }
	.gl-office__provider img { width: 60px; height: 60px; }
}
@media (max-width: 767px) {
	.gl-locations { grid-template-columns: 1fr; }
	.gl-location__map { width: 100%; min-height: 240px; }
}
.footer .location h4 a, .footer-location-link { color: inherit; text-decoration: none; }
.footer-location-link:hover { color: var(--color-4); }
.footer .map-div .gl-location__map { width: 100%; min-height: 200px; }
@media (min-width: 992px) { .footer .grid-5 { grid-template-columns: repeat(3, 1fr); } }

/* Cards without a number badge hold running text: left-align it (centred paragraphs read poorly). */
.gl-card.card:not(:has(> .icon-div)) { align-items: flex-start; text-align: left; }
.gl-card .gl-card__body > .gl-buttons { margin-top: 10px; margin-bottom: 0; }
