/*
Theme Name: Vijftig Plus Magazine
Theme URI: https://vijftig.nl/
Author: Codex
Description: Een rustig en betrouwbaar magazine-thema voor Vijftig.nl, gebouwd voor veel artikelen en tips voor 50-plussers.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: vijftig-plus
*/

:root {
  --vp-ink: #24332f;
  --vp-muted: #63716d;
  --vp-soft: #f5f1e9;
  --vp-paper: #fffdf8;
  --vp-line: #ded8cc;
  --vp-sage: #6c8a78;
  --vp-sage-dark: #3f6757;
  --vp-blue: #315f73;
  --vp-clay: #b86d4b;
  --vp-gold: #d8a646;
  --vp-shadow: 0 14px 34px rgba(36, 51, 47, 0.12);
  --vp-radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--vp-ink);
  background: var(--vp-paper);
  font-family: "Atkinson Hyperlegible", "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.65;
}

a {
  color: var(--vp-sage-dark);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--vp-blue);
}

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

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link:focus {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  clip: auto;
  padding: 10px 14px;
  color: #fff;
  background: var(--vp-ink);
}

.site-header {
  position: sticky;
  z-index: 20;
  top: 0;
  background: rgba(255, 253, 248, 0.96);
  border-bottom: 1px solid var(--vp-line);
  backdrop-filter: blur(14px);
}

.wrap {
  width: min(1160px, calc(100% - 40px));
  margin-inline: auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--vp-ink);
  text-decoration: none;
}

.css-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--vp-ink);
  text-decoration: none;
  user-select: text;
}

.css-logo-mark {
  position: relative;
  display: grid;
  width: 68px;
  height: 58px;
  place-items: center;
  color: #fff;
  isolation: isolate;
}

.css-logo-mark::before,
.css-logo-mark::after {
  position: absolute;
  content: "";
  z-index: -1;
  border-radius: 22px;
  transform: rotate(-8deg);
}

.css-logo-mark::before {
  inset: 4px 10px 4px 0;
  background: linear-gradient(135deg, #78a487, #315f73);
  box-shadow: 0 10px 22px rgba(36, 51, 47, 0.18);
}

.css-logo-mark::after {
  inset: 0 0 8px 22px;
  background: linear-gradient(135deg, #f3c85e, #d8754e);
  mix-blend-mode: multiply;
  opacity: 0.88;
}

.css-logo-number {
  color: #fff;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 2.05rem;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(36, 51, 47, 0.22);
}

.css-logo-word {
  color: var(--vp-ink);
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 2.55rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.css-logo-word::after {
  display: block;
  width: 72%;
  height: 6px;
  margin-top: 5px;
  background: linear-gradient(90deg, var(--vp-gold), rgba(216, 166, 70, 0));
  border-radius: 999px;
  content: "";
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu a {
  display: block;
  padding: 10px 12px;
  color: var(--vp-ink);
  border-radius: var(--vp-radius);
  font-size: 0.98rem;
  font-weight: 700;
  text-decoration: none;
}

.primary-menu a:hover,
.primary-menu a:focus {
  background: var(--vp-soft);
}

.site-main {
  min-height: 60vh;
}

.hero {
  padding: 46px 0 34px;
  background:
    linear-gradient(120deg, rgba(108, 138, 120, 0.18), rgba(216, 166, 70, 0.13)),
    var(--vp-paper);
  border-bottom: 1px solid var(--vp-line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 34px;
  align-items: stretch;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px 0;
}

.eyebrow,
.card-kicker,
.section-kicker {
  color: var(--vp-clay);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1,
.page-title {
  margin: 10px 0 14px;
  max-width: 780px;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 4.6vw, 4.9rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-lead {
  max-width: 690px;
  margin: 0;
  color: var(--vp-muted);
  font-size: clamp(1.08rem, 1.6vw, 1.28rem);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.trust-row span {
  padding: 8px 11px;
  color: var(--vp-ink);
  background: #fff;
  border: 1px solid var(--vp-line);
  border-radius: var(--vp-radius);
  font-size: 0.9rem;
  font-weight: 800;
}

.identity-band {
  padding: 28px 0;
  color: #fff;
  background: var(--vp-sage-dark);
}

.identity-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: center;
}

.identity-grid h2 {
  margin: 4px 0 0;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 2.8vw, 2.7rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.identity-grid p {
  margin: 0;
  color: #eef5ee;
  font-size: 1.08rem;
}

.identity-band .section-kicker {
  color: #f1d17a;
}

.hero-card {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  overflow: hidden;
  color: var(--vp-ink);
  background: #fff;
  border: 1px solid var(--vp-line);
  border-radius: var(--vp-radius);
  box-shadow: var(--vp-shadow);
  text-decoration: none;
}

.hero-card-media {
  min-height: 190px;
  background:
    linear-gradient(135deg, rgba(63, 103, 87, 0.78), rgba(49, 95, 115, 0.68)),
    linear-gradient(45deg, #e8decf, #f8f2e8);
}

.hero-card-media img {
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.hero-card-body {
  padding: 24px;
}

.hero-card h2 {
  margin: 8px 0 10px;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: clamp(1.6rem, 2.4vw, 2.25rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-card p,
.article-card p,
.intro-panel p,
.newsletter p {
  color: var(--vp-muted);
}

.section {
  padding: 44px 0;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}

.section-title {
  margin: 4px 0 0;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: clamp(1.8rem, 2.8vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: 0;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.topic {
  min-height: 128px;
  padding: 18px;
  color: var(--vp-ink);
  background: #fff;
  border: 1px solid var(--vp-line);
  border-radius: var(--vp-radius);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.topic:hover,
.topic:focus {
  transform: translateY(-2px);
  box-shadow: var(--vp-shadow);
}

.topic-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  place-items: center;
  color: #fff;
  background: var(--vp-sage-dark);
  border-radius: 50%;
}

.topic:nth-child(2) .topic-icon {
  background: var(--vp-blue);
}

.topic:nth-child(3) .topic-icon {
  background: var(--vp-clay);
}

.topic:nth-child(4) .topic-icon {
  background: #8a7355;
}

.topic:nth-child(5) .topic-icon {
  background: #596f8a;
}

.topic:nth-child(6) .topic-icon {
  background: #7b7d4b;
}

.sidebar-topic:nth-child(2) .topic-icon {
  background: var(--vp-blue);
}

.sidebar-topic:nth-child(3) .topic-icon {
  background: var(--vp-clay);
}

.sidebar-topic:nth-child(4) .topic-icon {
  background: #8a7355;
}

.sidebar-topic:nth-child(5) .topic-icon {
  background: #596f8a;
}

.sidebar-topic:nth-child(6) .topic-icon {
  background: #7b7d4b;
}

.topic-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topic strong {
  display: block;
  font-size: 1rem;
  line-height: 1.2;
}

.topic > span:not(.topic-icon) {
  display: block;
  margin-top: 7px;
  color: var(--vp-muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--vp-line);
  border-radius: var(--vp-radius);
}

.article-card-media {
  background: var(--vp-soft);
}

.article-card-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.article-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
}

.article-card h2,
.article-card h3 {
  margin: 7px 0 9px;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.42rem;
  line-height: 1.17;
  letter-spacing: 0;
}

.article-card h2 a,
.article-card h3 a {
  color: var(--vp-ink);
  text-decoration: none;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  color: var(--vp-muted);
  font-size: 0.88rem;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 38px;
  padding: 44px 0;
}

.post-content {
  max-width: 760px;
}

.post-content h1,
.post-content h2,
.post-content h3 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  line-height: 1.13;
  letter-spacing: 0;
}

.post-content h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.post-content h2 {
  margin-top: 2em;
  font-size: 2rem;
}

.post-content p,
.post-content li {
  font-size: 1.08rem;
}

.post-content blockquote {
  margin: 28px 0;
  padding: 18px 22px;
  background: var(--vp-soft);
  border-left: 5px solid var(--vp-gold);
}

.post-content img {
  border-radius: var(--vp-radius);
}

.sidebar {
  align-self: start;
  position: sticky;
  top: 102px;
}

.widget-panel,
.intro-panel,
.newsletter {
  padding: 22px;
  background: var(--vp-soft);
  border: 1px solid var(--vp-line);
  border-radius: var(--vp-radius);
}

.widget-panel + .widget-panel {
  margin-top: 18px;
}

.widget-panel h2,
.widget-panel h3,
.newsletter h2 {
  margin: 0 0 10px;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  letter-spacing: 0;
  line-height: 1.15;
}

.widget-panel ul {
  margin: 0;
  padding-left: 20px;
}

.category-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 0 !important;
  list-style: none;
}

.category-pill-list li {
  margin: 0;
}

.category-pill-list a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 11px;
  color: var(--vp-ink);
  background: #fff;
  border: 1px solid var(--vp-line);
  border-radius: var(--vp-radius);
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

.category-pill-list a:hover,
.category-pill-list a:focus {
  color: #fff;
  background: var(--vp-sage-dark);
  border-color: var(--vp-sage-dark);
}

.search-panel .search-form {
  display: grid;
  gap: 10px;
}

.search-panel label {
  display: block;
}

.search-panel .search-field {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  color: var(--vp-ink);
  background: #fff;
  border: 1px solid var(--vp-line);
  border-radius: var(--vp-radius);
  font: inherit;
}

.search-panel .search-submit {
  min-height: 44px;
  color: #fff;
  background: var(--vp-sage-dark);
  border: 0;
  border-radius: var(--vp-radius);
  font-weight: 800;
  cursor: pointer;
}

.search-panel .search-submit:hover,
.search-panel .search-submit:focus {
  background: var(--vp-blue);
}

.sidebar-topic-list {
  display: grid;
  gap: 10px;
}

.sidebar-topic {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  color: var(--vp-ink);
  background: #fff;
  border: 1px solid var(--vp-line);
  border-radius: var(--vp-radius);
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.sidebar-topic:hover,
.sidebar-topic:focus {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(36, 51, 47, 0.1);
}

.sidebar-topic .topic-icon {
  margin-bottom: 0;
}

.sidebar-topic-copy strong,
.sidebar-topic-copy span {
  display: block;
}

.sidebar-topic-copy strong {
  line-height: 1.2;
}

.sidebar-topic-copy span {
  margin-top: 3px;
  color: var(--vp-muted);
  font-size: 0.84rem;
  line-height: 1.3;
}

.newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-top: 24px;
  background: #fff;
}

.button,
.wp-block-button__link,
.read-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  color: #fff;
  background: var(--vp-sage-dark);
  border-radius: var(--vp-radius);
  font-weight: 800;
  text-decoration: none;
}

.button:hover,
.button:focus,
.wp-block-button__link:hover,
.wp-block-button__link:focus {
  color: #fff;
  background: var(--vp-blue);
}

.site-footer {
  margin-top: 34px;
  padding: 40px 0 26px;
  color: #f8f4ea;
  background: var(--vp-ink);
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.footer-logo-link {
  color: inherit;
  text-decoration: none;
}

.css-logo-footer {
  padding: 10px 12px;
  background: #fffdf8;
  border-radius: var(--vp-radius);
}

.css-logo-footer .css-logo-word {
  font-size: 2.2rem;
}

.footer-brand p {
  max-width: 620px;
  margin: 0;
  color: #dce5df;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
  padding-top: 28px;
}

.site-footer a {
  color: #fff;
}

.site-footer h2 {
  margin: 0 0 10px;
  color: #fff;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.site-footer p {
  margin: 0;
  color: #dce5df;
  font-size: 0.96rem;
  line-height: 1.58;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li + li {
  margin-top: 7px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding-top: 20px;
  color: #c8d3ce;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.9rem;
}

.pagination {
  margin-top: 30px;
}

.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-numbers {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--vp-line);
  border-radius: var(--vp-radius);
  text-decoration: none;
}

.page-numbers.current {
  color: #fff;
  background: var(--vp-sage-dark);
}

@media (max-width: 980px) {
  .header-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .primary-menu {
    flex-wrap: wrap;
  }

  .hero-grid,
  .content-layout,
  .newsletter,
  .identity-grid {
    grid-template-columns: 1fr;
  }

  .topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(100% - 28px, 1160px);
  }

  body {
    font-size: 17px;
  }

  .hero {
    padding-top: 30px;
  }

  .topic-grid,
  .article-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .footer-grid,
  .footer-brand,
  .footer-bottom {
    align-items: start;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .css-logo {
    gap: 9px;
  }

  .css-logo-mark {
    width: 58px;
    height: 50px;
  }

  .css-logo-number {
    font-size: 1.75rem;
  }

  .css-logo-word {
    font-size: 1.85rem;
  }
}
