/* MicWeb2026 - utseendet för micteam.se
   Samma grundstil som Dansspelaren, men med egen accentfärg.
   Byt färg på hela sidan genom att ändra --accent (och --accent-soft/--accent-line). */

:root {
  --bg: #12151c; --panel: #1b202a; --panel2: #232a36; --line: #2c3442;
  --text: #e8ecf2; --muted: #8b95a7; --soft: #c5ccd8;
  --accent: #f0a030;                          /* Bärnsten. Hallon: #f0577a  Himmel: #4db0f5  Lila: #b08cff */
  --accent-soft: rgba(240, 160, 48, .08);
  --accent-line: rgba(240, 160, 48, .35);
  --on-accent: #12151c;                       /* text på accentfärgen */
  --dansspelaren: #2fbf71;
  --beat: #4db0f5;
  --telefonboken: #d7262b;                    /* samma röda som i Telefonbokens ikon */
}

* { box-sizing: border-box; }
/* scroll-padding: menylänkarna hamnar nedanför den fasta delen överst */
html { scroll-behavior: smooth; scroll-padding-top: 215px; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; line-height: 1.6; font-size: 16px; }
a { color: var(--accent); }
img { max-width: 100%; }
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.wide { max-width: 1400px; margin: 0 auto; padding: 0 20px; }

/* ---------- Överst: menyn + logga och bildspel, ligger alltid kvar när man scrollar ---------- */
.mt-sticky { position: sticky; top: 0; z-index: 20; background: var(--bg); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.mt-header { border-bottom: 1px solid var(--line); }
.mt-header .wide { display: flex; align-items: center; justify-content: center; min-height: 48px; gap: 12px; }
.mt-nav { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 2px 24px; font-size: 15px; }
.mt-nav a { color: var(--soft); text-decoration: none; }
.mt-nav a:hover { color: var(--text); }
.mt-nav a.mt-cta { color: var(--on-accent); background: var(--accent); padding: 5px 14px; border-radius: 9px; font-weight: 600; }
.mt-mobilelogo { display: none; font-weight: 700; font-size: 19px; color: var(--accent); text-decoration: none; }
.mt-burger { display: none; width: 44px; height: 44px; border-radius: 10px; background: var(--panel2);
  border: 1px solid #3a4456; color: var(--text); cursor: pointer; align-items: center; justify-content: center; padding: 0; }
.mt-mobilemenu { display: none; flex-direction: column; border-top: 1px solid var(--line); padding: 4px 20px 10px;
  max-height: 60vh; overflow-y: auto; }
.mt-mobilemenu a { color: var(--text); text-decoration: none; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mt-mobilemenu a:last-child { border-bottom: 0; color: var(--accent); font-weight: 600; }

/* Logga till vänster, bildspel till höger - alltid bredvid varandra */
.mt-top { padding: 10px 0; border-bottom: 1px solid var(--line); }
.mt-top .wide { display: flex; gap: 12px; align-items: stretch; }
.mt-logo { flex: 0 0 190px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; text-align: center; }
.mt-logo img { width: 100%; height: auto; display: block; }
.mt-logo span { font-size: 11px; color: var(--muted); }
/* Bildspelet: bilderna har sina egna proportioner (sträcks inte ut).
   Så många som får plats på raden visas - resten ligger dolda på rad 2 och byts in en i taget. */
.mt-slides { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 10px; height: 140px; overflow: hidden; }
.mt-slide { flex: 0 0 auto; margin: 0; position: relative; height: 140px; border-radius: 12px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line); }
.mt-slide img { height: 100%; width: auto; display: block; transition: opacity .6s ease; }
.mt-slide img.fade { opacity: 0; }
.mt-slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 10px 6px; font-size: 12px;
  color: #fff; background: linear-gradient(to top, rgba(0,0,0,.7), rgba(0,0,0,0)); transition: opacity .6s ease; }
.mt-slide img.fade + figcaption { opacity: 0; }

/* Mobil: hamburgare, liten logga och en bild bredvid varandra */
@media (max-width: 720px) {
  html { scroll-padding-top: 175px; }
  .mt-header .wide { justify-content: space-between; }
  .mt-nav { display: none; }
  .mt-mobilelogo { display: inline; }
  .mt-burger { display: inline-flex; }
  .mt-mobilemenu.open { display: flex; }
  .mt-top { padding: 8px 0; }
  .mt-logo { flex-basis: 120px; padding: 6px; }
  .mt-logo span { display: none; }
  .mt-slides, .mt-slide { height: 90px; }
  .mt-slide figcaption { font-size: 11px; padding: 10px 8px 4px; }
}

/* ---------- Avsnitt ---------- */
section { padding: 56px 0; }
section.alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h1, h2, h3 { line-height: 1.2; }
h1 { font-size: 40px; margin: 0 0 14px; letter-spacing: -.5px; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: 30px; margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 30px; font-size: 17px; }
.lead { font-size: 19px; color: var(--soft); margin: 0 0 26px; max-width: 40em; }
.btn { display: inline-block; padding: 13px 24px; border-radius: 10px; font-size: 17px; font-weight: 600;
  text-decoration: none; border: 1px solid #3a4456; color: var(--text); background: var(--panel2); }
.btn:hover { border-color: #56627a; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
section.alt .card { background: var(--bg); }
.card h3 { margin: 0 0 6px; font-size: 19px; }
.card p { margin: 0; color: var(--soft); }
.num { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 12px; }
.free { margin-top: 18px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: 14px; padding: 16px 20px; }
.free b { color: var(--accent); }

.two { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: start; }
ul.check { list-style: none; padding: 0; margin: 0 0 18px; }
ul.check li { padding-left: 30px; position: relative; margin: 10px 0; font-size: 18px; }
ul.check li::before { content: "✓"; position: absolute; left: 4px; color: var(--accent); font-weight: 700; }
.tip { color: var(--muted); font-size: 17px; border-left: 3px solid var(--accent); padding-left: 12px; }

/* Danserna: kort som fälls ut ("Läs mer") */
.dances { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; align-items: start; }
details.dance { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; }
details.dance summary { cursor: pointer; padding: 14px 18px; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; }
details.dance summary::-webkit-details-marker { display: none; }
details.dance summary::after { content: "Läs mer"; color: var(--accent); font-weight: 400; font-size: 14px; }
details.dance[open] summary::after { content: "Stäng"; }
details.dance .txt { padding: 0 18px 16px; color: var(--soft); font-size: 17px; }
/* En öppen dans tar hela bredden, så att texten blir lätt att läsa */
details.dance[open] { grid-column: 1 / -1; border-color: var(--accent-line); }
details.dance .txt p { margin: 0 0 10px; }

/* Omdömen */
figure.quote { margin: 0; }
figure.quote blockquote { margin: 0 0 12px; color: var(--soft); font-size: 18px; line-height: 1.55; }
figure.quote figcaption { font-size: 15px; }
/* Omdömena ligger ovanpå varandra - bara det aktiva syns, de byts med en mjuk övertoning */
.quotes { display: grid; }
.quotes figure.quote { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .9s ease, visibility .9s; }
.quotes figure.quote.active { opacity: 1; visibility: visible; }
figure.quote figcaption span { color: var(--muted); }

/* Kalender */
.cal { width: 100%; height: 680px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }

/* Historien */
details.story summary { cursor: pointer; color: var(--accent); font-weight: 600; margin-top: 8px; }
.story-text p { color: var(--soft); font-size: 18px; }
details.story summary { font-size: 18px; }
.story-text h3 { margin: 26px 0 8px; }

/* Verktyg */
a.card { text-decoration: none; color: var(--text); display: block; }
a.card:hover { border-color: #56627a; }
a.card.ds h3 { color: var(--dansspelaren); }
.card.tb h3 { color: var(--telefonboken); }
/* Apparnas loggor */
.card .app { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.card .app img { width: 56px; height: 56px; border-radius: 13px; flex: 0 0 auto; }
.card .app h3 { margin: 0; }
.card.beat h3 { color: var(--beat); }

footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 820px) {
  .grid3, .two { grid-template-columns: 1fr; gap: 24px; }
  h1 { font-size: 30px; }
  section { padding: 40px 0; }
  h2 { font-size: 26px; }
  .cal { height: 520px; }
}

/* Bilderna i historien (från Word-dokumentet) */
.story-text img.fl { float: left; margin: 4px 14px 8px 0; border-radius: 6px; }
.story-text img.fr { float: right; margin: 4px 0 8px 14px; border-radius: 6px; }
.story-text .clr { clear: both; }

/* Svänget och föra/följa: står alltid framme under rubriken Danserna */
.svang { background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 12px; padding: 18px 22px; margin: 18px 0 28px; color: var(--soft); font-size: 17px; }
.svang h3 { margin: 0 0 10px; color: var(--text); }
.svang h4 { margin: 14px 0 4px; color: var(--accent); font-size: 19px; }
.svang h4:first-child { margin-top: 0; }
.svang p { margin: 0 0 10px; }

/* ---------- Beat (rutan som öppnas från Verktyg) ---------- */
.btn.small { margin-top: 14px; padding: 8px 16px; font-size: 15px; }
.beat-dlg { width: min(440px, 94vw); background: var(--panel); color: var(--text); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 20px 12px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.beat-dlg::backdrop { background: rgba(5,7,10,.7); }
.beat-head { display: flex; align-items: center; gap: 12px; }
.beat-head img { width: 44px; height: 44px; border-radius: 11px; }
.beat-head h3 { margin: 0; flex: 1; font-size: 22px; color: var(--beat); }
.beat-close { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #3a4456; background: var(--panel2);
  color: var(--text); font-size: 18px; cursor: pointer; }
.beat-help { color: var(--soft); font-size: 15px; margin: 12px 0; min-height: 3em; }
.beat-row { display: flex; gap: 12px; }
.beat-tap { flex: 1; height: 200px; border-radius: 14px; border: 2px solid var(--line); background: var(--bg);
  color: var(--text); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.beat-tap span { font-size: 64px; font-weight: 700; line-height: 1; }
.beat-tap small { color: var(--muted); font-size: 14px; margin-top: 6px; }
.beat-tap.counting { background: #1d4a68; border-color: var(--beat); }   /* medan man räknar */
.beat-histbox { flex: 0 0 90px; display: flex; flex-direction: column; }
.beat-histbox span { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.beat-hist { list-style: none; margin: 0; padding: 0; height: 180px; overflow-y: auto; font-size: 18px; }
.beat-hist li { padding: 2px 8px; border-radius: 6px; }
.beat-hist li:first-child { background: var(--panel2); font-weight: 600; }
.beat-foot { color: var(--muted); font-size: 12px; text-align: center; margin: 10px 0 0; }

/* Hela kortet är klickbart (Beat öppnar rutan, Telefonboken går till sin hemsida) */
a.card { cursor: pointer; }
.story-text::after { content: ""; display: block; clear: both; }

/* Rubrik + underrubrik bredvid varandra när det får plats, annars under */
.head { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 18px; margin-bottom: 30px; }
.head h2, .head .sub { margin: 0; }

/* ---------- Bilden i stort format (klick på en bild i bildspelet) ---------- */
.mt-slide { cursor: zoom-in; }
.lightbox { padding: 0; border: 0; background: transparent; max-width: 100vw; max-height: 100vh;
  width: 100vw; height: 100vh; overflow: hidden; }
.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lightbox::backdrop { background: rgba(5,7,10,.96); }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 92vw; }
.lb-fig img { max-width: 92vw; max-height: 84vh; width: auto; height: auto; border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.6); transition: opacity .3s ease; }
.lb-fig img.loading { opacity: .25; }
.lb-fig figcaption { color: var(--text); font-size: 16px; text-align: center; }
.lb-btn { position: absolute; border: 1px solid #3a4456; background: rgba(35,42,54,.85); color: var(--text);
  border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lb-btn:hover { background: var(--panel2); border-color: #56627a; }
.lb-close { top: 16px; right: 16px; width: 46px; height: 46px; font-size: 20px; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 50px; height: 70px; font-size: 40px; line-height: 1; }
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
@media (max-width: 720px) {
  .lb-prev, .lb-next { top: auto; bottom: 16px; transform: none; width: 56px; height: 50px; }
  .lb-fig img { max-height: 74vh; }
}

/* Swingdanserna: luft mellan rubriken och danskorten */
#danserna h2 { margin-bottom: 24px; }
