/* ═══════════════════════════════════════════════════════════
   Rehabkliniken — Naprapater i Stockholm
   Designed with UI/UX Pro Max: Accessible & Ethical
   ═══════════════════════════════════════════════════════════ */

:root {
  --primary: #0E7490;        /* deep cyan */
  --primary-dark: #155E75;
  --primary-light: #06B6D4;
  --accent: #059669;         /* health green CTA */
  --accent-dark: #047857;
  --bg: #FFFFFF;
  --bg-soft: #F0F9FF;        /* very light cyan */
  --bg-tint: #ECFEFF;
  --text: #0F172A;           /* high contrast */
  --text-muted: #475569;
  --border: #E2E8F0;
  --gold: #D4AF37;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.06);
  --shadow: 0 4px 16px rgba(15,23,42,0.08);
  --shadow-lg: 0 24px 60px rgba(15,23,42,0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
  --maxw: 1200px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: var(--primary-light); color: #fff; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Figtree', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: 'Figtree', sans-serif; font-weight: 700; line-height: 1.2; color: var(--text); letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); }
p { color: var(--text-muted); }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--primary-light); outline-offset: 3px; border-radius: 4px;
}

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

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(20px, 4vw, 40px); }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff; padding: 12px 20px; z-index: 1000; }
.skip-link:focus { left: 16px; top: 16px; }

/* ─── Top contact strip ─── */
.topbar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  padding: 10px 0;
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.topbar-info { display: flex; gap: 24px; align-items: center; }
.topbar a { color: #fff; font-weight: 600; }
.topbar a:hover { color: var(--bg-tint); }
.topbar svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 6px; }

/* ─── Header ─── */
.header {
  position: sticky; top: 0; z-index: 80;
  background: rgba(255,255,255,0.96);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: var(--shadow-sm);
}
.brand-text strong { display: block; font-size: 19px; color: var(--text); font-weight: 800; line-height: 1.1; }
.brand-text span { font-size: 12px; color: var(--text-muted); letter-spacing: 0.04em; text-transform: uppercase; }

.nav { display: flex; gap: 8px; align-items: center; }
.nav a { padding: 10px 16px; font-size: 15px; font-weight: 600; color: var(--text); border-radius: 8px; }
.nav a:hover { background: var(--bg-soft); color: var(--primary-dark); }
.nav a.active { color: var(--primary-dark); }
.nav-cta {
  background: var(--accent); color: #fff !important;
  padding: 12px 22px !important; border-radius: 10px !important;
  font-weight: 700; box-shadow: var(--shadow-sm);
}
.nav-cta:hover { background: var(--accent-dark); transform: translateY(-1px); box-shadow: var(--shadow); }

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 10px; min-width: 44px; min-height: 44px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; transition: all 0.3s; border-radius: 2px; }

/* ─── Hero ─── */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--bg-tint) 0%, var(--bg-soft) 50%, #fff 100%);
  padding: clamp(60px, 8vw, 110px) 0 clamp(60px, 8vw, 100px);
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 70%; height: 200%;
  background: radial-gradient(closest-side, rgba(6,182,212,0.18), transparent);
  pointer-events: none;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(5,150,105,0.1); color: var(--accent-dark);
  padding: 8px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.02em;
  margin-bottom: 24px;
}
.hero-eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(5,150,105,0.2); }
.hero h1 { margin-bottom: 20px; }
.hero h1 span { color: var(--primary); }
.hero-sub { font-size: 19px; color: var(--text-muted); margin-bottom: 32px; max-width: 540px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-trust { display: flex; gap: 32px; align-items: center; padding-top: 24px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.hero-trust-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-muted); }
.hero-trust-item strong { display: block; font-size: 22px; color: var(--text); font-weight: 800; line-height: 1; }
.hero-trust-item span { font-size: 13px; }
.hero-trust-divider { width: 1px; height: 36px; background: var(--border); }

.hero-visual { position: relative; }
.hero-img-main {
  width: 100%; aspect-ratio: 4/5; object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.hero-badge {
  position: absolute; bottom: 24px; left: -24px;
  background: #fff; padding: 18px 22px;
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 14px;
  max-width: 280px;
}
.hero-badge-icon { width: 44px; height: 44px; border-radius: 50%; background: rgba(5,150,105,0.15); display: flex; align-items: center; justify-content: center; color: var(--accent); flex-shrink: 0; }
.hero-badge strong { display: block; font-size: 14px; color: var(--text); font-weight: 700; }
.hero-badge span { font-size: 12px; color: var(--text-muted); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px;
  font-size: 15px; font-weight: 700;
  border-radius: 10px; border: 2px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: all var(--transition);
  font-family: inherit; min-height: 48px;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-secondary { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ─── Sections ─── */
.section { padding: clamp(64px, 8vw, 110px) 0; }
.section-soft { background: var(--bg-soft); }
.section-header { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--primary); margin-bottom: 12px;
}
.section-header h2 { margin-bottom: 14px; }
.section-header p { font-size: 18px; }

/* ─── Treatment cards ─── */
.treatments-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.treatment {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.treatment:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--primary-light); }
.treatment-img { aspect-ratio: 4/3; overflow: hidden; }
.treatment-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.treatment:hover .treatment-img img { transform: scale(1.05); }
.treatment-body { padding: 24px 22px; flex: 1; display: flex; flex-direction: column; }
.treatment-icon { width: 40px; height: 40px; color: var(--primary); margin-bottom: 14px; }
.treatment h3 { margin-bottom: 10px; }
.treatment p { font-size: 15px; flex: 1; }
.treatment-link { margin-top: 18px; font-weight: 700; font-size: 14px; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; }
.treatment-link::after { content: '→'; transition: transform var(--transition); }
.treatment:hover .treatment-link::after { transform: translateX(4px); }

/* ─── Symptoms list (SEO content) ─── */
.symptoms {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  padding: 48px;
}
.symptoms h3 { font-size: 1.4rem; margin-bottom: 20px; }
.symptoms-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 24px; list-style: none; margin-top: 16px; }
.symptoms-list li {
  padding: 10px 0 10px 28px; position: relative;
  font-size: 15px; color: var(--text);
  border-bottom: 1px solid rgba(15,23,42,0.06);
}
.symptoms-list li::before {
  content: ''; position: absolute; left: 0; top: 14px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); opacity: 0.15;
}
.symptoms-list li::after {
  content: ''; position: absolute; left: 5px; top: 19px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}

/* ─── Process / How it works ─── */
.process { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; }
.process-step { text-align: left; padding: 32px; background: #fff; border-radius: var(--radius-lg); border: 1px solid var(--border); transition: all var(--transition); }
.process-step:hover { box-shadow: var(--shadow); }
.process-step-icon {
  width: 56px; height: 56px;
  background: var(--bg-tint); color: var(--primary);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.process-step h3 { margin-bottom: 10px; }
.process-step p { font-size: 15px; }

/* ─── Therapists ─── */
.therapists { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.therapist {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden; text-align: center;
  transition: all var(--transition);
}
.therapist:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.therapist-photo {
  aspect-ratio: 1; overflow: hidden;
  background: linear-gradient(135deg, var(--bg-tint), var(--bg-soft));
}
.therapist-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.therapist:hover .therapist-photo img { transform: scale(1.04); }
.therapist-body { padding: 22px 18px; }
.therapist-body h3 { font-size: 1.1rem; margin-bottom: 4px; }
.therapist-body p { font-size: 13px; color: var(--text-muted); }

/* ─── Testimonials ─── */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.testimonial {
  background: #fff; padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  position: relative;
}
.testimonial-stars { color: var(--gold); font-size: 14px; letter-spacing: 3px; margin-bottom: 14px; }
.testimonial blockquote { font-size: 16px; color: var(--text); line-height: 1.7; margin-bottom: 18px; }
.testimonial figcaption strong { display: block; font-size: 14px; color: var(--text); font-weight: 700; }
.testimonial figcaption span { font-size: 13px; color: var(--text-muted); }

/* ─── CTA band ─── */
.cta-band {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: clamp(48px, 7vw, 84px) 0;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; top: -50%; right: -10%; width: 60%; height: 200%;
  background: radial-gradient(closest-side, rgba(255,255,255,0.08), transparent);
}
.cta-band-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  position: relative; flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.85); font-size: 17px; }
.cta-band .btn-primary { background: #fff; color: var(--primary-dark); border-color: #fff; }
.cta-band .btn-primary:hover { background: var(--bg-tint); color: var(--primary-dark); }

/* ─── Blog grid ─── */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.blog-card {
  background: #fff; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all var(--transition);
  display: flex; flex-direction: column;
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--primary-light); }
.blog-card-img {
  aspect-ratio: 16/10; overflow: hidden;
  background: linear-gradient(135deg, var(--bg-tint), var(--bg-soft));
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.blog-card:hover .blog-card-img img { transform: scale(1.04); }
.blog-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.blog-tag {
  display: inline-block; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--primary); margin-bottom: 10px;
}
.blog-card h3 { font-size: 1.2rem; margin-bottom: 10px; line-height: 1.35; }
.blog-card h3 a { color: var(--text); }
.blog-card h3 a:hover { color: var(--primary); }
.blog-card p { font-size: 14px; flex: 1; margin-bottom: 18px; }
.blog-card-meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 12px; align-items: center; }

/* ─── Article (blog post) ─── */
.article { padding: clamp(40px, 6vw, 80px) 0; }
.article-header { max-width: 760px; margin: 0 auto 40px; text-align: left; }
.article-header .blog-tag { margin-bottom: 16px; }
.article-header h1 { margin-bottom: 16px; font-size: clamp(2rem, 4vw, 2.8rem); }
.article-meta { font-size: 14px; color: var(--text-muted); display: flex; gap: 16px; align-items: center; }
.article-hero { max-width: 980px; margin: 0 auto 40px; }
.article-hero img { width: 100%; aspect-ratio: 21/9; object-fit: cover; border-radius: var(--radius-lg); }
.article-body { max-width: 760px; margin: 0 auto; font-size: 18px; line-height: 1.8; }
.article-body p { color: var(--text); margin-bottom: 24px; }
.article-body h2 { font-size: 1.7rem; margin: 48px 0 16px; }
.article-body h3 { font-size: 1.3rem; margin: 32px 0 12px; }
.article-body ul, .article-body ol { margin: 0 0 24px 24px; color: var(--text); }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: var(--text); }
.article-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 16px 24px; margin: 32px 0;
  background: var(--bg-soft); border-radius: 0 8px 8px 0;
  font-style: italic; color: var(--text);
}
.article-cta {
  background: linear-gradient(135deg, var(--bg-tint), var(--bg-soft));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; margin: 48px 0; text-align: center;
}
.article-cta h3 { margin-bottom: 8px; }
.article-cta p { margin-bottom: 20px; }
.article-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-top: 32px; }

/* ─── Contact ─── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-info h2 { margin-bottom: 16px; }
.contact-details { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-item-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-tint); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-item strong { display: block; font-size: 14px; color: var(--text-muted); font-weight: 600; margin-bottom: 2px; }
.contact-item a, .contact-item span { color: var(--text); font-size: 16px; font-weight: 600; }

.contact-form { background: #fff; padding: 36px; border-radius: var(--radius-lg); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; }
.contact-form label { font-size: 13px; font-weight: 600; color: var(--text); }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; padding: 14px 16px;
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 16px; font-family: inherit; color: var(--text);
  transition: border-color var(--transition);
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--primary); outline: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-status { font-size: 14px; padding: 12px; border-radius: 8px; display: none; }
.form-status.success { display: block; background: rgba(5,150,105,0.1); color: var(--accent-dark); }
.form-status.error { display: block; background: #FEF2F2; color: #991B1B; }
.form-note { font-size: 13px; color: var(--text-muted); }

/* ─── Footer ─── */
.footer { background: #0B1F2A; color: rgba(255,255,255,0.7); padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; }
.footer-brand p { font-size: 14px; margin-top: 16px; max-width: 320px; }
.footer h4 { color: #fff; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; font-weight: 700; }
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a, .footer-links span { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 22px 0; font-size: 13px; }
.footer-bottom-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom a { color: var(--primary-light); }

/* ─── Reduced motion ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .treatments-grid, .therapists { grid-template-columns: repeat(2, 1fr); }
  .symptoms-list { grid-template-columns: repeat(2, 1fr); }
  .process { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .topbar-info { gap: 14px; font-size: 13px; }
  .topbar-info > span:first-child { display: none; }
  .nav { display: none; position: fixed; inset: 64px 0 0; background: #fff; flex-direction: column; padding: 32px 24px; gap: 4px; z-index: 90; border-top: 1px solid var(--border); align-items: stretch; }
  .nav.open { display: flex; }
  .nav a { padding: 16px; font-size: 17px; border-radius: 12px; }
  .nav-cta { margin-top: 12px; text-align: center; }
  .menu-toggle { display: block; }
  .menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .header-inner { height: 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; max-width: 420px; margin: 0 auto; }
  .hero-img-main { aspect-ratio: 4/3; }
  .hero-badge { left: 12px; right: 12px; max-width: none; }
  .hero-trust { gap: 20px; }
  .hero-trust-divider { display: none; }
  .treatments-grid, .therapists, .testimonials-grid, .blog-grid { grid-template-columns: 1fr; }
  .symptoms { padding: 28px; }
  .symptoms-list { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-band-inner { flex-direction: column; text-align: center; align-items: center; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-trust { flex-direction: column; align-items: flex-start; gap: 14px; }
}
