:root {
    color-scheme: light;
    --navy: #112c43;
    --muted: #4b6172;
    --blue: #145b89;
    --blue-dark: #0f486e;
    --line: #dbe7ee;
    --ice: #edf6fa;
    --surface: #f6fafc;
    --white: #fff;
    --shell: 1180px;
    --gutter: clamp(18px, 4vw, 52px);
    font-family: "Inter", "Segoe UI", "Nirmala UI", system-ui, sans-serif;
}

:lang(si) {
    font-family: "Noto Sans Sinhala", "Nirmala UI", "Iskoola Pota", sans-serif;
}

:lang(ta) {
    font-family: "Noto Sans Tamil", "Nirmala UI", "Latha", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    color: var(--navy);
    background: var(--white);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
img { display: block; max-width: 100%; }
input { font: inherit; }

h1, h2, h3, h4, p, ul { margin: 0; }
h1, h2, h3, h4 { line-height: 1.2; }
:where(h1, h2, h3, h4):lang(si),
:where(h1, h2, h3, h4):lang(ta) { line-height: 1.4; }

:focus-visible {
    outline: 3px solid #0077b2;
    outline-offset: 4px;
}

.shell {
    width: min(var(--shell), 100% - 2 * var(--gutter));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    z-index: 1;
    inset: 10px auto auto var(--gutter);
    padding: .6rem 1rem;
    background: var(--white);
    transform: translateY(-160%);
}

.skip-link:focus { transform: none; }

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: clamp(12px, 2.3vw, 34px);
    min-height: 82px;
    padding-block: 10px;
}

.brand {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
}

.brand img { width: clamp(126px, 15vw, 162px); height: auto; }

.site-nav, .language-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.site-nav { gap: 0 clamp(14px, 2vw, 30px); }

.site-nav a, .language-picker a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: var(--navy);
    font-size: .9rem;
    font-weight: 650;
    text-decoration: none;
}

.site-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }

.language-picker {
    gap: 2px;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.language-picker a {
    justify-content: center;
    padding-inline: .58rem;
    border-radius: 8px;
}

.language-picker a:hover { background: var(--ice); }
.language-picker a[aria-current] { background: var(--navy); color: var(--white); }

.hero {
    background: radial-gradient(ellipse at 100% 10%, #d8eef6, transparent 59%), var(--ice);
    border-bottom: 1px solid var(--line);
    padding-block: clamp(42px, 6.5vw, 92px);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
    gap: clamp(24px, 4.4vw, 66px);
    align-items: center;
}

.hero h1 {
    max-width: 15ch;
    font-size: clamp(2.4rem, 5.1vw, 4.55rem);
    line-height: 1.02;
    letter-spacing: -.055em;
    text-wrap: balance;
}

.hero h1:lang(si), .hero h1:lang(ta) {
    max-width: none;
    font-size: clamp(1.8rem, 3.6vw, 3.05rem);
    line-height: 1.37;
    letter-spacing: normal;
}

.hero-copy > p {
    max-width: 46ch;
    margin-top: 1.35rem;
    color: var(--muted);
    font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 52px;
    margin-top: clamp(22px, 3.2vw, 34px);
    padding: .72rem 1.15rem;
    border: 1px solid var(--blue);
    border-radius: 11px;
    background: var(--blue);
    color: var(--white);
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
}

.hero-button:hover { background: var(--blue-dark); color: var(--white); }
.arrow { white-space: nowrap; }

.whatsapp-float {
    position: fixed;
    z-index: 2;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    display: grid;
    width: 60px;
    height: 60px;
    place-items: center;
    border: 2px solid var(--white);
    border-radius: 50%;
    background: #25d366;
    box-shadow: 0 4px 16px #112c4352;
}

.whatsapp-float img { border-radius: 50%; }
.whatsapp-float:hover { box-shadow: 0 5px 20px #112c4380; }

.hero-photo {
    overflow: hidden;
    aspect-ratio: 1.32;
    border: 1px solid #fff;
    border-radius: clamp(16px, 3vw, 32px);
    background: #d6e6ed;
    box-shadow: 0 18px 44px -26px #264c67a6;
}

.hero-photo img { width: 100%; height: 100%; object-fit: cover; }

.section { padding-block: clamp(44px, 6.2vw, 84px); }
.section-heading { max-width: 66ch; margin-bottom: 24px; }

h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.85rem);
    letter-spacing: -.035em;
}

h2:lang(si), h2:lang(ta) { letter-spacing: normal; }

.section-heading p, .about-layout p, .education-layout p {
    margin-top: .85rem;
    color: var(--muted);
}

.clinic-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 10px 24px;
    margin-bottom: 18px;
}

.search-field { width: min(100%, 470px); }

.search-field label {
    display: block;
    margin-bottom: 5px;
    font-size: .92rem;
    font-weight: 700;
}

.search-field input {
    width: 100%;
    min-height: 50px;
    padding: 10px 14px;
    border: 1px solid #a9c3d4;
    border-radius: 10px;
    background: var(--white);
    color: var(--navy);
}

.search-field input::placeholder { color: #536c7e; }
.clinic-count { color: var(--muted); font-size: .9rem; }

.clinic-grid, .service-list, .contact-list {
    list-style: none;
    padding: 0;
}

.clinic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr));
    gap: 12px;
}

.clinic-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
    padding: 14px 16px 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.clinic-card h3 { font-size: 1.05rem; }

.location-pin {
    flex: none;
    box-sizing: content-box;
    padding: 7px;
    border-radius: 9px;
    background: #dff0f7;
    color: var(--blue);
}

.clinic-card a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    font-size: .9rem;
    font-weight: 650;
    text-underline-offset: 3px;
}

.empty-state {
    padding: 20px;
    border: 1px dashed #a9c3d4;
    border-radius: 12px;
    color: var(--muted);
}

.services-section, .education-section { background: var(--ice); }

.services-layout, .about-layout, .education-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(22px, 5vw, 62px);
    align-items: start;
}

.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 10px;
}

.services-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }

.service-list li {
    padding: .65rem .9rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--white);
}

.video h3 { margin-bottom: .7rem; font-size: 1.1rem; }

.video-frame {
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    background: var(--navy);
}

.video-link, .video-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: inherit;
}

.video-link {
    position: relative;
    display: grid;
    overflow: hidden;
    place-items: center;
}

.video-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(.73);
}

.video-play {
    position: absolute;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-height: 44px;
    margin: 12px;
    padding: .65rem 1rem;
    border-radius: 10px;
    background: var(--white);
    color: var(--navy);
    font-weight: 700;
}

.video-link:hover .video-play { background: var(--ice); }

.mission-grid, .values-grid {
    display: grid;
    gap: 12px;
    margin-top: 24px;
}

.mission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 38px; }
.values-title { margin-top: 34px; font-size: 1.35rem; }
.values-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.mission-card, .value-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.mission-card p, .value-card p { margin-top: .55rem; color: var(--muted); }
.education-list { columns: 2 195px; padding-inline-start: 1.2em; }
.education-list li { margin-bottom: .5rem; break-inside: avoid; }

.site-footer {
    padding-block: clamp(34px, 5vw, 66px) calc(92px + env(safe-area-inset-bottom, 0px));
    background: var(--navy);
    color: #e5eff5;
}

.site-footer :focus-visible { outline-color: #92d6ff; }
.site-footer h2 { color: var(--white); }
.site-footer a { color: var(--white); text-underline-offset: 4px; }
.site-footer a:hover { color: #b8e4ff; }
.site-footer address { margin-top: .75rem; font-style: normal; }

.footer-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
    gap: 20px;
    align-items: start;
}

.contact-list li { min-height: 44px; display: flex; align-items: center; gap: .3em; }
.contact-list a { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .3em; min-height: 44px; }

.copyright {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #426078;
    color: #c3d7e4;
    font-size: .88rem;
}

@media (max-width: 1070px) {
    .header-inner {
        grid-template-columns: 1fr auto;
        row-gap: 4px;
    }

    .site-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .hero-grid, .services-layout, .about-layout, .education-layout { grid-template-columns: minmax(0, 1fr); }
    .hero { padding-block: 34px 26px; }
    .hero h1 { max-width: 16ch; font-size: clamp(2.3rem, 8.5vw, 3.6rem); }
    .hero-copy > p { margin-top: 1rem; }
    .hero-photo { aspect-ratio: 1.7; }
}

@media (max-width: 460px) {
    .header-inner { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; }
    .brand img { width: clamp(96px, 29vw, 126px); }
    .language-picker a { padding-inline: .44rem; }
    .site-nav { column-gap: 14px; }
    .hero-button { width: 100%; }
    .mission-grid { grid-template-columns: minmax(0, 1fr); }
}
