/**
 * Szybka Terapia Onkologiczna – page template styles.
 * Loaded only on template-szybka-terapia-onkologiczna.php.
 * All selectors are prefixed with .sto- to avoid clashes with theme/Bootstrap.
 *
 * @package scanmed
 */
/* ==========================================================
   Design tokens (taken from theme style.css)
   ========================================================== */
.sto {
	--sto-red: #ED1C24;          /* brand red: icons, borders, large text */
	--sto-red-text: #D3141B;     /* darker red for small text & filled buttons (WCAG AA 5.4:1 on white) */
	--sto-bg-soft: #F7FAFF;      /* theme section background */
	--sto-line: #C6D9EA;         /* theme border colour */
	--sto-text: #000;
	--sto-muted: #707070;        /* theme body text grey (4.9:1 on white) */
	--sto-white: #fff;
	--sto-radius-lg: 25px;
	--sto-radius: 15px;
	--sto-radius-sm: 10px;
	--sto-shadow: 8px 8px 23px -17px rgba(66, 68, 90, 1); /* theme card shadow */
	--sto-header-offset: 0px;    /* set to sticky theme header height if needed */
	--sto-nav-h: 64px;
}

/* ==========================================================
   STO component styles (prefix .sto- to avoid theme/Bootstrap clashes)
   ========================================================== */
.sto { --container: 1200px; }

/* Theme overrides scoped to this template */
.sto, .sto *, .sto *::before, .sto *::after { box-sizing: border-box; }
.site-main.sto { padding-top: 0; background-color: #fff; }
.sto h1, .sto h2, .sto h3 { clear: none; }
.sto a:focus { outline: revert; }
.sto-container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.sto-skip { position: absolute; left: -9999px; top: 0; z-index: 1000; background: #fff; padding: 10px 16px; border: 2px solid var(--sto-red-text); border-radius: var(--sto-radius-sm); }
.sto-skip:focus { left: 16px; top: 16px; }

.sto :focus-visible { outline: 3px solid var(--sto-red-text); outline-offset: 3px; border-radius: 6px; }

/* ---------- Hero ---------- */
.sto-hero { background: var(--sto-bg-soft); padding: 24px 0 72px; }
.sto-breadcrumb { font-size: 13px; margin: 0 0 32px; color: var(--sto-text); }
.sto-breadcrumb a { text-decoration: none; }
.sto-breadcrumb a:hover { color: var(--sto-red-text); text-decoration: underline; }
.sto-hero h1 { font-size: clamp(28px, 4vw, 45px); font-weight: 700; line-height: 1.15; text-align: center; margin: 0 0 48px; }
.sto-hero__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.sto-hero__lead { font-size: 18px; font-weight: 300; color: var(--sto-muted); margin: 0 0 28px; max-width: 46ch; }
.sto-hero__lead p { font-size: inherit; color: inherit; margin: 0 0 1em; }
.sto-hero__lead p:last-child { margin-bottom: 0; }
.sto-hero__lead strong { color: var(--sto-text); font-weight: 500; }
.sto-hero__grid--single { grid-template-columns: minmax(0, 1fr); }
.sto-hero__media { border-radius: var(--sto-radius-lg); overflow: hidden; box-shadow: var(--sto-shadow); aspect-ratio: 16 / 9; background: #e9eff7; }
.sto-hero__img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Quick contact chip in hero */
.sto-quick { display: inline-flex; align-items: center; gap: 14px; background: #fff; border-radius: var(--sto-radius); padding: 14px 20px 14px 14px; box-shadow: var(--sto-shadow); text-decoration: none; color: var(--sto-text); }
.sto-quick__icon { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--sto-red); display: grid; place-items: center; }
.sto-quick__icon svg { width: 20px; height: 20px; }
.sto-quick__label { display: block; font-size: 13px; color: var(--sto-muted); }
.sto-quick__value { display: block; font-size: 18px; font-weight: 600; color: var(--sto-red-text); }
.sto-quick:hover .sto-quick__value { text-decoration: underline; }

/* ---------- Anchor navigation ---------- */
.sto-nav { position: sticky; top: var(--sto-header-offset); z-index: 50; background: rgba(255,255,255,.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--sto-line); }
.sto-nav__list { display: flex; gap: 8px; list-style: none; margin: 0 auto; padding: 10px 24px; max-width: var(--container); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.sto-nav__list::-webkit-scrollbar { display: none; }
.sto-nav__list li { flex: none; scroll-snap-align: start; }
.sto-nav__link { display: block; padding: 10px 18px; border: 1.2px solid var(--sto-line); border-radius: 999px; font-size: 15px; font-weight: 500; text-decoration: none; color: var(--sto-text); white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; }
.sto-nav__link:hover { border-color: var(--sto-red); color: var(--sto-red-text); }
.sto-nav__link[aria-current="true"] { background: var(--sto-red-text); border-color: var(--sto-red-text); color: #fff; }
.sto-nav__link--contact { border-color: var(--sto-red); color: var(--sto-red-text); }

/* ---------- Sections ---------- */
.sto-section { padding: 80px 0; scroll-margin-top: calc(var(--sto-header-offset) + var(--sto-nav-h)); }
.sto-section--soft { background: var(--sto-bg-soft); }
.sto-h2 { font-size: clamp(26px, 3vw, 36px); font-weight: 700; line-height: 1.2; margin: 0 0 12px; }
.sto-intro { font-size: 18px; font-weight: 300; color: var(--sto-muted); margin: 0 0 40px; max-width: 62ch; }
.sto-h3 { font-size: 20px; font-weight: 600; margin: 0 0 18px; }

/* Red-cross bullet (in theme: use uploads/2021/09/red-cross.svg) */
.sto-cross { flex: none; width: 14px; height: 14px; margin-top: .4em; background: var(--sto-red);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M5 0h4v5h5v4H9v5H5V9H0V5h5z'/%3E%3C/svg%3E") center/contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M5 0h4v5h5v4H9v5H5V9H0V5h5z'/%3E%3C/svg%3E") center/contain no-repeat; }

/* Benefits tiles */
.sto-benefits { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; list-style: none; margin: 0; padding: 0; }
.sto-benefit { background: #fff; border: 1px solid var(--sto-line); border-radius: var(--sto-radius-lg); padding: 28px 24px; box-shadow: var(--sto-shadow); }
.sto-benefit__icon { width: 56px; height: 56px; border-radius: 16px; background: #fff0f1; display: grid; place-items: center; margin-bottom: 20px; }
.sto-benefit__icon svg { width: 28px; height: 28px; stroke: var(--sto-red); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sto-benefit p { margin: 0; color: var(--sto-text); font-size: 16px; line-height: 1.45; }

/* Specialisations band */
.sto-band { background: var(--sto-bg-soft); border-radius: var(--sto-radius-lg); padding: 40px; display: grid; grid-template-columns: repeat(var(--sto-cols, 3), minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.sto-band__text { font-size: 20px; font-weight: 500; line-height: 1.4; margin: 0; align-self: stretch; display: flex; align-items: center; padding-right: 28px; border-right: 3px solid var(--sto-red); }
.sto-band__text:only-child { padding-right: 0; border-right: 0; }
.sto-spec { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; background: #fff; border-radius: var(--sto-radius); padding: 24px; text-decoration: none; color: var(--sto-text); border: 1.2px solid transparent; transition: border-color .15s, box-shadow .15s; }
.sto-spec:hover { border-color: var(--sto-red); box-shadow: 4px 1px 18px -8px var(--sto-red); }
.sto-spec__title { font-size: 20px; font-weight: 600; line-height: 1.25; }
.sto-spec__more { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--sto-red-text); font-weight: 500; }
.sto-spec__more svg { width: 22px; height: 22px; }

/* Grouped procedure tiles (surgery) */
.sto-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.sto-group { position: relative; overflow: hidden; background: #fff; border-radius: var(--sto-radius-lg); padding: 32px 28px 28px; box-shadow: var(--sto-shadow); }
.sto-group::before { content: ""; position: absolute; left: 28px; top: 0; width: 48px; height: 4px; background: var(--sto-red); border-radius: 0 0 4px 4px; }
.sto-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.sto-list li { display: flex; gap: 12px; font-size: 16px; font-weight: 300; line-height: 1.5; }
.sto-list li small { display: block; color: var(--sto-muted); font-size: 14px; }

/* Gynaecology: cancer tiles + procedure bars */
.sto-cancers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.sto-cancer .sto-cross { margin-top: 0; }
.sto-cancer { display: flex; align-items: center; gap: 14px; background: var(--sto-bg-soft); border: 1px solid var(--sto-line); border-radius: var(--sto-radius); padding: 22px 20px; font-size: 17px; font-weight: 500; }
.sto-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sto-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; background: #fff; border: 1px solid var(--sto-line); border-left: 5px solid var(--sto-red); border-radius: var(--sto-radius-sm); padding: 20px 24px; }
.sto-bar__text { margin: 0; font-size: 16px; font-weight: 300; line-height: 1.55; }
.sto-bar__text strong { font-weight: 600; }
.sto-tag { white-space: nowrap; font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 999px; background: var(--sto-bg-soft); border: 1px solid var(--sto-line); color: var(--sto-text); }

/* Diagnostics tiles */
.sto-diag { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; list-style: none; margin: 0; padding: 0; }
.sto-diag li { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 120px; background: #fff; border-radius: var(--sto-radius); padding: 22px; box-shadow: var(--sto-shadow); }
.sto-diag__name { font-size: 18px; font-weight: 600; line-height: 1.3; }
.sto-badge { align-self: flex-start; font-size: 12px; font-weight: 500; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--sto-red); color: var(--sto-red-text); }
.sto-badge--nfz { border-color: var(--sto-line); color: var(--sto-muted); }
.sto-diag__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.sto-badge--link { align-self: auto; display: inline-flex; align-items: center; min-height: 28px; padding: 4px 12px; text-decoration: none; transition: background-color .15s, color .15s; }
.sto-badge--link:hover, .sto-badge--link:focus-visible { background: var(--sto-red-text); border-color: var(--sto-red-text); color: #fff; }
.sto-bar--notag { grid-template-columns: minmax(0, 1fr); }

/* Blocks inside a section */
.sto-block + .sto-block { margin-top: 56px; }
.sto-block + .sto-block.sto-block--text { margin-top: 24px; }
.sto-block .sto-h3 + * { margin-top: 0; }

/* Rich text block */
.sto-text { color: var(--sto-muted); font-size: 15px; max-width: 70ch; }
.sto-text p, .sto-text li { font-size: inherit; color: inherit; }
.sto-text p { margin: 0 0 .75em; }
.sto-text > :last-child { margin-bottom: 0; }
.sto-text ul, .sto-text ol { padding-left: 1.25em; margin: 0 0 .75em; }
.sto-text a { color: var(--sto-red-text); font-weight: 500; text-decoration: underline; }

/* Fallback when no ACF sections */
.sto-fallback { padding-top: 60px; padding-bottom: 60px; }

.sto-links__grid--nologo { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* Contact (the strong moment of the page) */
.sto-contact:focus { outline: none; }
.sto-contact { padding: 80px 0; scroll-margin-top: calc(var(--sto-header-offset) + var(--sto-nav-h)); }
.sto-contact__card { background: var(--sto-red-text); color: #fff; border-radius: var(--sto-radius-lg); padding: 56px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; position: relative; overflow: hidden; }
.sto-contact__card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; background: rgba(255,255,255,.08);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M5 0h4v5h5v4H9v5H5V9H0V5h5z'/%3E%3C/svg%3E") center/contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M5 0h4v5h5v4H9v5H5V9H0V5h5z'/%3E%3C/svg%3E") center/contain no-repeat; pointer-events: none; }
.sto-contact h2 { color: #fff; }
.sto-contact__role { font-size: 16px; margin: 0 0 6px; opacity: .92; }
.sto-contact__name { font-size: 28px; font-weight: 600; margin: 0 0 16px; }
.sto-contact__hours { font-size: 15px; margin: 0; opacity: .92; }
.sto-contact__actions { display: grid; gap: 14px; position: relative; z-index: 1; }
.sto-btn { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: var(--sto-radius); text-decoration: none; font-size: 18px; font-weight: 500; transition: background-color .15s, color .15s; }
.sto-btn svg { flex: none; width: 24px; height: 24px; }
.sto-btn small { display: block; font-size: 13px; font-weight: 400; opacity: .85; }
.sto-btn--white { background: #fff; color: var(--sto-red-text); }
.sto-btn--white:hover { background: #fff0f1; }
.sto-btn--ghost { border: 1.2px solid rgba(255,255,255,.85); color: #fff; word-break: break-all; }
.sto-btn--ghost:hover { background: rgba(255,255,255,.12); }
.sto-contact .sto-btn:focus-visible { outline-color: #fff; }

/* Important links */
.sto-links { padding: 0 0 80px; }
.sto-links .sto-h2 { margin-bottom: 24px; }
.sto-links__grid { display: grid; grid-template-columns: 220px minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.sto-logo { display: grid; place-items: center; border: 1px solid var(--sto-line); border-radius: var(--sto-radius); padding: 16px; }
.sto-logo img { max-height: 90px; width: auto; }
.sto-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px; border: 1.2px solid var(--sto-line); border-radius: var(--sto-radius); text-decoration: none; color: var(--sto-text); transition: border-color .15s; }
.sto-link:hover { border-color: var(--sto-red); }
.sto-link__title { font-size: 17px; font-weight: 600; display: block; }
.sto-link__meta { font-size: 14px; color: var(--sto-muted); display: block; }
.sto-link svg { flex: none; width: 28px; height: 28px; stroke: var(--sto-red); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.sto-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { .sto * { transition: none !important; } }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.sto-hero__grid, .sto-contact__card { grid-template-columns: 1fr; }
	.sto-hero__media { order: -1; }
	.sto-band { grid-template-columns: 1fr 1fr; }
	.sto-band__text { grid-column: 1 / -1; padding: 0 0 20px; border-right: 0; border-bottom: 3px solid var(--sto-red); }
	.sto-band__text:only-child { padding-bottom: 0; border-bottom: 0; }
	.sto-groups { grid-template-columns: 1fr; }
	.sto-diag { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sto-cancers { grid-template-columns: 1fr 1fr; }
	.sto-links__grid { grid-template-columns: 1fr 1fr; }
	.sto-logo { grid-column: 1 / -1; }
}
@media (max-width: 599px) {
	.sto-container { padding: 0 16px; }
	.sto-nav__list { padding: 10px 16px; }
	.sto-section, .sto-contact { padding: 56px 0; }
	.sto-hero { padding-bottom: 48px; }
	.sto-hero h1 { margin-bottom: 28px; }
	.sto-band { grid-template-columns: 1fr; padding: 24px; }
	.sto-cancers { grid-template-columns: 1fr; }
	.sto-block + .sto-block { margin-top: 40px; }
	.sto-bar { grid-template-columns: 1fr; gap: 12px; padding: 18px; }
	.sto-tag { justify-self: start; }
	.sto-contact__card { padding: 32px 22px; gap: 28px; }
	.sto-contact__name { font-size: 24px; }
	.sto-links__grid { grid-template-columns: 1fr; }
	.sto-quick { width: 100%; }
	.sto-benefits { gap: 12px; }
	.sto-benefit { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: var(--sto-radius); }
	.sto-benefit__icon { flex: none; width: 48px; height: 48px; margin: 0; }
}

/* Inline SVG icons rendered from the template (no presentation attributes) */
.sto-quick__icon svg,
.sto-spec__more svg,
.sto-btn svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sto-quick__icon { color: #fff; }
.sto-spec__more svg { stroke-width: 1.6; }
