/* =========================================================================
   SMSIMSR inner pages, v1 (18 Nov 2026).
   Brings the inner pages into the home page's design language: red-line kickers,
   Gentium headings, rounded white cards with soft brand shadows, cream / white
   section rhythm and a closing call-to-action band.
   Loaded only on pages with body.ui-inner (lib/layout.php). The home page,
   the Medical College pages and /international-patients/ never load this file.
   ========================================================================= */

/* Metric-matched fallback for Gantari (measured against Arial, 18 Nov 2026): text keeps the same width and
   line height while the web font loads, so paragraphs do not re-flow when it arrives (layout shift). */
@font-face {
    font-family: 'Gantari Fallback';
    src: local('Arial'), local('ArialMT'), local('Helvetica'), local('Roboto');
    size-adjust: 101.9%; ascent-override: 93.2%; descent-override: 24.5%; line-gap-override: 0%;
}

/* Same for the Gentium Plus headings, measured against Times New Roman metrics (Times on iOS / Windows, Tinos on Android). */
@font-face {
    font-family: 'Gentium Fallback'; font-weight: 400;
    src: local('Times New Roman'), local('TimesNewRomanPSMT'), local('Liberation Serif'), local('Tinos');
    size-adjust: 98.6%; ascent-override: 111.6%; descent-override: 37.5%; line-gap-override: 0%;
}
@font-face {
    font-family: 'Gentium Fallback'; font-weight: 700;
    src: local('Times New Roman Bold'), local('TimesNewRomanPS-BoldMT'), local('Liberation Serif Bold'), local('Tinos Bold');
    size-adjust: 99%; ascent-override: 111.1%; descent-override: 37.4%; line-gap-override: 0%;
}

.ui-inner {
    --sans: 'Gantari', 'Gantari Fallback', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
    --serif: 'Gentium Plus', 'Gentium Fallback', Georgia, 'Times New Roman', serif;
    --ink-soft: #3F3F3F;
    --r-lg: 20px;
    --card-pad: clamp(20px, 2.4vw, 30px);
    --sec-y: clamp(48px, 7vw, 96px);
}

/* ---------- Readability ---------- */
.ui-inner main { font-size: 1.0625rem; line-height: 1.75; }
.ui-inner main .sec p, .ui-inner main .sec li { color: var(--body); }
.ui-inner main .lead { font-family: var(--sans); font-size: clamp(1.1rem, 1rem + .45vw, 1.25rem); line-height: 1.7; color: var(--ink-soft); font-weight: 400; }
.ui-inner main .c-12 > p, .ui-inner main .c-12 > ul, .ui-inner main .c-12 > ol,
.ui-inner main .c-12 > .lead, .ui-inner main .c-solo > p { max-width: 72ch; }
.ui-inner main strong { color: var(--ink); }
.ui-inner main .sec p a:not(.btn), .ui-inner main .sec li a, .ui-inner main .sec td a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
.ui-inner main .sec p a:not(.btn):hover, .ui-inner main .sec li a:hover, .ui-inner main .sec td a:hover { text-decoration-thickness: 2px; }
.ui-inner main .sec--image p a:not(.btn), .ui-inner main .sec--image li a { color: #fff; }

/* Headings: same scale and serif as the home page. */
.ui-inner main h1 { font-size: clamp(2.15rem, 1.45rem + 3.1vw, 3.75rem); line-height: 1.08; letter-spacing: -.01em; margin: 0 0 .35em; max-width: 22ch; text-wrap: balance; }
.ui-inner main h2 { font-size: var(--fs-h2); line-height: var(--lh-h2); letter-spacing: -.005em; margin: 0 0 .5em; text-wrap: balance; }
.ui-inner main h3 { font-size: clamp(1.3rem, 1.12rem + .75vw, 1.65rem); line-height: 1.25; margin: 0 0 .5em; text-wrap: balance; }
.ui-inner main h4 { font-size: 1.25rem; }
.ui-inner main * + h2 { margin-top: 1.1em; }
.ui-inner main * + h3 { margin-top: .9em; }

/* Whole sentences that were marked up as headings (lib/layout.php turns them into p.statement). */
.ui-inner main .statement {
    max-width: 46ch; margin: 0 0 1em; font-family: var(--serif); font-weight: 400;
    font-size: clamp(1.2rem, 1.05rem + .7vw, 1.5rem); line-height: 1.5; color: var(--ink); text-wrap: pretty;
}
.ui-inner main > .sec:first-of-type .statement { font-family: var(--sans); font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); line-height: 1.65; color: var(--ink-soft); max-width: 62ch; }
.ui-inner .sec--image .statement { color: #fff; }

/* Small uppercase labels (h6 in the converted pages, .page-kicker in the title block) = the home page kicker with its red line. */
.ui-inner main h6, .ui-inner .page-kicker {
    display: flex; align-items: center; gap: 12px; margin: 0 0 1em;
    font: 700 .8125rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--brand);
}
.ui-inner main h6::before, .ui-inner .page-kicker::before { content: ''; flex: none; width: 34px; height: 2px; background: var(--brand); }
.ui-inner .sec--image h6, .ui-inner .sec--image .page-kicker { color: #fff; }
.ui-inner .sec--image h6::before, .ui-inner .sec--image .page-kicker::before { background: #fff; }

/* ---------- Page header (breadcrumb + first section) ---------- */
.ui-inner main > .crumbs { max-width: none; margin: 0; padding-inline: max(var(--gut), calc((100% - var(--wrap)) / 2 + var(--gut))); background: var(--cream); }
.ui-inner main > .crumbs ol { padding-top: 18px; font-size: .875rem; }
.ui-inner main > .crumbs a { color: var(--brand); text-decoration: none; }
.ui-inner main > .crumbs a:hover { text-decoration: underline; }
.ui-inner main > .crumbs [aria-current] { color: var(--ink-soft); }

.ui-inner main > .sec:first-of-type:not(.sec--image) {
    position: relative; overflow: hidden; isolation: isolate;
    padding: clamp(28px, 4.5vw, 64px) 0 clamp(40px, 6vw, 88px);
    background: linear-gradient(180deg, var(--cream) 0%, var(--cream) 55%, #fff 100%);
    border-bottom: 1px solid var(--line);
}
/* Decorative brand arcs, echoing the curve in the home page hero. */
.ui-inner main > .sec:first-of-type:not(.sec--image)::before,
.ui-inner main > .sec:first-of-type:not(.sec--image)::after {
    content: ''; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%;
}
.ui-inner main > .sec:first-of-type:not(.sec--image)::before {
    width: clamp(260px, 38vw, 620px); aspect-ratio: 1; right: clamp(-200px, -9vw, -60px); top: clamp(-260px, -16vw, -90px);
    background: radial-gradient(circle at 35% 65%, rgba(126,35,32,.13) 0%, rgba(126,35,32,.05) 45%, rgba(126,35,32,0) 70%);
}
.ui-inner main > .sec:first-of-type:not(.sec--image)::after {
    width: clamp(220px, 30vw, 500px); aspect-ratio: 1; right: clamp(-150px, -6vw, -40px); top: clamp(-220px, -13vw, -70px);
    border: 2px solid rgba(126,35,32,.14);
}
.ui-inner main > .sec:first-of-type h1 { margin-bottom: .3em; }
/* The intro under the title is a bold serif h3 in many converted pages: shown as a lead paragraph. */
.ui-inner main > .sec:first-of-type .g--sub h3,
.ui-inner main > .sec:first-of-type h1 + h3 {
    font-family: var(--sans); font-weight: 400; font-size: clamp(1.1rem, 1rem + .5vw, 1.3rem); line-height: 1.65; color: var(--ink-soft); max-width: 62ch; margin: 0;
}
.ui-inner main > .sec--image:first-of-type .g--sub h3,
.ui-inner main > .sec--image:first-of-type h1 + h3,
.ui-inner main > .sec--image .lead,
.ui-inner main > .sec--image .statement { color: rgba(255,255,255,.92); }
.ui-inner main > .sec:first-of-type .g--sub { margin-top: .6em; }
.ui-inner main > .sec:first-of-type .lead { max-width: 62ch; }

/* ---------- Section rhythm: cream and white alternate after the header ---------- */
.ui-inner main > .sec { padding-block: var(--sec-y); }
.ui-inner main > .sec:not(:first-of-type):not(.sec--image):not(.sec--dark) { background: #fff; }
.ui-inner main > .sec:not(:first-of-type):not(.sec--image):not(.sec--dark):nth-of-type(odd) { background: var(--cream); }
.ui-inner main > .sec + .sec { padding-top: var(--sec-y); }
.ui-inner main > .sec--image { padding-block: clamp(64px, 9vw, 128px); }
.ui-inner main > .sec--image::before { background: linear-gradient(100deg, rgba(40,12,11,.88) 0%, rgba(60,18,16,.62) 55%, rgba(60,18,16,.35) 100%); }
.ui-inner main > .sec--image p, .ui-inner main > .sec--image li { color: rgba(255,255,255,.92); }
.ui-inner main > .sec--image strong { color: #fff; }
.ui-inner .g { gap: clamp(20px, 3vw, 48px); }

/* ---------- Media ---------- */
.ui-inner main .media img { border-radius: var(--r-lg); box-shadow: var(--shadow-2); }
.ui-inner main .media figcaption { font-size: .9rem; margin-top: .75em; }

/* Columns of three or four with text become home-style cards. */
.ui-inner main .g:has(> .c-4 ~ .c-4 ~ .c-4) > .c-4:not(:has(> .media:only-child)):not(:has(> .gallery)),
.ui-inner main .g:has(> .c-3 ~ .c-3 ~ .c-3) > .c-3:not(:has(> .media:only-child)):not(:has(> .gallery)) {
    background: #fff; border: 1px solid var(--pline); border-radius: var(--r-lg); padding: var(--card-pad); box-shadow: var(--shadow-1);
}
.ui-inner main .g:has(> .c-4 ~ .c-4 ~ .c-4) > .c-4 > .media:first-child,
.ui-inner main .g:has(> .c-3 ~ .c-3 ~ .c-3) > .c-3 > .media:first-child { margin: calc(var(--card-pad) * -1) calc(var(--card-pad) * -1) 1.1em; }
.ui-inner main .g:has(> .c-4 ~ .c-4 ~ .c-4) > .c-4 > .media:first-child img,
.ui-inner main .g:has(> .c-3 ~ .c-3 ~ .c-3) > .c-3 > .media:first-child img { border-radius: var(--r-lg) var(--r-lg) 0 0; box-shadow: none; }

/* Photo grids and tiles. */
.ui-inner main .tile { border-radius: var(--r-lg); border-color: var(--pline); box-shadow: var(--shadow-1); }
.ui-inner main .tile--link:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.ui-inner main .tile__title { font-size: 1.15rem; }

/* ---------- Lists: brand check markers ---------- */
.ui-inner main ul:not([class]) { list-style: none; padding-left: 0; }
.ui-inner main ul:not([class]) > li { position: relative; padding-left: 1.9em; margin-bottom: .55em; }
.ui-inner main ul:not([class]) > li::before {
    content: ''; position: absolute; left: 0; top: .42em; width: 1.15em; height: 1.15em; border-radius: 50%;
    background: rgba(126,35,32,.1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237E2320' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 62% no-repeat;
}
.ui-inner .sec--image ul:not([class]) > li::before { background-color: rgba(255,255,255,.2); filter: brightness(0) invert(1); }
.ui-inner main ol:not([class]) { padding-left: 1.4em; }
.ui-inner main ol:not([class]) > li { margin-bottom: .55em; padding-left: .3em; }
.ui-inner main ol:not([class]) > li::marker { color: var(--brand); font-weight: 700; }
.ui-inner main hr { border: 0; height: 1px; background: var(--line); margin: 1.6em 0; }

/* ---------- Accordions: card style, 56px rows ---------- */
.ui-inner main .accordion { border-top: 0; display: grid; gap: 10px; }
.ui-inner main details { background: #fff; border: 1px solid var(--pline); border-radius: 14px; box-shadow: 0 2px 10px rgba(90,23,21,.04); transition: border-color .2s, box-shadow .2s; }
.ui-inner main details[open] { border-color: rgba(126,35,32,.35); box-shadow: var(--shadow-1); }
.ui-inner main summary { display: flex; align-items: center; min-height: 56px; padding: 14px 56px 14px 20px; font-size: 1.12rem; line-height: 1.35; border-radius: 14px; }
.ui-inner main summary:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.ui-inner main summary::after {
    content: ''; right: 18px; width: 28px; height: 28px; border-radius: 50%;
    background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237E2320' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E") center / 14px no-repeat;
    transition: transform .2s;
}
.ui-inner main details[open] > summary::after { content: ''; transform: translateY(-50%) rotate(45deg); background-color: rgba(126,35,32,.1); }
.ui-inner main details > :not(summary) { padding: 0 20px; }
.ui-inner main details > :last-child { padding-bottom: 18px; }
.ui-inner main details ul, .ui-inner main details ol, .ui-inner main details p { margin-inline: 20px; padding-inline-start: 0; }
.ui-inner main details ul:not([class]) > li { padding-left: 1.9em; }
.ui-inner main details ol { padding-left: 1.4em; }

/* ---------- Buttons ---------- */
.ui-inner main .btn { min-height: 48px; border-radius: 999px; padding-inline: 1.5em; }
.ui-inner main .btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Counters (impact figures on some pages). */
.ui-inner main .counter__value { font-family: var(--serif); color: var(--brand); }

/* Tables. */
.ui-inner main .table-wrap { border-radius: 14px; box-shadow: var(--shadow-1); }
.ui-inner main table { font-size: 1rem; }

/* Post dates and other eyebrow labels: readable size. */
.ui-inner main .eyebrow { font-size: .9rem; }

/* Stand-alone text links in a column (not inside a sentence): 44px touch target. */
.ui-inner main .c > a:not(.btn), .ui-inner.kind-post main > .sec:first-of-type .c-3 a { display: inline-flex; align-items: center; min-height: 44px; }
.ui-inner main th { background: var(--cream); color: var(--ink); }

/* ---------- Doctor profiles ---------- */
.ui-inner.kind-profile main > .sec:first-of-type { padding-bottom: clamp(28px, 4vw, 52px); }
.ui-inner.kind-profile main > .sec:nth-of-type(2) { background: #fff; }
.ui-inner.kind-profile .sec--first .c-4 .media { margin: 0; }
.ui-inner.kind-profile .sec--first .c-4 .media img { border-radius: 24px; box-shadow: var(--shadow-2); }
.ui-inner.kind-profile .sec--first .c-8 > h3:first-child { display: none; }  /* repeats the page title */
.ui-inner.kind-profile .sec--first .c-8 > h3:nth-of-type(2) {
    display: inline-flex; align-items: center; margin: 0 0 1.2em; padding: 8px 16px; border-radius: 999px;
    background: rgba(126,35,32,.08); color: var(--brand); font: 700 .95rem/1.3 var(--sans); letter-spacing: .02em;
}
@media (min-width: 900px) {
    .ui-inner.kind-profile .sec--first .c-4 { position: sticky; top: calc(var(--hdr) + 24px); align-self: start; }
}

/* ---------- News and event posts ---------- */
.ui-inner.kind-post main > .sec:first-of-type .c-3 {
    display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 .35em; align-self: start; justify-self: start; width: auto; max-width: 100%; padding: 8px 16px; border-radius: 999px;
    background: #fff; border: 1px solid var(--pline); font-size: .9rem; line-height: 1.4; color: var(--ink-soft);
}
.ui-inner.kind-post main > .sec:not(:first-of-type) .c-12 { max-width: 820px; }
.ui-inner.kind-post main > .sec:not(:first-of-type) .c-12 .media { max-width: none; }

/* ---------- Closing call to action (home page .cta-final, adapted) ---------- */
.cta-band { position: relative; overflow: hidden; background: linear-gradient(110deg, var(--brand-dark) 0%, var(--brand) 100%); color: #fff; }
.cta-band::after {
    content: ''; position: absolute; right: -120px; top: -160px; width: 420px; aspect-ratio: 1; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.14); pointer-events: none;
}
.cta-band__inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 24px 48px; padding-block: clamp(44px, 6vw, 76px); }
.cta-band__kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 .8em; font: 700 .8125rem/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.85); }
.cta-band__kicker::before { content: ''; width: 34px; height: 2px; background: rgba(255,255,255,.7); }
.cta-band h2 { margin: 0 0 .35em; color: #fff; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); line-height: 1.15; text-wrap: balance; }
.cta-band__text { margin: 0; color: rgba(255,255,255,.88); font-size: 1.0625rem; line-height: 1.6; }
.cta-band__btns { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.cta-band__btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 12px 24px;
    border: 1.5px solid rgba(255,255,255,.75); border-radius: 999px; color: #fff; font-weight: 700; font-size: 1.02rem; text-decoration: none; text-align: center;
    transition: background .2s, color .2s, transform .2s;
}
.cta-band__btn .i { width: 20px; height: 20px; flex: none; }
.cta-band__btn:hover { background: rgba(255,255,255,.12); color: #fff; }
.cta-band__btn--fill { background: #fff; border-color: #fff; color: var(--brand); box-shadow: 0 12px 26px rgba(0,0,0,.18); }
.cta-band__btn--fill:hover { background: var(--cream); color: var(--brand-dark); }
.cta-band__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 899px) {
    .cta-band__inner { grid-template-columns: 1fr; }
}
@media (max-width: 759px) {
    .ui-inner { --sec-y: 48px; }
    .ui-inner main { font-size: 1.0625rem; line-height: 1.72; }
    .ui-inner main h1 { max-width: none; }
    .ui-inner main > .sec:first-of-type:not(.sec--image) { padding: 22px 0 40px; }
    .ui-inner main > .crumbs ol { padding-top: 14px; }
    .ui-inner main .media img { border-radius: 16px; }
    .ui-inner main .g--sub { gap: 18px; }
    .ui-inner main summary { font-size: 1.05rem; padding-left: 16px; }
    .ui-inner main details > :not(summary) { padding-inline: 16px; }
    .ui-inner main details ul, .ui-inner main details ol, .ui-inner main details p { margin-inline: 16px; }
    .ui-inner main .btn-row .btn { flex: 1 1 100%; justify-content: center; }
    .ui-inner.kind-profile .sec--first .c-4 .media { max-width: 320px; margin-inline: auto; }
    .cta-band::after { width: 300px; right: -140px; top: -150px; }
}

@media (prefers-reduced-motion: reduce) {
    .ui-inner main .tile--link:hover { transform: none; }
    .ui-inner main summary::after, .cta-band__btn { transition: none; }
}
