/* =========================================================
   Skapende-Kristendom.net 
   style.css 
   v0.7.5
   ---------------------------------------------------------
   Grunnleggende design for:
   - mobil, nettbrett og desktop
   - lys og automatisk mørk modus
   - bibeltekster og bibelreferanser
   - info-bokser
   - lyd, video og bilder
   - ressurslenker og knapper
   ========================================================= */


/* =========================================================
   1. FARGER OG DESIGNVARIABLER
   ---------------------------------------------------------
   Lys modus er standard.
   Fargene er inspirert av helse- og velvære-nettsider:
   rolige grønne/blågrønne toner, myk bakgrunn og høy lesbarhet.
   ========================================================= */

:root {
  --background: #f5f8f6;
  --surface: #ffffff;
  --surface-soft: #eef4f1;

  --text: #27332f;
  --text-muted: #65736e;

  --accent: #3f7f70;
  --accent-hover: #32685c;
  --accent-soft: #dcebe6;

  --border: #dbe5e0;
  --shadow: 0 8px 24px rgba(39, 51, 47, 0.08);

  --max-width: 900px;
  --radius-small: 8px;
  --radius-medium: 14px;
  --radius-large: 18px;

  --space-xs: 0.4rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-xxl: 3rem;

  --transition: 160ms ease;
}


/* =========================================================
   2. ENKEL RESET / BASE
   ---------------------------------------------------------
   Gjør størrelser og spacing mer forutsigbare på tvers av
   nettlesere og enheter.
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

img,
video {
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
}


/* =========================================================
   3. BODY / GRUNNSTIL
   ---------------------------------------------------------
   Systemfonter brukes for rask lasting og god støtte på
   iPhone, Android, iPad, Mac og Windows.
   ========================================================= */

body {
  min-height: 100vh;
  background: var(--background);
  color: var(--text);

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  font-size: 1rem;
  line-height: 1.65;
}


/* =========================================================
   4. TYPOGRAFI
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--text);
  line-height: 1.25;
  margin-top: 0;
  margin-bottom: var(--space-md);
  font-weight: 700;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
}

h2 {
  font-size: clamp(1.4rem, 4vw, 2rem);
}

h3 {
  font-size: clamp(1.15rem, 3vw, 1.45rem);
}

p {
  margin-top: 0;
  margin-bottom: var(--space-md);
}

strong {
  font-weight: 700;
}

small {
  color: var(--text-muted);
}


/* =========================================================
   5. HOVEDLAYOUT / CONTAINER
   ---------------------------------------------------------
   Maks bredde er 900px på større skjermer.
   På mobil brukes nesten hele bredden med luft på sidene.
   ========================================================= */

.container,
main {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

main {
  padding-block: var(--space-xl);
}


/* =========================================================
   6. HEADER
   ========================================================= */

header {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  padding-top: var(--space-xl);
}

header p {
  color: var(--text-muted);
  max-width: 65ch;
}

  .header-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
  }

  @media (max-width: 600px) {
    .header-links {
      flex-direction: column;
      gap: 0.5rem;
    }
  }

.header-logo {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto var(--space-md);
}

@media (max-width: 600px) {
  .header-logo {
    width: 90%;
    max-width: none;
  }
}

/* =========================================================
   7. SEKSJONER
   ---------------------------------------------------------
   Bruk:
   <section class="content-section">
   ========================================================= */

.content-section {
  margin-block: var(--space-xxl);
}

.content-section:first-child {
  margin-top: 0;
}

.content-section > :last-child {
  margin-bottom: 0;
}


/* =========================================================
   8. VANLIGE LENKER
   ========================================================= */

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
  transition:
    color var(--transition),
    background-color var(--transition),
    border-color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}


/* =========================================================
   9. RESSURSLISTER OG STORE MOBILVENNLIGE LENKER
   ---------------------------------------------------------
   Bruk:
   <ul class="resource-list">
     <li><a class="resource-link" href="...">...</a></li>
   </ul>
   ========================================================= */

.resource-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--space-sm);
}

.resource-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);

  min-height: 52px;
  padding: 0.9rem 1rem;

  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);

  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(39, 51, 47, 0.04);
}

.resource-link::after {
  content: "›";
  color: var(--accent);
  font-size: 1.3rem;
  line-height: 1;
}

.resource-link:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
  background: var(--surface-soft);
}


/* =========================================================
   9B. VIS / SKJUL-LISTER
   ---------------------------------------------------------
   Brukes til grupper med ressurslenker.

   Bruk:
   <details class="link-details">
     <summary>Vis linker ...</summary>
     ...
   </details>
   ========================================================= */

.link-details {
  margin-bottom: var(--space-md);
}

.link-details summary {
  padding: 0.9rem 1rem;

  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);

  font-weight: 600;
  cursor: pointer;

  transition:
    color var(--transition),
    background-color var(--transition),
    border-color var(--transition);
}

.link-details summary:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
  background: var(--surface-soft);
}

.link-details[open] summary {
  border-color: var(--accent);
  background: var(--surface-soft);
}

.link-details .resource-list {
  margin-top: var(--space-sm);
}

.link-details summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}


/* =========================================================
   10. KNAPPER
   ---------------------------------------------------------
   Bruk på vanlige <button> eller lenker som skal se ut
   som knapper.
   ========================================================= */

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;

  min-height: 44px;
  padding: 0.7rem 1rem;

  border: 1px solid var(--accent);
  border-radius: var(--radius-small);

  background: var(--accent);
  color: #ffffff;

  font-weight: 700;
  text-decoration: none;
  cursor: pointer;

  transition:
    background-color var(--transition),
    border-color var(--transition),
    transform var(--transition);
}

.button:hover,
button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #ffffff;
}

.button:active,
button:active {
  transform: translateY(1px);
}


/* =========================================================
   11. BIBELTEKST
   ---------------------------------------------------------
   Bruk:
   <p class="bible-text">...</p>
   ========================================================= */

.bible-text {
  font-size: 1.06rem;
  line-height: 1.78;
  margin-bottom: 0.55rem;
}


/* =========================================================
   12. BIBELREFERANSE
   ---------------------------------------------------------
   Standardisert formatering for alle bibelhenvisninger.
   Bruk:
   <p class="bible-reference">Jesaja 53:4–5</p>
   ========================================================= */

.bible-reference {
  margin-top: 0;
  margin-bottom: var(--space-xl);

  color: var(--accent);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}


/* =========================================================
   13. INFO-BOX
   ---------------------------------------------------------
   Brukes til kildeinfo, introduksjoner, copyright,
   forklaringer eller annen tilleggsinformasjon.

   Bruk:
   <div class="info-box">
     <h2>Om denne samlingen</h2>
     <p>...</p>
   </div>
   ========================================================= */

.info-box {
  margin-block: var(--space-xl);
  padding: var(--space-lg);

  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-medium);
}

.info-box > :last-child {
  margin-bottom: 0;
}


/* =========================================================
   14. BILDER
   ---------------------------------------------------------
   Standardbilde:
   <img src="..." alt="...">

   Pen presentasjon:
   <img class="content-image" src="..." alt="...">
   ========================================================= */

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

.content-image {
  width: 100%;
  margin-block: var(--space-lg);
  border-radius: var(--radius-medium);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}


/* ---------------------------------------------------------
   BILDEKREDITERING
   ---------------------------------------------------------
   Brukes under bilder for fotograf-/kildeinformasjon.

   Eksempel:
   <p class="image-credit">
     Image by <a href="...">fotograf</a> from
     <a href="https://pixabay.com/">Pixabay</a>
   </p>
   --------------------------------------------------------- */

.image-credit {
  margin-top: -0.75rem;
  margin-bottom: var(--space-xl);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.image-credit a {
  color: var(--accent);
}


/* =========================================================
   15. LYD / MP3
   ---------------------------------------------------------
   Bruk:
   <div class="audio-card">
     <h3>Tittel</h3>
     <audio controls preload="none">...</audio>
   </div>
   ========================================================= */

.audio-card {
  margin-block: var(--space-lg);
  padding: var(--space-lg);

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow);
}

.audio-card > :last-child {
  margin-bottom: 0;
}

audio {
  display: block;
  width: 100%;
  margin-top: var(--space-sm);
}


/* =========================================================
   16. VIDEO / MP4
   ---------------------------------------------------------
   Beholder videoens naturlige format.
   Ingen tvungen 16:9.

   Bruk:
   <div class="video-container">
     <video controls preload="metadata">...</video>
   </div>
   ========================================================= */

.video-container {
  width: 100%;
  max-width: 900px;
  margin-block: var(--space-xl);
  margin-inline: auto;
}

.video-container iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;

  border: 0;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow);
}


/* ---------------------------------------------------------
   YOUTUBE-SPILLELISTE
   ---------------------------------------------------------
   Responsiv 16:9-spiller for innebygde YouTube-spillelister.

   Bruk:
   <div class="youtube-playlist">
     <iframe src="..."></iframe>
   </div>
   --------------------------------------------------------- */

.youtube-playlist {
  width: 100%;
  max-width: var(--max-width);
  margin-block: var(--space-xl);
  margin-inline: auto;
  aspect-ratio: 16 / 9;
}

.youtube-playlist iframe {
  display: block;
  width: 100%;
  height: 100%;

  border: 0;
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow);
}


/* =========================================================
   17. ENKEL INNHOLDSBOKS / CARD
   ---------------------------------------------------------
   Valgfri generell boks for tekst eller blandet innhold.
   ========================================================= */

.card {
  margin-block: var(--space-lg);
  padding: var(--space-lg);

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow);
}

.card > :last-child {
  margin-bottom: 0;
}


/* =========================================================
   18. SITATER OG BØNNER
   ---------------------------------------------------------
   Fleksibel presentasjon av sitater, bibelord og bønner.
   Justering kan varieres med quote-left, quote-center
   og quote-right.
   ========================================================= */

.quote-collection {
  display: grid;
  gap: var(--space-lg);
  margin-block: var(--space-xxl);
}

.quote-card {
  padding: clamp(1.15rem, 3vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  box-shadow: var(--shadow);
}

.quote-card > :last-child {
  margin-bottom: 0;
}

.quote-title {
  margin-bottom: var(--space-sm);
  color: var(--accent);
  font-size: clamp(1.15rem, 3vw, 1.4rem);
}

.quote-text {
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.quote-reference {
  margin-top: var(--space-sm);
  margin-bottom: 0;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.quote-list {
  display: inline-block;
  margin: 0 0 var(--space-md);
  padding-left: 1.25rem;
  text-align: left;
}

.quote-left {
  text-align: left;
}

.quote-center {
  text-align: center;
}

.quote-right {
  text-align: right;
}

/* =========================================================
   NEDLASTNINGER
   ---------------------------------------------------------
   Liste med filer og tydelige nedlastningsknapper.
   ========================================================= */

.download-list {
  display: grid;
  gap: var(--space-md);
  margin-block: var(--space-xl);
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);

  padding: var(--space-md);

  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-medium);
  box-shadow: 0 2px 8px rgba(39, 51, 47, 0.04);
}

.download-info {
  flex: 1;
}

.download-card span {
  font-weight: 600;
}

.download-info p {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.project-number {
  margin-top: var(--space-sm);
  margin-bottom: 0;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

@media (max-width: 600px) {
  .download-card {
    flex-direction: column;
    align-items: stretch;
  }

  .download-card .button {
    width: 100%;
  }
}

/* =========================================================
   19. FOOTER
   ========================================================= */

.site-footer {
  margin-top: var(--space-xxl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  text-align: center;
}

.site-footer p {
  margin-bottom: var(--space-sm);
}

.site-footer a {
  font-weight: 600;
}

.site-footer small {
  display: block;
}


.site-footer .footer-logo {
  display: block;
  width: 100%;
  max-width: 180px;
  height: auto;
  margin: 0 auto var(--space-md);
}

@media (max-width: 600px) {
  .site-footer .footer-logo {
    width: 90%;
    max-width: none;
  }
}


/* =========================================================
   20. HORISONTAL SKILLELINJE
   ========================================================= */

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin-block: var(--space-xxl);
}


/* =========================================================
   21. FOCUS / TILGJENGELIGHET
   ---------------------------------------------------------
   Gir tydelig fokusmarkering for tastaturbrukere.
   ========================================================= */

a:focus-visible,
button:focus-visible,
audio:focus-visible,
video:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-small);
}


/* =========================================================
   22. RESPONSIV TILPASNING - MOBIL
   ---------------------------------------------------------
   Mobil er hovedmålgruppen.
   ========================================================= */

@media (max-width: 600px) {
  .container,
  main,
  header {
    width: min(100% - 1.25rem, var(--max-width));
  }

  main {
    padding-block: var(--space-lg);
  }

  header {
    padding-top: var(--space-lg);
  }

  .content-section {
    margin-block: var(--space-xl);
  }

  .info-box,
  .audio-card,
  .card {
    padding: 1rem;
  }

  .resource-link {
    padding: 0.9rem;
  }

  .bible-text {
    font-size: 1rem;
    line-height: 1.72;
  }

  .quote-right {
    text-align: left;
  }
}



/* =========================================================
   23. RESPONSIV TILPASNING - STØRRE SKJERMER
   ---------------------------------------------------------
   Litt mer luft på nettbrett og desktop.
   ========================================================= */

@media (min-width: 768px) {
  main {
    padding-block: var(--space-xxl);
  }

  header {
    padding-top: var(--space-xxl);
  }

  .resource-link {
    padding: 1rem 1.15rem;
  }

  .info-box,
  .audio-card,
  .card {
    padding: 1.5rem;
  }
}




/* =========================================================
   24. HOVEDNAVIGASJON
   ---------------------------------------------------------
   Synlig, horisontal navigasjon.

   På små skjermer ligger menyen på én linje og kan scrolles
   vannrett med fingeren dersom det ikke er plass til alle
   lenkene samtidig. Ingen JavaScript er nødvendig.

   Bruk:
   <nav class="main-navigation" aria-label="Hovednavigasjon">
     <div class="main-navigation-inner">
       <a href="index.html">Forside</a>
       ...
     </div>
   </nav>
   ========================================================= */

.main-navigation {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
  padding-top: var(--space-md);

  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.main-navigation-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  width: max-content;
  min-width: 100%;
  padding-bottom: 0.35rem;
}

.main-navigation a {
  flex: 0 0 auto;

  min-height: 42px;
  padding: 0.55rem 0.8rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-small);

  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;

  white-space: nowrap;
}

.main-navigation a:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
  background: var(--surface-soft);
}

.main-navigation a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}


/* Mobil: navigasjonen får samme sidekant som resten av siden. */
@media (max-width: 600px) {
  .main-navigation {
    width: min(100% - 1.25rem, var(--max-width));
    padding-top: var(--space-sm);
  }

  .main-navigation a {
    min-height: 40px;
    padding: 0.5rem 0.72rem;
    font-size: 0.92rem;
  }
}


/* Større skjermer: alle lenkene kan ligge rolig på én linje. */
@media (min-width: 768px) {
  .main-navigation {
    padding-top: var(--space-lg);
  }
}


/* =========================================================
   25. AUTOMATISK MØRK MODUS
   ---------------------------------------------------------
   Følger brukerens operativsystem/nettleser.
   Ingen cookie, localStorage eller JavaScript er nødvendig.
   ========================================================= */

@media (prefers-color-scheme: dark) {
  :root {
    --background: #151b19;
    --surface: #202825;
    --surface-soft: #26302c;

    --text: #e6ece9;
    --text-muted: #adb9b4;

    --accent: #78b9a8;
    --accent-hover: #9acbbb;
    --accent-soft: #294239;

    --border: #34413c;
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
  }

  .resource-link {
    box-shadow: none;
  }

  .button,
  button {
    color: #10201b;
  }

  .button:hover,
  button:hover {
    color: #10201b;
  }
}


/* =========================================================
   26. REDUSERT BEVEGELSE
   ---------------------------------------------------------
   Respekterer brukere som har valgt redusert animasjon.
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
