/* =============================================
   johanvanhouten.nl — Global Stylesheet
   ============================================= */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400;1,600&family=Inter:wght@300;400;500&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --bg:        #f9f8f6;
  --text:      #1c1c1c;
  --accent:    #2d7168;
  --accent-dark: #225a52;
  --light:     #edf4f3;
  --border:    #c8dedd;
  --nav-height: 80px;
  --max-width: 780px;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}
a:hover { color: var(--accent-dark); opacity: 0.85; }

/* --- Typography --- */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1.2rem; }
h2 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: 0.9rem; }
h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1.2rem; }
p:last-child { margin-bottom: 0; }

/* --- Layout Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
}

.section--light {
  background: var(--light);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* --- Header & Navigation --- */
header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.2rem 1.5rem 0;
  max-width: 960px;
  margin: 0 auto;
}

.logo-wrap {
  display: block;
  margin-bottom: 0.8rem;
}

.logo-wrap img {
  height: 48px;
  width: auto;
  margin: 0 auto;
}

/* Nav */
nav {
  width: 100%;
  position: relative;
}

.nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  padding: 0 0 0.6rem;
}

.nav-list a {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  padding: 0.4rem 0.8rem;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
}

.nav-list a:hover,
.nav-list a.active {
  color: var(--accent);
  background: var(--light);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  position: absolute;
  right: 0;
  top: -2.4rem;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* Mobile nav */
@media (max-width: 600px) {
  .header-inner { padding: 1rem 1.5rem; align-items: flex-start; }
  .logo-wrap { margin-bottom: 0; }
  .hamburger { display: block; }

  .nav-list {
    display: none;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    padding: 0.75rem 0 1rem;
    margin-top: 0.5rem;
  }

  .nav-list.open { display: flex; }

  .nav-list a {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* --- Hero / Intro --- */
.hero {
  padding: 5rem 0 3.5rem;
  text-align: center;
}

.hero p {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 1.2rem;
  color: #3a3a3a;
}

/* --- Pull Quote --- */
.pullquote {
  padding: 3.5rem 0;
  text-align: center;
}

.pullquote blockquote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.3rem, 3.5vw, 2rem);
  color: var(--accent);
  max-width: 620px;
  margin: 0 auto;
  line-height: 1.4;
}

/* --- CTA Buttons --- */
.cta-wrap {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 2rem 0 1rem;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.75rem 1.8rem;
  border-radius: 4px;
  border: 2px solid var(--accent);
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: transparent;
  color: var(--accent);
  opacity: 1;
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
}

.btn--ghost:hover {
  background: var(--accent);
  color: #fff;
}

/* --- Project Cards --- */
.project-block {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--border);
}

.project-block:last-child {
  border-bottom: none;
}

.project-block h2 {
  margin-bottom: 0.75rem;
}

/* --- Artikel Kaarten (Inspiratie) --- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.4rem 1.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--text);
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(45, 113, 104, 0.08);
  color: var(--text);
  opacity: 1;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.35;
}

.card-arrow {
  color: var(--accent);
  font-size: 1.2rem;
  flex-shrink: 0;
}

/* --- Contact --- */
.contact-links {
  list-style: none;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-links li a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  font-size: 1rem;
}

.contact-links li a::before {
  content: '→';
  color: var(--accent);
}

/* --- Footer --- */
footer {
  background: var(--light);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 2.5rem 1.5rem;
  font-size: 0.85rem;
  color: #666;
}

footer a {
  color: var(--accent);
  font-weight: 500;
}

footer a:hover { color: var(--accent-dark); }

.footer-links {
  margin-top: 0.6rem;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* --- Blog Article --- */
.article-meta {
  font-size: 0.82rem;
  color: #888;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  max-width: 680px;
}

.article-body p { margin-bottom: 1.4rem; }

.article-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 2rem 0;
  padding: 0.6rem 1.4rem;
  color: #444;
  font-style: italic;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 2.5rem;
}

.back-link:hover { color: var(--accent-dark); opacity: 1; }

/* --- Contact Form --- */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 560px;
  margin-top: 2rem;
}

.contact-form label {
  font-size: 0.88rem;
  font-weight: 500;
  color: #444;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-form input,
.contact-form textarea {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
  width: 100%;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form textarea {
  resize: vertical;
  min-height: 130px;
}

.contact-form .btn { align-self: flex-start; }

/* --- Responsive adjustments --- */
@media (max-width: 600px) {
  .section { padding: 2.5rem 0; }
  .hero { padding: 3rem 0 2rem; }
  .pullquote { padding: 2.5rem 0; }
}

/* --- Hulpklassen (vervangen inline styles i.v.m. Content Security Policy) --- */
.u-center { text-align: center; }

.text-note {
  margin-bottom: 0.5rem;
  color: #555;
  font-size: 0.95rem;
}

.form-note {
  margin-top: 1.2rem;
  font-size: 0.85rem;
  color: #888;
}

.closing-note { margin-top: 2rem; }

.form-melding {
  padding: 0.8rem 1rem;
  border-radius: 4px;
  font-size: 0.92rem;
  background: #fdecea;
  color: #8a2a20;
  border: 1px solid #f2b8b0;
}

/* Honeypot: onzichtbaar voor bezoekers */
.hp-field {
  position: absolute;
  left: -9999px;
}

/* --- Video embed (YouTube) --- */
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  margin: 2rem 0;
  border-radius: 6px;
  overflow: hidden;
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* --- Blog-tegels (Inspiratie) --- */
.tiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.tile {
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.tile:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(45, 113, 104, 0.12);
  transform: translateY(-2px);
  color: var(--text);
  opacity: 1;
}

.tile img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.tile-title {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  line-height: 1.35;
  padding: 1rem 1.2rem 1.2rem;
  display: block;
}

/* --- Lees ook (onderaan blogartikelen) --- */
.read-more {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.read-more h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.read-more ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.read-more a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.read-more a::before {
  content: '→';
  color: var(--accent);
}

/* --- Blogfoto bovenaan artikel --- */
.article-img {
  width: 100%;
  max-width: 680px;
  border-radius: 6px;
  margin-bottom: 2rem;
}

/* --- Bijschrift onder video --- */
.video-caption {
  font-size: 0.85rem;
  color: #777;
  margin-top: -1.2rem;
  margin-bottom: 1.4rem;
}

/* =============================================
   Blog-presentatie v2
   ============================================= */

/* Tegels: max 2 naast elkaar, strak gelijk formaat */
.tiles-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 640px) {
  .tiles-grid { grid-template-columns: 1fr; }
}

.tile img { aspect-ratio: 16 / 9; }

.tile-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 4.2em;
}

/* Blogfoto als paginaheader (volle breedte) */
.article-hero img {
  width: 100%;
  height: clamp(220px, 36vw, 400px);
  object-fit: cover;
  display: block;
}

/* Video: robuust en volle tekstbreedte */
.video-embed {
  aspect-ratio: auto;
  height: 0;
  padding-bottom: 56.25%;
  width: 100%;
}

/* Mini-cards onderaan blogs */
.mini-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

@media (max-width: 600px) {
  .mini-cards { grid-template-columns: 1fr; }
}

.mini-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.9rem 0.6rem 0.6rem;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mini-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px rgba(45, 113, 104, 0.1);
  color: var(--text);
  opacity: 1;
}

.mini-card img {
  width: 92px;
  height: 62px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.mini-card span {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  line-height: 1.3;
}

/* =============================================
   Blog-presentatie v3
   ============================================= */

/* Blogfoto-header: gegarandeerd paginabreed en gecentreerd */
.article-hero {
  width: 100%;
  overflow: hidden;
}

.article-hero img {
  width: 100%;
  max-width: 100%;
  height: clamp(240px, 38vw, 420px);
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0 auto;
}

/* Video: exact tekstbreedte */
.article-body .video-embed {
  width: 100%;
  max-width: 100%;
}

/* Mini-tegels onderaan blogs: foto boven, tekst eronder, max 5 naast elkaar */
.mini-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 0.9rem;
}

.mini-card {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.mini-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 0;
}

.mini-card span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  line-height: 1.3;
  padding: 0.5rem 0.6rem 0.65rem;
  text-align: center;
}
