/* ==========================================================================
   Medical page – templates/page-iatriki.php (key: page-iatriki)
   Hero (title + intro + photo), sticky TOC + prose with inline CTAs, FAQ,
   gallery, related siblings, contact block (styles for the contact grid
   live in page-home.css and are duplicated here for inner pages).
   ========================================================================== */

/* Hero ---------------------------------------------------------------------- */
.be_med-hero { padding-top: 40px; padding-bottom: 64px; background: linear-gradient(180deg, var(--be-mist) 0%, var(--be-white) 100%); }
.be_med-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 40px 80px; align-items: center; }
.be_med-title { max-width: 16ch; }
.be_med-intro { margin-top: 26px; max-width: 620px; font: var(--be-lead); color: var(--be-muted); text-wrap: pretty; }
.be_med-intro p + p { margin-top: 0.8em; }
.be_med-actions { margin-top: 32px; }
.be_med-byline { display: flex; align-items: center; gap: 10px; margin-top: 28px; font: 500 13px/1.45 var(--be-font); color: var(--be-muted); }
.be_med-byline .be_icon { width: 20px; height: 20px; color: var(--be-teal); flex: 0 0 20px; }
.be_med-hero-media { position: relative; padding: 0 20px 20px 0; }
.be_med-hero-media::before { content: ""; position: absolute; inset: 20px 0 0 20px; border: 1px solid rgba(59, 143, 168, 0.45); border-radius: var(--be-radius); pointer-events: none; }
.be_med-hero-photo { border-radius: var(--be-radius); overflow: hidden; background: var(--be-teal-3); box-shadow: 0 30px 60px rgba(18, 40, 59, 0.14); }
.be_med-hero-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

@media (prefers-reduced-motion: no-preference) {
	.be_med-hero .be_breadcrumb, .be_med-hero .be_eyebrow, .be_med-title, .be_med-intro, .be_med-actions, .be_med-byline { animation: be-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
	.be_med-hero .be_eyebrow { animation-delay: 0.08s; }
	.be_med-title { animation-delay: 0.16s; }
	.be_med-intro { animation-delay: 0.28s; }
	.be_med-actions { animation-delay: 0.4s; }
	.be_med-byline { animation-delay: 0.5s; }
	.be_med-hero-photo { animation: be-photo 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both; }
	.be_med-hero-media::before { animation: be-frame 1s ease 0.7s both; }
}
@keyframes be-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes be-photo { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes be-frame { from { opacity: 0; transform: translate(-10px, -10px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
	.be_med-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 32px 40px; }
}
@media (max-width: 860px) {
	.be_med-hero { padding-top: 28px; padding-bottom: 44px; }
	.be_med-hero-grid { grid-template-columns: 1fr; }
	.be_med-title { max-width: none; }
	.be_med-hero-media { padding: 0 14px 14px 0; }
	.be_med-hero-media::before { inset: 14px 0 0 14px; }
	.be_med-hero-photo img { aspect-ratio: 3 / 2; }
}
@media (max-width: 700px) {
	.be_med-intro { margin-top: 18px; }
	.be_med-actions { margin-top: 24px; }
	.be_med-actions .be_btn { width: 100%; }
}

/* Body: sticky TOC + prose ------------------------------------------------- */
.be_med-body { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 760px); gap: 48px 96px; align-items: start; }
.be_med-toc {
	position: sticky;
	top: calc(var(--be-header-h) + 24px);
	max-height: calc(100vh - var(--be-header-h) - 48px); /* never taller than the viewport: scrolls inside */
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--be-line) transparent;
	border-top: 1px solid var(--be-line);
	padding-right: 12px;
}
.be_med-toc::-webkit-scrollbar { width: 6px; }
.be_med-toc::-webkit-scrollbar-thumb { background: var(--be-line); border-radius: 3px; }
.be_med-toc-title { padding: 16px 0 10px; font: 500 12px/1 var(--be-font); letter-spacing: 0.16em; text-transform: uppercase; color: var(--be-teal-2); }
.be_med-toc ol { list-style: none; counter-reset: toc; display: grid; gap: 2px; }
.be_med-toc li { counter-increment: toc; }
.be_med-toc a { display: flex; gap: 12px; padding: 8px 0; font: 400 14.5px/1.4 var(--be-font); color: var(--be-muted); text-decoration: none; transition: color 0.2s ease; }
.be_med-toc ol a::before { content: counter(toc, decimal-leading-zero); flex: 0 0 24px; font: 400 12px/1.7 var(--be-font-display); color: var(--be-teal-2); }
.be_med-toc a:hover, .be_med-toc a.is-current { color: var(--be-navy); }
.be_med-toc a.is-current::before { color: var(--be-navy); font-weight: 600; }
.be_med-toc a.is-current { font-weight: 600; }
@media (max-height: 760px) {
	.be_med-toc a { padding: 5px 0; font-size: 13.5px; }
	.be_med-toc-title { padding: 12px 0 8px; }
}
.be_med-toc-call { display: grid; gap: 4px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--be-line); font: 500 12px/1.4 var(--be-font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--be-muted); }
.be_med-toc-call a { font: 500 22px/1.2 var(--be-font-display); letter-spacing: 0; text-transform: none; color: var(--be-navy); text-decoration: none; }

.be_prose { font: 400 17.5px/1.7 var(--be-font); color: var(--be-text); }
.be_prose > * + * { margin-top: 1.1em; }
.be_prose h2 { margin-top: 2.2em; padding-top: 1.1em; border-top: 1px solid var(--be-line); font: 500 30px/1.22 var(--be-font-display); scroll-margin-top: calc(var(--be-header-h) + 24px); }
.be_prose > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.be_prose h3 { margin-top: 1.6em; font: 500 22px/1.35 var(--be-font-display); scroll-margin-top: calc(var(--be-header-h) + 24px); }
.be_prose ul, .be_prose ol { padding-left: 1.3em; }
.be_prose li + li { margin-top: 0.45em; }
.be_prose li::marker { color: var(--be-teal); }
.be_prose a { color: var(--be-teal-2); text-decoration: underline; text-underline-offset: 3px; }
.be_prose strong { color: var(--be-navy); }
.be_prose img { width: 100%; height: auto; border-radius: var(--be-radius); }
.be_prose table { width: 100%; font: 400 15px/1.5 var(--be-font); border-collapse: collapse; }
.be_prose th, .be_prose td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--be-line); text-align: left; vertical-align: top; }
.be_prose th { font-weight: 600; color: var(--be-navy); }

	display: grid;
	grid-template-columns: auto minmax(0, 1fr) auto;
	gap: 18px 24px;
	align-items: center;
	margin: 2.4em 0;
	padding: 28px 30px;
	border-radius: var(--be-radius);
	background: var(--be-navy-2);
	color: var(--be-white);
	background-image: radial-gradient(500px 240px at 100% 0%, rgba(59, 143, 168, 0.35), transparent 65%);
}

/* Gallery (before/after) */
.be_med-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 2.4em; }
.be_med-gallery-item { margin: 0; }
.be_med-gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--be-radius); }
.be_med-gallery-item figcaption { margin-top: 10px; font: var(--be-small); color: var(--be-muted); }

/* FAQ (shares the .be_faq-* look of the homepage) */
.be_med-faq { margin-top: 3em; }
.be_med-faq h2 { padding-top: 0; border-top: 0; margin-bottom: 0.8em; }
.be_faq-list { display: grid; border-top: 1px solid var(--be-line); }
.be_faq-item { border-bottom: 1px solid var(--be-line); }
.be_faq-q { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; font: 500 20px/1.3 var(--be-font-display); color: var(--be-navy); transition: color 0.2s ease; }
.be_faq-q:hover { color: var(--be-teal-2); }
.be_faq-q::-webkit-details-marker { display: none; }
.be_faq-chev { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--be-line); position: relative; transition: transform 0.25s ease, border-color 0.2s ease; }
.be_faq-chev::before { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; background: var(--be-navy); -webkit-mask: url("../../img/icon-chevron.svg") center / contain no-repeat; mask: url("../../img/icon-chevron.svg") center / contain no-repeat; }
.be_faq-item[open] .be_faq-chev { transform: rotate(180deg); border-color: var(--be-teal); }
.be_faq-a { padding: 0 64px 24px 0; font: 400 16px/1.65 var(--be-font); color: var(--be-muted); }
.be_faq-a p + p { margin-top: 10px; }

@media (max-width: 1100px) {
	.be_med-body { grid-template-columns: 1fr; gap: 32px; }
	.be_med-toc { position: static; }
	.be_med-toc-call { display: none; }
}
@media (max-width: 700px) {
	.be_prose { font-size: 16.5px; }
	.be_prose h2 { font-size: 25px; }
	.be_prose h3 { font-size: 20px; }
	.be_med-gallery { grid-template-columns: 1fr; }
	.be_faq-q { padding: 18px 0; font-size: 18px; }
	.be_faq-a { padding: 0 0 18px; font-size: 15px; }
}

/* Related siblings ---------------------------------------------------------- */
.be_med-related-list { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 40px; border-top: 1px solid var(--be-line); }
.be_med-related-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--be-line); font: 500 18px/1.3 var(--be-font-display); color: var(--be-navy); text-decoration: none; transition: color 0.2s ease; }
.be_med-related-list a:hover { color: var(--be-teal-2); }
.be_med-related-list .be_icon { width: 18px; height: 18px; color: var(--be-teal); flex: 0 0 18px; transition: transform 0.2s ease; }
.be_med-related-list a:hover .be_icon { transform: translateX(4px); }
@media (max-width: 1100px) { .be_med-related-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .be_med-related-list { grid-template-columns: 1fr; } }

/* Contact block (copied from page-home.css so inner pages do not load it) ----- */
.be_contact { background: var(--be-white); border-top: 1px solid var(--be-line); }
.be_contact-grid { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 48px 96px; align-items: start; }
.be_contact-text { margin-top: 20px; font: var(--be-lead); color: var(--be-muted); text-wrap: pretty; max-width: 520px; }
.be_contact-phone { display: inline-flex; align-items: center; gap: 18px; margin-top: 32px; text-decoration: none; color: var(--be-navy); }
.be_contact-phone-icon { display: inline-flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--be-line); color: var(--be-teal); transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.be_contact-phone:hover .be_contact-phone-icon { background: var(--be-navy); border-color: var(--be-navy); color: var(--be-white); }
.be_contact-phone-icon .be_icon { width: 22px; height: 22px; }
.be_contact-phone-body { display: grid; gap: 4px; }
.be_contact-phone-label { font: 500 12px/1 var(--be-font); letter-spacing: 0.14em; text-transform: uppercase; color: var(--be-muted); }
.be_contact-phone strong { font: 500 28px/1.1 var(--be-font-display); color: var(--be-navy); }
.be_contact-phone[href^="tel"] { color: var(--be-navy); }
.be_contact-locations { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin-top: 36px; border-top: 1px solid var(--be-line); }
.be_location { display: flex; gap: 14px; padding: 20px 0; border-bottom: 1px solid var(--be-line); }
.be_location-icon { display: inline-flex; color: var(--be-teal); flex: 0 0 20px; margin-top: 2px; }
.be_location-icon .be_icon { width: 20px; height: 20px; }
.be_location-body { display: grid; gap: 4px; font: 400 14.5px/1.5 var(--be-font); color: var(--be-muted); }
.be_location-city { font: 500 19px/1.2 var(--be-font-display); color: var(--be-navy); }
.be_location-address { color: inherit; text-decoration: none; }
a.be_location-address:hover { color: var(--be-teal-2); text-decoration: underline; text-underline-offset: 3px; }
.be_location-phones { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.be_location-phones a { font-weight: 600; color: var(--be-navy); }
.be_contact-form-wrap { position: sticky; top: calc(var(--be-header-h) + 24px); }
.be_contact-form { padding: 40px; border-radius: var(--be-radius); background: var(--be-mist); }
.be_contact-form-title { font: 500 28px/1.2 var(--be-font-display); }
.be_contact-form-text { margin: 10px 0 26px; font: 400 15px/1.5 var(--be-font); color: var(--be-muted); }
.be_contact-form .wpcf7-form > button { width: 100%; padding: 19px 26px; }
.be_contact-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 18px; font: 400 13px/1.45 var(--be-font); color: var(--be-muted); }
.be_contact-note .be_icon { width: 18px; height: 18px; color: var(--be-teal); margin-top: 1px; }
@media (max-width: 1100px) { .be_contact-grid { grid-template-columns: 1fr; gap: 40px; } .be_contact-form-wrap { position: static; } }
@media (max-width: 700px) { .be_contact-locations { grid-template-columns: 1fr; margin-top: 28px; } .be_contact-form { padding: 24px 18px; } }
