/* GRUNNSTILAR OCH FÄRGER */
:root {
  --green: #185b43;
  --green-dark: #103f30;
  --green-deep: #0b3024;
  --green-soft: #eaf1ec;
  --gold: #d7b35b;
  --gold-light: #f4e9c8;
  --white: #ffffff;
  --ink: #26312b;
  --muted: #69756d;
  --line: #dfe6e0;
  --surface: #f6f8f5;
  --radius: 8px;
  --shadow: 0 8px 25px rgba(17, 54, 38, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.section-wrap {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

/* TOPPMENY */
.site-header {
  position: relative;
  z-index: 5;
  background: var(--green-dark);
  border-bottom: 3px solid var(--gold);
}

.header-inner {
  width: min(1240px, calc(100% - 48px));
  min-height: 82px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  color: var(--white);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.brand img {
  width: auto;
  max-width: 180px;
  max-height: 58px;
  object-fit: contain;
}

.brand-text {
  max-width: 190px;
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px 18px;
}

.main-nav a {
  display: inline-block;
  padding: 9px 0;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 2px solid transparent;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: color 0.2s, border-color 0.2s;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* GEMENSAMMA RUBRIKER */
.eyebrow {
  display: inline-block;
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1.5;
  text-transform: uppercase;
}

h1, h2, h3, p { overflow-wrap: break-word; }

h2 {
  margin: 7px 0 0;
  color: var(--green-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(27px, 3vw, 36px);
  font-weight: 500;
  line-height: 1.25;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.text-link:hover { color: #99721c; }

.small-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 11px;
}

/* KNAPPAR */
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  transition: transform 0.2s, background 0.2s;
}

.button:hover { transform: translateY(-2px); }
.button-gold { background: var(--gold); color: var(--green-deep); }
.button-gold:hover { background: #e6c978; }
.button-green { background: var(--green); color: var(--white); }
.button-green:hover { background: var(--green-dark); }

/* HERO – BAKGRUNDSBILD BAKOM VÄLKOMSTTEXTEN */
.hero {
  position: relative;
  overflow: hidden;
  background-image:
    linear-gradient(
      rgba(11, 48, 36, 0.35),
      rgba(11, 48, 36, 0.35)
    ),
    url("./images/BakrundNorsk.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--white);
}

.hero-inner {
  position: relative;
  width: min(1120px, calc(100% - 48px));
  min-height: 420px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
  padding: 64px 0;
}

.hero .eyebrow { color: var(--gold); }

.hero h1 {
  margin: 16px 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 5.4vw, 64px);
  font-weight: 500;
  letter-spacing: -1.5px;
  line-height: 1.08;
}

.hero h1 span { color: var(--gold); }

.hero-copy p {
  max-width: 510px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.83);
  font-size: 16px;
}

/* VÄLKOMMEN */
.welcome {
  padding-top: 65px;
  padding-bottom: 52px;
  text-align: center;
}

.welcome .section-intro {
  max-width: 720px;
  margin: 17px auto 0;
  color: var(--muted);
  font-size: 15px;
}

/* BILDER PÅ STARTSIDAN */
.home-section {
  padding-top: 20px;
  padding-bottom: 70px;
}

.photo-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: repeat(2, 180px);
  gap: 15px;
}

.photo-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--green-soft);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.photo-card-large { grid-row: span 2; }

.photo-card img {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.photo-card:hover img { transform: scale(1.04); }

.photo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
  color: var(--white);
}

.photo-fallback span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  opacity: 0.65;
}

.photo-fallback strong {
  max-width: 220px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
}

.tone-green { background: linear-gradient(145deg, #123e2f, #438368); }
.tone-gold { background: linear-gradient(145deg, #92702e, #d9bb70); }
.tone-sage { background: linear-gradient(145deg, #526f5b, #9eb6a0); }
.tone-dark { background: linear-gradient(145deg, #283c32, #6c8b74); }

/* TABELLER OCH NYHETER */
.news-section {
  padding: 65px 0;
  background: var(--surface);
  border-top: 1px solid #edf0eb;
  border-bottom: 1px solid #edf0eb;
}

.schedule-section {
  padding-top: 65px;
  padding-bottom: 70px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

table { width: 100%; border-collapse: collapse; text-align: left; }
thead { background: var(--green); color: var(--white); }

th {
  padding: 14px 17px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

td {
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  color: #4b574f;
  font-size: 13px;
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) { background: #fafbf9; }
tbody tr:hover { background: var(--green-soft); }

td:first-child {
  white-space: nowrap;
  color: var(--green-dark);
  font-weight: 700;
}

td a { color: var(--green); font-weight: 800; white-space: nowrap; }
td a:hover { color: #98731d; }

.table-tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 3px;
  background: var(--gold-light);
  color: var(--green-dark);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

/* FÖRSTA GANG */
.beginner-section {
  background: var(--green-soft);
  border-top: 1px solid #dfe9e1;
}

.beginner-inner {
  min-height: 235px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 35px;
  padding-top: 45px;
  padding-bottom: 45px;
}

.beginner-inner > div { max-width: 650px; }
.beginner-inner p { margin: 13px 0 0; color: var(--muted); }

/* GRÖNN FOOTER – BEHÅLLER SIN DESIGN */
.site-footer {
  padding: 42px 24px 25px;
  border-top: 4px solid var(--gold);
  background: var(--green-dark);
  color: var(--white);
  text-align: center;
}

.footer-inner { width: min(1120px, 100%); margin-inline: auto; }

.footer-brand {
  color: var(--white);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

.footer-inner p {
  margin: 8px 0 18px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-bottom: 22px;
}

.footer-links a { color: rgba(255, 255, 255, 0.9); font-size: 12px; }
.footer-links a:hover { color: var(--gold); }
.footer-inner small { color: rgba(255, 255, 255, 0.6); font-size: 10px; }

/* KATEGORISIDOR */
.page-main {
  min-height: 65vh;
  padding-top: 30px;
  padding-bottom: 75px;
}

.back-link {
  display: inline-block;
  margin-bottom: 25px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.back-link:hover { color: #98731d; }

.page-heading {
  padding: 25px 0 28px;
  border-bottom: 1px solid var(--line);
}

.page-heading h1 {
  margin: 8px 0 10px;
  color: var(--green-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(35px, 4.5vw, 48px);
  font-weight: 500;
  line-height: 1.15;
}

.page-heading p { max-width: 750px; margin: 0; color: var(--muted); }
.page-content { padding-top: 20px; }

.page-content h2 {
  margin-top: 30px;
  margin-bottom: 12px;
  font-size: 27px;
}

.page-content h3 {
  margin-top: 0;
  color: var(--green-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
}

.page-content p,
.page-content li { color: #4f5b53; }

.page-content a {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-panel {
  margin: 20px 0;
  padding: 20px 23px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: 5px;
  background: var(--surface);
}

.content-panel p:last-child { margin-bottom: 0; }

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.info-card {
  padding: 21px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 4px 15px rgba(17, 54, 38, 0.035);
}

.info-card h3 { margin-bottom: 10px; }

.info-card p:last-child,
.info-card ul:last-child { margin-bottom: 0; }

.page-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 210px;
  gap: 15px;
  margin: 25px 0;
}

.page-photo-grid .photo-placeholder {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  overflow: hidden;
  border-radius: var(--radius);
  color: var(--white);
}

.page-photo-grid .photo-placeholder strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 500;
}

/* MOBIL OCH MINDRE SKÄRMAR */
@media (max-width: 1050px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding-top: 16px;
    padding-bottom: 12px;
  }

  .main-nav { justify-content: flex-start; gap: 3px 17px; }
  .hero-copy { max-width: 600px; }
}

@media (max-width: 700px) {
  .section-wrap,
  .header-inner,
  .hero-inner { width: calc(100% - 32px); }

  .header-inner { gap: 9px; }
  .brand { gap: 10px; font-size: 15px; }

  .brand img {
    max-width: 150px;
    max-height: 50px;
  }

  .brand-text { max-width: 145px; font-size: 12px; }
  .main-nav { gap: 2px 14px; }
  .main-nav a { padding: 5px 0; font-size: 11px; }
  .hero-inner { min-height: 360px; }
  .hero-copy { padding: 52px 0; }
  .hero h1 { font-size: clamp(36px, 9vw, 49px); }

  .hero-copy p {
    max-width: 440px;
    font-size: 14px;
  }

  .welcome { padding-top: 48px; padding-bottom: 40px; }
  .home-section, .schedule-section { padding-bottom: 48px; }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 205px 155px 155px;
    gap: 10px;
  }

  .photo-card-large { grid-column: span 2; grid-row: auto; }
  .photo-fallback { padding: 14px; }
  .photo-fallback strong { font-size: 15px; }
  .photo-fallback span { font-size: 27px; }
  .news-section { padding: 48px 0; }
  .schedule-section { padding-top: 48px; }

  .beginner-inner {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
    padding-top: 45px;
    padding-bottom: 45px;
  }

  .table-wrap { border-radius: 6px; }
  th, td { padding: 12px; font-size: 12px; }
  .page-main { padding-top: 20px; padding-bottom: 55px; }
  .page-heading { padding-top: 15px; }
  .info-grid, .page-photo-grid { grid-template-columns: 1fr; }
  .page-photo-grid { grid-auto-rows: 220px; }
  .site-footer { padding-top: 35px; }
}

@media (max-width: 390px) {
  .brand { gap: 8px; font-size: 13px; letter-spacing: 1px; }

  .brand img {
    max-width: 120px;
    max-height: 42px;
  }

  .brand-text { max-width: 125px; font-size: 11px; }
  .main-nav { gap: 1px 11px; }
  .main-nav a { font-size: 10px; }
  .hero h1 { font-size: 35px; }
  .photo-grid { grid-template-rows: 180px 145px 145px; }
  th, td { padding: 10px; font-size: 11px; }
}

/* =========================
   BILDKORT – TEXT OPPÅ BILDERNA
   ========================= */

.photo-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.photo-card img {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.photo-card:hover img {
  transform: scale(1.05);
}

.photo-fallback {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
  color: #ffffff;

  /* Mörkare nederkant gör texten lättare att läsa */
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(0, 0, 0, 0.35) 45%,
    rgba(0, 0, 0, 0.05) 75%,
    transparent 100%
  );
}

.photo-fallback span {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 34px;
  color: #ffffff;
  opacity: 0.9;
}

.photo-fallback strong {
  position: relative;
  z-index: 3;
  display: block;
  max-width: 220px;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.3;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.8);
}

/* =========================
   MOBILANPASSNING
   ========================= */

@media (max-width: 600px) {
  .photo-fallback {
    padding: 14px;
  }

  .photo-fallback span {
    font-size: 28px;
  }

  .photo-fallback strong {
    font-size: 17px;
  }
}