/* ==========================================================================
   Clinic one-pager — styles
   Per-clinic look = change the :root block only. Everything below reads
   from these tokens. Layout: centred column (max 1180px), full-width bands.
   ========================================================================== */

:root{
  /* Colour */
  --brand:        #0B2545;   /* headings, dark bands, primary buttons */
  --brand-hover:  #13355E;
  --brand-soft:   #2E6F95;   /* eyebrows, labels */
  --accent:       #5FC9D6;   /* small lines, focus ring */
  --accent-line:  #9FD8DA;   /* outlines, text on dark */
  --accent-wash:  #CDEFF2;   /* important banner, pinned notices */
  --surface:      #F5FAFB;   /* page background */
  --surface-dim:  #E9F3F5;
  --card:         #FFFFFF;
  --ink:          #0F2438;
  --ink-soft:     #4C6C7D;
  --line:         #D5E6EA;
  --ok:           #6FBF8B;
  --warn:         #E5B567;
  --closed:       #E5594F;   /* red: closed */

  /* Type */
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Shape */
  --radius: 3px;
  --max: 1180px;
  --gutter: 32px;


  color-scheme: light;
}

/* ---------- Base ---------- */
*{box-sizing:border-box; margin:0; padding:0;}
[hidden]{display:none !important;}
.sr-only{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}
html{scroll-behavior:smooth; scroll-padding-top:88px;}
body{
  font-family:var(--font-body); font-size:16px; line-height:1.55;
  color:var(--ink); background:var(--surface);
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3{font-family:var(--font-heading); font-weight:500; line-height:1.1; letter-spacing:-.01em; color:var(--brand); text-wrap:balance;}
a{color:inherit;}
img{max-width:100%; display:block;}
button{font:inherit; cursor:pointer;}
a:focus-visible, button:focus-visible{outline:2px solid var(--accent); outline-offset:3px;}

.wrap{
  max-width:var(--max); margin:0 auto;
  padding-left:max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right:max(var(--gutter), env(safe-area-inset-right, 0px));
}
@media (max-width:600px){ :root{--gutter:18px;} }

.skip-link{position:absolute; left:-9999px; background:var(--brand); color:var(--surface); padding:12px 18px; z-index:100;}
.skip-link:focus{left:16px; top:16px;}

.eyebrow{
  font-family:var(--font-mono); font-size:12.5px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--brand-soft); display:flex; align-items:center; gap:10px;
}
.eyebrow::before{content:""; width:22px; height:1px; background:var(--accent);}
.eyebrow-light{color:var(--accent-line);}

.section-head{max-width:640px; margin-bottom:40px; display:grid; gap:12px;}
.section-head h2, .board-head h2, .patient-info h2{font-size:clamp(28px, 3vw, 38px);}
.section-head-compact{margin-bottom:24px;}
.section-intro{color:var(--ink-soft); max-width:52ch;}

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  font-size:14.5px; font-weight:600; text-decoration:none; white-space:nowrap;
  padding:12px 20px; border-radius:var(--radius); border:1px solid transparent;
  transition:background .2s, color .2s, border-color .2s, transform .15s;
}
.btn:hover{transform:translateY(-1px);}
.btn svg{flex-shrink:0;}
.btn-light{background:var(--surface); color:var(--brand);}
.btn-light:hover{background:var(--card);}
.btn-glass{background:rgba(255,255,255,.08); color:#fff; border-color:rgba(255,255,255,.45);}
.btn-glass:hover{background:rgba(255,255,255,.16); border-color:#fff;}
.btn-outline{background:var(--card); color:var(--brand); border-color:var(--accent-line);}
.btn-outline:hover{border-color:var(--brand);}
@media (prefers-reduced-motion:reduce){ .btn, .btn:hover{transition:none; transform:none;} html{scroll-behavior:auto;} }

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:env(safe-area-inset-top, 0px); z-index:50;
  background:color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter:blur(8px);
  border-bottom:1px solid var(--line);
}
.nav-row{display:flex; align-items:center; justify-content:space-between; gap:16px; height:68px;}
.brand{display:flex; align-items:center; gap:11px; text-decoration:none; min-width:0; flex:1 1 auto;}
.brand-mark{
  width:36px; height:36px; border-radius:9px; flex-shrink:0;
  background:var(--brand); color:var(--surface);
  display:grid; place-items:center; font-family:var(--font-heading); font-weight:600; font-size:16px;
}
.brand-logo{height:40px; width:auto; max-width:min(220px, calc(100vw - 190px)); object-fit:contain; object-position:left center; flex-shrink:0;}
/* Uploaded logos are sized by shape so none looks tiny or crowds out the menu icons. */
.brand--tall .brand-logo{height:50px;}
.brand--square .brand-logo{height:44px;}
.brand--wide .brand-logo{height:32px;}
/* On phones a wide logo plus the name does not fit: the logo alone (the link still says the name to screen readers). */
@media (max-width:520px){ .brand--normal .brand-name, .brand--wide .brand-name{display:none;} }
.brand-name{font-family:var(--font-heading); font-weight:600; font-size:18px; color:var(--brand); white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.nav-icons{display:flex; gap:6px; flex-shrink:0;}
.icon-link{display:grid; place-items:center; width:38px; height:38px; border-radius:50%; color:var(--brand); transition:background .2s;}
.icon-link:hover{background:var(--surface-dim);}
@media (max-width:420px){ .brand-name{font-size:16px;} }

/* ---------- Important banner (newest pinned notice) ---------- */
.alert-banner{background:var(--accent-wash); border-bottom:1px solid var(--accent-line);}
.alert-list{display:grid;}
.alert-inner{display:flex; align-items:center; gap:12px; padding-block:11px;}
.alert-inner + .alert-inner{border-top:1px solid var(--accent-line);}
.alert-icon{color:var(--brand-soft); flex-shrink:0; display:flex;}
.alert-text{flex:1; min-width:0; font-size:14.5px; color:var(--brand);}
.alert-text strong{font-weight:600;}
.alert-date{font-family:var(--font-mono); font-size:12px; color:var(--brand-soft); white-space:nowrap;}
.alert-link{font-size:14px; font-weight:600; color:var(--brand); text-underline-offset:3px; flex-shrink:0;}

/* ---------- Hero ---------- */
.hero{
  color:#fff; padding-block:72px 56px;
  /* The photo is set per clinic in index.php: background-image: var(--hero-overlay), url(...) */
  --hero-overlay: linear-gradient(180deg, color-mix(in srgb, var(--brand) 80%, transparent), color-mix(in srgb, var(--brand) 58%, transparent));
  background-color:var(--brand); background-image:var(--hero-overlay), url('hero.jpg');
  background-size:cover; background-position:center; background-repeat:no-repeat;
}
.hero-inner{max-width:720px; display:grid; gap:18px;}
.hero h1{color:#fff; font-size:clamp(36px, 5vw, 56px);}
.hero-lede{font-size:15px; color:var(--accent-wash);}
/* One line where it fits; on phones the sentence wraps rather than shrinking to an unreadable size */
@media (min-width:760px){ .hero-lede{white-space:nowrap;} }
.hero-cta{display:flex; flex-wrap:wrap; gap:10px; margin-top:10px;}

.status-bar{
  margin-top:52px; background:var(--brand); color:var(--accent-wash);
  border-radius:var(--radius); display:grid; grid-template-columns:repeat(3, 1fr);
}
.status-item{padding:20px 24px; border-right:1px solid rgba(255,255,255,.12); display:grid; gap:4px; align-content:start;}
.status-item:last-child{border-right:none;}
.status-label{font-family:var(--font-mono); font-size:12.5px; letter-spacing:.1em; text-transform:uppercase; opacity:.65;}
.status-value{font-size:16.5px; font-weight:500; color:#fff; display:flex; align-items:center; gap:9px; flex-wrap:wrap;}
.status-phone{color:#fff; text-decoration:none; font-variant-numeric:tabular-nums; border-bottom:1px solid rgba(255,255,255,.35);}
.status-phone:hover{border-bottom-color:#fff;}
.status-phone-inline{color:#fff; text-decoration:none; letter-spacing:.06em; border-bottom:1px solid rgba(255,255,255,.35); margin-left:6px;}
.status-phone-inline:hover{border-bottom-color:#fff;}
.status-sub{font-size:15px; opacity:.8;}
.dot{width:9px; height:9px; border-radius:50%; background:var(--ok); flex-shrink:0;}
.dot.is-lunch{background:var(--warn);}
.dot.is-closed{background:var(--closed);}
@media (max-width:760px){
  .status-bar{grid-template-columns:1fr;}
  .status-item{border-right:none; border-bottom:1px solid rgba(255,255,255,.12);}
  .status-item:last-child{border-bottom:none;}
}

/* ---------- Notice board ---------- */
.board{padding-block:96px;}
.board-layout{display:grid; gap:32px; max-width:calc(860px + 2 * var(--gutter));}
.board-head{display:grid; gap:10px; justify-items:center; text-align:center;}
.board-head h2.eyebrow{font-family:var(--font-mono); font-size:13px; font-weight:500; line-height:1.4; color:var(--brand-soft);}
.eyebrow-center::after{content:""; width:22px; height:1px; background:var(--accent);}
.board-body{display:grid; gap:20px; min-width:0;}
.notice-list{display:grid; gap:2px; background:var(--line); border:1px solid var(--line);}
.notice{background:var(--card); padding:24px 28px; display:grid; gap:8px;}
.notice-meta{display:flex; align-items:center; gap:12px; flex-wrap:wrap;}
.notice-date{font-family:var(--font-mono); font-size:12.5px; color:var(--ink-soft); font-variant-numeric:tabular-nums;}
.notice h3{font-size:21px;}
.notice-body{display:grid; gap:10px; color:var(--ink); max-width:62ch;}
.notice-body p{overflow-wrap:anywhere;}
.notice.is-pinned{background:var(--accent-wash);}
.notice.is-pinned .notice-date{color:var(--brand-soft);}
.pin-tag{
  display:inline-flex; align-items:center; gap:5px;
  font-family:var(--font-mono); font-size:11px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--brand); background:var(--card); border:1px solid var(--accent-line);
  border-radius:20px; padding:3px 10px 3px 8px;
}
.notice:target{outline:2px solid var(--accent); outline-offset:-2px;}
.notice-empty{background:var(--card); padding:24px 28px; color:var(--ink-soft);}
.board-older{display:grid; gap:20px;}
.board-older > summary{justify-self:center; list-style:none; width:fit-content;}
.board-older > summary::-webkit-details-marker{display:none;}
.board-older[open] > summary{display:none;}
@media (max-width:900px){
  .board{padding-block:64px;}
  .board-layout{gap:24px;}
}
@media (max-width:600px){ .notice, .notice-empty{padding:20px;} }

/* ---------- Services ---------- */
.services{padding-block:0 96px;}
.services-grid{display:grid; grid-template-columns:repeat(var(--cols, 4), 1fr); gap:2px; background:var(--line); border:1px solid var(--line);}
.service-card{background:var(--card); padding:30px 26px; display:grid; gap:10px; align-content:start;}
.service-card h3{font-size:20px;}
.service-card p{font-size:14.5px; color:var(--ink-soft);}
.service-tag{
  font-family:var(--font-mono); font-size:11px; letter-spacing:.08em; text-transform:uppercase;
  color:var(--brand-soft); border:1px solid var(--accent-line); border-radius:20px; padding:3px 10px; width:fit-content;
}
@media (max-width:1000px){ .services-grid{grid-template-columns:repeat(min(var(--cols, 4), 2), 1fr);} }
@media (max-width:560px){ .services-grid{grid-template-columns:1fr;} .services{padding-block:0 64px;} }

/* ---------- Normaltariffen ---------- */
.tariff{padding-block:96px 0;}
.tariff-image{display:block; width:100%; max-width:520px; margin-inline:auto; border:1px solid var(--line); border-radius:6px; overflow:hidden; background:#fff; box-shadow:0 10px 30px color-mix(in srgb, var(--brand) 14%, transparent); transition:transform .2s;}
.tariff-image:hover{transform:translateY(-2px);}
.tariff-image img{display:block; width:100%; height:auto;}
@media (max-width:760px){ .tariff{padding-block:64px 0;} }
@media (prefers-reduced-motion:reduce){ .tariff-image{transition:none;} .tariff-image:hover{transform:none;} }
.notice-body a, .service-card a, .pi-card a, .hero-lede a, .contact-note a{text-underline-offset:3px;}

/* ---------- Staff ---------- */
.staff{padding-block:96px 0;}
/* Heading on the left like «Tjenester»; the people sit centred in one box framed like the service cards. */
.staff-panel{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:40px 32px 44px;}
.staff-group + .staff-group{margin-top:40px;}
/* Same pill as the tags on the service cards («Offentlig avtale»). */
.staff-group-title{
  font-family:var(--font-mono); font-size:11px; font-weight:400; letter-spacing:.08em; text-transform:uppercase; line-height:1.4;
  color:var(--brand-soft); border:1px solid var(--accent-line); border-radius:20px; padding:3px 10px;
  width:fit-content; margin:0 auto 18px;
}
/* Flex, not grid, so a short row (two secretaries) sits in the middle instead of to the left. */
.staff-grid{list-style:none; margin:0; padding:0; display:flex; flex-wrap:wrap; justify-content:center; gap:28px 22px;}
.staff-card{width:156px; display:grid; gap:2px; align-content:start; justify-items:center; text-align:center; min-width:0;}
.staff-photo{width:100%; aspect-ratio:1; border-radius:14px; overflow:hidden; background:var(--accent-wash); margin-bottom:10px;}
.staff-photo img{width:100%; height:100%; object-fit:cover; display:block;}
.staff-placeholder{width:100%; height:100%; display:block;}
.staff-name{font-family:var(--font-heading); font-weight:600; font-size:16px; color:var(--brand); line-height:1.25;}
.staff-role{font-size:13.5px; color:var(--ink-soft);}
@media (max-width:560px){
  .staff{padding-block:64px 0;}
  .staff-panel{padding:28px 16px 32px;}
  .staff-grid{gap:22px 14px;}
  .staff-card{width:calc(50% - 7px); max-width:156px;}
  .staff-name{font-size:15px;}
}
/* Placeholder figures, in theme colours */
.staff-placeholder{stroke-linejoin:round; stroke-linecap:round;}
.ph-face{fill:#fff; stroke:var(--brand); stroke-width:2.2;}
.ph-hair{fill:var(--brand); stroke:var(--brand); stroke-width:2.2;}
.ph-coat{fill:#fff; stroke:var(--brand); stroke-width:2.2;}
.ph-top{fill:color-mix(in srgb, var(--brand-soft) 40%, var(--accent-wash)); stroke:var(--brand); stroke-width:2.2;}
.ph-line{fill:none; stroke:var(--brand); stroke-width:2.2;}
.ph-dark{fill:var(--brand);}
.ph-scope{fill:none; stroke:var(--brand); stroke-width:3;}
.ph-headset{fill:none; stroke:var(--brand); stroke-width:3.2;}
.ph-mic{fill:none; stroke:var(--brand); stroke-width:2.2;}
.ph-paper{fill:#fff; stroke:var(--brand); stroke-width:2.2;}
.ph-text{fill:none; stroke:var(--brand-soft); stroke-width:1.8;}

/* ---------- Patient info ---------- */
.patient-info{
  color:var(--surface); padding-block:96px;
  --hero-overlay: linear-gradient(180deg, color-mix(in srgb, var(--brand) 88%, transparent), color-mix(in srgb, var(--brand) 74%, transparent));
  background-color:var(--brand); background-image:var(--hero-overlay), url('hero.jpg');
  background-size:cover; background-position:center bottom; background-repeat:no-repeat;
}
.patient-info > .wrap{display:grid; gap:14px;}
.patient-info h2{color:var(--surface);}
.pi-grid{display:grid; grid-template-columns:repeat(var(--cols, 3), 1fr); gap:2px; background:rgba(255,255,255,.14); margin-top:28px;}
.pi-card{background:var(--brand); padding:26px 24px; display:grid; gap:8px; align-content:start;}
.pi-card h3{color:var(--surface); font-size:18px;}
.pi-card p{font-size:14.5px; color:var(--accent-line);}
@media (max-width:900px){ .pi-grid{grid-template-columns:1fr;} .patient-info{padding-block:64px;} }

/* Parallax: the hero and "Til deg som pasient" share one image fixed to the window,
   so it shows through again further down. Only on devices with a mouse and
   without reduced motion; iOS ignores fixed backgrounds anyway. */
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  .parallax .hero, .parallax .patient-info{background-attachment:fixed; background-position:center;}
}

/* ---------- Hours & contact ---------- */
.contact{padding-block:72px 80px;}
.contact-grid{display:grid; grid-template-columns:repeat(3, 1fr); gap:2px; background:var(--line); border:1px solid var(--line);}
.contact-card{background:var(--card); padding:24px; display:flex; flex-direction:column; gap:8px; min-width:0;}
.contact-card h3{font-family:var(--font-mono); font-size:14px; font-weight:500; letter-spacing:.08em; text-transform:uppercase; color:var(--brand-soft); margin-bottom:4px;}
.hours-row{display:flex; justify-content:space-between; gap:12px; font-size:16.5px; padding:8px 0; border-bottom:1px dashed var(--line);}
.hours-row:last-child{border-bottom:none;}
.hours-row span:last-child{font-family:var(--font-mono); font-size:15px; color:var(--ink-soft); white-space:nowrap; font-variant-numeric:tabular-nums;}
.hours-row.is-today{color:var(--brand);}   /* marked by colour and «· i dag», not bold (easier to read) */
.hours-row.is-today span:last-child{color:var(--brand);}
.hours-row.is-today span:first-child::after{content:" · i dag"; font-weight:400; color:var(--brand-soft);}
.hours-note{color:var(--ink-soft);}
.contact-card .big{font-family:var(--font-heading); font-size:28px; color:var(--brand);}
.contact-card .big a{text-decoration:none;}
.contact-sub{margin-top:18px !important; font-family:var(--font-mono); font-size:13px; letter-spacing:.08em; text-transform:uppercase; color:var(--brand-soft); margin-top:12px;}
.contact-card .hours-row span:last-child{text-align:right; line-height:1.5;}
.contact-note{margin-top:8px;}
.muted{font-size:16px; color:var(--ink-soft);}
address{font-style:normal; font-size:16.5px; margin-top:auto; padding-top:8px;}

.map-slot{flex:1; min-height:170px; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; display:flex; margin-top:4px;}
.map-slot iframe{width:100%; min-height:170px; border:0; flex:1;}
.map-load{
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px;
  background:var(--surface-dim); border:0; color:var(--brand); font-weight:600; font-size:14.5px;
}
.map-load small{font-weight:400; font-size:12.5px; color:var(--ink-soft);}
.map-load:hover{background:var(--accent-wash);}
.map-out{font-size:15px; color:var(--brand-soft); text-underline-offset:3px;}
@media (max-width:900px){ .contact-grid{grid-template-columns:1fr 1fr;} .contact-card-map{grid-column:1 / -1;} }
@media (max-width:600px){ .contact-grid{grid-template-columns:1fr;} .contact{padding-block:56px 64px;} }

/* ---------- News feed (bottom) ---------- */
.feed{padding-block:72px 0;}
.feed-head{display:flex; justify-content:space-between; align-items:baseline; gap:8px 24px; flex-wrap:wrap; margin-bottom:18px;}
.feed-head h2.eyebrow{font-size:12.5px; font-weight:500; line-height:1.4;}
.feed-source{font-size:13px; color:var(--ink-soft);}
.feed-source a{color:inherit; text-underline-offset:2px;}
.feed-list{list-style:none; display:grid; grid-template-columns:repeat(4, 1fr); gap:2px; background:var(--line); border:1px solid var(--line);}
.feed-item{background:var(--card); padding:18px 20px 20px; display:flex; flex-direction:column; gap:8px; min-width:0;}
.feed-date{font-family:var(--font-mono); font-size:12px; color:var(--ink-soft); font-variant-numeric:tabular-nums;}
.feed-link{font-size:15px; font-weight:500; line-height:1.4; color:var(--brand); text-decoration:underline; text-decoration-color:var(--accent-line); text-underline-offset:3px; overflow-wrap:anywhere;}
.feed-link:hover{text-decoration-color:var(--brand);}
@media (max-width:900px){ .feed-list{grid-template-columns:1fr 1fr;} }
@media (max-width:560px){ .feed-list{grid-template-columns:1fr;} .feed{padding-block:56px 0;} }

/* ---------- Footer ---------- */
.site-footer{border-top:1px solid var(--line);}
.footer-row{display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:8px 22px; padding-block:24px;}
.footer-name{font-family:var(--font-heading); font-weight:600; color:var(--brand);}
.footer-fine{font-size:15px; color:var(--ink-soft);}
.footer-legal{border-top:1px solid var(--line); justify-content:flex-start; padding-block:16px 28px;}
.footer-legal a{font-size:15px; color:var(--ink-soft); text-underline-offset:3px;}
.footer-legal a:hover{color:var(--brand);}

@media print{
  .site-header, .hero-cta, .map-slot, .map-out, .board-older > summary{display:none;}
  .hero, .patient-info{background:none; color:#000;}
}
