:root{
  --bg:#000000;
  --ink:#fefcee;
  --muted:#aaaaaa;
  --gold:#d4af37;
  --gold-hover:#f0d65b;
  --radius:16px;
  --max:1100px;
}

/* Grund */
body.dark{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Inter,Arial,sans-serif;
  background:var(--bg);
  color:var(--ink);
  line-height:1.6;
}

/* Header */
header{
  max-width:var(--max);
  margin:auto;
  padding:20px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
header .logo{height:44px}
header nav a{
  color:var(--ink);
  text-decoration:none;
  margin-left:14px;
  font-weight:600;
  transition:color .2s;
}
header nav a.cta {
  background: none;
  padding: 0;
  color: var(--ink);
  font-weight: 600;
  border-radius: 0;
  transition: color 0.2s ease;
}

header nav a.cta:hover {
  background: none; /* inga bakgrunder vid hover */
  color: var(--gold);
}

/* Hero */
.hero{
  max-width:var(--max);
  margin:0 auto;
  padding:40px 20px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:28px;
  align-items:center;
}
.hero h1{font-size:clamp(28px,4vw,42px); margin:0 0 10px}
.hero .lede{color:var(--muted); font-size:1.1rem; margin:0 0 20px}
.hero img{width:100%; border-radius:var(--radius); box-shadow:0 8px 24px rgba(0,0,0,.6)}

.cta{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  background:var(--gold);
  color:#000;
  padding:12px 18px;
  border-radius:12px;
  font-weight:700;
  text-decoration:none;
  max-width:100%; /* fix: knappar aldrig bredare än skärmen */
  box-sizing:border-box;
}
.cta:hover{background:var(--gold-hover)}

/* Hero-knappen lite större */
.hero .cta{
  font-size:1.1rem;
  padding:14px 24px;
}

/* Features */
main{max-width:var(--max); margin:40px auto; padding:0 20px}
.features{text-align:center; margin:40px 0}
.features .grid{
  display:grid;
  gap:20px;
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr));
}
.features h3{color:var(--gold)}


.features {
  display: flex;
  justify-content: center; /* centrera hela raden */
  gap: 3rem;               /* avstånd mellan rutorna */
  margin-top: 2rem;
  flex-wrap: wrap;         /* gör att de bryts på små skärmar */
  text-align: center;
}

.feature {
  flex: 1 1 250px;         /* minsta bredd 250px, växer annars jämnt */
  max-width: 300px;        /* låt dem inte bli för breda */
}

.feature .icon {
  width: 40px;
  height: auto;
  margin-bottom: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Steg-för-steg med bilder */
.steps img.step-img {
  max-width: 140px;
  height: auto;
  display: block;
  margin: 0 auto 12px;
}
.steps h3 {
  margin: 8px 0;
  color: var(--gold);
  font-size: 1.1rem;
}
.steps p {
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 280px;
  margin: 0 auto;
}

/* CTA-bar */
.cta-bar{
  margin:50px 0;
  padding:20px;
  background:#111;
  border:1px solid #333;
  border-radius:14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:16px;
}

/* Gör CTA-knappen i CTA-bar auto-bredd och centrerad */
.cta-bar .cta {
  width: auto;
  min-width: 180px;
  align-self: center;
  border-radius: 8px;
}

/* Footer */
footer{
  text-align:center;
  font-size:.9rem;
  color:#777;
  padding:20px;
}

/* --- Artikelsektion --- */
.articles{margin:60px 0}
.articles h2{text-align:center; margin-bottom:20px; color:var(--gold)}

.filterbar{
  margin:18px 0 24px;
  display:flex; gap:10px; flex-wrap:wrap; justify-content:center;
}
.chip{
  border:1px solid #444;
  background:none;
  color:#ccc;
  padding:8px 14px;
  border-radius:999px;
  cursor:pointer;
  font-weight:600;
  font-size:.95rem;
}
.chip[aria-pressed="true"]{
  background:#222;
  border-color:#666;
  color:#fff;
}

.grid-articles{
  display:grid;
  gap:20px;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
}
.card{
  background:#111;
  border:1px solid #333;
  border-radius:14px;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:transform .15s ease, box-shadow .15s ease;
}
.card:hover{transform:translateY(-3px); box-shadow:0 8px 20px rgba(0,0,0,.5)}
.thumb{aspect-ratio:16/9; width:100%; object-fit:cover; display:block}
.card .body{padding:16px; display:flex; flex-direction:column; gap:8px; flex:1}
.kicker{color:var(--gold); font-weight:800; font-size:.85rem; text-transform:uppercase}
.title{font-size:1.2rem; font-weight:700; margin:0; color:#fff}
.excerpt{color:#aaa; font-size:.95rem; margin:0}
.meta{display:flex; gap:10px; color:#777; font-size:.85rem}
.more{margin-top:auto}

/* ===================== */
/* Mobilanpassning */
/* ===================== */

@media (max-width: 992px) {
  /* Hero ska bli en kolumn tidigare */
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero img {
    margin-top: 20px;
    max-width: 100%;
  }
}

  

  /* Artiklar */
  .grid-articles {
    grid-template-columns: 1fr;
  }

  /* Steg-för-steg */
  .steps {
    grid-template-columns: 1fr !important;
    text-align: center;
  }
  .steps img.step-img {
    margin: 0 auto 12px;
  }

  /* CTA-bar */
  .cta-bar {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero .lede {
    font-size: 1rem;
  }
  .cta {
    width: 100%;
    justify-content: center;
  }
  .steps img.step-img {
    max-width: 100px;
  }
  .feature {
    flex: 1 1 100%; /* fix: features full width på små mobiler */
    max-width: 100%;
  }
}

/* Nummer-badge för stegkort */
.step-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--gold);
  color: #000;
  font-weight: 700;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}

.steps .card {
  position: relative;
}

/* Bildjustering för kort */
.step-card img, 
.film-card img {
  width: 100%;
  height: auto; /* fix: ta bort fasta höjder */
  max-height: 250px; /* valfritt tak */
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #222;
}

/* Sociala länkar specifikt */
footer .social-links a {
  color: var(--gold);
  display: inline-flex;
  width: 28px;
  height: 28px;
  transition: transform .2s ease, color .2s ease;
  text-decoration: none; /* inga understrykningar */
}

footer .social-links a:hover {
  transform: scale(1.2);
  color: var(--gold-hover);
}

footer .social-links svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Resten av CSS (footer, cards etc) orört */
body {
  font-family: 'Domine', serif;
}
/* Sekundära CTA-knappar */
.cta.secondary {
  background: none;
  border: 2px solid var(--gold);
  color: var(--gold);
}

.cta.secondary:hover {
  background: var(--gold);
  color: #000;
}
/* Snygga citattecken för citatkort */
.card.quote .title {
  position: relative;
  font-style: italic;
  line-height: 0.7;
}

.card.quote .title::before,
.card.quote .title::after {
  font-family: Georgia, serif;
  font-size: 2.5rem;
  color: var(--gold);
  position: relative;
  vertical-align: top;
}

.card.quote .title::before {
  content: "”";
  margin-right: 8px;
}

.card.quote .title::after {
  content: "”";
  margin-left: 6px;
}
.quote-icon {
  width: 38px;
  height: 38px;
  color: var(--gold);
  opacity: 0.9;
  margin-bottom: 12px;
}
.gold-quote {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 2rem;
}

/* ========================= */
/* Fungerande bildslideshow  */
/* ========================= */
.slideshow {
  position: relative;
  width: 100%;
  max-width: 700px;
  height: 330px;          /* viktigt! ger höjd */
  overflow: hidden;
  border-radius: 8px;
}

.slideshow img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;           /* täcker hela ytan */
  object-fit: cover;
  opacity: 0;
  animation: fadeSlideshow 25s infinite;
  border-radius: 8px;
  z-index: 0;
}

/* Gör första bilden synlig direkt vid start */
.slideshow img:first-child {
  opacity: 1;
}

.slideshow img:nth-child(1) { animation-delay: 0s; }
.slideshow img:nth-child(2) { animation-delay: 5s; }
.slideshow img:nth-child(3) { animation-delay: 10s; }
.slideshow img:nth-child(4) { animation-delay: 15s; }
.slideshow img:nth-child(5) { animation-delay: 20s; }

@keyframes fadeSlideshow {
  0%   { opacity: 0; }
  8%   { opacity: 1; z-index: 1; }
  20%  { opacity: 1; z-index: 1; }
  28%  { opacity: 0; z-index: 0; }
  100% { opacity: 0; z-index: 0; }
}
/* ======= Hamburger-meny ======= */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 2rem;
  cursor: pointer;
}

/* Dölj menyn på mobil som standard */
@media (max-width: 768px) {
  header {
    position: relative;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 1001;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #000;
    border-top: 1px solid #333;
    padding: 10px 0;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
  }

  .main-nav a {
    padding: 12px 20px;
    display: block;
    text-align: center;
    margin: 0;
  }

  /* Visa menyn när aktiv */
  .main-nav.active {
    display: flex;
  }
}

.menu-toggle.open::before {
  content: "✕";
}
.menu-toggle.open {
  color: var(--gold);
}
.menu-toggle {
  position: relative !important;
  z-index: 2000 !important;
}
/* ====== FELSÄKER HAMBURGERMENY (Safari-kompatibel) ====== */

.menu-toggle-wrapper {
  position: relative;
  z-index: 2000; /* säkerställer att knappen alltid ligger överst */
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 2rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent; /* fix för iOS */
  touch-action: manipulation; /* fix för iOS klick */
  position: relative;
  z-index: 2000;
}

/* Dölj menyn som standard på mobil */
@media (max-width: 768px) {
  header {
    position: relative;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    right: 20px;
    top: 20px;
  }

  .main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #000;
    border-top: 1px solid #333;
    padding: 10px 0;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
  }

  .main-nav a {
    padding: 12px 20px;
    display: block;
    text-align: center;
    margin: 0;
  }

  /* Visa menyn vid aktiv */
  .main-nav.active {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }
}

/* Ändra ikon när öppen */
.menu-toggle.open::before {
  content: "✕";
}
.menu-toggle.open {
  color: var(--gold);
}
