
/* --- 1. Grundinställningar & Typsnitt --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-radius: 0 !important;
}
html { scroll-behavior: smooth; }
body {
  background-color: #ffffff;
  color: rgba(17, 26, 11, 1);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column; /* Footer i botten */
  min-height: 100vh;
  line-height: 1.6;
}

/* --- 2. Generella textstilar --- */
h1, h2, h3, p {
  font-weight: 300 !important;
  text-align: center;
  color: rgba(17, 26, 11, 1);
}
h1 {
  font-size: clamp(2rem, 8vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 40px;
  width: 100%;
}

/* --- 3. Sidofält & Hamburgermeny (alltid vänster) --- */
.side-bar {
  width: 80px;
  height: 100vh;
  position: fixed;
  left: 0; top: 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 0;
  z-index: 9999;
}

/* Behåll ikonens utseende: tre tunna streck, ingen bakgrund/ram */
.hamburgar-container { position: relative; padding: 10px; }
.hamburgar-ikon {
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;            /* ingen extra padding som förändrar utseendet */
  margin: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.hamburgar-ikon:focus-visible { outline: 2px solid #000; outline-offset: 3px; }

.streck {
  width: 25px;
  height: 1px;
  background-color: #000;
  margin: 7px 0;
}

/* Fly-out (stängt som default; öppnas via .open eller via hover på pekare med precision) */
.fly-out-menu {
  position: absolute;
  left: 40px;
  top: 0;
  background: #fff;
  width: 240px;
  display: none;           /* default stängt */
  padding: 20px;
  box-shadow: 15px 0 30px rgba(0,0,0,0.05);
}
.fly-out-menu.open {       /* öppet läge styrs av JS */
  display: block;
}

/* På dator (precisionspekare) tillåter vi även hover att öppna menyn, så det känns som förr */
@media (pointer: fine) {
  .hamburgar-container:hover .fly-out-menu { display: block; }
}

.fly-out-menu ul { list-style: none; }
.fly-out-menu a {
  text-decoration: none;
  color: #000;
  display: block;
  padding: 12px 0;
  font-weight: 300;
  font-size: 0.95rem;
  text-align: left;
}

/* --- 4. Layout Wrapper --- */
.wrapper {
  margin-left: 80px;
  width: calc(100% - 80px);
  padding: 80px 24px 60px 24px;
  max-width: 1400px;
  margin-right: auto;
  flex: 1;  /* Footer längst ner */
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- 5. Grid --- */
.utforska-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  width: 100%;
}

/* Vanliga kort */
.kort {
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background: #f4f4f4;
  text-decoration: none;
  border-radius: 8px;
}

/* Tom ruta behåller rutmönstret */
.tom-ruta {
  aspect-ratio: 1 / 1;
  background: transparent;
}

/* Bildcontainer */
.bild-box {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* Special-text-blocket */
.special-text-block {
  grid-column: span 2;
  grid-row: span 2;
  background: #f4f4f4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 8vw, 15%);
  border-radius: 8px;
}
.special-text-block p {
  font-size: clamp(1.05rem, 3vw, 1.25rem);
  line-height: 1.6;
}

/* --- 6. Overlay (större text) --- */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 200ms ease;
}
.kort:hover .overlay,
.kort:focus-within .overlay { /* tangentbord/touch-fallback */
  opacity: 1;
}
.overlay h3 {
  color: #ffffff !important;
  font-weight: 300 !important;
  /* Större och responsiv overlay-typografi */
  font-size: clamp(1.1rem, 3.2vw, 1.75rem);
  margin: 0;
  letter-spacing: 0.2px;
}

/* --- 7. Footer --- */
footer {
  margin-left: 80px;
  width: calc(100% - 80px);
  padding: 40px 20px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
}
.footer-content { max-width: 800px; margin: 0 auto; }
.footer-nav { margin-bottom: 20px; }
.footer-nav a {
  text-decoration: none;
  color: rgba(17, 26, 11, 0.6);
  margin: 0 15px;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}
.footer-nav a:hover { color: #000; }
copyright {
  font-size: 0.8rem;
  color: rgba(17, 26, 11, 0.4);
  letter-spacing: 1px;
}

/* --- 8. Brytpunkter (responsivt) --- */

/* Stora skärmar: lite större grid-gap */
@media (min-width: 1200px) {
  .utforska-grid { gap: 24px; }
}

/* Mellan: 2 kolumner */
@media (max-width: 1024px) {
  .utforska-grid { grid-template-columns: repeat(2, 1fr); }
  .special-text-block { grid-column: span 2; grid-row: span 1; }
}

/* Små surfplattor */
@media (max-width: 820px) {
  .side-bar { width: 72px; }
  .wrapper, footer {
    margin-left: 72px;
    width: calc(100% - 72px);
  }
  .utforska-grid { grid-template-columns: repeat(2, 1fr); }
  h1 { margin-bottom: 32px; }
}

/* Mobiler: 1 kolumn, special-text-blocket blir kvadratiskt som övriga kort */
@media (max-width: 600px) {
  .side-bar { width: 64px; padding: 24px 0; }
  .wrapper, footer {
    margin-left: 64px;
    width: calc(100% - 64px);
    padding: 56px 16px 32px 16px;
  }

  .utforska-grid { grid-template-columns: 1fr; gap: 16px; }

  /* Gör specialrutan lika stor som ett vanligt kort */
  .special-text-block {
    grid-column: span 1;
    grid-row: span 1;
    padding: 16px;
    aspect-ratio: 1 / 1;          /* ← kvadratisk, samma som .kort */
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .overlay h3 { font-size: clamp(1.25rem, 5vw, 1.5rem); }
}

/* --- 9. Tillgänglighet & preferenser --- */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Dölj body-scroll när menyn är öppen (om så önskas på små skärmar) */
.no-scroll { overflow: hidden; }
