/*
Theme Name: Dorpsbelangen Feanwâlden
Theme URI: https://db-ff.org
Author: Dorpsbelangen Veenwouden / Veenwoudsterwal e.o.
Description: Modern, fris thema voor de website van Dorpsbelangen Feanwâlden / Feanwâldsterwâl e.o. Zelfde structuur als de oude site, maar met een eigentijds ontwerp dat goed werkt op mobiel.
Version: 1.9.4
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: dbff
*/

/* ---------------------------------------------------------------------------
   1. Basis & variabelen
--------------------------------------------------------------------------- */
:root {
  --c-primary: #1e3a5f;        /* diep blauw – herkenbaar t.o.v. oude site */
  --c-primary-dark: #142942;
  --c-accent: #2f8f5b;         /* groen – dorps, natuur */
  --c-accent-dark: #237147;
  --c-bg: #f7f9fb;
  --c-surface: #ffffff;
  --c-band: #eaf1f7;
  --c-text: #22303e;
  --c-text-soft: #5a6b7b;
  --c-border: #dde5ec;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(20, 41, 66, 0.08);
  --shadow-lg: 0 8px 28px rgba(20, 41, 66, 0.14);
  --wrap: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--c-primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--c-accent-dark); }

h1, h2, h3, h4 {
  line-height: 1.25;
  color: var(--c-primary-dark);
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* Voorkom een los woordje op de laatste regel van alinea's */
p { text-wrap: pretty; }

/* Vangnet: lange (dorps)namen mogen afbreken in plaats van van het scherm te vallen */
.site-title,
.hero h1,
.page-header h1 { overflow-wrap: anywhere; }
h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 1.9rem); }
h3 { font-size: 1.25rem; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--c-primary-dark);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------------------------------------------------------------------------
   2. Header & navigatie
--------------------------------------------------------------------------- */
.site-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header.is-scrolled { box-shadow: var(--shadow); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-block: 0.85rem;
}

.site-branding { display: flex; align-items: center; gap: 0.85rem; margin-right: auto; }
.custom-logo-link img { max-height: 52px; width: auto; display: block; }

.site-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--c-primary-dark);
  text-decoration: none;
  line-height: 1.2;
  display: block;
}
.site-title:hover { color: var(--c-accent-dark); }
.site-tagline {
  margin: 0.1rem 0 0;
  font-size: 0.85rem;
  color: var(--c-text-soft);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-weight: 600;
  color: var(--c-primary-dark);
  cursor: pointer;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem;
}
.site-nav a {
  display: block;
  padding: 0.45rem 0.55rem;
  text-decoration: none;
  color: var(--c-text);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 8px;
  white-space: nowrap;
}
.site-nav a:hover { background: var(--c-band); color: var(--c-primary-dark); }
.site-nav .current-menu-item > a,
.site-nav .current_page_item > a {
  background: var(--c-primary);
  color: #fff;
}

/* Ledenknop in het menu: pil met slotje, groen zodra ingelogd */
.site-nav .menu-item-leden > a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1.5px solid var(--c-primary);
  border-radius: 999px;
  padding-inline: 0.85rem;
  color: var(--c-primary);
}
.site-nav .menu-item-leden > a:hover {
  background: var(--c-primary);
  color: #fff;
}
.site-nav .menu-item-leden.current-menu-item > a,
.site-nav .menu-item-leden.current_page_item > a {
  background: var(--c-primary);
  border-radius: 999px;
  color: #fff;
}
.site-nav .menu-item-leden--ingelogd > a {
  border-color: var(--c-accent);
  color: var(--c-accent-dark);
}
.site-nav .menu-item-leden--ingelogd > a:hover,
.site-nav .menu-item-leden--ingelogd.current-menu-item > a,
.site-nav .menu-item-leden--ingelogd.current_page_item > a {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #fff;
}
.menu-slot { flex: 0 0 auto; }

/* Uitklapmenu (o.a. onder Ledengedeelte voor ingelogde leden) */
.site-nav li { position: relative; }
.site-nav .sub-menu {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 190px;
  z-index: 60;
}
.site-nav li:hover > .sub-menu,
.site-nav li:focus-within > .sub-menu { display: block; }
.site-nav .sub-menu a { border-radius: 6px; }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    width: 100%;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; padding-block: 0.5rem; }
  .site-nav a { padding: 0.7rem 0.8rem; }
  .site-nav .sub-menu {
    display: block;
    position: static;
    border: none;
    box-shadow: none;
    padding: 0 0 0 1rem;
  }
}

/* ---------------------------------------------------------------------------
   3. Hero (voorpagina)
--------------------------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, var(--c-primary-dark) 0%, var(--c-primary) 55%, #2b5c8f 100%);
  background-size: cover;
  background-position: center;
  color: #fff;
  padding-block: clamp(3.5rem, 10vw, 7rem);
}
.hero h1 { color: #fff; margin-bottom: 0.4em; }
.hero p {
  max-width: 46rem;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 1.6rem;
}

.button,
.entry-content .wp-block-button__link {
  display: inline-block;
  background: var(--c-accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  border: 2px solid transparent;
  transition: background 0.15s ease;
}
.button:hover,
.entry-content .wp-block-button__link:hover { background: var(--c-accent-dark); color: #fff; }
.button--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.7);
}
.button--ghost:hover { background: rgba(255, 255, 255, 0.12); }
.hero-buttons { display: flex; gap: 0.85rem; flex-wrap: wrap; }

/* ---------------------------------------------------------------------------
   4. Secties & kaarten
--------------------------------------------------------------------------- */
.section { padding-block: clamp(2.5rem, 6vw, 4rem); }
.section--band { background: var(--c-band); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.6rem;
}
.section-head h2 { margin: 0; }
.section-head .more-link { font-weight: 600; white-space: nowrap; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.4rem;
}

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.card .entry-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.4rem;
}
.card h3 { margin-bottom: 0.5rem; }
.card h3 a { text-decoration: none; color: inherit; }
.card h3 a:hover { color: var(--c-accent-dark); }
.card p { margin: 0 0 1rem; color: var(--c-text-soft); flex-grow: 1; }
.card .card-link { font-weight: 700; text-decoration: none; }

/* ---------------------------------------------------------------------------
   5. Pagina's & berichten
--------------------------------------------------------------------------- */
.page-header {
  background: linear-gradient(135deg, var(--c-primary-dark), var(--c-primary));
  background-size: cover;
  background-position: center;
  color: #fff;
  min-height: clamp(220px, 28vw, 320px);
  display: flex;
  align-items: flex-end;
  padding-block: 1.6rem;
}
.page-header .wrap { width: 100%; }
.page-header h1 { color: #fff; margin: 0; }
.page-header .entry-meta { color: rgba(255, 255, 255, 0.8); margin: 0.5rem 0 0; font-size: 0.95rem; }

.content-area { padding-block: clamp(2rem, 5vw, 3.5rem); }

.entry-content,
.page-content-narrow {
  max-width: 46rem;
}
.entry-content > * + * { margin-top: 1.1em; }
/* Links-pagina: breder en twee kolommen */
.page-links .entry-content { max-width: 68rem; }
.links-kolommen { gap: clamp(1.5rem, 5vw, 4rem); }
.links-kolommen h3 { margin-top: 1.4em; padding-bottom: .3em; border-bottom: 1px solid var(--c-border); }
.links-kolommen h3:first-child { margin-top: 0; }
.links-lijst li { line-height: 1.4; }
.links-oms { color: var(--c-text-soft); font-size: 0.9em; }
.links-toc { line-height: 1.9; color: var(--c-text-soft); }
.entry-content h2 { margin-top: 1.8em; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.3rem; }
.entry-content li + li { margin-top: 0.35em; }
.entry-content blockquote {
  margin: 1.5em 0;
  padding: 0.8em 1.2em;
  border-left: 4px solid var(--c-accent);
  background: var(--c-band);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.97rem;
}
.entry-content th, .entry-content td {
  border: 1px solid var(--c-border);
  padding: 0.55rem 0.8rem;
  text-align: left;
}
.entry-content th { background: var(--c-band); }
.entry-content hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 2em 0;
}

.back-link { display: inline-block; margin-top: 2.2rem; font-weight: 600; }

/* Pagination */
.pagination, .navigation.pagination { margin-top: 2.5rem; }
.pagination .nav-links { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.pagination .page-numbers {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface);
  text-decoration: none;
  font-weight: 600;
}
.pagination .page-numbers.current { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* ---------------------------------------------------------------------------
   6. Formulieren (o.a. Contact Form 7)
--------------------------------------------------------------------------- */
.entry-content input[type="text"],
.entry-content input[type="email"],
.entry-content input[type="tel"],
.entry-content input[type="number"],
.entry-content input[type="password"],
.entry-content select,
.entry-content textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font: inherit;
  border: 1px solid var(--c-border);
  border-radius: 8px;
  background: var(--c-surface);
  color: var(--c-text);
}
.entry-content input:focus,
.entry-content select:focus,
.entry-content textarea:focus {
  outline: 2px solid var(--c-accent);
  outline-offset: 1px;
  border-color: var(--c-accent);
}
.entry-content label { font-weight: 600; display: block; margin-bottom: 0.25rem; }
.wpcf7 p { margin-bottom: 1rem; }
.entry-content input[type="submit"],
.entry-content button[type="submit"] {
  background: var(--c-accent);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.7rem;
  cursor: pointer;
  font-size: 1rem;
}
.entry-content input[type="submit"]:hover { background: var(--c-accent-dark); }
.wpcf7-response-output {
  border-radius: 8px !important;
  padding: 0.7rem 1rem !important;
}

/* Infoblok (te gebruiken via groep-blok met klasse "infobox") */
.infobox {
  background: var(--c-band);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
}

/* Ledengedeelte */
.nieuws-lijst { list-style: none; margin: 0; padding: 0; }
.nieuws-lijst li { border-bottom: 1px solid var(--c-border); padding: 1.1rem 0; }
.nieuws-lijst .entry-date {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.nieuws-lijst .nieuws-titel {
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--c-primary-dark);
}
.nieuws-lijst .nieuws-titel:hover { color: var(--c-accent-dark); }
.nieuws-lijst p { margin: 0.3rem 0 0; color: var(--c-text-soft); }
.leden-badge {
  display: inline-block;
  background: var(--c-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-left: 0.5rem;
  vertical-align: middle;
}
.dbff-hp { position: absolute; left: -9999px; }
.entry-content .dbff-readonly {
  background: var(--c-band);
  color: var(--c-text-soft);
  cursor: not-allowed;
}
.dbff-profiel small, .dbff-registratie small { color: var(--c-text-soft); font-weight: 400; }
.dbff-fout {
  background: #fdecec;
  border: 1px solid #f0b9b9;
  border-radius: var(--radius);
  padding: 0.8rem 1.2rem;
  color: #8a2424;
}
.entry-content .button {
  font: inherit;
  font-weight: 700;
  border: none;
  cursor: pointer;
}
#loginform p { margin-bottom: 1rem; }
#loginform .login-remember label { font-weight: 400; display: inline; }
#loginform input[type="checkbox"] { width: auto; margin-right: 0.4rem; }
#loginform input[type="submit"] {
  background: var(--c-accent);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.6rem;
  cursor: pointer;
}
#loginform input[type="submit"]:hover { background: var(--c-accent-dark); }

/* ---------------------------------------------------------------------------
   7. Footer
--------------------------------------------------------------------------- */
.site-footer {
  background: var(--c-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 3rem;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 2rem;
  padding-block: 2.75rem;
}
.site-footer h3 { color: #fff; font-size: 1.05rem; margin-bottom: 0.7rem; }
.site-footer a { color: #cfe3f5; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0.4rem; }
.footer-social { margin-top: 0.9rem !important; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  text-decoration: none;
}
.footer-social a:hover span { text-decoration: underline; }
.footer-social .icon-facebook { flex: none; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-block: 1.1rem;
  font-size: 0.88rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------------------------
   8. Diversen
--------------------------------------------------------------------------- */
.error-404 { text-align: center; padding-block: 4rem; }

@media print {
  .site-header, .site-footer, .hero-buttons, .back-link { display: none; }
}
