/* ClinicIT.Solutions shared styles: tokens, type, buttons, header, footer.
   Loaded by every page; home.css and page.css build on it. */

:root {
    --paper: #F4F7F5;
    --surface: #FFFFFF;
    --ink: #16302B;
    --ink-2: #4A5F59;
    --rule: #D3DDD8;
    --rule-strong: #A9B9B2;
    --biro: #1C3FC4;
    --biro-deep: #142F99;
    --biro-wash: #E8ECFB;

    --slot-std: #DAD5F6;
    --slot-long: #C9E9D8;
    --slot-tele: #CCE1F4;
    --slot-nurse: #F3E9B0;

    --band: #16302B;
    --band-text: #E6EEEA;
    --band-muted: #A9BDB6;

    --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --measure: 66ch;
    --gutter: 24px;
    --max: 1180px;

    /* Hooks consumed by ai-chat.js injected styles */
    --accent-color: var(--biro);
    --accent-hover: var(--biro-deep);
    --primary-green: var(--biro);
    --background-color: var(--paper);
    --bg-accent: #E7EDEA;
    --bg-primary: var(--paper);
    --border-color: var(--rule);
    --card-background: var(--surface);
    --card-bg: var(--surface);
    --font-family: var(--font);
    --text-color: var(--ink);
    --text-primary: var(--ink);
    --text-secondary: var(--ink-2);
    --text-muted: var(--ink-2);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--biro); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--biro-deep); }

:focus-visible {
    outline: 3px solid var(--biro);
    outline-offset: 3px;
    border-radius: 4px;
}

h1, h2, h3 { text-wrap: balance; margin: 0; font-weight: 750; line-height: 1.08; letter-spacing: -0.02em; font-stretch: 112%; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.625rem); }
h3 { font-size: 1.3125rem; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip {
    position: absolute; left: 16px; top: -60px;
    background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; z-index: 100;
}
.skip:focus { top: 12px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 48px; padding: 0 22px;
    font: inherit; font-weight: 650; font-size: 1rem;
    border-radius: 6px; border: 0; cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease;
}
.btn-primary { background: var(--biro); color: #fff; }
.btn-primary:hover { background: var(--biro-deep); color: #fff; }
.btn-primary:disabled { opacity: .7; cursor: progress; }

.link-quiet { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--rule-strong); }
.link-quiet:hover { color: var(--biro); text-decoration-color: currentColor; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(244, 247, 245, 0.94);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand-name { font-weight: 750; font-stretch: 112%; font-size: 1.0625rem; letter-spacing: -0.01em; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 550; font-size: 0.975rem; }
.nav a:not(.btn):hover { color: var(--biro); }
.nav .btn { min-height: 40px; padding: 0 16px; font-size: 0.95rem; }

.nav-toggle {
    display: none; font: inherit; font-weight: 600; color: var(--ink);
    background: none; border: 1px solid var(--rule-strong); border-radius: 6px; padding: 8px 14px; cursor: pointer;
}

/* ---------- Footer ---------- */
.site-footer { background: var(--band); color: var(--band-muted); padding: 72px 0 40px; font-size: 0.9375rem; border-top: 1px solid rgba(230, 238, 234, 0.16); }
.site-footer a { color: var(--band-text); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 40px; }
.foot-brand .brand { color: #fff; }
.foot-brand p { margin-top: 14px; max-width: 26em; }
.site-footer h4 { margin: 0 0 12px; color: #fff; font-size: 0.9375rem; font-weight: 650; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-bottom { margin-top: 56px; padding-top: 24px; border-top: 1px solid rgba(230, 238, 234, 0.2); font-size: 0.875rem; }

@media (max-width: 1080px) {
    .foot-grid { grid-template-columns: repeat(3, 1fr); }
    .foot-brand { grid-column: 1 / -1; }
}

@media (max-width: 960px) {
    .nav-toggle { display: inline-block; }
    .nav {
        display: none;
        position: absolute; top: 68px; left: 0; right: 0;
        background: var(--paper); border-bottom: 1px solid var(--rule);
        flex-direction: column; align-items: stretch; gap: 0;
        padding: 8px var(--gutter) 20px;
    }
    .nav.open { display: flex; }
    .nav ul { flex-direction: column; gap: 0; }
    .nav ul a { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); }
    .nav .btn { margin-top: 16px; min-height: 48px; }
}

@media (max-width: 640px) {
    :root { --gutter: 16px; }
    body { font-size: 1rem; }
    .foot-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Cookie banner (injected by cookie-consent.js), re-themed ---------- */
body .cookie-consent-banner { background: var(--ink); font-family: var(--font); }
body .cookie-btn { font-family: inherit; font-weight: 600; }
body .cookie-btn-primary { background: #fff; color: var(--ink); }
body .cookie-btn-primary:hover { background: var(--band-text); transform: none; }
body .cookie-btn-secondary { border-color: rgba(230, 238, 234, 0.45); }
body .cookie-btn-secondary:hover { background: rgba(255, 255, 255, 0.08); border-color: #fff; }
body .cookie-btn-tertiary { color: var(--band-text); border-color: rgba(230, 238, 234, 0.3); }
body .cookie-btn-tertiary:hover { background: rgba(255, 255, 255, 0.08); }
body .cookie-toggle input:checked + .cookie-toggle-slider { background-color: #4F6EE8; }
body .cookie-policy-links a { color: #fff; }
body .cookie-settings-trigger { background: var(--ink); box-shadow: 0 4px 12px rgba(22, 48, 43, 0.3); }
