/* ========================================
   Bakkerij de Gouden Korf - Stylesheet
   ======================================== */

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

:root {
  --cream: #faf6ef;
  --wheat: #8c5a2b;
  --gold: #d9923c;
  --brown: #3a2a1a;
  --light-wheat: #f0e6d6;
  --warm-white: #fdf9f2;
  --border: #e0d5c5;
  --error: #b33a3a;
  --success: #3a7a3a;
  --shadow: 0 2px 12px rgba(58, 42, 26, 0.10);
  --shadow-lg: 0 6px 24px rgba(58, 42, 26, 0.14);
  --radius: 10px;
  --max-w: 1140px;
  --header-h: 72px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--brown);
  background-color: var(--cream);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--wheat);
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); }

p { margin-bottom: 1rem; }

a {
  color: var(--wheat);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
  transition: color 0.2s;
}

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

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

ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* --- Grain Texture Background --- */
.grain-bg {
  position: relative;
}

.grain-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%238c5a2b' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

.grain-bg > * { position: relative; z-index: 1; }

/* --- Header --- */
.site-header {
  background-color: var(--wheat);
  color: var(--cream);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--cream);
  flex-shrink: 0;
}

.logo:hover, .logo:focus { color: var(--gold); }

.logo svg { flex-shrink: 0; }

.logo-text {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.15;
}

.logo-text small {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

/* Main nav */
.main-nav ul {
  display: flex;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  color: var(--cream);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a:focus {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.main-nav a.active {
  background: var(--gold);
  color: var(--brown);
  font-weight: 700;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle svg { width: 28px; height: 28px; display: block; }

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--wheat) 0%, #6b4420 100%);
  color: var(--cream);
  padding: 3.5rem 0 3rem;
  text-align: center;
}

.hero h1 { color: var(--cream); margin-bottom: 0.75rem; }

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 1.5rem;
  opacity: 0.95;
}

.hero-art {
  margin: 2rem auto 0;
  max-width: 560px;
}

.hero-art svg { width: 100%; height: auto; }

/* --- Sections --- */
section { padding: 3rem 0; }

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 { margin-bottom: 0.5rem; }
.section-title p { color: #6b5340; max-width: 560px; margin: 0 auto; }

/* --- Cards Grid --- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.card {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-img {
  width: 100%;
  aspect-ratio: 16/10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-wheat);
  overflow: hidden;
}

.card-img svg { width: 100%; height: 100%; }

.card-body {
  padding: 1.25rem;
}

.card-body h3 { margin-bottom: 0.5rem; }
.card-body p { font-size: 0.95rem; color: #5a4535; }

/* --- Button --- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.75rem;
  border: 2px solid var(--gold);
  background: var(--gold);
  color: var(--brown);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
  font-family: inherit;
}

.btn:hover, .btn:focus {
  background: var(--wheat);
  border-color: var(--wheat);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--gold);
}

.btn-outline:hover, .btn-outline:focus {
  background: var(--gold);
  color: var(--brown);
}

/* --- Features Row (home) --- */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.feature-item {
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature-item svg { margin-bottom: 0.75rem; }
.feature-item h3 { margin-bottom: 0.4rem; }
.feature-item p { font-size: 0.9rem; margin-bottom: 0; }

/* --- Diensten Page --- */
.service-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.service-row:nth-child(even) .service-img { order: -1; }

.service-img {
  background: var(--light-wheat);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-img svg { width: 100%; height: 100%; }

.service-text h3 { margin-bottom: 0.5rem; }
.service-text p { font-size: 0.95rem; color: #5a4535; }

/* --- Over Ons Timeline --- */
.timeline {
  position: relative;
  padding: 1rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  padding-left: 52px;
  margin-bottom: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 6px;
  width: 18px;
  height: 18px;
  background: var(--gold);
  border: 3px solid var(--cream);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--gold);
}

.timeline-year {
  font-family: Georgia, 'Times New Roman', Times, serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.timeline-item p {
  font-size: 0.95rem;
  color: #5a4535;
  margin-bottom: 0;
}

/* --- Contact --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--wheat);
  font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--brown);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 146, 60, 0.2);
}

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

.form-message {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.95rem;
  display: none;
}

.form-message.success {
  display: block;
  background: #e8f5e8;
  color: var(--success);
  border: 1px solid #b5d8b5;
}

.form-message.error {
  display: block;
  background: #fde8e8;
  color: var(--error);
  border: 1px solid #e8b5b5;
}

/* Opening hours */
.opening-hours {
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.opening-hours h3 {
  margin-bottom: 1rem;
  text-align: center;
}

.hours-table {
  width: 100%;
}

.hours-table tr {
  border-bottom: 1px solid var(--border);
}

.hours-table tr:last-child { border-bottom: none; }

.hours-table td {
  padding: 0.55rem 0.5rem;
  font-size: 0.95rem;
}

.hours-table td:first-child {
  font-weight: 600;
  color: var(--wheat);
}

.hours-table td:last-child {
  text-align: right;
  color: #5a4535;
}

.hours-table .closed {
  color: var(--error);
  font-style: italic;
}

/* --- Newsletter --- */
.newsletter {
  background: var(--wheat);
  color: var(--cream);
  padding: 2.5rem 0;
  text-align: center;
}

.newsletter h2 { color: var(--cream); margin-bottom: 0.5rem; }
.newsletter p { opacity: 0.9; margin-bottom: 1.25rem; }

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  max-width: 440px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 1rem;
  border: 2px solid var(--gold);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--brown);
}

.newsletter-form input[type="email"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(217, 146, 60, 0.3);
}

.newsletter-form button {
  padding: 0.65rem 1.5rem;
  background: var(--gold);
  color: var(--brown);
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}

.newsletter-form button:hover { background: #e5a24d; }

.newsletter-message {
  margin-top: 1rem;
  font-size: 0.95rem;
  display: none;
}

.newsletter-message.show { display: block; }

/* --- Footer --- */
.site-footer {
  background: var(--brown);
  color: var(--light-wheat);
  padding-top: 2.5rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  padding-bottom: 2rem;
}

.footer-col h4 {
  color: var(--gold);
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.footer-col p,
.footer-col a,
.footer-col li {
  font-size: 0.9rem;
  color: var(--light-wheat);
}

.footer-col a {
  text-decoration: none;
  display: block;
  padding: 0.2rem 0;
}

.footer-col a:hover { color: var(--gold); }

.footer-col ul li a { padding: 0.25rem 0; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: rgba(240, 230, 214, 0.7);
}

.footer-bottom a {
  color: rgba(240, 230, 214, 0.7);
  text-decoration: none;
  margin-left: 1rem;
}

.footer-bottom a:hover { color: var(--gold); }

/* --- Legal Pages --- */
.legal-page {
  padding: 3rem 0;
}

.legal-page h1 { margin-bottom: 1.5rem; }

.legal-page h2 {
  font-size: 1.25rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-page p,
.legal-page li {
  font-size: 0.95rem;
  color: #5a4535;
}

.legal-page ul {
  padding-left: 1.5rem;
  list-style: disc;
}

.legal-page li { margin-bottom: 0.35rem; }

.last-updated {
  font-style: italic;
  color: #8a7565;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* --- About intro --- */
.about-intro {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 2.5rem;
}

.about-img {
  background: var(--light-wheat);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-img svg { width: 100%; height: 100%; }

.about-text h2 { margin-bottom: 0.75rem; }

/* ========================================
   Responsive Breakpoints
   ======================================== */

/* Tablet: 600px+ */
@media (min-width: 600px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

/* Desktop: 860px+ */
@media (min-width: 860px) {
  .nav-toggle { display: none !important; }

  .main-nav ul {
    display: flex !important;
    gap: 0.25rem;
  }

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

  .hero { padding: 4.5rem 0 4rem; }

  .service-row {
    grid-template-columns: 1fr 1fr;
  }

  .service-row:nth-child(even) .service-img { order: 0; }
  .service-row:nth-child(even) .service-text { order: -1; }

  .about-intro { grid-template-columns: 1fr 1fr; }

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

/* Mobile nav slide */
@media (max-width: 859px) {
  .nav-toggle { display: block; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    right: -100%;
    width: 260px;
    height: calc(100vh - var(--header-h));
    background: var(--wheat);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    transition: right 0.3s ease;
    z-index: 99;
    overflow-y: auto;
  }

  .main-nav.open { right: 0; }

  .main-nav ul {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    gap: 0.25rem;
  }

  .main-nav a {
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
  }

  .nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    top: var(--header-h);
    background: rgba(0, 0, 0, 0.4);
    z-index: 98;
  }

  .nav-overlay.show { display: block; }
}

/* Print */
@media print {
  .site-header, .site-footer, .newsletter, .nav-toggle { display: none; }
  body { background: #fff; }
}
