:root{
  --bg:#ffffff;
  --text:#0f172a;          /* slate-900 */
  --muted:#475569;         /* slate-600 */
  --card:#f8fafc;          /* slate-50 */
  --border:#e2e8f0;        /* slate-200 */
  --accent:#2563eb;        /* blue-600 */
  --accent-contrast:#ffffff;
  --shadow:0 10px 20px rgba(2,6,23,.08);
  --contact-icon:48px;     /* tweak 32/36/40/48 */
}
html[data-theme="dark"]{
  --bg:#0b1220;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --card:#111827;
  --border:#1f2937;
  --accent:#6068fa;
  --accent-contrast:#0b1220;
  --shadow:0 12px 24px rgba(67,67,67,.35);
}

/* Base */
*{ box-sizing:border-box; }
html, body{ overflow-x:hidden; }
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,Helvetica,Arial,"Apple Color Emoji","Segoe UI Emoji";
  color:var(--text);
  background:var(--bg);
  line-height:1.4;
  min-height:100dvh;
}
a{ color:inherit; text-decoration:none; }

/* Header */
.header{
  position:sticky; top:0; z-index:100;
  background:rgba(255,255,255,.85);
  backdrop-filter:saturate(1.2) blur(8px);
  border-bottom:1px solid var(--border);
  overflow:visible;
}
html[data-theme="dark"] .header{ background:rgba(11,18,32,.78); }
.container{ width:min(1100px,100%); margin:0 auto; padding:0 16px; }
.row{ display:flex; align-items:center; justify-content:space-between; gap:12px; }

.brand{ display:flex; align-items:center; gap:10px; padding:14px 0; font-weight:700; }
.brand .logo{
  width:36px; height:36px; border-radius:10px; display:grid; place-items:center;
  font-size:18px; font-weight:800; background:var(--accent); color:var(--accent-contrast);
  box-shadow:var(--shadow);
}
.logo-img{ content:url("images/logga_hor.png"); height:64px; }
html[data-theme="dark"] .logo-img{ content:url("images/logga_hor_dark_new.png"); }

/* Top navigation */
.topnav{ display:none; }
.topnav ul{ list-style:none; display:flex; gap:16px; padding:0; margin:0; }
.topnav a{ padding:10px 12px; border-radius:10px; color:var(--muted); font-weight:600; }
.topnav a:hover, .topnav a.active{ color:var(--text); background:var(--card); }

.actions{ display:flex; gap:8px; align-items:center; }
.btn, select{
  border:1px solid var(--border); background:var(--card); color:var(--text);
  padding:8px 10px; border-radius:10px; font-weight:600; cursor:pointer;
}
button:hover, select:hover{ box-shadow:var(--shadow); }
.btn{ transition:transform .1s; }
.btn:active{ transform:translateY(4px); box-shadow:none; }
.btn:focus-visible, select:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
.lang-toggle{ font-size:1.2rem; line-height:1; padding:8px 10px; background:var(--card); border:1px solid var(--border); border-radius:10px; cursor:pointer; }

/* Burger & Mobile drawer */
.burger{
  display:inline-grid; border:1px solid var(--border); background:var(--card);
  padding:8px; border-radius:10px; color:var(--text);
}
.mobile{
  display:block; position:fixed; inset:64px 8px auto 8px; background:var(--bg);
  border:1px solid var(--border); border-radius:16px; box-shadow:var(--shadow);
  max-height:calc(100dvh - 88px); overflow:auto; z-index:1000; transform:translateZ(0);
}
.mobile[hidden]{ display:none !important; }
.mobile nav{ display:block; }
.mobile ul{ list-style:none; display:flex; flex-direction:column; gap:12px; padding:16px; margin:0; }
.mobile a{
  display:block; padding:16px 20px; text-align:center; border-radius:14px; font-weight:600;
  border:.5px solid var(--muted); font-size:1.1rem; color:var(--text); transition:background .2s;
}
.mobile a:hover, .mobile a:focus{ background:var(--card); }

/* Sections */
section{ scroll-margin-top:90px; padding:28px 0; border-bottom:1px dashed var(--border); }
.lead{ font-size:clamp(24px, 2.2vw + 12px, 36px); font-weight:800; margin:0 0 12px; }
.sub{ color:var(--muted); margin:0 0 24px; }
.card{ background:var(--card); border:1px solid var(--border); border-radius:16px; padding:16px; }
.grid{ display:grid; grid-template-columns:repeat(12,1fr); gap:16px; }
.section.is-hidden{ display:none !important; }

/* News */
.news{ display:grid; gap:12px; }
.news .item{ padding:12px; border-radius:12px; border:1px solid var(--border); }

/* Instructors */
.instr-controls{ display:flex; gap:8px; align-items:center; margin:8px 0 16px; }
.instr-card{ display:grid; gap:10px; }
.instr-card h3{ margin:6px 0; }
.instr-card.media-layout{ display:grid; grid-template-columns:120px 1fr; gap:16px; align-items:start; }
.instr-photo{ display:block; }
.instr-photo img{
  width:100%; height:auto; display:block; border-radius:12px; border:1px solid var(--border); background:var(--card);
}
.click-zoom{ cursor:zoom-in; }

/* Lightbox */
.lightbox{
  position:fixed; inset:0; background:rgba(0,0,0,.6); display:grid; place-items:center;
  z-index:3000; padding:24px;
}
.lightbox[hidden]{ display:none !important; }
.lightbox img{ max-width:92vw; max-height:92vh; border-radius:12px; box-shadow:var(--shadow); background:var(--bg); }

/* Layout helpers */
.two-col{ display:grid; grid-template-columns:1fr; gap:12px; }
.cols{ display:grid; grid-template-columns:1fr; gap:16px; }

/* Shop */
.shop{ display:grid; grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:12px; }
.product{ display:grid; gap:10px; }
.thumb{
  aspect-ratio:4/3; background:linear-gradient(135deg, var(--border), transparent);
  border:1px solid var(--border); border-radius:12px; display:grid; place-items:center;
  font-weight:800; color:var(--muted); }
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures image fills the 4/3 aspect ratio without stretching */
  display: block;    /* Removes bottom gap on inline images */
}
.product .meta{ display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap: wrap; }
.product .meta h3 {
  margin: 0;
  white-space: nowrap; /* Keeps "Bälte" on one line */
  overflow: hidden;
  text-overflow: ellipsis; /* Adds "..." if it's still too long */
}

/* Image utilities */
figure.media{
  display:block; margin:12px 0; border:1px solid var(--border); border-radius:12px; overflow:hidden;
  background:var(--card); box-shadow:var(--shadow);
}
figure.media img{ width:100%; height:auto; display:block; }
figure.media figcaption{ padding:8px 12px; color:var(--muted); font-size:.95rem; }
.media--rounded{ border-radius:20px; }
.media--shadow{ box-shadow:var(--shadow); }
.gallery{ display:grid; grid-template-columns:repeat(2, minmax(0,1fr)); gap:12px; }
@media (min-width:768px){ .gallery{ grid-template-columns:repeat(3,1fr); } }

/* Footer */
footer{ padding:32px 0; color:var(--muted); text-align:center; }

/* Swish block (QR overlay) */
.swish-card{ position:relative; }
.swish-card h3{ margin-right:100px; }
.swish-card .swish-qr{ position:absolute; top:.8em; right:16px; width:128px; height:auto; }
@media (max-width:600px){ .swish-qr{ display:none !important; } }

/* Contact details (2 per row, aligned icons) */
.card.contact-details{
  display:grid; grid-template-columns:1fr 1fr; gap:0px;
}
.card.contact-details h3{ grid-column:1 / -1; }
.card.contact-details a{ display:block; }
.card.contact-details .btn-with-icon{
  display:flex; align-items:center; justify-content:flex-start; gap:10px;
  width:100%; padding:12px 16px; text-align:left;
  background:var(--card); border:1px solid var(--border); border-radius:8px;
  color:var(--text); cursor:pointer;
}
.card.contact-details .btn-with-icon img{
  flex:0 0 var(--contact-icon);
  width:var(--contact-icon); height:var(--contact-icon);
  object-fit:contain; display:block;
}

/* Generic buttons (elsewhere) */
.btn-with-icon{
  display:flex; align-items:center; gap:10px;
  width:100%; padding:12px 16px; text-align:left;
  color:var(--muted); background:var(--card); border:1px solid var(--border); border-radius:8px; cursor:pointer;
}
.btn-with-icon:hover{ background:var(--bg); color:var(--text); }

/* Special Swish button (if used separately) */
.btn-with-icon-swish{
  display:inline-flex; align-items:center; gap:.5em;
  background:var(--card); padding:8px 16px; border:1px solid var(--border);
  border-radius:6px; color:var(--muted); cursor:pointer;
}
.btn-with-icon-swish:hover{ background:var(--bg); color:var(--text); }
.btn-with-icon-swish img{ width:42px; height:42px; object-fit:contain; }

/* Generic images inside cards */
.card img{
  display:block; max-width:100%; height:auto; border-radius:8px;
}

/* Figure center helper (non-media variant) */
figure{ text-align:center; }

/* Accessibility */
.visually-hidden{
  position:absolute !important; height:1px; width:1px; overflow:hidden;
  clip:rect(1px,1px,1px,1px); white-space:nowrap;
}

/* Responsive ≥901px */
@media (min-width:901px){
  .topnav{ display:block; }
  .burger{ display:none; }
  .mobile{ display:none !important; }
  .grid{ gap:20px; }
  .two-col{ grid-template-columns:repeat(2,1fr); }
  .cols{ grid-template-columns:2fr 1fr; }
  .shop{ grid-template-columns:repeat(3, minmax(0,1fr)); }
}

/* Instructors ≥768px */
@media (min-width:768px){
  .instr-card.media-layout{ grid-template-columns:180px 1fr; }
}
