:root {
    /* Surfaces */
    --bg: #F4F9FA;
    --surface: #FFFFFF;
    --surface-soft: #EAF4F2;
    --ink: #0C2733;
    --muted: #5A7181;
    --line: #DCE7EB;

    /* Brand */
    --primary: #0C6E8C;
    --primary-dark: #073B4C;
    --primary-light: #4FA9C4;
    --primary-soft: #E4F1F3;

    --accent: #E15B3B;
    --accent-dark: #B7452B;
    --accent-soft: #FDEAE3;

    --success: #2E9E6C;
    --success-soft: #E4F5EC;
    --danger: #C0392B;

    /* Type */
    --font-display: "Manrope", "Inter", "Segoe UI", sans-serif;
    --font-body: "Inter", "Segoe UI", Arial, Helvetica, sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

    /* Radius + shadow scale */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 4px 14px rgba(9, 45, 60, .07);
    --shadow-md: 0 14px 34px rgba(9, 45, 60, .12);
    --shadow-lg: 0 30px 64px rgba(9, 45, 60, .18);

    /* legacy aliases kept for any inline / unseen usage */
    --shadow: var(--shadow-lg);
    --shadow-soft: var(--shadow-sm);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.15;
}
p { margin-top: 0; }
.hero h1, .hero h2, .footer h2, .footer h3 { color: inherit; }
a { color: var(--primary-dark); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(12, 110, 140, .28);
    outline-offset: 3px;
}
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.container--narrow { width: min(780px, calc(100% - 32px)); }
.site-nav .container { width: min(1420px, calc(100% - 40px)); }

/* Small monospace figures — used for phone numbers / schedules */
.figures, .big-phone, .footer h3 + p, .topbar__inner span {
    font-variant-numeric: tabular-nums;
}

/* ===== Topbar ===== */
.topbar {
    background: linear-gradient(90deg, #062836, #0B3D52);
    color: #ffffff;
    font-size: 13.5px;
}
.topbar__inner { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; flex-wrap: wrap; }
.topbar__inner span {
    color: #DDEEF2;
    font-weight: 600;
    font-family: var(--font-mono);
    letter-spacing: .01em;
}
.topbar a,
.topbar a:visited,
.topbar a[x-apple-data-detectors],
.topbar__inner span a {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-decoration: none !important;
}

/* ===== Nav ===== */
.site-nav {
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(9, 45, 60, .03);
}
.site-nav::after {
    content: "";
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 45%, var(--accent) 100%);
    opacity: .9;
}
.site-nav__inner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px; min-height: 92px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-family: var(--font-display); color: var(--ink); font-size: 19px; min-width: 214px; transition: color .18s ease; }
.brand:hover { color: var(--primary-dark); text-decoration: none; }
.brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--primary-soft), 0 0 0 4px rgba(12, 110, 140, .18);
}
.site-nav__links { grid-column: 2; grid-row: 1; display: flex; gap: 4px; flex-wrap: nowrap; justify-content: flex-end; align-items: center; }
.site-nav__links a {
    position: relative;
    padding: 10px 12px;
    border-radius: 999px;
    color: #2B4250;
    font-size: 14.5px;
    font-weight: 700;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}
.site-nav__links a::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 2px;
    height: 2px;
    background: var(--accent);
    border-radius: 999px;
    opacity: 0;
    transform: scaleX(.3);
    transition: opacity .18s ease, transform .18s ease;
}
.site-nav__links a.is-active,
.site-nav__links a:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-1px);
}
.site-nav__links a.is-active::after,
.site-nav__links a:hover::after {
    opacity: 1;
    transform: scaleX(1);
}
.site-nav__actions { grid-column: 3; grid-row: 1; display: none; align-items: center; justify-content: flex-end; gap: 10px; }
.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 10px 22px rgba(225, 91, 59, .28);
    transition: box-shadow .18s ease, transform .18s ease;
}
.nav-cta:hover {
    color: #fff;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(225, 91, 59, .34);
    transform: translateY(-2px);
}
.nav-toggle {
    display: none;
    width: 46px;
    height: 46px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
    place-items: center;
    padding: 0;
    box-shadow: var(--shadow-sm);
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 3px auto;
    background: var(--primary-dark);
    border-radius: 999px;
    transition: transform .18s ease, opacity .18s ease;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 88px;
    background:
        radial-gradient(880px 520px at 84% -10%, rgba(79, 169, 196, .28), transparent 60%),
        linear-gradient(160deg, rgba(7, 59, 76, .90) 0%, rgba(12, 110, 140, .82) 55%, rgba(14, 138, 147, .58) 100%),
        url("../img/fundal-watercolor.jpg") center 32% / cover no-repeat;
    color: white;
    min-height: 620px;
    display: grid;
    align-items: center;
    justify-items: center;
    text-align: left;
}
.hero::before {
    /* pulse / EKG line motif — the site's signature mark */
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 54px;
    height: 60px;
    opacity: .22;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 60' preserveAspectRatio='none'%3E%3Cpolyline points='0,30 120,30 145,8 165,52 190,30 600,30' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 600px 60px;
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(4, 24, 33, .14), rgba(4, 24, 33, .38));
    pointer-events: none;
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 700px) minmax(300px, 360px); gap: 64px; align-items: center; justify-content: space-between; width: min(1320px, calc(100% - 48px)); margin: 0 auto; }
.hero__grid > div:first-child { justify-self: start; max-width: 700px; }
.hero h1 { margin: 0; font-size: 52px; line-height: 1.08; letter-spacing: -.015em; max-width: 700px; }
.hero__text { font-size: 19px; color: rgba(255,255,255,.88); max-width: 640px; margin: 18px 0 0; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    color: var(--accent-dark);
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: .08em;
    font-size: 12px;
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.hero .eyebrow { color: #CFF1EA; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-start; margin-top: 28px; }

.btn {
    border: 1.5px solid var(--accent);
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    box-shadow: 0 10px 22px rgba(225, 91, 59, .22);
    transition: box-shadow .18s ease, transform .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn--primary { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); border-color: var(--accent); color: white; }
.btn:hover, .btn:focus-visible {
    color: white;
    text-decoration: none;
    box-shadow: 0 16px 30px rgba(225, 91, 59, .3);
    transform: translateY(-2px);
}
/* Optional secondary look — additive, opt-in via extra class, does not change default .btn behaviour */
.btn--ghost {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .55);
    color: #fff;
    box-shadow: none;
}
.btn--ghost:hover {
    background: rgba(255, 255, 255, .16);
    border-color: #fff;
    color: #fff;
    box-shadow: 0 10px 24px rgba(4, 24, 33, .2);
}
.btn--outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary-dark);
    box-shadow: none;
}
.btn--outline:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-color: var(--primary);
    box-shadow: none;
}

.hero-visual { position: relative; min-height: 0; display: grid; justify-content: center; width: 100%; transform: none; }
.hero__panel {
    position: relative;
    z-index: 2;
    width: min(420px, 100%);
    background: rgba(255, 255, 255, .97);
    color: var(--ink);
    border: 1px solid rgba(255,255,255,.6);
    border-radius: var(--radius-lg);
    padding: 26px;
    box-shadow: var(--shadow-lg);
}
.hero__panel h2 { color: var(--ink); margin-top: 0; font-size: 19px; }
.big-phone { font-family: var(--font-mono); font-size: 28px; font-weight: 700; letter-spacing: -.01em; color: var(--primary-dark); margin: 10px 0; }

/* Live open/closed status pill — computed server-side from real schedule */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 14px;
}
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-pill--open { background: var(--success-soft); color: #1E7A50; }
.status-pill--open::before { animation: pulse-dot 1.8s ease-in-out infinite; }
.status-pill--closed { background: #F1F3F5; color: #667180; }
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(46, 158, 108, .45); }
    50% { box-shadow: 0 0 0 6px rgba(46, 158, 108, 0); }
}

/* ===== Sections ===== */
.section { padding: 68px 0; }
.section--muted { background: var(--surface-soft); }
.section__head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin-bottom: 26px; }
.section__head h2, .page-title h1 { margin: 0; }
.page-title {
    position: relative;
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--bg) 65%);
    padding: 58px 0;
    border-bottom: 1px solid var(--line);
}
.page-title::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.page-title p { color: var(--muted); margin-bottom: 0; font-size: 17px; }
.page-title h1 { font-size: 40px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards--list { grid-template-columns: 1fr; }
.card, .doctor-card, .document-group, .form-card, .admin-panel, .login-card, .stat-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.card, .doctor-card, .document-group, .public-section-card, .content-block { position: relative; overflow: hidden; }
.card::before, .doctor-card::before, .document-group::before, .public-section-card::before, .content-block::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity .18s ease;
}
.card:hover, .doctor-card:hover, .document-group:hover, .public-section-card:hover, .content-block:hover {
    border-color: rgba(12, 110, 140, .28);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}
.card:hover::before, .doctor-card:hover::before, .document-group:hover::before, .public-section-card:hover::before, .content-block:hover::before {
    opacity: 1;
}
.card time, .article time { color: var(--muted); font-family: var(--font-mono); font-size: 13px; }
.card h2, .card h3 { margin: 8px 0; }
.post-thumb { display: block; margin: -24px -24px 18px; border-radius: var(--radius-md) var(--radius-md) 0 0; overflow: hidden; background: var(--surface-soft); aspect-ratio: 16 / 9; }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.card:hover .post-thumb img { transform: scale(1.045); }
.doctor-list, .document-groups { display: grid; gap: 18px; }
.doctor-card { display: grid; gap: 16px; }
.doctor-card.is-hidden { display: none; }
.doctor-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 24px; }
.doctor-toolbar .search-field { flex: 1 1 260px; min-width: 220px; }
.doctor-toolbar select { max-width: 260px; }
.doctor-card__head { display: flex; gap: 18px; align-items: flex-start; }
.doctor-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 17px;
    color: #fff;
    letter-spacing: .02em;
}
.doctor-avatar--0 { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.doctor-avatar--1 { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); }
.doctor-avatar--2 { background: linear-gradient(135deg, var(--success), #1E7A50); }
.doctor-card__head h2 { font-size: 21px; margin: 0 0 2px; }
.doctor-card__head > div > p { color: var(--muted); margin: 0; }
.doctor-card__meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 14px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    background: var(--primary-soft);
    color: var(--primary-dark);
}
.pill-activity {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}
.pill-activity--reception { background: var(--success-soft); color: #1E7A50; }
.pill-activity--sector { background: var(--primary-soft); color: var(--primary-dark); }
.doctor-empty { text-align: center; padding: 56px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius-md); }
.document-link { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.article h1 { font-size: 40px; line-height: 1.16; }
.article__image { width: 100%; border-radius: var(--radius-sm); margin: 24px 0; }
.prose { margin-top: 24px; font-size: 18px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--primary-soft); font-family: var(--font-display); font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--primary-dark); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: var(--surface-soft); }

label { display: grid; gap: 7px; font-weight: 700; font-size: 14.5px; }
input, select, textarea { width: 100%; border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 12px 13px; font: inherit; background: white; transition: border-color .18s ease, box-shadow .18s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); outline: none; }
textarea { resize: vertical; }
.form-layout { max-width: 760px; }
.form-card, .admin-form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.check input { width: auto; }
.notice { padding: 14px 16px; border-radius: var(--radius-sm); background: var(--success-soft); color: #1E7A50; margin-bottom: 18px; border: 1px solid rgba(30, 122, 80, .16); }
.notice--error { background: #FDEAE7; color: var(--danger); border-color: rgba(192, 57, 43, .18); }
.form-help { margin: -6px 0 0; color: var(--muted); font-size: 14px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.about-grid { display: grid; grid-template-columns: 240px 1fr; gap: 28px; align-items: start; }
.about-nav { position: sticky; top: 108px; display: grid; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px; box-shadow: var(--shadow-sm); }
.about-nav a { padding: 10px 12px; border-radius: var(--radius-sm); color: var(--ink); font-weight: 700; transition: background .18s ease, color .18s ease, transform .18s ease; }
.about-nav a:hover { background: var(--primary-soft); text-decoration: none; color: var(--primary-dark); transform: translateX(2px); }
.about-content { display: grid; gap: 18px; }
.content-block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 26px; }
.content-block h2 { margin-top: 0; }
.value-grid, .people-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
.people-grid { grid-template-columns: repeat(2, 1fr); }
.value-grid article, .person-card { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px; background: var(--surface-soft); }
.value-grid h3, .person-card h3 { margin-top: 0; }
.schedule-list { display: grid; gap: 10px; padding-left: 20px; }
.public-section-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.public-section-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; box-shadow: var(--shadow-sm); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.public-section-card--wide { grid-column: 1 / -1; padding: 28px; }
.public-section-card h2, .public-section-card h3 { margin-top: 0; }
.public-section-card ul { padding-left: 20px; }
.reading-content { max-width: 900px; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--primary); font-weight: 700; }
.history-content { white-space: normal; line-height: 1.8; }
.leadership-grid { align-items: start; }
.person-card--profile { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; padding: 20px; background: var(--surface); box-shadow: var(--shadow-sm); }
.person-card__image { width: 190px; height: 230px; object-fit: contain; object-position: center; display: block; border-radius: var(--radius-sm); background: var(--surface-soft); }
.person-card__content h2 { margin: 0 0 8px; font-size: 23px; }
.person-card__role { color: var(--primary); font-weight: 700; }
.person-card__cv { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); line-height: 1.7; color: var(--ink); }
.organization-chart { display: block; width: 100%; height: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px; box-shadow: var(--shadow-sm); }
.service-card__icon {
    display: block;
    width: 72px;
    height: 72px;
    margin: -4px 0 16px;
    background: url('../img/service-icons.svg') no-repeat;
    background-size: 216px 216px;
}
.service-card__icon--1 { background-position: 0 0; }
.service-card__icon--2 { background-position: -72px 0; }
.service-card__icon--3 { background-position: -144px 0; }
.service-card__icon--4 { background-position: 0 -72px; }
.service-card__icon--5 { background-position: -72px -72px; }
.service-card__icon--6 { background-position: -144px -72px; }
.service-card__icon--7 { background-position: 0 -144px; }
.service-card__icon--8 { background-position: -72px -144px; }
.service-card__icon--9 { background-position: -144px -144px; }
.quick-links { display: flex; flex-wrap: wrap; gap: 10px; }
.quick-links a { display: inline-flex; align-items: center; min-height: 42px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); font-weight: 700; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.quick-links a:hover { text-decoration: none; background: var(--primary-soft); border-color: rgba(12, 110, 140, .3); transform: translateY(-1px); }

/* ===== Footer ===== */
.footer {
    position: relative;
    background: linear-gradient(160deg, #062836, #0B3D52);
    color: #E3F0F3;
    padding: 0 0 40px;
}
.footer::before {
    content: "";
    display: block;
    height: 44px;
    margin-bottom: 16px;
    opacity: .18;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 44' preserveAspectRatio='none'%3E%3Cpolyline points='0,22 120,22 145,4 165,38 190,22 600,22' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: repeat-x;
    background-size: 600px 44px;
}
.footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 24px; padding-top: 6px; }
.footer h2, .footer h3 { color: white; font-size: 16px; }
.footer h3 { text-transform: uppercase; letter-spacing: .04em; font-size: 13px; color: #9FC4CE; margin-bottom: 12px; }
.footer p { color: #C7DEE3; }
.footer-links { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-links a { color: #E3F0F3; }
.footer-links a:hover { color: white; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 46px; height: 46px; object-fit: contain; border-radius: 50%; background: white; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.login-card { width: min(420px, 100%); display: grid; gap: 16px; }
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; background: var(--bg); }
.admin-sidebar { background: linear-gradient(180deg, #062836, #0B3D52); color: white; padding: 22px; }
.admin-logo { display: block; color: white; font-family: var(--font-display); font-weight: 800; font-size: 21px; margin-bottom: 24px; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar a { color: #DDEEF2; padding: 10px 12px; border-radius: var(--radius-sm); }
.admin-sidebar a.is-active, .admin-sidebar a:hover { background: rgba(255,255,255,.13); text-decoration: none; }
.admin-main { padding: 24px; min-width: 980px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; }
.admin-top h1 { margin: 0; }
.admin-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card span { color: var(--muted); display: block; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.stat-card strong { font-family: var(--font-mono); font-size: 32px; color: var(--primary-dark); }
.admin-panel { margin-bottom: 18px; }
.admin-form--inline { grid-template-columns: repeat(7, minmax(120px, 1fr)) auto; align-items: end; }
.table-actions { display: flex; gap: 10px; align-items: center; }
.table-actions form { margin: 0; }
button { font: inherit; }
td button { border: 0; background: transparent; color: var(--danger); cursor: pointer; padding: 0; }

@media (max-width: 1180px) {
    .site-nav__inner { grid-template-columns: auto 1fr; align-items: center; gap: 12px 18px; padding: 10px 0; }
    .site-nav__actions { grid-column: 2; grid-row: 1; justify-self: end; }
    .site-nav__links { grid-column: 1 / -1; flex-wrap: wrap; justify-content: center; padding-bottom: 4px; }
    .hero__grid { grid-template-columns: minmax(0, 820px); }
    .hero-visual { justify-content: center; transform: none; }
    .hero { text-align: center; }
    .hero__grid > div:first-child { justify-self: center; }
    .hero h1, .hero__text { margin-left: auto; margin-right: auto; }
    .actions { justify-content: center; }
    .hero { min-height: 560px; }
    .hero h1 { font-size: 46px; }
}

@media (max-width: 760px) {
    .site-nav__inner { grid-template-columns: auto auto; }
    .site-nav__actions { display: flex; }
    .site-nav__links {
        display: none;
        grid-column: 1 / -1;
        width: 100%;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px 0 4px;
    }
    .site-nav__links.is-open { display: grid; }
    .site-nav__links a {
        background: var(--surface-soft);
        border: 1px solid var(--line);
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 12px;
        font-size: 16px;
        border-radius: var(--radius-sm);
    }
    .site-nav__links a::after { display: none; }
    .nav-toggle { display: grid; }
}

@media (max-width: 900px) {
    .cards, .contact-grid, .footer__grid, .admin-cards, .about-grid, .value-grid, .people-grid, .public-section-grid { grid-template-columns: 1fr; }
    .admin-shell { grid-template-columns: 260px 1fr; overflow-x: auto; }
    .about-nav { position: static; }
    .admin-form--inline, .form-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 40px; }
    .person-card--profile { grid-template-columns: 180px minmax(0, 1fr); }
    .person-card__image { width: 180px; height: 220px; }
}

@media (max-width: 640px) {
    .container { width: min(100% - 24px, 1180px); }
    .topbar__inner { font-size: 12.5px; justify-content: center; text-align: center; }
    .topbar__inner span { color: #ffffff; }
    .site-nav__inner { gap: 12px; min-height: 78px; }
    .brand { font-size: 18px; min-width: 0; }
    .brand img { width: 52px; height: 52px; }
    .site-nav__actions { gap: 8px; }
    .nav-toggle { width: 42px; height: 42px; }
    .site-nav__links { grid-template-columns: 1fr; }
    .hero { min-height: calc(100vh - 185px); padding: 48px 0; }
    .hero h1 { font-size: 32px; }
    .hero__text { font-size: 17px; }
    .page-title { padding: 40px 0; }
    .page-title h1 { font-size: 32px; }
    .actions { display: grid; grid-template-columns: 1fr; }
    .btn { width: 100%; }
    .hero__panel { padding: 20px; }
    .big-phone { font-size: 24px; }
    .article h1 { font-size: 30px; }
    .section { padding: 40px 0; }
    .section__head { align-items: flex-start; flex-direction: column; }
    .person-card--profile { grid-template-columns: 1fr; }
    .person-card__image { width: min(100%, 260px); height: auto; aspect-ratio: 1 / 1; margin: 0 auto; }
    .doctor-toolbar { flex-direction: column; align-items: stretch; }
    .doctor-toolbar select { max-width: none; }
}

@media (max-width: 420px) {
    .brand { font-size: 16px; gap: 10px; }
    .brand img { width: 48px; height: 48px; }
    .hero h1 { font-size: 28px; }
    .hero__panel { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .status-pill--open::before { animation: none; }
    *, *::before, *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
