/* ============================================================
   USER.CSS — Hausstijl Patrick / nell.quest
   Cassiopeia Joomla 6 — Versie 3.0 (geoptimaliseerd)
   Principe: alle themakleuren zijn variabelen.
   Dark mode overschrijft ALLEEN variabelen — geen element-regels.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Carlito:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* --- 1. VARIABELEN (licht = standaard) --------------------- */
:root {
  /* Cassiopeia / Bootstrap overrides */
  --cassiopeia-color-primary: #017274;
  --cassiopeia-color-link:    #017274;
  --cassiopeia-color-hover:   #014F50;
  --link-color:               #017274;
  --link-color-rgb:           1, 114, 116;
  --link-hover-color:         #014F50;
  --link-hover-color-rgb:     1, 79, 80;
  --nav-link-color:           var(--link-color);
  --nav-link-hover-color:     var(--link-hover-color);

  /* Palet */
  --hs-teal-dark:   #014F50;
  --hs-teal:        #017274;
  --hs-teal-light:  #029EA1;
  --hs-teal-tint:   #E8F5F5;
  --hs-amber:       #E8A020;
  --hs-amber-light: #FFF3DA;
  --hs-text:        #1C1C1C;
  --hs-grey:        #6B6B6B;
  --hs-offwhite:    #F5F5F5;
  --hs-white:       #FFFFFF;
  --hs-border:      #C5E5E5;
  --hs-ok-bg:   #D6EFD8;  --hs-ok-text:   #1A5C1E;
  --hs-warn-bg: #FFF3DA;  --hs-warn-text: #7A4B00;
  --hs-err-bg:  #FDDEDE;  --hs-err-text:  #7A1010;

  /* Semantisch (dark mode wisselt enkel deze + palet) */
  --hs-h1:        var(--hs-teal);
  --hs-link:      var(--hs-teal);
  --hs-link-hover: var(--hs-teal-dark);
  --hs-table-top: var(--hs-teal-dark);
  --hs-th-bg:     var(--hs-teal);
  --hs-row-hover: #D0ECEC;
  --hs-card:      #FFFFFF;
  --hs-lead:      #2A2A2A;
  --hs-hr:        var(--hs-teal-tint);
  --hs-shadow:    rgba(1, 79, 80, 0.07);

  --hs-font: 'Carlito', 'Calibri', Arial, sans-serif;
  --hs-lh:   1.4;
}

/* --- 2. DARK MODE — enkel variabelen ------------------------ */
/* Automatisch via systeem, tenzij .light-mode; handmatig via .dark-mode */
@media (prefers-color-scheme: dark) {
  :root:not(.light-mode) {
    --body-bg: #121212;      --body-color: #E8E8E8;
    --card-bg: #1A1A1A;      --card-border-color: #2A4A4A;
    --border-color: #2A4A4A; --secondary-bg: #1A1A1A; --tertiary-bg: #1A1A1A;
    --hs-text:    #E8E8E8;   --hs-grey:    #A0A0A0;
    --hs-offwhite:#1A1A1A;   --hs-white:   #121212;
    --hs-border:  #2A4A4A;   --hs-teal-tint: #0E2E2F;
    --hs-amber-light: #2A2210;
    --hs-ok-bg:   #142814;   --hs-ok-text:   #7DCF82;
    --hs-warn-bg: #2A2210;   --hs-warn-text: #E8A020;
    --hs-err-bg:  #2A1414;   --hs-err-text:  #E07070;
    --hs-h1:        var(--hs-teal-light);
    --hs-link:      var(--hs-teal-light);
    --hs-link-hover:#4DC8CB;
    --hs-table-top: var(--hs-teal-light);
    --hs-th-bg:     var(--hs-teal-dark);
    --hs-row-hover: #1A3A3B;
    --hs-card:      #1A1A1A;
    --hs-lead:      #D0D0D0;
    --hs-hr:        #2A4A4A;
    --hs-shadow:    rgba(0, 0, 0, 0.3);
  }
}
:root.dark-mode {
  --body-bg: #121212;      --body-color: #E8E8E8;
  --card-bg: #1A1A1A;      --card-border-color: #2A4A4A;
  --border-color: #2A4A4A; --secondary-bg: #1A1A1A; --tertiary-bg: #1A1A1A;
  --hs-text:    #E8E8E8;   --hs-grey:    #A0A0A0;
  --hs-offwhite:#1A1A1A;   --hs-white:   #121212;
  --hs-border:  #2A4A4A;   --hs-teal-tint: #0E2E2F;
  --hs-amber-light: #2A2210;
  --hs-ok-bg:   #142814;   --hs-ok-text:   #7DCF82;
  --hs-warn-bg: #2A2210;   --hs-warn-text: #E8A020;
  --hs-err-bg:  #2A1414;   --hs-err-text:  #E07070;
  --hs-h1:        var(--hs-teal-light);
  --hs-link:      var(--hs-teal-light);
  --hs-link-hover:#4DC8CB;
  --hs-table-top: var(--hs-teal-light);
  --hs-th-bg:     var(--hs-teal-dark);
  --hs-row-hover: #1A3A3B;
  --hs-card:      #1A1A1A;
  --hs-lead:      #D0D0D0;
  --hs-hr:        #2A4A4A;
  --hs-shadow:    rgba(0, 0, 0, 0.3);
}

/* --- 3. BASIS ----------------------------------------------- */
body {
  font-family: var(--hs-font);
  font-size: 1rem;
  color: var(--hs-text);
  line-height: var(--hs-lh);
  background-color: var(--hs-white);
}

h1, .article-header h1 {
  font-family: var(--hs-font);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--hs-h1);
  margin: 1.6rem 0 0.6rem;
  border-bottom: 2px solid var(--hs-h1);
  padding-bottom: 0.3rem;
}
h2 {
  font-family: var(--hs-font);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--hs-text);
  margin: 1.4rem 0 0.4rem;
}
h3 {
  font-family: var(--hs-font);
  font-size: 1rem;
  font-weight: 700;
  color: var(--hs-grey);
  margin: 1.1rem 0 0.3rem;
}
p {
  font-size: 1rem;
  color: var(--hs-text);
  line-height: var(--hs-lh);
  margin-bottom: 0.8rem;
}

a        { color: var(--hs-link); text-decoration: none; }
a:hover  { color: var(--hs-link-hover); text-decoration: underline; }

/* --- 4. TABELLEN -------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--hs-font);
  font-size: 1rem;
  margin: 1.2rem 0;
  border-top: 2px solid var(--hs-table-top);
}
th {
  background-color: var(--hs-th-bg);
  color: #FFFFFF;
  font-weight: 700;
  padding: 0.5rem 0.75rem;
  text-align: left;
}
td {
  padding: 0.45rem 0.75rem;
  color: var(--hs-text);
  border-bottom: 1px solid var(--hs-border);
}
tbody tr:nth-child(odd)  { background-color: var(--hs-white); }
tbody tr:nth-child(even) { background-color: var(--hs-teal-tint); }
tbody tr:hover           { background-color: var(--hs-row-hover); }

/* --- 5. CONTENT BLOKKEN ------------------------------------- */
/* <div class="hs-block|hs-attention|hs-ok"> ... </div> */
.hs-block, .hs-attention, .hs-ok {
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-radius: 0 4px 4px 0;
}
.hs-block     { border-left: 4px solid var(--hs-teal);    background: var(--hs-teal-tint); }
.hs-attention { border-left: 4px solid var(--hs-amber);   background: var(--hs-amber-light); color: var(--hs-warn-text); font-weight: 700; }
.hs-ok        { border-left: 4px solid var(--hs-ok-text); background: var(--hs-ok-bg);       color: var(--hs-ok-text); }

/* --- 6. TAGS & METADATA ------------------------------------- */
.article-info, .article-info-term {
  font-size: 0.85rem;
  color: var(--hs-grey);
}
.article-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.82rem;
  padding: 0.5rem 0 0.75rem;
  border-bottom: 1px solid var(--hs-border);
  margin-bottom: 1.25rem;
}
.article-info dt { display: none; }
.article-info dd { margin: 0; color: var(--hs-grey); }
.article-info dd span { color: var(--hs-grey); }
.article-info dd::before { content: '· '; color: var(--hs-border); }
.article-info dd:first-of-type::before { content: ''; }

/* Tags: badge (BS5), label (oud), btn-info (Joomla 6 blog) */
.tag-list .label, .tags-list .label, .tag-list .badge, .tags-list .badge,
.item-tags .badge, .item-tags .label, a.badge, span.badge,
a.btn-info, .btn.btn-info, .btn.btn-sm.btn-info {
  background-color: var(--hs-teal) !important;
  border-color: var(--hs-teal) !important;
  color: #FFFFFF !important;
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 3px;
  font-family: var(--hs-font);
  text-transform: lowercase;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.tag-list .label:hover, .tags-list .label:hover, .tag-list .badge:hover,
.tags-list .badge:hover, .item-tags .badge:hover, a.badge:hover,
a.btn-info:hover, .btn.btn-info:hover {
  background-color: var(--hs-teal-dark) !important;
  border-color: var(--hs-teal-dark) !important;
  color: #FFFFFF !important;
}

/* --- 7. NAVIGATIE / HEADER / FOOTER / BREADCRUMB ------------- */
.navbar { background-color: var(--hs-teal-dark) !important; }
.navbar-brand, .navbar .nav-link {
  color: #FFFFFF !important;
  font-family: var(--hs-font);
}
.navbar .nav-link:hover, .navbar .nav-link.active { color: var(--hs-amber) !important; }

#sp-header { border-bottom: 3px solid var(--hs-teal); }

#sp-footer {
  border-top: 1px solid var(--hs-border);
  background-color: var(--hs-offwhite);
  color: var(--hs-grey);
  font-size: 0.85rem;
  font-family: var(--hs-font);
}
#sp-footer a { color: var(--hs-link); }

.breadcrumb { font-size: 0.85rem; color: var(--hs-grey); }
.breadcrumb-item.active { color: var(--hs-teal); font-weight: 700; }

/* --- 8. ARTIKEL --------------------------------------------- */
.com-content-article {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1rem;
}

.com-content-article .cat-link,
.com-content-article .category-name a,
.com-content-article .article-category a {
  display: inline-block;
  background-color: var(--hs-teal-tint);
  color: var(--hs-teal-dark);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  text-decoration: none;
  margin-bottom: 0.5rem;
}
.com-content-article .cat-link:hover,
.com-content-article .category-name a:hover {
  background-color: var(--hs-teal);
  color: #FFFFFF;
}

.com-content-article .item-text,
.com-content-article__body {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--hs-text);
}
.com-content-article .item-text > p:first-child {
  font-size: 1.05rem;
  color: var(--hs-lead);
}
.com-content-article blockquote {
  border-left: 3px solid var(--hs-grey);
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  color: var(--hs-grey);
  font-style: italic;
}
.com-content-article hr {
  border: none;
  border-top: 2px solid var(--hs-hr);
  margin: 1.5rem 0;
}

/* Lees meer knop */
.com-content-article .btn, .com-content-article a.btn, a.btn.btn-secondary {
  background-color: var(--hs-teal);
  border-color: var(--hs-teal);
  color: #FFFFFF !important;
  font-family: var(--hs-font);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 3px;
  padding: 0.4rem 1.1rem;
  text-decoration: none;
}
.com-content-article .btn:hover, a.btn.btn-secondary:hover {
  background-color: var(--hs-teal-dark);
  border-color: var(--hs-teal-dark);
}

/* --- Terugverwijzing naar vorig deel ------------------------ */
.article-backlink {
  font-size: 0.85rem;
  color: var(--hs-grey);
  margin-bottom: 1rem;
}
.article-backlink a {
  color: var(--hs-grey);
  text-decoration: none;
}
.article-backlink a:hover {
  color: var(--hs-link);
  text-decoration: underline;
}

/* --- 9. BLOGLIJST KAARTJES ----------------------------------- */
.com-content-category-blog article,
.com-content-featured article {
  border-left: 4px solid var(--hs-teal);
  background: var(--hs-card);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 1px 4px var(--hs-shadow);
  border-radius: 0 4px 4px 0;
  transition: border-left-color 0.2s ease, box-shadow 0.2s ease;
}
.com-content-category-blog article:hover,
.com-content-featured article:hover {
  border-left-color: var(--hs-amber);
  box-shadow: 0 3px 10px rgba(1, 114, 116, 0.13);
}
.com-content-category-blog article h2,
.com-content-featured article h2 {
  font-size: 1.2rem;
  color: var(--hs-h1);
  margin-top: 0.25rem;
}
.com-content-category-blog article h2 a,
.com-content-featured article h2 a {
  color: var(--hs-h1);
  text-decoration: none;
}
.com-content-category-blog article h2 a:hover,
.com-content-featured article h2 a:hover {
  color: var(--hs-link-hover);
  text-decoration: underline;
}

/* --- 10. PAGINATIE ------------------------------------------- */
.pagination .page-link {
  color: var(--hs-link);
  border-color: var(--hs-border);
  background-color: var(--hs-card);
  font-family: var(--hs-font);
}
.pagination .page-item.active .page-link {
  background-color: var(--hs-teal);
  border-color: var(--hs-teal);
  color: #FFFFFF;
}
.pagination .page-link:hover {
  background-color: var(--hs-teal-tint);
  color: var(--hs-link-hover);
}

/* --- 11. AFBEELDINGEN ---------------------------------------- */
figure img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 0.5rem 0 1rem;
}
figure figcaption {
  font-size: 0.82rem;
  color: var(--hs-grey);
  text-align: center;
  margin-top: 0.25rem;
}

/* --- 12. KNOPPEN (toggle + back-to-top) ----------------------- */
.theme-toggle {
  background: none;
  border: 1px solid var(--hs-border);
  border-radius: 3px;
  padding: 4px 10px;
  font-family: var(--hs-font);
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--hs-grey);
  transition: all 0.2s ease;
}
.theme-toggle:hover {
  border-color: var(--hs-teal-light);
  color: var(--hs-teal-light);
}

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--hs-teal);
  color: #FFFFFF;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover   { background-color: var(--hs-teal-dark); }

/* --- 13. RESPONSIVE ------------------------------------------ */
@media (max-width: 768px) {
  h1     { font-size: 1.3rem; }
  h2     { font-size: 1.05rem; }
  table  { font-size: 0.9rem; }
  th, td { padding: 0.35rem 0.5rem; }
  .hs-block, .hs-attention, .hs-ok { padding: 0.6rem 0.75rem; }
  .com-content-article { padding: 0 0.5rem; }
  .com-content-category-blog article,
  .com-content-featured article {
    padding: 0.75rem 0.9rem;
    margin-bottom: 1.25rem;
  }
  .article-info { gap: 0.4rem; }
}

/* ============================================================
   EINDE — v3.0: 100% variabel-gedreven, dark mode = alleen vars
   ============================================================ */
