﻿/* ====== FÄRGSYSTEM ====== */
:root {
  --clr-primary:     #0088cc;   /* blå — header, footer, knappar, aktiva states */
  --clr-primary-dk:  #006daa;   /* mörkare blå — hover, border */
  --clr-accent:      #c8922a;   /* guld/amber — accentborder, badges, highlights */
  --clr-accent-lt:   #e8b44a;   /* ljusare guld */
  --clr-bg:          #f0f6fb;   /* varm vit — sidbakgrund */
  --clr-bg-card:     #cce8f8;   /* kortbakgrund */
  --clr-bg-warm:     #e0f2fb;   /* lite varmare — hover, sekundära ytor */
  --clr-border:      #80c0e8;   /* kantlinje */
  --clr-text:        #081220;   /* primär textfärg */
  --clr-text-mid:    #1a3a4a;   /* sekundär text, mörk blå */
  --clr-text-muted:  #4a6a7a;   /* dämpad text */
}

/* ====== GLOBAL ====== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 60px; /* kompenserar för den fasta headern */
}

body {
  margin: 0;
  padding: 0;
  background: #f0f6fb;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.7;
  color: #081220;
}

a {
  color: #1a3a4a;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Philosopher', serif;
}

h1 {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #081220;
  margin-bottom: 20px;
}

h2 {
  font-size: 28px;
  font-weight: 700;
  color: #081220;
  margin-bottom: 18px;
}

h3 {
  font-size: 21px;
  font-weight: 600;
  color: #081220;
  margin-bottom: 12px;
}

h4 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #081220;
  margin-bottom: 10px;
}

h5, h6 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #4a6a7a;
  margin-bottom: 8px;
}

p {
  margin-bottom: 18px;
}

blockquote {
  border-left: 4px solid #1a3a4a;
  padding: 12px 18px;
  margin: 20px 0;
  background: #ecf2f7;
  font-style: italic;
  color: #081220;
  border-radius: 6px;
}

/* ====== HEADER ====== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 999;
  background: #0088cc;
  border-bottom: 1px solid #006daa;
}

.header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 60px;
}

.brand-link {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Desktop-nav */
.main-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.main-menu > ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

/* Dropdown-undermeny */
.main-menu > ul > li {
  position: relative;
}

.main-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  /* 8px osynlig topp-padding = brygga mot li-hover, ersätter det gamla gapet */
  padding: 8px 0 6px;
  background: #fff;
  border: 1px solid #b0c8da;
  border-radius: 10px;
  box-shadow: 0 6px 24px rgba(40, 58, 90, 0.14);
  min-width: 210px;
  z-index: 1001;
  flex-direction: column;
  gap: 0;
  list-style: none;
  margin: 0;
}

/* Osynlig brygga ovanför menyn — håller hover aktiv när musen rör sig neråt */
.main-menu .sub-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 0;
  right: 0;
  height: 8px;
}

.main-menu > ul > li:hover > .sub-menu,
.main-menu > ul > li:focus-within > .sub-menu {
  display: flex;
}

.main-menu .sub-menu li a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: #081220;
  font-weight: 500;
  white-space: nowrap;
}

.main-menu .sub-menu li a:hover {
  background: #e8f0f5;
  color: #1a2a5a;
}

.main-menu .sub-menu li:not(:last-child) a {
  border-bottom: 1px solid #f0ebe2;
}

.main-menu a {
  font-size: 15px;
  color: #ffffff;
  font-weight: 500;
  position: relative;
  display: inline-block;
}

.main-menu a:hover {
  color: #cce8f8;
  text-decoration: none;
}

/* Aktiv menypost — accentlinje under länken */
.main-menu li.current-menu-item > a,
.main-menu li.current-menu-ancestor > a,
.main-menu li.current_page_item > a,
.main-menu li.current_page_ancestor > a {
  color: #ffffff;
  font-weight: 600;
}

.main-menu li.current-menu-item > a::after,
.main-menu li.current-menu-ancestor > a::after,
.main-menu li.current_page_item > a::after,
.main-menu li.current_page_ancestor > a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  right: 0;
  height: 2px;
  background: #c8922a;
  border-radius: 1px;
}

/* ====== BRÖDSMULA ====== */

.ks-breadcrumb {
  font-size: 13px;
  color: #4a6a7a;
  margin-bottom: 22px;
  margin-top: -8px;
}

.ks-breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
}

.ks-breadcrumb li {
  display: flex;
  align-items: center;
}

.ks-breadcrumb a {
  color: #1a2a5a;
  text-decoration: none;
  font-weight: 500;
}

.ks-breadcrumb a:hover {
  text-decoration: underline;
}

.ks-breadcrumb__sep {
  margin: 0 5px;
  color: #a0b8c8;
  font-size: 13px;
  line-height: 1;
  user-select: none;
}

.ks-breadcrumb [aria-current="page"] {
  color: #1a3a4a;
  font-weight: 500;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ====== SÖKIKON I HEADER ====== */

.header-search {
  position: relative;
  display: flex;
  align-items: center;
}

.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: #ffffff;
  padding: 5px 7px;
  line-height: 0;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.search-toggle:hover {
  color: #cce8f8;
  background: rgba(255, 255, 255, 0.12);
}

/* Desktop: form expanderar inline åt vänster */
.nav-search-form {
  display: flex;
  align-items: center;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-width 0.35s ease, opacity 0.25s ease;
}
.header-search.open .nav-search-form {
  max-width: 230px;
  opacity: 1;
  pointer-events: auto;
}

.nav-search-form input[type="search"] {
  padding: 7px 14px;
  font-size: 14px;
  border: 1.5px solid #ccc;
  border-radius: 20px;
  width: 210px;
  background: #f5f8fb;
  outline: none;
  color: #0a1f2a;
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.nav-search-form input[type="search"]:focus {
  border-color: #1a2a5a;
}
.nav-search-form input[type="search"]::placeholder {
  color: #7090a0;
}

/* Mobil: form visas som fast sökfält under headern */
@media (max-width: 680px) {
  .nav-search-form {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    padding: 10px 15px;
    background: white;
    border-top: 1px solid #eee;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 998;
    max-width: none !important;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0;
    overflow: visible;
    transition: opacity 0.2s ease;
  }
  .admin-bar .nav-search-form {
    top: 92px;
  }
  .nav-search-form input[type="search"] {
    width: 100%;
    font-size: 16px;
    padding: 10px 16px;
    border-radius: 8px;
  }
}

/* Hamburger-knapp (dold på desktop) */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
}

.hamburger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.2s ease;
}

/* Animera till × när menyn är öppen */
.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-main {
  margin-top: 60px;
}

.admin-bar .site-header {
  top: 32px;
}

/* ====== MOBILMENY ====== */

@media (max-width: 680px) {
  .site-main {
    margin-top: 56px;
  }

  .hamburger-btn {
    display: flex;
  }

  /* Dölj nav tills hamburger klickas */
  .main-menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 4px 0 12px;
    background: #0088cc;
    border-top: 1px solid #006daa;
  }

  .main-menu.open {
    display: flex;
  }

  .main-menu > ul {
    flex-direction: column;
    gap: 0;
  }

  .main-menu > ul > li > a {
    display: block;
    padding: 11px 0;
    font-size: 16px;
    border-bottom: 1px solid #006daa;
    color: #ffffff;
  }

  .main-menu > ul > li:last-child > a {
    border-bottom: none;
  }

  /* Sub-menu på mobil: visa som indenterade objekt */
  .main-menu .sub-menu {
    display: flex !important;
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0 0 0 16px;
    background: transparent;
    min-width: 0;
  }

  .main-menu .sub-menu li a {
    padding: 9px 0;
    font-size: 15px;
    color: #1a3a4a;
    border-bottom: 1px solid #e8edf5;
  }

  .main-menu .sub-menu li:last-child a {
    border-bottom: none;
  }

  .main-menu .sub-menu li a:hover {
    background: transparent;
    color: #1a2a5a;
  }

}

/* ====== SEARCH ====== */

.no-results {
  margin-top: 30px;
  padding: 20px;
  background: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 6px;
}

.search-again-form {
  margin-top: 10px;
  display: flex;
  gap: 10px;
}

.search-again-form input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.search-again-form button {
  padding: 8px 14px;
  background: #1a2a5a;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* ====== CONTAINER / LAYOUT ====== */

.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 35px 15px;
}

.section-title {
  font-size: 22px;
  margin-bottom: 25px;
  color: #1a3a4a;
  font-weight: 600;
}

.section-divider {
  border-top: 1px solid #a0bbcb;
  margin: 35px 0 25px 0;
  opacity: 0.7;
}

/* ====== KATEGORIFILTER ====== */

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 28px;
}

.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #cce8f8;
  border: 1px solid #80c0e8;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: #1a3a4a;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.cat-btn:hover {
  background: #b0d8f4;
  border-color: #0070aa;
  text-decoration: none;
}

.cat-btn.active {
  background: #1a2a5a;
  border-color: #1a2a5a;
  color: #f0f6fb;
}

.cat-btn.active:hover {
  background: #101e48;
}

.cat-count {
  font-size: 12px;
  opacity: 0.65;
}

/* ====== GRID ====== */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 25px;
}

.card.full-width {
  grid-column: 1 / -1;
}

/* Startsidans 11-inläggsrutnät: 1 / 2+2 / 3+3 */
.grid-home {
  grid-template-columns: repeat(6, 1fr);
}

.grid-home .card:nth-child(1) {
  grid-column: span 6;
}

.grid-home .card:nth-child(2),
.grid-home .card:nth-child(3),
.grid-home .card:nth-child(4),
.grid-home .card:nth-child(5) {
  grid-column: span 3;
}

.grid-home .card:nth-child(n+6) {
  grid-column: span 2;
}

@media (max-width: 680px) {
  .grid-home {
    grid-template-columns: 1fr;
  }
  .grid-home .card {
    grid-column: span 1 !important;
  }
}

/* ====== CARD ====== */

.card {
  background: #cce8f8;
  padding: 0;
  border-radius: 12px;
  border: 1px solid #80c0e8;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  text-decoration: none;
  color: #1a3a4a;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0,0,0,0.07);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.13);
}

/* Thumbnail */
.card-thumb {
  height: 150px;
  background-color: var(--cat-color, #3a5a6a);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(0,0,0,0.22) 100%);
  pointer-events: none;
}

.card-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-thumb-letter {
  font-size: 56px;
  color: rgba(255,255,255,0.32);
  font-family: 'Philosopher', serif;
  font-weight: 700;
  user-select: none;
  line-height: 1;
  position: relative;
  z-index: 1;
}

/* Card body */
.card-body {
  padding: 14px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Category badge */
.card-cat-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: #fff;
  background-color: var(--cat-color, #3a5a6a);
  margin-bottom: 9px;
  align-self: flex-start;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 8px;
  color: #081220;
}

.excerpt {
  font-size: 14px;
  color: #555;
  line-height: 1.65;
  letter-spacing: 0.1px;
  margin-bottom: 10px;
  flex: 1;
}

.source {
  font-size: 12px;
  color: #999;
  margin: 0;
}

/* Hero card (first in grid-home): horisontell layout på desktop */
.grid-home .card:nth-child(1) {
  flex-direction: row;
}
.grid-home .card:nth-child(1) .card-thumb {
  width: 40%;
  height: auto;
  min-height: 200px;
  flex-shrink: 0;
}
.grid-home .card:nth-child(1) .card-thumb-letter {
  font-size: 90px;
}
.grid-home .card:nth-child(1) .card-body {
  padding: 24px 26px;
}
.grid-home .card:nth-child(1) .card-title {
  font-size: 22px;
}
.grid-home .card:nth-child(1) .excerpt {
  font-size: 15px;
}

@media (max-width: 680px) {
  .grid-home .card:nth-child(1) {
    flex-direction: column;
  }
  .grid-home .card:nth-child(1) .card-thumb {
    width: 100%;
    height: 160px;
    min-height: unset;
  }
}

/* ====== SINGLE POST ====== */

.single-container {
  max-width: 760px;
  box-sizing: border-box;
  margin: 40px auto;
  background: #ffffff;
  padding: 40px 35px;
  border-radius: 6px;
  border: 1px solid #e6e6e6;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.post-title {
  font-size: 36px;
  letter-spacing: -0.5px;
  margin: 0 0 6px;
  color: #081220;
  font-weight: 700;
  line-height: 1.25;
}

.post-meta {
  font-size: 13px;
  color: #888;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
}

/* Optimal läslinje: ~67 tecken/rad vid Merriweather 16.5px */
.post-content,
.post-meta,
.toc {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.post-content {
  font-family: "Merriweather", serif;
  font-size: 16.5px;
  line-height: 1.85;
  color: #0e1e2e;
}

.post-content p {
  margin-bottom: 22px;
}

/* Typografisk skala inom artikel */
.post-content h2 {
  font-size: 26px;
  font-weight: 700;
  margin-top: 2.2em;
  margin-bottom: 0.7em;
  padding-bottom: 6px;
  border-bottom: 2px solid #80c0e8;
  letter-spacing: -0.2px;
}

.post-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin-top: 1.8em;
  margin-bottom: 0.6em;
}

.post-content h4 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #3a6070;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.post-content blockquote {
  border-left: 4px solid #c8922a;
  background: #f1f6fd;
  padding: 16px 22px;
  margin: 28px 0;
  margin-left: 0;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  font-size: 1.05em;
  line-height: 1.9;
  color: #1a3a4a;
}

/* ====== ARABISK TEXT ====== */
/* Används på <span class="arabic-text"> eller <p class="arabic-text"> i artikelinnehåll */

.arabic-text,
[lang="ar"] {
  font-family: 'Noto Naskh Arabic', 'Scheherazade New', 'Arabic Typesetting',
               'Traditional Arabic', 'Geeza Pro', 'Al Nile', serif;
  direction: rtl;
  text-align: right;
  unicode-bidi: embed;
  line-height: 2.2;
  font-size: 1.2em;
  letter-spacing: 0;
}

.post-content .arabic-text {
  display: block;
  margin: 24px 0;
  padding: 14px 20px 14px 14px;
  background: #f1f6fd;
  border-right: 4px solid #c8922a;
  border-radius: 8px 0 0 8px;
  font-size: 1.35em;
  color: #0a2a3a;
}

/* Dölj DKPDFs automatiskt tillagda knapp — vi använder vår egen */
.dkpdf-button-container {
  display: none !important;
}

.article-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

/* ====== DOWNLOAD-KNAPPAR ====== */

.ks-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  position: relative;
  white-space: nowrap;
}

.ks-dl-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.14);
  text-decoration: none;
}

.ks-dl-btn:active { transform: translateY(0); }

.ks-dl-btn__icon { flex-shrink: 0; }

/* Kopiera — outline/sekundär */
.ks-dl-btn--copy {
  background: #fff;
  border-color: #b0c8da;
  color: #1a3a4a;
}
.ks-dl-btn--copy:hover { background: #f0f6fb; border-color: #c8922a; color: #1a3a4a; }

/* PDF — primärgrön */
.ks-dl-btn--pdf {
  background: #1a2a5a;
  border-color: #1a2a5a;
  color: #fff;
}
.ks-dl-btn--pdf:hover { background: #101e48; color: #fff; }

/* DOCX — accentguld */
.ks-dl-btn--docx {
  background: #c8922a;
  border-color: #c8922a;
  color: #fff;
}
.ks-dl-btn--docx:hover { background: #a07020; color: #fff; }

/* Tooltip (CSS-only via data-tooltip) */
.ks-dl-btn[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #081220;
  color: #f0f6fb;
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 20;
}
.ks-dl-btn[data-tooltip]::after {
  content: '';
  position: absolute;
  bottom: calc(100% + 3px);
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #081220;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s;
  z-index: 20;
}
.ks-dl-btn[data-tooltip]:hover::before,
.ks-dl-btn[data-tooltip]:hover::after { opacity: 1; }

/* Nedladdningssektion i botten av artikeln */
.article-dl-footer {
  margin: 36px 0 0;
  padding: 22px 24px;
  background: #e8f0f5;
  border-radius: 10px;
  border: 1px solid #c8dae4;
  text-align: center;
}
.article-dl-footer__title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #6a8a9a;
  margin-bottom: 14px;
}

/* Mobil: stapla knapparna */
@media (max-width: 540px) {
  .article-buttons { flex-direction: column; align-items: stretch; }
  .ks-dl-btn { justify-content: center; }
}

/* Legacy .copy-post-btn (bevaras för bakåtkompatibilitet) */
.copy-post-btn {
  background: #fff;
  border: 1px solid #80c0e8;
  border-radius: 6px;
  padding: 4px 14px;
  font-size: 14px;
  color: #3a6070;
  cursor: pointer;
  transition: background 0.2s ease;
  text-decoration: none;
  display: inline-block;
}
.copy-post-btn:hover { background: #cce8f8; text-decoration: none; }

.share-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.meta-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #fff;
  border: 1px solid #80c0e8;
  border-radius: 6px;
  padding: 4px 14px;
  font-size: 14px;
  color: #3a6070;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-left: 3px;
}

.meta-share-btn:hover {
  background: #cce8f8;
}

.share-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid #80c0e8;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 100;
  min-width: 155px;
  overflow: hidden;
}

.share-menu.open {
  display: block;
}

.share-option {
  display: block;
  padding: 10px 16px;
  font-size: 15px;
  color: #1a3a4a;
  text-decoration: none;
  border-bottom: 1px solid #e8edf5;
}

.share-option:last-child {
  border-bottom: none;
}

.share-option:hover {
  background: #cce8f8;
  text-decoration: none;
}

/* ====== INNEHÅLLSFÖRTECKNING ====== */

.toc {
  background: #cce8f8;
  border: 1px solid #80c0e8;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 28px;
}

.toc-toggle {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  font-size: 13px;
  font-weight: 700;
  color: #1a3a4a;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.toc-arrow {
  font-size: 11px;
  color: #5a7a8a;
  transition: transform 0.2s ease;
}

.toc-toggle[aria-expanded="false"] .toc-arrow {
  transform: rotate(180deg);
}

.toc-list {
  margin: 12px 0 0 0;
  padding-left: 18px;
  line-height: 2;
}

.toc-list a {
  color: #1a3a4a;
  text-decoration: none;
  font-size: 15px;
}

.toc-list a:hover {
  text-decoration: underline;
}

.toc-h3 {
  padding-left: 14px;
  list-style-type: circle;
}

.toc-h3 a {
  font-size: 14px;
  color: #3a6070;
}

/* ====== ARTICLE WRAPPER ====== */

.article-wrapper {
  max-width: 100%;
  margin: 0;
  padding: 20px 0;
}

.article-header {
  text-align: left;
  margin-bottom: 30px;
}

.article-title {
  font-size: 34px;
  font-weight: 700;
  color: #081220;
  margin-bottom: 10px;
}

.article-meta {
  font-size: 11px;
  color: #7898a8;
  margin-top: 3px;
  margin-bottom: 24px;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
}

.article-meta a {
  color: #7898a8;
  text-decoration: none;
}

.article-meta a:hover {
  color: #3a6070;
}

.meta-sep {
  color: #a0b8c8;
  margin: 0 7px;
}

.meta-item {
  display: inline-block;
  background: #fff;
  border: 1px solid #80c0e8;
  border-radius: 6px;
  padding: 4px 14px;
  font-size: 14px;
  color: #3a6070;
  margin: 0 3px;
  transition: background 0.2s ease;
}

.meta-item:hover {
  background: #cce8f8;
}

.article-image img {
  width: 100%;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.12);
  margin-bottom: 25px;
}

.copy-btn {
  background: #e0f2fb;
  border: 1px solid #80c0e8;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.25s ease;
  font-size: 15px;
}

.copy-btn:hover {
  background: #cce8f8;
}

.article-content {
  font-size: 18px;
  line-height: 1.75;
  color: #081220;
}

.article-content p {
  margin-bottom: 20px;
}

/* ====== POST NAVIGATION ====== */

.post-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.post-navigation a {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
}

.post-navigation a:hover {
  text-decoration: underline;
}

.post-navigation-box {
  background: #e0f2fb;
  padding: 20px;
  border-radius: 8px;
  margin-top: 30px;
  border: 1px solid #80c0e8;
  text-align: center;
}

.post-navigation-box .page-numbers {
  font-size: 22px;
  display: inline-block;
  margin: 0 8px;
}

.post-navigation-box .page-numbers.current {
  font-weight: 700;
}

/* ====== NO RESULTS / PAGE ====== */

.no-results-box {
  background: #e0f2fb;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #80c0e8;
  text-align: center;
  margin: 40px 0;
}

.no-results-box .back-home {
  display: inline-block;
  margin-top: 15px;
  padding: 10px 20px;
  background: #80c0e8;
  color: #081220;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
}

.page-content-box {
  background: #e0f2fb;
  padding: 30px;
  border-radius: 8px;
  border: 1px solid #80c0e8;
  margin-top: 30px;
}

.page-title {
  margin-bottom: 20px;
  color: #1a3a4a;
}

.page-content p {
  margin-bottom: 15px;
  line-height: 1.7;
}

/* ====== KORAN BOX ====== */

.koran-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.4px;
  color: #8a8a8a;
  text-transform: uppercase;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.koran-title::before {
  content: "";
  height: 1px;
  background: #d6d6d6;
  width: 45px;
  flex-shrink: 0;
}

.koran-box {
  background: radial-gradient(circle, #fff 60%, #e8f5fa 100%);
  border: 3px double #c8922a;
  padding: 12px 35px 35px;
  margin: 4px auto 50px;
  max-width: 750px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  font-size: 22px;
  line-height: 1.8;
  color: #1E4a7B;
  text-align: center;
  font-family: "Merriweather", serif;
  position: relative;
}

.koran-image-box {
  margin-top: 6px;
  margin-bottom: 18px;
  max-width: 100%;
}

.koran-image-box img {
  width: 100%;
  max-width: 420px;
  border-radius: 10px;
  display: block;
}

/* ====== RANDOM POSTS ====== */

.random-posts-box {
  margin-top: 40px;
}

.random-column {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.random-column .card {
  background: #cce8f8;
  padding: 14px 18px;
  border-radius: 8px;
  border: 1px solid #80c0e8;
  text-decoration: none;
  color: #1a3a4a;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  overflow: visible;
  transform: none;
  box-shadow: none;
}

.random-column .card:hover {
  background: #a8d4f0;
  transform: translateX(3px);
  box-shadow: none;
}

.random-column .card-thumb {
  display: none;
}

.random-card-body {
  flex: 1;
  min-width: 0;
}

.random-card-thumb {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
}

.random-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.random-column .card-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 600;
}

/* ====== BOTTOM SHARE BUTTON ====== */

#bottomShareBtn {
  position: fixed;
  bottom: 25px;
  right: 80px;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
}

#bottomShareBtn.show {
  opacity: 1;
  visibility: visible;
}

.bottom-share-inner {
  background: #cce8f8;
  border: 1px solid #80c0e8;
  border-radius: 999px;
  padding: 9px 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: #4a6a7a;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}

.bottom-share-inner:hover {
  background: #80c0e8;
}

#bottomShareBtn .share-menu {
  top: auto;
  bottom: calc(100% + 8px);
}

/* ====== SCROLL TO TOP ====== */

#scrollTopBtn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 45px;
  height: 45px;
  background: #cce8f8;
  color: #1a2a5a;
  border: 1px solid #80c0e8;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  appearance: none;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: background 0.2s ease, opacity 0.3s ease, visibility 0.3s ease;
  z-index: 9999;
}

#scrollTopBtn:hover {
  background: #80c0e8;
}

#scrollTopBtn.show {
  opacity: 1;
  visibility: visible;
}

/* ====== FOOTER ====== */

.site-footer {
  background: #0088cc;
  border-top: 1px solid #006daa;
  margin-top: 40px;
}

/* --- Widgets-rad (3 kolumner) --- */
.footer-widgets {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 15px 32px;
}

.footer-widgets__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
}

.footer-brand__name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #ffffff;
  text-decoration: none;
  margin-bottom: 10px;
}

.footer-brand__name:hover { text-decoration: none; }

.footer-brand__desc {
  font-size: 13px;
  color: #cce8f8;
  line-height: 1.65;
  margin: 0;
}

.footer-widget__title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 14px;
}

.footer-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-nav__list a {
  font-size: 14px;
  color: #cce8f8;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.footer-nav__list a:hover { color: #ffffff; text-decoration: underline; }

.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.footer-contact a {
  font-size: 13px;
  color: #a8d8f0;
  text-decoration: none;
  font-weight: 400;
}

.footer-contact a:hover { color: #ffffff; text-decoration: underline; }

.footer-arabic {
  font-family: 'Noto Naskh Arabic', 'Scheherazade New', 'Traditional Arabic', serif;
  font-size: 15px;
  color: #1a2a5a;
  opacity: 0.55;
  direction: rtl;
  text-align: right;
  line-height: 2.2;
}

/* --- Footer-bar (copyright) --- */
.footer-bar {
  border-top: 1px solid #006daa;
  background: #0070aa;
}

.footer-bar__inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.footer-bar__copy,
.footer-bar__tack {
  font-size: 12px;
  color: #a8d4f0;
  margin: 0;
  font-weight: 400;
}

/* Mobil */
@media (max-width: 680px) {
  .footer-widgets__grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bar__inner    { flex-direction: column; text-align: center; }
}

/* Mörkt läge */
[data-theme="dark"] .site-footer         { background: #0c0e14; border-top-color: #1e2530; }
[data-theme="dark"] .footer-brand__name  { color: #d5e8ed; }
[data-theme="dark"] .footer-brand__desc  { color: #4a6878; }
[data-theme="dark"] .footer-widget__title { color: #4ab0d8; }
[data-theme="dark"] .footer-nav__list a  { color: #80b8c8; }
[data-theme="dark"] .footer-nav__list a:hover { color: #d5e8ed; }
[data-theme="dark"] .footer-contact a    { color: #4a6878; }
[data-theme="dark"] .footer-contact a:hover { color: #80b8c8; }
[data-theme="dark"] .footer-arabic       { color: #4ab0d8; }
[data-theme="dark"] .footer-bar          { background: #0c0e14; border-top-color: #1e2530; }
[data-theme="dark"] .footer-bar__copy,
[data-theme="dark"] .footer-bar__tack    { color: #2a4a5a; }

/* ====== BÖNETIDER ====== */

.bonetider-manad-tabell {
  width: 100%;
  border-collapse: collapse !important;
  margin-top: 20px;
  font-size: 16px;
}

.bonetider-manad-tabell th,
.bonetider-manad-tabell td {
  padding: 10px 12px !important;
  border: 1px solid #ddd !important;
  text-align: center;
}

.bonetider-manad-tabell th {
  background: #f5f5f5;
  font-weight: 600;
}

.bonetider-manad-tabell tr:nth-child(even) {
  background: #fafafa;
}

.bonetider-kategori-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 25px;
}

.bonetider-kort {
  background: #ffffff;
  border: 1px solid #e3e6ee;
  padding: 18px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  transition: 0.2s ease;
}

.bonetider-kort:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.bonetider-kort a {
  text-decoration: none;
  color: #1a2a5a;
  font-size: 18px;
  font-weight: 600;
}

.stadsvaljare select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #d1d5df;
  font-size: 16px;
  background: #f5f8fc;
  margin-bottom: 20px;
}

/* ====== PRAYER WIDGET ====== */

#prayer-widget {
  background: rgba(231, 240, 248, 0.85);
  backdrop-filter: blur(4px);
  padding: 14px 26px;
  border-radius: 10px;
  border: 1px solid #80c0e8;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  margin-bottom: 20px;
  text-align: center;
}

#prayer-widget h3 {
  margin: 0 0 8px 0;
  color: #1a2f3a;
  font-weight: 800;
  font-size: 19px;
}

#prayer-title {
  text-align: center;
  color: #1a2f3a;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 10px;
}

#city-name {
  font-size: 18px;
  font-weight: 700;
  color: #1a2f3a;
  margin-top: -4px;
  margin-bottom: 10px;
  opacity: 0.9;
}

#prayer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

#prayer-row span {
  background: #d2e8f3;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 14px;
  white-space: nowrap;
}

#next-prayer-box {
  background: rgba(35, 60, 80, 0.12);
  padding: 8px 10px;
  border-radius: 8px;
  color: #1a2f3a;
  border: 1px solid rgba(35, 60, 80, 0.2);
  font-size: 14px;
  text-align: center;
}

#countdown {
  display: inline-block;
  margin-top: 4px;
  font-size: 18px;
  font-weight: 600;
}

.grid-item-full {
  grid-column: 1 / -1;
  width: 100%;
}

/* ====== ORDLISTA ====== */

.ord-wrap { max-width: 820px; margin: 0 auto; }

/* Sökrad */
.ord-search-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.ord-search-input-wrap {
  position: relative;
  flex: 1;
}

.ord-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #6a8a9a;
  pointer-events: none;
}

#ord-search {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 36px 11px 40px;
  font-size: 15px;
  font-family: inherit;
  border: 1.5px solid #b0c8da;
  border-radius: 8px;
  background: #fff;
  color: #081220;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#ord-search:focus {
  border-color: #1a2a5a;
  box-shadow: 0 0 0 3px rgba(26,42,90,0.10);
}

#ord-search::placeholder { color: #b0a090; }

.ord-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 14px;
  color: #6a8a9a;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}

.ord-clear-btn:hover { color: #081220; }

.ord-count {
  font-size: 13px;
  color: #6a8a9a;
  white-space: nowrap;
  min-width: 70px;
  text-align: right;
}

/* Bokstavsnavigation */
.ord-alpha-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 36px;
  justify-content: center;
}

.ord-alpha-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  background: #f0f6fb;
  border: 1.5px solid #b0c8da;
  color: #1a2a5a;
  transition: background 0.15s, border-color 0.15s;
}

.ord-alpha-btn:hover { background: #cce8f8; border-color: #c8922a; }

.ord-alpha-btn--empty {
  color: #ccc;
  border-color: #eee;
  background: transparent;
  cursor: default;
  pointer-events: none;
}

/* Ingen träff */
.ord-no-results {
  text-align: center;
  color: #4a6a7a;
  font-size: 15px;
  padding: 48px 0;
}

/* Bokstavsgrupp */
.ord-group { margin-bottom: 48px; }

.ord-group__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.ord-group__letter {
  font-family: 'Philosopher', serif;
  font-size: 28px;
  font-weight: 700;
  color: #1a2a5a;
  line-height: 1;
  min-width: 32px;
}

.ord-group__heading::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #80c0e8;
}

/* Termgrid */
.ord-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* Termkort */
.ord-card {
  background: #fff;
  border: 1px solid #c8dae4;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}

.ord-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.09);
  transform: translateY(-2px);
}

.ord-card__top {
  background: #f0f6fb;
  border-bottom: 1px solid #80c0e8;
  padding: 12px 16px 10px;
  text-align: right;
}

.ord-card__arabic {
  font-size: 1.5em;
  color: #081220;
  line-height: 1.8;
}

.ord-card__body {
  padding: 12px 16px 14px;
}

.ord-card__term {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #081220;
  margin-bottom: 2px;
}

.ord-card__translit {
  display: block;
  font-size: 13px;
  color: #c8922a;
  font-style: italic;
  margin-bottom: 8px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 14px;
}

.ord-card__def {
  font-size: 14px;
  color: #1a3a4a;
  line-height: 1.6;
  margin: 0;
}

/* Mobil */
@media (max-width: 600px) {
  .ord-grid { grid-template-columns: 1fr; }
  .ord-search-bar { flex-direction: column; align-items: stretch; }
  .ord-count { text-align: left; }
  .ord-alpha-btn { width: 28px; height: 28px; font-size: 12px; }
}

/* ====== CITIES ====== */

.city-wrapper {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 0 60px;
}

/* Sökrad */
.city-search-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.city-search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.city-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #6a8a9a;
  pointer-events: none;
}

#city-search {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 38px 11px 40px;
  font-size: 15px;
  font-family: inherit;
  border: 1.5px solid #b0c8da;
  border-radius: 8px;
  background: #fff;
  color: #081220;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#city-search:focus {
  border-color: #1a2a5a;
  box-shadow: 0 0 0 3px rgba(26,42,90,0.10);
}

#city-search::placeholder { color: #b0a090; }

.city-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 14px;
  color: #6a8a9a;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
}

.city-clear-btn:hover { color: #081220; }

/* Geo-knapp */
.city-geo-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 600;
  color: #fff;
  background: #1a2a5a;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}

.city-geo-btn:hover:not(:disabled) { background: #101e48; }
.city-geo-btn:disabled { opacity: 0.7; cursor: default; }

/* Status / ingen-träff */
.geo-status {
  font-size: 14px;
  color: #1a3a4a;
  background: #cce8f8;
  border: 1px solid #c8922a;
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 24px;
  text-align: center;
}

.city-no-results {
  text-align: center;
  color: #4a6a7a;
  font-size: 15px;
  padding: 40px 0;
}

/* Regions */
.city-region {
  margin-bottom: 44px;
}

.city-region__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #80c0e8;
}

.city-region__icon {
  font-size: 20px;
  line-height: 1;
}

.city-region__title {
  font-size: 18px;
  font-weight: 700;
  color: #081220;
  margin: 0;
}

.city-region__count {
  margin-left: auto;
  font-size: 12px;
  color: #6a8a9a;
  letter-spacing: 0.5px;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 20px 0;
}

.city-box {
  background: #cce8f8;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid #80c0e8;
  text-decoration: none;
  color: #1a3a4a;
  font-size: 17px;
  transition: 0.25s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.city-box:hover {
  background: #b0d8f4;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.city-icon {
  font-size: 20px;
  color: #1a3a4a;
}

.city-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 25px 0;
}

.city-item {
  background: #f0f6fb;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #b0c8da;
  text-decoration: none;
  color: #081220;
  font-size: 14px;
  font-weight: 500;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: 0.25s ease;
}

.city-item:hover {
  background: #cce8f8;
  border-color: #c8922a;
  color: #1a2a5a;
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0,0,0,0.09);
}

/* ====== HERO ====== */

/* Fade-in uppåt för hero-element */
@keyframes ks-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.ks-hero {
  position: relative;
  background-color: #d5edf8;
  background-image:
    radial-gradient(ellipse 68% 58% at 50% 44%,
      #f0f6fb 10%,
      rgba(240,247,252,0.65) 48%,
      rgba(240,247,252,0) 78%),
    url('../images/hero-pattern.svg');
  background-size: 100% 100%, 100px 100px;
  background-repeat: no-repeat, repeat;
  overflow: hidden;
  font-family: 'Lato', sans-serif;
}

/* Subtil värmevignett i kanterna */
.ks-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 88% 85% at 50% 50%,
    transparent 52%,
    rgba(44, 88, 130, 0.06) 100%);
  pointer-events: none;
  z-index: 0;
}

/* Animerade intoningar med staggered delays */
.ks-hero__eyebrow { animation: ks-fade-up 0.7s ease-out 0.10s both; }
.ks-hero__title   { animation: ks-fade-up 0.8s ease-out 0.28s both; }
.ks-hero__divider { animation: ks-fade-up 0.5s ease-out 0.50s both; }
.ks-hero__ayah    { animation: ks-fade-up 0.7s ease-out 0.65s both; }
.ks-hero__cta     { animation: ks-fade-up 0.6s ease-out 0.85s both; }
.ks-hero__stats   { animation: ks-fade-up 0.6s ease-out 1.05s both; }
.ks-hero__scroll  { animation: ks-fade-up 0.5s ease-out 1.20s both; }

/* Respektera rörelsepreferenser */
@media (prefers-reduced-motion: reduce) {
  .ks-hero__eyebrow,
  .ks-hero__title,
  .ks-hero__divider,
  .ks-hero__ayah,
  .ks-hero__cta,
  .ks-hero__stats,
  .ks-hero__scroll { animation: none; }
}

.ks-hero__arabic {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(32px, 5.5vw, 56px);
  line-height: 1;
  color: #5090a8;
  opacity: 0.55;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  letter-spacing: 0;
  font-weight: 400;
  font-family: 'Traditional Arabic', 'Scheherazade New', 'Amiri', Georgia, serif;
  z-index: 0;
}

.ks-hero__inner {
  position: relative;
  z-index: 1;
  padding: 28px 24px 20px;
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.ks-hero__eyebrow {
  font-size: 10px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: #4a7a90;
  margin: 0 0 10px;
  font-weight: 400;
}

.ks-hero__title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 600;
  line-height: 1.15;
  color: #1a1008;
  margin: 0 0 12px;
  letter-spacing: -0.5px;
}

.ks-hero__title em {
  font-style: italic;
  color: #2a4a6a;
}

.ks-hero__divider {
  width: 36px;
  height: 1px;
  background: #0088cc;
  margin: 0 auto 12px;
}

.ks-hero__ayah {
  margin: 0 auto 16px;
  padding: 0;
  border: none;
  max-width: 480px;
}

.ks-hero__ayah p {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  font-weight: 300;
  font-style: italic;
  color: #2a4a6a;
  line-height: 1.55;
  margin: 0 0 5px;
}

.ks-hero__ayah cite {
  font-size: 11px;
  color: #607090;
  letter-spacing: 1.5px;
  font-style: normal;
}

.ks-hero__cta {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.ks-btn {
  display: inline-block;
  padding: 10px 22px;
  font-family: 'Lato', sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

.ks-btn--primary {
  background-color: #1a2a5a;
  color: #d6eaf5;
  border: 1px solid #1a2a5a;
}

.ks-btn--primary:hover {
  background-color: #101e48;
  color: #d6eaf5;
  text-decoration: none;
}

.ks-btn--secondary {
  background-color: transparent;
  color: #1a2a5a;
  border: 1px solid #c8922a;
}

.ks-btn--secondary:hover {
  background-color: #cce8f8;
  text-decoration: none;
}

.ks-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #80c0e8;
}

.ks-hero__stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  background-color: #cce8f8;
  border-right: 1px solid #80c0e8;
  text-align: center;
}

.ks-hero__stat:last-child {
  border-right: none;
}

.ks-hero__stat-number {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 300;
  color: #1a2a5a;
  line-height: 1;
  display: block;
  margin-bottom: 3px;
}

.ks-hero__stat-label {
  font-size: 10px;
  color: #4a7a90;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.ks-hero__scroll {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 24px;
  background-color: #f0f6fb;
  border-top: 1px solid #80c0e8;
  font-size: 10px;
  color: #607090;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.ks-hero__scroll-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #0088cc;
  display: inline-block;
}

/* ====== PW (PRAYER WIDGET V2) ====== */

.pw-wrap { margin: 1.5rem 0; }
.pw-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.pw-title  { font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: #888; }
.pw-date   { font-size: 12px; color: #aaa; }

.pw-next {
  background: linear-gradient(135deg, #c8922a, #a07020);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pw-next-eyebrow { font-size: 11px; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .06em; display: block; }
.pw-next-name    { font-size: 20px; font-weight: 500; color: #fff; display: block; }
.pw-next-arabic  { font-size: 16px; color: rgba(255,255,255,.75); display: block; direction: rtl; font-family: 'Noto Naskh Arabic', 'Scheherazade New', 'Arabic Typesetting', 'Traditional Arabic', 'Geeza Pro', serif; line-height: 1.8; }
.pw-countdown    { font-size: 22px; font-weight: 500; color: #fff; font-variant-numeric: tabular-nums; }
.pw-countdown-label { font-size: 11px; color: rgba(255,255,255,.65); margin-top: 2px; }

.pw-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }

.pw-card {
  background: #fff;
  border: 0.5px solid #eee;
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
}

.pw-card.active { border-color: #c8922a; background: #fffaf3; }
.pw-card.passed { opacity: .4; }
.pw-card-arabic { font-size: 15px; color: #c8922a; margin-bottom: 4px; direction: rtl; font-family: 'Noto Naskh Arabic', 'Scheherazade New', 'Arabic Typesetting', 'Traditional Arabic', 'Geeza Pro', serif; line-height: 1.8; }
.pw-card-name   { font-size: 12px; font-weight: 500; color: #222; margin-bottom: 4px; }
.pw-card-time   { font-size: 14px; font-weight: 500; color: #222; font-variant-numeric: tabular-nums; }
.pw-card.active .pw-card-time { color: #c8922a; }
.pw-dot { width: 5px; height: 5px; border-radius: 50%; background: #c8922a; margin: 6px auto 0; opacity: 0; }
.pw-card.active .pw-dot { opacity: 1; }

.pw-footer { display: flex; align-items: center; justify-content: space-between; margin-top: .75rem; }
.pw-city   { font-size: 12px; color: #aaa; display: flex; align-items: center; gap: 5px; }
.pw-progress-wrap { flex: 1; max-width: 140px; height: 3px; background: #eee; border-radius: 99px; margin: 0 12px; overflow: hidden; }
.pw-progress-bar  { height: 100%; background: #c8922a; border-radius: 99px; transition: width 1s linear; }
.pw-method { font-size: 12px; color: #aaa; }

/* ====== MEDIA QUERIES ====== */

@media (max-width: 768px) {
  .single-container,
  .home-container,
  .archive-container {
    padding-top: 25px;
  }

  body {
    padding-top: 45px;
  }
}

@media (max-width: 600px) {
  body {
    font-size: 17px;
    line-height: 1.75;
  }

  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  h3 { font-size: 19px; }

  .article-title   { font-size: 28px; }
  .article-content { font-size: 17px; }

  .city-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .city-search-bar { flex-direction: column; align-items: stretch; }
  .city-geo-btn { justify-content: center; }

  .ks-hero__inner  { padding: 20px 16px 14px; }
  .ks-hero__arabic { font-size: 28px; opacity: 0.45; }
  .ks-hero__stats  { grid-template-columns: 1fr; }
  .ks-hero__stat   { border-right: none; border-bottom: 1px solid #80c0e8; }
  .ks-hero__stat:last-child { border-bottom: none; }
  .ks-hero__cta    { flex-direction: column; align-items: center; }
  .ks-btn          { width: 100%; max-width: 280px; text-align: center; }
}

@media (max-width: 900px) {
  .city-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

.pagination .page-numbers,
.nav-links a,
.nav-links span {
  font-size: 22px;
  padding: 8px 14px;
  border: 1px solid #ccc;
  border-radius: 25px;
  margin: 0 4px;
  display: inline-block;
}

.pagination .current,
.page-numbers.current {
  background: #1a2a5a;
  border-color: #1a2a5a;
  color: #f0f6fb;
  font-weight: 600;
}

.pagination .page-numbers:hover,
.nav-links a:hover {
  background: #cce8f8;
  border-color: #c8922a;
  color: #081220;
}

/* ============================================================
   MÖRKT LÄGE — [data-theme="dark"]
   Varma mörka toner — bekväm nattläsning
   ============================================================ */

/* ====== BIBLIOTEKET ====== */
.bib-wrap { max-width: 820px; margin: 0 auto; }

.bib-search-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.bib-search-input-wrap { position: relative; flex: 1; }
.bib-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #6a8a9a;
  pointer-events: none;
}
#bib-search {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 36px 11px 40px;
  font-size: 15px;
  font-family: inherit;
  border: 1.5px solid #b0c8da;
  border-radius: 8px;
  background: #fff;
  color: #081220;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#bib-search:focus { border-color: #1a2a5a; box-shadow: 0 0 0 3px rgba(26,42,90,0.10); }
#bib-search::placeholder { color: #b0a090; }
.bib-clear-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 14px;
  color: #6a8a9a;
  cursor: pointer;
  padding: 2px 4px;
}
.bib-count { font-size: 13px; color: #6a8a9a; white-space: nowrap; }
.bib-no-results { text-align: center; color: #4a6a7a; font-size: 15px; padding: 40px 0; }

.bib-group { margin-bottom: 40px; }
.bib-group__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid #80c0e8;
}
.bib-group__badge {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #fff;
}
.bib-group__count { font-size: 12px; color: #6a8a9a; margin-left: auto; }

.bib-list { display: flex; flex-direction: column; gap: 4px; }

.bib-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #d8e5ea;
  background: #fff;
  transition: background 0.15s, border-color 0.15s;
}
.bib-item:hover { background: #f0f6fb; border-color: #b0c8da; }

.bib-item__info { flex: 1; min-width: 0; }
.bib-item__title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #081220;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bib-item__title:hover { color: #1a2a5a; text-decoration: underline; }
.bib-item__meta { font-size: 12px; color: #6a8a9a; }

.bib-item__actions { display: flex; gap: 6px; flex-shrink: 0; }
.bib-item__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  transition: opacity 0.15s, transform 0.15s;
}
.bib-item__btn:hover { opacity: 0.85; transform: translateY(-1px); }
.bib-item__btn--pdf  { background: #1a2a5a; color: #fff; }
.bib-item__btn--docx { background: #c8922a; color: #fff; }

@media (max-width: 540px) {
  .bib-item { flex-direction: column; align-items: flex-start; }
  .bib-item__actions { align-self: flex-end; }
  .bib-search-bar { flex-direction: column; align-items: stretch; }
  .bib-count { text-align: right; }
}

/* Dark mode bibliotek */
[data-theme="dark"] #bib-search { background: #16202c; border-color: #243040; color: #d5e8ed; }
[data-theme="dark"] #bib-search:focus { border-color: #4ab0d8; }
[data-theme="dark"] #bib-search::placeholder { color: #2a4a5a; }
[data-theme="dark"] .bib-count { color: #4a6878; }
[data-theme="dark"] .bib-group__header { border-bottom-color: #1e2530; }
[data-theme="dark"] .bib-group__count { color: #4a6878; }
[data-theme="dark"] .bib-item { background: #16202c; border-color: #2e2a24; }
[data-theme="dark"] .bib-item:hover { background: #1e2530; border-color: #243040; }
[data-theme="dark"] .bib-item__title { color: #d5e8ed; }
[data-theme="dark"] .bib-item__meta { color: #4a6878; }

/* Mjuk färgövergång vid temaväxling */
body, .site-header, .card, .single-container, .page-content-box,
.koran-box, .ord-card, .city-item, .cat-btn, .random-column .card {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* ── Toggle-knapp ─────────────────────────────────────────── */
.dark-toggle {
  background: none;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #ffffff;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s;
}

.dark-toggle:hover { border-color: #c8922a; color: #c8922a; }
.dark-toggle__sun  { display: none; }

[data-theme="dark"] .dark-toggle {
  border-color: #243040;
  color: #80b8c8;
}

[data-theme="dark"] .dark-toggle:hover { border-color: #e8a83a; color: #e8a83a; }
[data-theme="dark"] .dark-toggle__sun  { display: block; }
[data-theme="dark"] .dark-toggle__moon { display: none; }

/* ── Globalt ──────────────────────────────────────────────── */
[data-theme="dark"] body         { background: #101418; color: #d5e8ed; }
[data-theme="dark"] a            { color: #80b8c8; }
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4           { color: #d5e8ed; }
[data-theme="dark"] h5,
[data-theme="dark"] h6           { color: #607090; }
[data-theme="dark"] blockquote   { background: #16202c; border-left-color: #c8922a; color: #80b8c8; }

/* ── Header & nav ────────────────────────────────────────── */
[data-theme="dark"] .site-header        { background: #0c0e14; border-bottom-color: #1e2530; }
[data-theme="dark"] .brand-link         { color: #d5e8ed; }
[data-theme="dark"] .main-menu a        { color: #80b8c8; }
[data-theme="dark"] .main-menu a:hover  { color: #d5e8ed; }
[data-theme="dark"] .main-menu .sub-menu { background: #16202c; border-color: #243040; }
[data-theme="dark"] .main-menu .sub-menu li a { color: #80b8c8; }
[data-theme="dark"] .main-menu .sub-menu li a:hover { background: #1e2530; color: #d5e8ed; }
[data-theme="dark"] .main-menu .sub-menu li:not(:last-child) a { border-bottom-color: #1e2530; }
[data-theme="dark"] .hamburger-btn span { background: #80b8c8; }
[data-theme="dark"] .main-menu          { background: #0c0e14; border-top-color: #1e2530; }
[data-theme="dark"] .main-menu ul li a  { border-bottom-color: #1e2530; color: #80b8c8; }

[data-theme="dark"] .main-menu li.current-menu-item > a,
[data-theme="dark"] .main-menu li.current_page_item > a { color: #4ab0d8; }
[data-theme="dark"] .main-menu li.current-menu-item > a::after,
[data-theme="dark"] .main-menu li.current_page_item > a::after { background: #e8a83a; }

[data-theme="dark"] .search-toggle { color: #80b8c8; }
[data-theme="dark"] .search-toggle:hover { color: #d5e8ed; background: rgba(200,184,136,0.1); }
[data-theme="dark"] .nav-search-form input[type="search"] {
  background: #16202c; border-color: #243040; color: #d5e8ed;
}
[data-theme="dark"] .nav-search-form input[type="search"]:focus { border-color: #4ab0d8; }
[data-theme="dark"] .nav-search-form input[type="search"]::placeholder { color: #2a4a5a; }
@media (max-width: 680px) {
  [data-theme="dark"] .nav-search-form {
    background: #0c0e14; border-top-color: #1e2530;
  }
}

/* ── Kategorifilter ─────────────────────────────────────── */
[data-theme="dark"] .cat-btn       { background: #16202c; border-color: #243040; color: #80b8c8; }
[data-theme="dark"] .cat-btn:hover { background: #1e2530; border-color: #2a4a5a; }
[data-theme="dark"] .cat-btn.active { background: #1a2a5a; border-color: #1a4a7a; color: #d5e8ed; }
[data-theme="dark"] .cat-btn.active:hover { background: #101e48; }

/* ── Artikel-kort (grid) ─────────────────────────────────── */
[data-theme="dark"] .card { background: #16202c; border-color: #2e2a24; }
[data-theme="dark"] .card:hover { box-shadow: 0 10px 26px rgba(0,0,0,0.45); }
[data-theme="dark"] .card-title  { color: #d5e8ed; }
[data-theme="dark"] .excerpt     { color: #607090; }
[data-theme="dark"] .source      { color: #3a6070; }
[data-theme="dark"] .card-thumb  { filter: brightness(0.85); }

[data-theme="dark"] .random-column .card       { background: #141a22; border-color: #2e2a24; color: #80b8c8; }
[data-theme="dark"] .random-column .card:hover { background: #182028; }
[data-theme="dark"] .random-column .card-title { color: #d5e8ed; }
[data-theme="dark"] .random-card-thumb img     { filter: brightness(0.82); }

/* ── Enstaka artikel ─────────────────────────────────────── */
[data-theme="dark"] .single-container { background: #141a22; border-color: #2e2a24; }
[data-theme="dark"] .post-title       { color: #d5e8ed; }
[data-theme="dark"] .post-meta        { color: #4a6878; }
[data-theme="dark"] .post-content     { color: #c0d0d8; }
[data-theme="dark"] .post-content h2  { color: #d5e8ed; border-bottom-color: #243040; }
[data-theme="dark"] .post-content h3,
[data-theme="dark"] .post-content h4  { color: #d5e8ed; }
[data-theme="dark"] .post-content h4  { color: #607090; }
[data-theme="dark"] .post-content blockquote {
  background: #16202c; border-left-color: #e8a83a; color: #80b8c8;
}
[data-theme="dark"] .article-meta     { color: #4a6878; }
[data-theme="dark"] .article-meta a   { color: #4a6878; }
[data-theme="dark"] .meta-sep         { color: #1a3a4a; }

[data-theme="dark"] .copy-post-btn { background: #16202c; border-color: #243040; color: #80b8c8; }
[data-theme="dark"] .copy-post-btn:hover { background: #1e2530; }
[data-theme="dark"] .ks-dl-btn--copy { background: #16202c; border-color: #243040; color: #80b8c8; }
[data-theme="dark"] .ks-dl-btn--copy:hover { background: #1e2530; border-color: #e8a83a; color: #d5e8ed; }
[data-theme="dark"] .ks-dl-btn[data-tooltip]::before { background: #0c0e14; }
[data-theme="dark"] .ks-dl-btn[data-tooltip]::after { border-top-color: #0c0e14; }
[data-theme="dark"] .article-dl-footer { background: #16202c; border-color: #2e2a24; }
[data-theme="dark"] .article-dl-footer__title { color: #4a6878; }

[data-theme="dark"] .koran-box {
  background: radial-gradient(circle, #16202c 60%, #101520 100%);
  border-color: #e8a83a; color: #a8d4e8;
}
[data-theme="dark"] .koran-title { color: #4a6878; }

/* Taggar */
[data-theme="dark"] .tag-link { background: #16202c; border-color: #243040; color: #80b8c8; }

/* TOC */
[data-theme="dark"] .toc          { background: #16202c; border-color: #243040; }
[data-theme="dark"] .toc a        { color: #6ab8d0; }
[data-theme="dark"] .toc-toggle   { color: #80b8c8; }

/* Brödsmula */
[data-theme="dark"] .ks-breadcrumb a                  { color: #6ab8d0; }
[data-theme="dark"] .ks-breadcrumb [aria-current="page"] { color: #80b8c8; }
[data-theme="dark"] .ks-breadcrumb__sep                { color: #1a3a4a; }

/* Post-navigering & paginering */
[data-theme="dark"] .post-navigation             { border-top-color: #1e2530; }
[data-theme="dark"] .post-navigation a           { color: #6ab8d0; }
[data-theme="dark"] .post-navigation-box         { background: #141a22; border-color: #2e2a24; }
[data-theme="dark"] .post-navigation-box a       { border-color: #243040; color: #80b8c8; }
[data-theme="dark"] .post-navigation-box a:hover { background: #1e2530; border-color: #e8a83a; color: #d5e8ed; }
[data-theme="dark"] .page-numbers.current        { background: #1a2a5a; border-color: #1a4a7a; color: #d5e8ed; }
[data-theme="dark"] .page-numbers:hover,
[data-theme="dark"] .nav-links a:hover           { background: #1e2530; border-color: #e8a83a; color: #d5e8ed; }

/* ── Statiska sidor ──────────────────────────────────────── */
[data-theme="dark"] .page-content-box { background: #141a22; border-color: #2e2a24; }
[data-theme="dark"] .page-title       { color: #d5e8ed; }
[data-theme="dark"] .page-content     { color: #c0d0d8; }

/* ── Sök ─────────────────────────────────────────────────── */
[data-theme="dark"] .no-results         { background: #16202c; border-color: #2e2a24; }
[data-theme="dark"] .search-again-form input {
  background: #141a22; border-color: #243040; color: #d5e8ed;
}

/* ── Avsnitt & dividers ──────────────────────────────────── */
[data-theme="dark"] .section-title   { color: #d5e8ed; }
[data-theme="dark"] .section-divider { border-top-color: #1e2530; }

/* ── Footer ──────────────────────────────────────────────── */
[data-theme="dark"] .site-footer      { background: #0c0e14; border-top-color: #1e2530; color: #4a6878; }
[data-theme="dark"] .footer-links a   { color: #6ab8d0; }
[data-theme="dark"] .top-links-bar    { color: #1a3a4a; }
[data-theme="dark"] .top-links-bar a  { color: #1a3a4a; }
[data-theme="dark"] .footer-tack      { color: #1a3a4a; }

/* ── Scroll-to-top & dela-knapp ─────────────────────────── */
[data-theme="dark"] #scrollTopBtn,
[data-theme="dark"] #bottomShareBtn  { background: #16202c; border-color: #243040; color: #80b8c8; }
[data-theme="dark"] #scrollTopBtn:hover,
[data-theme="dark"] #bottomShareBtn:hover { background: #1e2530; }
[data-theme="dark"] .share-menu       { background: #16202c; border-color: #243040; }
[data-theme="dark"] .share-option     { color: #80b8c8; border-bottom-color: #1e2530; }
[data-theme="dark"] .share-option:hover { background: #1e2530; }

/* ── Hero ────────────────────────────────────────────────── */
[data-theme="dark"] .ks-hero           { background-color: #101418; background-image: none; }
[data-theme="dark"] .ks-hero__arabic   { color: #70c0e8; opacity: 0.07; }
[data-theme="dark"] .ks-hero__title    { color: #d5e8ed; }
[data-theme="dark"] .ks-hero__title em { color: #e8a83a; }
[data-theme="dark"] .ks-hero__eyebrow  { color: #4a6878; }
[data-theme="dark"] .ks-hero__divider  { background: #243040; }
[data-theme="dark"] .ks-hero__ayah p   { color: #80b8c8; }
[data-theme="dark"] .ks-hero__ayah cite { color: #4a6878; }
[data-theme="dark"] .ks-hero__stats    { border-top-color: #1e2530; }
[data-theme="dark"] .ks-hero__stat     { border-right-color: #1e2530; }
[data-theme="dark"] .ks-hero__stat-number { color: #4ab0d8; }
[data-theme="dark"] .ks-hero__stat-label  { color: #4a6878; }
[data-theme="dark"] .ks-hero__scroll   { background-color: #101418; border-top-color: #1e2530; color: #4a6878; }
[data-theme="dark"] .ks-hero__scroll-dot { background-color: #243040; }

/* ── Ordlista ────────────────────────────────────────────── */
[data-theme="dark"] #ord-search            { background: #16202c; border-color: #243040; color: #d5e8ed; }
[data-theme="dark"] #ord-search:focus      { border-color: #4ab0d8; }
[data-theme="dark"] #ord-search::placeholder { color: #2a4a5a; }
[data-theme="dark"] .ord-clear-btn         { color: #4a6878; }
[data-theme="dark"] .ord-count             { color: #4a6878; }
[data-theme="dark"] .ord-alpha-btn         { background: #16202c; border-color: #243040; color: #6ab8d0; }
[data-theme="dark"] .ord-alpha-btn:hover   { background: #1e2530; border-color: #e8a83a; }
[data-theme="dark"] .ord-group__letter     { color: #4ab0d8; }
[data-theme="dark"] .ord-group__heading::after { background: #1e2530; }
[data-theme="dark"] .ord-card              { background: #16202c; border-color: #2e2a24; }
[data-theme="dark"] .ord-card__top         { background: #121520; border-bottom-color: #1e2530; }
[data-theme="dark"] .ord-card__arabic      { color: #d5e8ed; }
[data-theme="dark"] .ord-card__term        { color: #d5e8ed; }
[data-theme="dark"] .ord-card__translit    { color: #e8a83a; }
[data-theme="dark"] .ord-card__def         { color: #607090; }
[data-theme="dark"] .ord-no-results        { color: #4a6878; }

/* ── Bönetider-städer ────────────────────────────────────── */
[data-theme="dark"] .city-item              { background: #16202c; border-color: #2e2a24; color: #80b8c8; }
[data-theme="dark"] .city-item:hover        { background: #1e2530; border-color: #e8a83a; color: #d5e8ed; }
[data-theme="dark"] #city-search            { background: #16202c; border-color: #243040; color: #d5e8ed; }
[data-theme="dark"] #city-search::placeholder { color: #2a4a5a; }
[data-theme="dark"] #city-search:focus      { border-color: #4ab0d8; }
[data-theme="dark"] .city-region__title     { color: #d5e8ed; }
[data-theme="dark"] .city-region__header    { border-bottom-color: #1e2530; }
[data-theme="dark"] .city-region__count     { color: #4a6878; }
[data-theme="dark"] .geo-status             { background: #14202a; border-color: #e8a83a; color: #80b8c8; }
[data-theme="dark"] .city-no-results        { color: #4a6878; }

/* ── Bönetidswidget ──────────────────────────────────────── */
[data-theme="dark"] .pw-card             { background: #16202c; border-color: #2e2a24; }
[data-theme="dark"] .pw-card.active      { background: #1a2010; border-color: #e8a83a; }
[data-theme="dark"] .pw-card-name        { color: #80b8c8; }
[data-theme="dark"] .pw-card-time        { color: #80b8c8; }
[data-theme="dark"] .pw-title            { color: #4a6878; }
[data-theme="dark"] .pw-date             { color: #2a4a5a; }
[data-theme="dark"] .pw-card-arabic      { color: #e8a83a; }
[data-theme="dark"] .pw-card.active .pw-card-time { color: #e8a83a; }

/* ====== PRAYER CARDS (hero + bönetidssida) ====== */

.prayer-card {
  background: #fff;
  border-radius: 10px;
  padding: 10px 8px;
  text-align: center;
  border: 1.5px solid #b0d0f0;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.prayer-card--active {
  background: #1a2a5a;
  border-color: #1a2a5a;
}

.prayer-card--next {
  border-color: #1a2a5a;
  background: rgba(26, 42, 90, 0.06);
}

.prayer-card__arabic {
  font-family: 'Noto Naskh Arabic', 'Scheherazade New', 'Traditional Arabic', serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a2a5a;
  direction: rtl;
  line-height: 1.8;
  margin-bottom: 2px;
}

.prayer-card--active .prayer-card__arabic { color: rgba(255,255,255,0.85); }

.prayer-card__name {
  font-size: 0.7rem;
  font-weight: 700;
  color: #1a2a5a;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
}

.prayer-card--active .prayer-card__name  { color: rgba(255,255,255,0.9); }
.prayer-card--next   .prayer-card__name  { color: #1a2a5a; }

.prayer-card__time {
  font-size: 1.25rem;
  font-weight: 800;
  color: #1a2a5a;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.prayer-card--active .prayer-card__time  { color: #fff; }
.prayer-card--next   .prayer-card__time  { color: #1a2a5a; }

.prayer-card__swedish {
  font-size: 0.62rem;
  color: #7888a0;
  margin-top: 2px;
}

.prayer-card--active .prayer-card__swedish { color: rgba(255,255,255,0.65); }

.prayer-card__label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 4px;
  color: #7888a0;
}

.prayer-card--active .prayer-card__label  { color: rgba(255,255,255,0.75); }
.prayer-card--next   .prayer-card__label  { color: #1a2a5a; }

/* Spinner för loading-state */
.prayer-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #b0d0f0;
  border-top-color: #1a2a5a;
  border-radius: 50%;
  animation: prayer-spin 0.8s linear infinite;
}
@keyframes prayer-spin { to { transform: rotate(360deg); } }

.prayer-times-full__loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem;
  color: #6a8a9a;
}

.prayer-times-full__error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  color: #6a8a9a;
  font-size: 0.9rem;
}

.prayer-times-full__note {
  text-align: center;
  font-size: 0.8rem;
  color: #7888a0;
  margin-top: 1.2rem;
}

/* Mörkt läge */
[data-theme="dark"] .prayer-card              { background: #16202c; border-color: #243040; }
[data-theme="dark"] .prayer-card--active      { background: #1a2a5a; border-color: #4ab0d8; }
[data-theme="dark"] .prayer-card--next        { border-color: #4ab0d8; background: rgba(74,176,216,0.08); }
[data-theme="dark"] .prayer-card__arabic      { color: #6ab8d0; }
[data-theme="dark"] .prayer-card__name        { color: #6ab8d0; }
[data-theme="dark"] .prayer-card__time        { color: #d5e8ed; }
[data-theme="dark"] .prayer-card--active .prayer-card__arabic,
[data-theme="dark"] .prayer-card--active .prayer-card__name,
[data-theme="dark"] .prayer-card--active .prayer-card__time   { color: #fff; }

/* ====== HERO – STAD + GEO-KNAPP ====== */

.ks-hero__city-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.ks-hero__city-name {
  font-size: 13px;
  font-weight: 700;
  color: #1a2a5a;
  letter-spacing: 0.5px;
}

.ks-hero__geo-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(26, 42, 90, 0.08);
  border: 1px solid rgba(26, 42, 90, 0.18);
  border-radius: 9999px;
  padding: 4px 13px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: #1a2a5a;
  font-family: inherit;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ks-hero__geo-btn:hover:not(:disabled) {
  background: rgba(26, 42, 90, 0.15);
  border-color: rgba(26, 42, 90, 0.3);
}

.ks-hero__geo-btn:disabled { opacity: 0.6; cursor: wait; }

[data-theme="dark"] .ks-hero__city-name  { color: #6ab8d0; }
[data-theme="dark"] .ks-hero__geo-btn    { background: rgba(74,176,216,0.08); border-color: rgba(74,176,216,0.2); color: #6ab8d0; }
[data-theme="dark"] .ks-hero__geo-btn:hover:not(:disabled) { background: rgba(74,176,216,0.18); }

/* ====== HERO – STADSVÄLJARE DROPDOWN ====== */

.ks-hero__city-select-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
  margin-bottom: 16px;
}

.ks-hero__city-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 9px 36px 9px 16px;
  font-size: 14px;
  font-family: inherit;
  font-weight: 500;
  color: #1a2a5a;
  background-color: rgba(255, 255, 255, 0.72);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%231a2a5a' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border: 1.5px solid rgba(26, 42, 90, 0.22);
  border-radius: 10px;
  min-width: 200px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.ks-hero__city-select:hover {
  border-color: rgba(26, 42, 90, 0.38);
  background-color: rgba(255, 255, 255, 0.88);
}

.ks-hero__city-select:focus {
  border-color: #1a2a5a;
  background-color: #fff;
}

[data-theme="dark"] .ks-hero__city-select {
  background-color: rgba(22, 32, 44, 0.75);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24' fill='none' stroke='%236ab8d0' stroke-width='2.5' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  border-color: rgba(74, 176, 216, 0.2);
  color: #6ab8d0;
}

[data-theme="dark"] .ks-hero__city-select:hover  { border-color: rgba(74,176,216,0.38); }
[data-theme="dark"] .ks-hero__city-select:focus   { border-color: #4ab0d8; background-color: #16202c; }

@media (max-width: 600px) {
  .ks-hero__city-select { min-width: 0; width: 100%; max-width: 280px; }
}

/* ====== HERO – BÖNE-RAD-WRAPPER ====== */

.ks-hero__prayers {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 auto 10px;
  max-width: 580px;
}

.ks-hero__prayers .prayer-card {
  background: rgba(255, 255, 255, 0.7);
  border-color: rgba(176, 201, 216, 0.55);
  flex: 1;
  min-width: 72px;
  max-width: 108px;
}

.ks-hero__prayers .prayer-card--active {
  background: #1a2a5a;
  border-color: #1a2a5a;
}

.ks-hero__prayers .prayer-card--next {
  border-color: #1a2a5a;
  background: rgba(26, 42, 90, 0.08);
}

[data-theme="dark"] .ks-hero__prayers .prayer-card {
  background: rgba(22, 32, 44, 0.7);
  border-color: rgba(36, 48, 64, 0.7);
}

@media (max-width: 600px) {
  .ks-hero__prayers { gap: 5px; }
  .ks-hero__prayers .prayer-card { min-width: 58px; padding: 8px 5px; }
  .prayer-card__arabic { font-size: 0.95rem; }
  .prayer-card__time   { font-size: 1.05rem; }
}

/* ====== HERO SNABBKNAPPAR ====== */

.hero-quick-links {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 20px 15px 4px;
  flex-wrap: wrap;
}

.hero-quick-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  background: #0088cc;
  color: #ffffff;
  font-family: 'Philosopher', serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 6px;
  border: 2px solid #0088cc;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hero-quick-btn:hover {
  background: #006daa;
  border-color: #006daa;
  color: #ffffff;
  text-decoration: none;
}

[data-theme="dark"] .hero-quick-btn {
  background: #0088cc;
  border-color: #4ab0d8;
  color: #ffffff;
}

[data-theme="dark"] .hero-quick-btn:hover {
  background: #006daa;
  border-color: #6ab8d0;
}

@media (max-width: 680px) {
  .hero-quick-links { gap: 10px; padding: 16px 15px 4px; }
  .hero-quick-btn   { width: 100%; justify-content: center; }
}

/* ====== ARTIKEL-LISTA (STARTSIDA) ====== */

.article-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 10px;
}

.article-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: #cce8f8;
  border: 1px solid #80c0e8;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: #1a3a4a;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(26, 42, 90, 0.07);
  min-height: 160px;
}

.article-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(26, 42, 90, 0.13);
  text-decoration: none;
}

.article-row--reverse {
  flex-direction: row-reverse;
}

.article-row__image {
  width: 240px;
  flex-shrink: 0;
  overflow: hidden;
  background-color: var(--cat-color, #3a5a6a);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.article-row__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-row__image-letter {
  font-size: 72px;
  color: rgba(255, 255, 255, 0.28);
  font-family: 'Philosopher', serif;
  font-weight: 700;
  user-select: none;
  line-height: 1;
}

.article-row__body {
  flex: 1;
  padding: 22px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.article-row__body .card-cat-badge {
  align-self: flex-start;
  margin-bottom: 4px;
}

.article-row__body .card-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  color: #081220;
  line-height: 1.35;
}

.article-row__body .excerpt {
  font-size: 14px;
  color: #4a6a7a;
  line-height: 1.65;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-row__body .source {
  font-size: 12px;
  color: #7888a0;
  margin: 0;
}

/* Mörkt läge */
[data-theme="dark"] .article-row {
  background: #16202c;
  border-color: #1e2530;
}

[data-theme="dark"] .article-row:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .article-row__body .card-title  { color: #d5e8ed; }
[data-theme="dark"] .article-row__body .excerpt     { color: #6a8a9a; }
[data-theme="dark"] .article-row__body .source      { color: #2a4a5a; }

/* Mobil: bild ovanför text, ingen reverse */
@media (max-width: 680px) {
  .article-row,
  .article-row--reverse {
    flex-direction: column;
  }

  .article-row__image {
    width: 100%;
    height: 180px;
  }

  .article-row__body {
    padding: 16px 18px;
  }

  .article-row__body .card-title { font-size: 17px; }
}
