/* =========================================================
   Hverdagsbibel.dk — Site Stylesheet
   Plain CSS, no preprocessor, no external dependencies.
   ========================================================= */

/* ----- Reset & Base -------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: #f5f5f5;
  /* Subtle royalty-free backdrop (CC0). A light wash keeps text readable and
     the tone calm; the image shows softly behind the white content cards. */
  background-image:
    linear-gradient(rgba(245, 245, 245, 0.82), rgba(245, 245, 245, 0.88)),
    url('/site/assets/background.jpg');
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  background-attachment: fixed;
  color: #333333;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: #1a7abf;
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover,
a:focus-visible {
  color: #125f96;
  text-decoration: underline;
}

/* ----- Layout wrapper ------------------------------------ */
.site-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1rem;
  width: 100%;
}

/* ----- Header -------------------------------------------- */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1.5rem 0 1.25rem;
}

.site-header .site-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.site-logo-link {
  display: inline-flex;
  flex: none;
  line-height: 0;
}

.site-logo {
  display: block;
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.site-brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.site-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.site-title a {
  color: inherit;
  text-decoration: none;
}

.site-title a:hover,
.site-title a:focus-visible {
  color: #1a7abf;
  text-decoration: none;
}

.site-tagline {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
}

/* ----- Navigation ---------------------------------------- */
.site-nav {
  background: #1a7abf;
  border-bottom: 2px solid #125f96;
  position: relative;
  z-index: 100;
}

.site-nav .site-wrap {
  display: flex;
  align-items: stretch;
  position: relative;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
}

.nav-menu > li {
  position: relative;
}

.nav-menu > li > a,
.nav-menu > li > button.nav-toggle {
  display: block;
  padding: 0.75rem 1rem;
  color: #ffffff;
  text-decoration: none;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  background: none;
  border: none;
  cursor: pointer;
  line-height: 1.4;
  transition: background-color 0.15s ease;
}

.nav-menu > li > a:hover,
.nav-menu > li > a:focus-visible,
.nav-menu > li > button.nav-toggle:hover,
.nav-menu > li > button.nav-toggle:focus-visible,
.nav-menu > li.is-open > a,
.nav-menu > li.is-open > button.nav-toggle {
  background: rgba(0, 0, 0, 0.15);
  color: #ffffff;
  text-decoration: none;
}

.nav-menu > li > a.is-current {
  background: rgba(0, 0, 0, 0.2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Dropdown arrow indicator */
.nav-toggle::after {
  content: ' ▾';
  font-size: 0.7em;
  opacity: 0.8;
}

/* Dropdown panel */
.nav-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #ffffff;
  border: 1px solid #d0d0d0;
  border-top: 2px solid #1a7abf;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 200;
  list-style: none;
  padding: 0.25rem 0;
}

.nav-menu > li.is-open > .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 0.6rem 1rem;
  color: #333333;
  text-decoration: none;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  white-space: nowrap;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus-visible {
  background: #f0f7fd;
  color: #1a7abf;
}

/* Mobile menu toggle */
.nav-mobile-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  color: #ffffff;
  align-items: center;
  gap: 0.4rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
}

.nav-mobile-toggle svg {
  flex-shrink: 0;
}

/* ----- Content area -------------------------------------- */
.site-content {
  flex: 1;
  padding: 2rem 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 70% 2% 28%;
  grid-template-areas: "main gap sidebar";
  align-items: start;
}

.content-main {
  grid-area: main;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  padding: 2rem 2.25rem;
}

.content-sidebar {
  grid-area: sidebar;
}

/* ----- Prose / Post content ------------------------------ */
.entry-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.entry-title a {
  color: inherit;
  text-decoration: none;
}

.entry-title a:hover,
.entry-title a:focus-visible {
  color: #1a7abf;
}

.entry-meta {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e8e8e8;
}

.entry-content {
  max-width: 70ch;
  line-height: 1.75;
}

.entry-content p {
  margin-bottom: 1em;
}

.entry-content h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  color: #1a1a1a;
  font-weight: 700;
  margin-top: 1.75em;
  margin-bottom: 0.5em;
  line-height: 1.35;
}

.entry-content h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  color: #1a1a1a;
  font-weight: 700;
  margin-top: 1.5em;
  margin-bottom: 0.4em;
  line-height: 1.35;
}

.entry-content h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1rem;
  color: #1a1a1a;
  font-weight: 700;
  margin-top: 1.25em;
  margin-bottom: 0.35em;
}

.entry-content blockquote {
  border-left: 3px solid #1a7abf;
  margin: 1.5em 0;
  padding: 0.75em 1.25em;
  background: #f0f7fd;
  color: #444;
  font-style: italic;
}

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

.entry-content ul,
.entry-content ol {
  margin-bottom: 1em;
  padding-left: 1.5em;
}

.entry-content li {
  margin-bottom: 0.25em;
}

.entry-content strong {
  color: #1a1a1a;
  font-weight: 700;
}

.entry-content em {
  font-style: italic;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
  font-size: 0.9rem;
}

.entry-content th,
.entry-content td {
  text-align: left;
  padding: 0.5em 0.75em;
  border: 1px solid #ddd;
}

.entry-content th {
  background: #f5f5f5;
  font-weight: 700;
  color: #1a1a1a;
}

.entry-content tr:nth-child(even) td {
  background: #fafafa;
}

.entry-content hr {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 2em 0;
}

/* ----- Welcome greeting (homepage) ----------------------- */
.site-welcome {
  font-size: 1.15rem;
  font-style: italic;
  color: #5a6e5a;
  border-left: 4px solid #8aad8a;
  padding: 0.6em 1em;
  margin-bottom: 1.75rem;
  background: #f4f8f4;
}

/* ----- Search results page ------------------------------- */
.search-results-header {
  margin-bottom: 1.25rem;
}

.search-form--page {
  margin-bottom: 1.75rem;
}

.search-count {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* ----- Archive / Post listing ---------------------------- */
.archive-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e0e0e0;
}

.archive-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.4rem;
  color: #1a1a1a;
  font-weight: 700;
}

.post-list {
  list-style: none;
  padding: 0;
}

.post-list-item {
  padding: 1.25rem 0;
  border-bottom: 1px solid #ececec;
}

.post-list-item:last-child {
  border-bottom: none;
}

.post-list-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

.post-list-title a {
  color: #1a7abf;
  text-decoration: none;
}

.post-list-title a:hover,
.post-list-title a:focus-visible {
  text-decoration: underline;
  color: #125f96;
}

.post-list-meta {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.78rem;
  color: #999;
  margin-bottom: 0.5rem;
}

.post-list-excerpt {
  font-size: 0.92rem;
  color: #555;
  line-height: 1.65;
}

.read-more {
  display: inline-block;
  margin-top: 0.4rem;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  color: #1a7abf;
  text-decoration: none;
  font-weight: 500;
}

.read-more:hover,
.read-more:focus-visible {
  text-decoration: underline;
}

/* ----- Sidebar ------------------------------------------- */
.sidebar-widget {
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 2px;
  padding: 1.25rem 1.25rem 1rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #ececec;
}

.widget-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget-list li {
  border-bottom: 1px solid #f0f0f0;
}

.widget-list li:last-child {
  border-bottom: none;
}

.widget-list a {
  display: block;
  padding: 0.4rem 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  color: #1a7abf;
  text-decoration: none;
  line-height: 1.45;
}

.widget-list a:hover,
.widget-list a:focus-visible {
  color: #125f96;
  text-decoration: underline;
}

.widget-list .item-date {
  display: block;
  font-size: 0.72rem;
  color: #aaa;
  margin-top: 0.1rem;
}

/* Search widget */
.search-form {
  display: flex;
  gap: 0.4rem;
}

.search-input {
  flex: 1;
  padding: 0.45rem 0.6rem;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  color: #333;
  background: #fafafa;
  transition: border-color 0.15s ease;
}

.search-input:focus {
  outline: none;
  border-color: #1a7abf;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(26, 122, 191, 0.15);
}

.search-btn {
  padding: 0.45rem 0.75rem;
  background: #1a7abf;
  color: #ffffff;
  border: none;
  border-radius: 3px;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease;
}

.search-btn:hover,
.search-btn:focus-visible {
  background: #125f96;
}

/* ----- Footer -------------------------------------------- */
.site-footer {
  background: #2a2a2a;
  color: #c0c0c0;
  padding: 1.5rem 0;
  margin-top: auto;
  border-top: 3px solid #1a7abf;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.82rem;
}

.footer-inner a {
  color: #aac8e8;
  text-decoration: none;
}

.footer-inner a:hover,
.footer-inner a:focus-visible {
  color: #ffffff;
  text-decoration: underline;
}

/* ----- 404 page ------------------------------------------ */
.not-found-wrap {
  text-align: center;
  padding: 3rem 1.5rem;
}

.not-found-code {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 5rem;
  font-weight: 800;
  color: #e0e0e0;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.not-found-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  color: #1a1a1a;
  margin-bottom: 0.75rem;
}

.not-found-text {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.btn-home {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  background: #1a7abf;
  color: #ffffff;
  text-decoration: none;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 3px;
  transition: background-color 0.15s ease;
}

.btn-home:hover,
.btn-home:focus-visible {
  background: #125f96;
  color: #ffffff;
  text-decoration: none;
}

/* ----- Utility ------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Responsive — tablet (≤768px) --------------------- */
@media (max-width: 768px) {
  /* Nav: collapse to burger */
  .nav-mobile-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #125f96;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu > li {
    width: 100%;
  }

  .nav-menu > li > a,
  .nav-menu > li > button.nav-toggle {
    width: 100%;
    text-align: left;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .nav-dropdown {
    position: static;
    border: none;
    border-top: none;
    box-shadow: none;
    background: #0f4e7a;
    width: 100%;
    display: none;
    padding: 0;
  }

  .nav-menu > li.is-open > .nav-dropdown {
    display: block;
  }

  .nav-dropdown a {
    color: #cce0f0;
    padding: 0.65rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .nav-dropdown a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
  }

  /* Content: single column */
  .content-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .content-main {
    padding: 1.5rem 1.25rem;
  }

  .entry-content {
    max-width: 100%;
  }
}

/* ----- Responsive — mobile (≤480px) --------------------- */
@media (max-width: 480px) {
  .site-content {
    padding: 1.25rem 0;
  }

  .entry-title {
    font-size: 1.3rem;
  }

  .not-found-code {
    font-size: 3.5rem;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.25rem;
  }
}

/* ============================================================
   Dagens ord — reading-streak meter (læsestriber) + daily card
   ============================================================ */
.streak {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1.75rem;
  padding: 1rem 1.25rem;
  background: #f0f7fd;
  border: 1px solid #cfe6f7;
  border-left: 4px solid #1a7abf;
  border-radius: 4px;
}

.streak-flame {
  font-size: 2rem;
  line-height: 1;
}

.streak-body {
  flex: 1 1 auto;
}

.streak-count {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: #125f96;
  line-height: 1.1;
}

.streak-num {
  font-size: 2rem;
  font-weight: 700;
}

.streak-unit {
  font-size: 1rem;
}

.streak-sub {
  margin: 0.2rem 0 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.85rem;
  color: #555;
}

.streak-btn {
  flex: 0 0 auto;
  align-self: center;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.9rem;
  color: #ffffff;
  background: #1a7abf;
  border: none;
  border-radius: 3px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.streak-btn:hover,
.streak-btn:focus-visible {
  background: #125f96;
}

.streak-btn.is-done,
.streak-btn:disabled {
  background: #7fae54;
  cursor: default;
}

.dagens-kort {
  margin: 0 0 1.5rem;
  padding: 1.75rem 1.5rem;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  text-align: center;
}

.dagens-tema {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.5rem;
  color: #1a1a1a;
}

.dagens-ref {
  margin: 0.35rem 0 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #1a7abf;
}

.dagens-invitation {
  margin: 1rem 0 0;
  font-style: italic;
  color: #555;
}

@media (max-width: 560px) {
  .streak {
    flex-wrap: wrap;
  }
  .streak-btn {
    flex: 1 1 100%;
  }
}
