/* Design system - Mjøskirurgene */
:root {
  --background: 0 0% 100%;
  --foreground: 215 25% 27%;
  --card: 0 0% 100%;
  --card-foreground: 215 25% 27%;
  --primary: 212 92% 45%;
  --primary-foreground: 0 0% 100%;
  --secondary: 210 100% 97%;
  --secondary-foreground: 215 25% 27%;
  --muted: 210 40% 96%;
  --muted-foreground: 215 16% 47%;
  --border: 214 32% 91%;
  --radius: 0.75rem;
  --medical-50: 210 100% 98%;
  --warm-50: 24 95% 97%;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
}

.container { max-width: 1400px; margin-left: auto; margin-right: auto; padding-left: 1rem; padding-right: 1rem; }
@media (min-width: 768px) { .container { padding-left: 2rem; padding-right: 2rem; } }

/* Navigation */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid hsl(var(--border));
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.05);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.nav-logo { height: 5rem; width: auto; margin: -0.5rem 0; display: block; }
.nav-desktop { display: none; gap: 1.5rem; }
@media (min-width: 768px) {
  .nav-desktop { display: flex; align-items: center; }
  .nav-mobile-btn { display: none; }
}
.nav-desktop button, .nav-desktop a,
.nav-mobile a {
  background: none; border: none; cursor: pointer; font: inherit; color: inherit;
  transition: color 0.2s;
}
.nav-desktop button:hover, .nav-desktop a:hover,
.nav-mobile a:hover { color: hsl(var(--primary)); }
.nav-mobile-btn {
  padding: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  position: relative;
}
.nav-mobile-btn .icon-close { display: none; }
.nav-mobile-btn.is-open .icon-menu { display: none; }
.nav-mobile-btn.is-open .icon-close { display: block; }
.nav-mobile { display: none; flex-direction: column; gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; }
.nav-mobile.open { display: flex; }
.nav-mobile a { text-align: left; padding: 0.5rem 0; }

/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 6rem;
  position: relative;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
}
.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, hsl(var(--background) / 0.95), hsl(var(--background) / 0.85), hsl(var(--background) / 0.7));
}
.hero .container { position: relative; z-index: 10; }
.hero h1 { font-size: 2.5rem; font-weight: 700; margin: 0 0 1.5rem; line-height: 1.2; }
@media (min-width: 768px) { .hero h1 { font-size: 3.75rem; } }
.hero-sub { font-size: 1.25rem; margin: 0 0 1rem; }
@media (min-width: 768px) { .hero-sub { font-size: 1.5rem; } }
.hero-desc { font-size: 1.125rem; margin: 0 0 2rem; color: hsl(var(--muted-foreground)); max-width: 36rem; }
.hero-buttons { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) { .hero-buttons { flex-direction: row; } }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: calc(var(--radius) - 2px);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border: 1px solid hsl(var(--border));
  background: transparent;
  color: hsl(var(--foreground));
}
.btn:hover { background: hsl(var(--muted)); }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1.125rem; }
.hero-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.hero-footer a { color: inherit; font-weight: 500; text-decoration: underline; }
.hero-footer a:hover { opacity: 0.8; }
.hero-address { display: flex; align-items: center; gap: 0.5rem; color: hsl(var(--foreground) / 0.8); }

/* Sections */
section { padding: 3rem 0; }
@media (min-width: 768px) { section { padding: 5rem 0; } }
.section-alt { background: hsl(var(--secondary) / 0.3); }
.section-head { text-align: center; margin-bottom: 4rem; }
.section-head h2 { font-size: 2rem; font-weight: 700; margin: 0 0 1rem; }
@media (min-width: 768px) { .section-head h2 { font-size: 3rem; } }
.section-head p { font-size: 1.125rem; color: hsl(var(--muted-foreground)); max-width: 42rem; margin: 0 auto; }

/* Cards */
.card {
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.3s, transform 0.3s;
}
.card:hover { box-shadow: 0 10px 40px rgb(0 0 0 / 0.1); }
.card-link { display: block; text-decoration: none; color: inherit; height: 100%; }
.card-link:hover { transform: translateY(-4px); }
.card-link .card { height: 100%; }
.card-icon { width: 3.5rem; height: 3.5rem; border-radius: 0.5rem; background: hsl(var(--primary) / 0.1); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.card-icon svg { width: 1.75rem; height: 1.75rem; color: hsl(var(--primary)); }
.card h3 { font-size: 1.25rem; font-weight: 600; margin: 0 0 0.75rem; color: hsl(var(--card-foreground)); }
.card p { margin: 0; color: hsl(var(--muted-foreground)); }

/* Services grid */
.services-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(4, 1fr); } }

/* Accordion */
.accordion-wrap { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) { .accordion-wrap { flex-direction: row; } }
.accordion-item {
  border: 1px solid hsl(var(--primary) / 0.3);
  border-radius: var(--radius);
  padding: 0 1.5rem;
  background: hsl(var(--card));
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.05);
  flex: 1;
}
.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 0;
  background: none;
  border: none;
  font-size: 1.125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  cursor: pointer;
  text-align: left;
}
.accordion-trigger:hover { text-decoration: underline; }
.accordion-trigger svg { width: 1.25rem; height: 1.25rem; color: hsl(var(--primary)); flex-shrink: 0; }
.accordion-trigger .icon-left { display: flex; align-items: center; gap: 0.75rem; }
.accordion-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.2s ease-out;
}
.accordion-item.open .accordion-content { max-height: 800px; }
.accordion-item.open .accordion-chevron { transform: rotate(180deg); }
.accordion-body { padding-bottom: 1rem; color: hsl(var(--muted-foreground)); line-height: 1.7; }
.accordion-body p { margin: 0 0 0.5rem; }
.accordion-body p:last-of-type { margin-bottom: 1rem; }
.accordion-body a { color: hsl(var(--primary)); text-decoration: underline; }
.accordion-body a:hover { opacity: 0.8; }
.accordion-links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.accordion-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  border: 1px solid hsl(var(--primary) / 0.3);
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--primary));
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
}
.accordion-links a:hover { background: hsl(var(--primary) / 0.2); }

/* About */
.about-prose { font-size: 1.125rem; color: hsl(var(--muted-foreground)); margin-bottom: 3rem; max-width: none; }
.about-cards { display: grid; gap: 1.5rem; margin-bottom: 3rem; }
@media (min-width: 768px) { .about-cards { grid-template-columns: repeat(3, 1fr); } }
.about-card { text-align: center; padding: 1.5rem; }
.about-card .icon-wrap { width: 3rem; height: 3rem; border-radius: 50%; background: hsl(var(--primary) / 0.1); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.about-card .icon-wrap svg { width: 1.5rem; height: 1.5rem; color: hsl(var(--primary)); }
.about-card h3 { font-weight: 600; margin: 0 0 0.5rem; color: hsl(var(--card-foreground)); }
.about-card p { margin: 0; color: hsl(var(--muted-foreground)); }

/* Contact */
.contact-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } }
.contact-card { padding: 2rem; }
.contact-card h3 { font-size: 1.5rem; font-weight: 600; margin: 0 0 1.5rem; color: hsl(var(--card-foreground)); }
.contact-row { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1.5rem; }
.contact-row:last-child { margin-bottom: 0; }
.contact-icon { width: 2.5rem; height: 2.5rem; border-radius: 0.5rem; background: hsl(var(--primary) / 0.1); flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.contact-icon svg { width: 1.25rem; height: 1.25rem; color: hsl(var(--primary)); }
.contact-row h4 { font-weight: 500; margin: 0 0 0.25rem; color: hsl(var(--card-foreground)); }
.contact-row p, .contact-row a { margin: 0; color: hsl(var(--muted-foreground)); }
.contact-row a { color: hsl(var(--primary)); text-decoration: none; }
.contact-row a:hover { text-decoration: underline; }
.contact-hours .row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.contact-alert {
  padding: 1rem 1.5rem;
  background: hsl(48 96% 89%);
  border: 1px solid hsl(43 96% 76%);
  border-radius: var(--radius);
  display: flex;
  gap: 0.75rem;
}
.contact-alert svg { width: 1.25rem; height: 1.25rem; color: hsl(38 92% 50%); flex-shrink: 0; margin-top: 2px; }
.contact-alert h4 { font-weight: 600; margin: 0 0 0.5rem; color: hsl(32 95% 25%); }
.contact-alert p { font-size: 0.875rem; margin: 0; color: hsl(32 95% 30%); }

/* Footer */
.footer {
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  padding: 3rem 0;
}
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.footer-brand .icon { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: hsl(var(--background) / 0.1); display: flex; align-items: center; justify-content: center; }
.footer-brand .icon svg { width: 1.5rem; height: 1.5rem; }
.footer-brand span { font-size: 1.25rem; font-weight: 700; }
.footer p { margin: 0; opacity: 0.8; }
.footer h3 { font-weight: 600; margin: 0 0 1rem; }
.footer .space-y p { margin-bottom: 0.5rem; }
.footer .space-y p:last-child { margin-bottom: 0; }
.footer-bottom { border-top: 1px solid hsl(var(--background) / 0.2); padding-top: 2rem; text-align: center; opacity: 0.6; }

/* Page hero (inner pages) */
.page-hero {
  padding-top: 8rem;
  padding-bottom: 4rem;
  background: linear-gradient(to bottom, hsl(var(--medical-50)), hsl(var(--background)));
}
.page-hero .btn { margin-bottom: 1.5rem; }
.page-hero h1 { font-size: 2rem; font-weight: 700; margin: 0 0 1.5rem; }
@media (min-width: 768px) { .page-hero h1 { font-size: 3rem; } }
.page-hero p { font-size: 1.25rem; color: hsl(var(--muted-foreground)); margin: 0; }

/* Content sections (inner pages) */
.content-section { padding: 4rem 0; }
.content-inner { max-width: 56rem; margin: 0 auto; }
.content-inner > * + * { margin-top: 3rem; }
.content-inner h2 { font-size: 1.875rem; font-weight: 700; margin: 0 0 1.5rem; }
.content-inner .prose p { color: hsl(var(--muted-foreground)); margin-bottom: 1rem; }
.content-inner .prose p:last-child { margin-bottom: 0; }
.symptoms-list { list-style: none; padding: 0; margin: 0; }
.symptoms-list li { display: flex; align-items: flex-start; margin-bottom: 0.75rem; }
.symptoms-list li:last-child { margin-bottom: 0; }
.symptoms-list .icon { width: 1.25rem; height: 1.25rem; color: hsl(var(--primary)); margin-right: 0.75rem; margin-top: 2px; flex-shrink: 0; }
.content-cards { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .content-cards { grid-template-columns: repeat(3, 1fr); } }
.content-cards .card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.content-cards .card .big-icon { width: 2.5rem; height: 2.5rem; color: hsl(var(--primary)); margin-bottom: 1rem; }
.highlight-box {
  background: linear-gradient(135deg, hsl(var(--medical-50)), hsl(var(--warm-50)));
  border-radius: 1rem;
  padding: 2rem;
}
.doctor-card { padding: 2rem; }
.doctor-card .flex { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 768px) { .doctor-card .flex { flex-direction: row; } }
.doctor-card img { width: 12rem; height: 12rem; object-fit: cover; border-radius: 0.5rem; flex-shrink: 0; }
.doctor-card h2 { font-size: 1.5rem; font-weight: 700; margin: 0 0 0.5rem; }
.doctor-card .title { font-size: 1.125rem; color: hsl(var(--primary)); font-weight: 500; margin-bottom: 1rem; }
.doctor-card ul { margin: 0; padding: 0; list-style: none; }
.doctor-card li { color: hsl(var(--muted-foreground)); margin-bottom: 0.75rem; padding-left: 1rem; position: relative; }
.doctor-card li::before { content: "•"; position: absolute; left: 0; }
.facility-grid { display: grid; gap: 1.5rem; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .facility-grid { grid-template-columns: repeat(3, 1fr); } }
.facility-card { overflow: hidden; }
.facility-card img { width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; display: block; transition: transform 0.3s; }
.facility-card:hover img { transform: scale(1.05); }
.facility-card .card-body { padding: 1rem; }
.facility-card h3 { font-weight: 600; margin: 0 0 0.5rem; }
.facility-card p { font-size: 0.875rem; margin: 0; color: hsl(var(--muted-foreground)); }
.facility-center { display: flex; justify-content: center; margin-bottom: 3rem; }
.facility-center .facility-card { max-width: 33.333%; }
@media (max-width: 767px) { .facility-center .facility-card { max-width: 100%; } }
.why-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
.why-item { display: flex; align-items: flex-start; gap: 0.75rem; }
.why-item svg { width: 1.5rem; height: 1.5rem; color: hsl(var(--primary)); flex-shrink: 0; margin-top: 2px; }
.why-item h4 { font-weight: 600; margin: 0 0 0.25rem; }
.why-item p { margin: 0; color: hsl(var(--muted-foreground)); font-size: 0.9375rem; }
.page-title-flex { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.page-title-flex .icon-wrap { width: 4rem; height: 4rem; border-radius: 0.5rem; background: hsl(var(--primary) / 0.1); display: flex; align-items: center; justify-content: center; }
.page-title-flex .icon-wrap svg { width: 2rem; height: 2rem; color: hsl(var(--primary)); }

/* 404 */
.notfound { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: hsl(var(--muted)); }
.notfound-inner { text-align: center; }
.notfound h1 { font-size: 2.5rem; font-weight: 700; margin: 0 0 1rem; }
.notfound p { font-size: 1.25rem; color: hsl(var(--muted-foreground)); margin: 0 0 1rem; }
.notfound a { color: hsl(var(--primary)); text-decoration: underline; }
.notfound a:hover { opacity: 0.9; }

.scroll-mt { scroll-margin-top: 6rem; }
