/* ==========================================================================
   KARTJAKT HUB & TEMASIDER - ORDKONGEN.NO
   Skandinavisk lyst, rent og moderne design for Kartjakt-sidene
   ========================================================================== */

.kartjakt-page-container {
  width: 100%;
  margin: 0 auto;
  padding: 0.5rem 1rem 4rem 1rem;
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 1. Topp-verktøylinje over kartet */
.kartjakt-toolbar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0.5rem 0.75rem 0.5rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--primary, #0284c7);
  text-decoration: none;
  font-weight: 700;
  transition: opacity 0.15s ease;
}
.back-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--text-muted, #64748b);
}

.current-crumb {
  font-weight: 800;
  color: var(--text-main, #0f172a);
}

.kartjakt-badge {
  background: #e0f2fe;
  color: #0369a1;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #bae6fd;
}

:root[data-color-scheme="dark"] .kartjakt-badge {
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-tool {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--surface, #ffffff);
  color: var(--text-main, #0f172a);
  border: 1.5px solid var(--border-light, #cbd5e1);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.btn-tool:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

:root[data-color-scheme="dark"] .btn-tool {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #334155;
}

/* 2. Spillramme */
.kartjakt-game-wrapper {
  width: 100%;
  height: clamp(760px, 86vh, 940px);
  min-height: 720px;
  border-radius: 20px;
  border: 2px solid var(--border-light, #cbd5e1);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  position: relative;
  background: #f8fafc;
  margin-bottom: 3.5rem;
  transition: box-shadow 0.2s ease;
}

:root[data-color-scheme="dark"] .kartjakt-game-wrapper {
  border-color: #334155;
  background: #0f172a;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.kartjakt-game-wrapper.in-fullscreen {
  border-radius: 0;
  border: none;
  height: 100vh !important;
  max-height: 100vh !important;
}

.kartjakt-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* 3. SEO- og faghub under kartet */
.kartjakt-seo-hub {
  width: 100%;
  max-width: 1300px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.section-tag {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0284c7;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.hub-h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.85rem, 3.2vw, 2.7rem);
  font-weight: 900;
  color: var(--text-main, #0f172a);
  margin: 0 0 0.9rem 0;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hub-h2 {
  font-size: clamp(1.5rem, 2.3vw, 2.05rem);
  font-weight: 900;
  color: var(--text-main, #0f172a);
  margin: 0 0 0.8rem 0;
  line-height: 1.25;
}

.hub-lead {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-muted, #475569);
  max-width: 900px;
  margin: 0 0 1.5rem 0;
}

/* Snarveier (Quick launch chips) */
.quick-launch-bar {
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border-light, #e2e8f0);
  border-radius: 18px;
  padding: 1.5rem 1.8rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

:root[data-color-scheme="dark"] .quick-launch-bar {
  background: #1e293b;
  border-color: #334155;
}

.quick-launch-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  margin: 0 0 1rem 0;
}

.quick-launch-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #f1f5f9;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.25);
}

:root[data-color-scheme="dark"] .chip {
  background: #0f172a;
  color: #f1f5f9;
  border-color: #334155;
}

:root[data-color-scheme="dark"] .chip:hover {
  background: #0284c7;
  border-color: #0284c7;
}

/* Temaklynge-kort */
.cluster-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.cluster-card {
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border-light, #e2e8f0);
  border-radius: 16px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cluster-card:hover {
  transform: translateY(-3px);
  border-color: #0284c7;
  box-shadow: 0 10px 25px rgba(2, 132, 199, 0.1);
}

:root[data-color-scheme="dark"] .cluster-card {
  background: #1e293b;
  border-color: #334155;
}

.cluster-card-flag {
  font-size: 2.5rem;
  line-height: 1;
}

.cluster-card-content h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  margin: 0 0 0.35rem 0;
}

.cluster-card-content p {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted, #475569);
  margin: 0 0 0.8rem 0;
}

.cluster-card-link {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0284c7;
}

/* Fylkestabell */
.table-responsive-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 1.5rem 0 0.5rem 0;
  border-radius: 14px;
  border: 1.5px solid var(--border-light, #e2e8f0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.geo-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: var(--surface, #ffffff);
  font-size: 0.95rem;
}

:root[data-color-scheme="dark"] .geo-data-table {
  background: #1e293b;
}

.geo-data-table th,
.geo-data-table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border-light, #e2e8f0);
}

:root[data-color-scheme="dark"] .geo-data-table th,
:root[data-color-scheme="dark"] .geo-data-table td {
  border-color: #334155;
}

.geo-data-table th {
  background: #f8fafc;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

:root[data-color-scheme="dark"] .geo-data-table th {
  background: #0f172a;
  color: #f1f5f9;
}

.geo-data-table tr:hover {
  background: #f1f5f9;
}

:root[data-color-scheme="dark"] .geo-data-table tr:hover {
  background: #273549;
}

.table-caption {
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
  margin-top: 0.5rem;
}

/* Spillmoduser i stor grid */
.modes-grid-large {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.mode-box {
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border-light, #e2e8f0);
  border-radius: 16px;
  padding: 1.6rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

:root[data-color-scheme="dark"] .mode-box {
  background: #1e293b;
  border-color: #334155;
}

.mode-box-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.mode-box-icon {
  font-size: 2rem;
}

.mode-box-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  margin: 0;
}

.mode-box p {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-muted, #475569);
  margin: 0;
}

/* Skole & Læreplan-banner */
.school-card-section {
  background: linear-gradient(135deg, #f0fdf4 0%, #e0f2fe 100%);
  border: 1.5px solid #bbf7d0;
  border-radius: 20px;
  padding: 2.2rem;
}

:root[data-color-scheme="dark"] .school-card-section {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.4) 0%, rgba(2, 132, 199, 0.3) 100%);
  border-color: rgba(52, 211, 153, 0.3);
}

.school-card-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.school-badge-icon {
  font-size: 3.2rem;
  flex-shrink: 0;
}

.school-h2 {
  font-size: 1.5rem;
  font-weight: 900;
  color: #065f46;
  margin: 0 0 0.3rem 0;
}

:root[data-color-scheme="dark"] .school-h2 {
  color: #34d399;
}

.school-sub {
  font-size: 1rem;
  font-weight: 700;
  color: #0284c7;
  margin: 0;
}

:root[data-color-scheme="dark"] .school-sub {
  color: #38bdf8;
}

.school-body-text > p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #166534;
  margin-bottom: 1.5rem;
}

:root[data-color-scheme="dark"] .school-body-text > p {
  color: #d1fae5;
}

.school-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}

.pillar {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

:root[data-color-scheme="dark"] .pillar {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.pillar strong {
  display: block;
  font-size: 0.95rem;
  color: #065f46;
  margin-bottom: 0.4rem;
}

:root[data-color-scheme="dark"] .pillar strong {
  color: #34d399;
}

.pillar p {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #166534;
  margin: 0;
}

:root[data-color-scheme="dark"] .pillar p {
  color: #cbd5e1;
}

/* FAQ Accordion */
.faq-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1.25rem;
}

.faq-card {
  background: var(--surface, #ffffff);
  border: 1.5px solid var(--border-light, #e2e8f0);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

:root[data-color-scheme="dark"] .faq-card {
  background: #1e293b;
  border-color: #334155;
}

.faq-card[open] {
  border-color: #0284c7;
}

.faq-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.15rem 1.4rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main, #0f172a);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-toggle-icon {
  font-size: 1.1rem;
  color: #0284c7;
  transition: transform 0.2s ease;
}

.faq-card[open] .faq-toggle-icon {
  transform: rotate(180deg);
}

.faq-content {
  padding: 0 1.4rem 1.4rem 1.4rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-muted, #475569);
}

.faq-content p {
  margin: 0;
}

/* Bunnseksjon */
.bottom-actions-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (max-width: 768px) {
  .kartjakt-page-container {
    padding: 0.25rem 0.5rem 3rem 0.5rem;
  }
  .kartjakt-game-wrapper {
    height: 84vh;
    min-height: 580px;
    border-radius: 14px;
    margin-bottom: 2rem;
  }
  .kartjakt-seo-hub {
    gap: 2.5rem;
  }
  .school-card-header {
    flex-direction: column;
    text-align: center;
  }
}
