/* ==========================================================================
   Muziekschool Utrecht — front page
   Tokens: white background, warm off-white surfaces, near-black ink text
   Accents: green #27ae60, terracotta #dc6f42, violet #6147d8
   Dark "ink" bands (hero photo, news photo, footer) use the -on-dark tokens
   ========================================================================== */

:root {
  --bg: #ffffff;
  --surface: #f7f5f0;
  --surface-2: #efeae1;
  --ink: #1c1927;
  --text: #201c2b;
  --text-on-dark: #f6f3ee;
  --muted: #6b6478;
  --muted-on-dark: #b3abc4;
  --green: #27ae60;
  --green-dim: #219653;
  --terracotta: #dc6f42;
  --terracotta-dim: #b85933;
  --violet: #6147d8;
  --violet-dim: #4c35ab;
  --line: rgba(32, 28, 43, 0.12);
  --line-on-dark: rgba(246, 243, 238, 0.14);
  --radius: 3px;
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Work Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  text-transform: uppercase;
}

h3 {
  font-size: 1.3rem;
  font-weight: 500;
}

p { margin: 0 0 1em; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Page Header & Breadcrumbs */
.page-header {
  background-color: var(--surface, #f4f4f6);
  padding: 40px 0 30px;
  border-bottom: 1px solid var(--line, #e2e8f0);
}

.page-header h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 2.5rem;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  color: var(--ink, #111);
}

.breadcrumb {
  font-size: 0.9rem;
  color: #666;
}

.breadcrumb a {
  color: var(--ink, #111);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.page-section {
  padding: 50px 0;
}

.hero-subpage {
  background-size: cover;
  background-position: center;
  color: #ffffff;
  padding: 100px 0 80px 0;
  text-align: center;
}

.hero-subpage h1 {
  font-family: 'Oswald', sans-serif;
  font-size: 3rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 1.25rem;
  max-width: 700px;
  margin: 0 auto 28px auto;
  line-height: 1.5;
  color: #f0f0f0;
}

.breadcrumb-bar {
  background-color: #f8f9fa;
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
}

.lead-text {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #333333;
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-block;
  padding: 0.85em 1.8em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

/* Groene "Gratis proefles" knoppen */
.btn-accent {
  background: var(--green);
  color: #fff;
}

.btn-accent:hover { background: var(--green-dim); }

.btn-lg {
  font-size: 1.05rem;
  padding: 1em 2.2em;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.logo img {
  height: 48px;
  width: auto;
}

.main-nav {
  flex: 1;
}

.main-nav > ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav > ul > li > a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  padding: 8px 0;
}

.main-nav > ul > li > a:hover { color: var(--green); }

.has-sub {
  position: relative;
}

.sub-nav {
  list-style: none;
  margin: 0;
  padding: 8px 0;
  position: absolute;
  top: 100%;
  left: -16px;
  min-width: 190px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 24px rgba(32, 28, 43, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.has-sub:hover .sub-nav,
.has-sub:focus-within .sub-nav {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-nav a {
  display: block;
  padding: 8px 18px;
  font-size: 0.9rem;
  color: var(--muted);
}

.sub-nav a:hover { color: var(--text); background: var(--surface); }

.header-cta {
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

/* Submenu toggle knop voor mobiel */
.submenu-toggle {
  display: none;
}

/* Hero --------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(28,25,39,0.96) 10%, rgba(28,25,39,0.55) 55%, rgba(97,71,216,0.35) 100%);
}

.hero-inner {
  position: relative;
  padding-top: 80px;
  padding-bottom: 80px;
}

.hero h1 {
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  margin-bottom: 0.5em;
  text-transform: uppercase;
  color: var(--text-on-dark);
}

.hero h1 span { color: var(--terracotta); }

/* Promo strip ---------------------------------------------------------------- */

.promo-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.promo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}

.promo-card {
  display: flex;
  flex-direction: column;
  padding: 40px 32px;
  border-left: 3px solid var(--green);
}

.promo-card:nth-child(2) { border-left-color: var(--violet); }
.promo-card:nth-child(3) { border-left-color: var(--terracotta); }

.promo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background-color: var(--surface-2);
  color: var(--ink);
  margin-bottom: 1.25rem;
}

.promo-icon svg {
  width: 28px;
  height: 28px;
}

.promo-eyebrow {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.6em;
}

.promo-card h3 { margin-bottom: 0.5em; }
.promo-card h3 a:hover { color: var(--green); }
.promo-card p { color: var(--muted); font-size: 0.95rem; }
.promo-card p a { color: var(--green); font-weight: 600; }
.promo-card p a:hover { color: var(--violet); }

/* Intro ---------------------------------------------------------------------- */

.intro {
  padding: 96px 0;
}

.intro-inner {
  max-width: 760px;
}

.intro p {
  color: var(--muted);
  font-size: 1.05rem;
}

/* Instrument grid -------------------------------------------------------------- */

.instruments {
  padding: 0 0 100px;
}

.instrument-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 40px;
}

.instrument-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.instrument-image {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.instrument-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: grayscale(15%);
}

.instrument-card:hover .instrument-image img {
  transform: scale(1.06);
  filter: grayscale(0%);
}

.instrument-card h3 {
  padding: 20px 20px 4px;
  font-size: 1.15rem;
}

.instrument-card h3 a:hover { color: var(--green); }

.instrument-card .link-more {
  display: block;
  padding: 0 20px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--violet);
}

.instrument-card .link-more:hover { color: var(--green); }

/* Instrument Card Styling Verbeteringen */
.instrument-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
}

.instrument-card {
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: var(--radius, 12px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.instrument-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.instrument-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: var(--surface, #f4f4f6);
}

.instrument-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.instrument-card:hover .instrument-image img {
  transform: scale(1.04);
}

/* De body van de card met ruimere padding */
.instrument-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.instrument-card h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.5rem;
  margin: 0 0 12px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.instrument-card h3 a {
  color: var(--ink, #111111);
  text-decoration: none;
}

.instrument-card p {
  color: #555555;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 20px 0;
  flex-grow: 1; /* Dwt de 'Meer Info' knop naar de onderkant */
}

.instrument-card .link-more {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--accent, #e63946);
  text-decoration: none;
  font-size: 0.95rem;
  margin-top: auto;
}

.instrument-card .link-more:hover {
  text-decoration: underline;
}

/* News --------------------------------------------------------------------- */

.news {
  position: relative;
  padding: 100px 0;
  overflow: hidden;
}

.news-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28,25,39,0.94) 0%, rgba(28,25,39,0.88) 100%);
}

.news .wrap { position: relative; }

.news h2 { color: var(--text-on-dark); }

.news-sub { color: var(--muted-on-dark); margin-bottom: 2.2em; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.news-card {
  background: rgba(246, 243, 238, 0.08);
  border: 1px solid var(--line-on-dark);
  border-radius: var(--radius);
  padding: 32px;
}

.news-meta {
  color: var(--muted-on-dark);
  font-size: 0.85rem;
  margin-bottom: 0.8em;
}

.news-card h3 { margin-bottom: 0.6em; color: var(--text-on-dark); }
.news-card h3 a:hover { color: var(--green); }
.news-card p { color: var(--muted-on-dark); font-size: 0.95rem; }

.link-more {
  color: var(--green);
  font-weight: 600;
  font-size: 0.9rem;
}

.link-more:hover { color: var(--violet); }

.news .link-more { color: #82e0aa; }
.news .link-more:hover { color: var(--text-on-dark); }

/* Newsletter ----------------------------------------------------------------- */

.newsletter {
  background: var(--violet);
  padding: 72px 0;
}

.newsletter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}

.newsletter-text { max-width: 480px; }
.newsletter-text h2 { margin-bottom: 0.35em; color: var(--text-on-dark); }
.newsletter-text p { color: rgba(246, 243, 238, 0.85); margin: 0; }

.newsletter-form { flex: 1; min-width: 280px; max-width: 420px; }

.newsletter-form label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: rgba(246, 243, 238, 0.85);
}

.newsletter-row {
  display: flex;
  gap: 10px;
}

.newsletter-row input {
  flex: 1;
  padding: 0.85em 1em;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--bg);
  color: var(--text);
}

.newsletter-row input::placeholder { color: var(--muted); }

.honeypot-note {
  font-size: 0.75rem;
  color: rgba(246, 243, 238, 0.6);
  margin-top: 10px;
  margin-bottom: 0;
}

/* Contact form ----------------------------------------------------------------- */

.contact-form {
  padding: 100px 0;
}

.contact-inner {
  max-width: 620px;
}

.contact-form h2 { margin-bottom: 0.9em; }

.form-row { margin-bottom: 20px; }

.form-row label {
  display: block;
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.85em 1em;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  resize: vertical;
}

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

/* Footer ------------------------------------------------------------------------ */

.site-footer {
  background: var(--ink);
  color: var(--text-on-dark);
  padding: 72px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--muted-on-dark);
  margin-bottom: 0.6em;
  margin-top: 1.2em;
}

.footer-col h4:first-child { margin-top: 0; }

.footer-col p { margin-bottom: 0; }

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

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

.footer-list li { margin-bottom: 8px; }

.footer-note,
.footer-copy {
  color: var(--muted-on-dark);
  font-size: 0.85rem;
  border-top: 1px solid var(--line-on-dark);
  padding-top: 24px;
  margin: 0 auto;
}

.footer-copy { padding-top: 12px; border-top: none; }
.footer-copy a { color: var(--green); }

/* Responsive ---------------------------------------------------------------------- */

@media (max-width: 980px) {
  .instrument-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-grid { grid-template-columns: 1fr; }
  .promo-card { border-left: none; border-top: 3px solid var(--green); }
  .promo-card:nth-child(2) { border-top-color: var(--violet); }
  .promo-card:nth-child(3) { border-top-color: var(--terracotta); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .main-nav {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--bg);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    padding: 24px;
  }

  .main-nav.is-open { transform: translateX(0); }

  .main-nav > ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav > ul > li {
    position: relative;
    border-bottom: 1px solid var(--line);
  }

  .main-nav > ul > li > a {
    display: block;
    padding: 14px 0;
    font-size: 1.1rem;
  }

  /* Mobiel Submenu */
  .has-sub:hover .sub-nav,
  .has-sub:focus-within .sub-nav {
    display: none; /* Uitschakelen van hover op mobiel */
  }

  .sub-nav {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    background: none;
    box-shadow: none;
    padding: 0 0 12px 16px;
    display: none;
  }

  .has-sub.is-active > .sub-nav {
    display: block;
  }

  .submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0;
    top: 8px;
    background: none;
    border: none;
    font-size: 1.2rem;
    padding: 8px 12px;
    cursor: pointer;
    color: var(--text);
  }

  .submenu-toggle::after {
    content: '▾';
    display: inline-block;
    transition: transform 0.2s ease;
  }

  .has-sub.is-active > .submenu-toggle::after {
    transform: rotate(180deg);
  }

  .header-cta { display: none; }
  .nav-toggle { display: flex; }

  .news-grid { grid-template-columns: 1fr; }
  .newsletter-inner { flex-direction: column; align-items: flex-start; }
}

/* Responsive / Mobiel menu ---------------------------------------------------- */

@media (max-width: 860px) {
  /* Zorg dat de header-inner logo en hamburger netjes aan de randen plaatst */
  .header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  /* Verberg de desktop "Gratis proefles" knop in de header */
  .header-cta { 
    display: none; 
  }

  /* Hamburger-knop rechts uitlijnen */
  .nav-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: auto;
    padding: 8px;
    z-index: 1001; /* Blijft ALTIJD boven het geopende menu zweven */
    position: relative;
  }

  /* De 3 streepjes van het hamburger icoon */
  .nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--ink);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  /* Animatie naar Kruisje (X) wanneer het menu open is */
  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Het volledige schermvullende mobiele menu */
  .main-nav {
    position: fixed;
    inset: 0; /* Beslaat het hele scherm (top:0, right:0, bottom:0, left:0) */
    width: 100vw;
    height: 100vh;
    background: #ffffff; /* Scherpe witte achtergrond */
    padding: 90px 24px 40px;
    transform: translateX(100%); /* Standaard buiten beeld rechts */
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    z-index: 1000; /* Hoge z-index zodat niks eroverheen valt */
  }

  /* Wanneer het menu de klasse .is-open krijgt via JavaScript */
  .main-nav.is-open {
    transform: translateX(0) !important;
  }

  .main-nav > ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .main-nav > ul > li {
    position: relative;
    border-bottom: 1px solid var(--line);
    width: 100%;
  }

  .main-nav > ul > li > a {
    display: block;
    padding: 16px 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--ink);
  }

  /* Submenu instellingen op mobiel */
  .has-sub:hover .sub-nav,
  .has-sub:focus-within .sub-nav {
    display: none; /* Schakel hover uit op touchscreens */
  }

  .sub-nav {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    border: none;
    background: var(--surface);
    box-shadow: none;
    padding: 8px 16px;
    margin: 0 0 12px 0;
    border-radius: var(--radius);
    display: none; /* Standaard ingeklapt */
  }

  /* Wanneer de categorie wordt aangeklikt klapt het submenu open */
  .has-sub.is-active > .sub-nav {
    display: block !important;
  }

  .sub-nav a {
    display: block;
    padding: 10px 0;
    font-size: 1rem;
    color: var(--text);
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }

  .sub-nav li:last-child a {
    border-bottom: none;
  }

  /* Het uitklap-pijltje (knopje) naast Muzieklessen en Contact */
  .submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    right: 0;
    top: 10px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--ink);
    z-index: 2;
  }

  .submenu-toggle::after {
    content: '▾';
    display: inline-block;
    transition: transform 0.2s ease;
  }

  .has-sub.is-active > .submenu-toggle::after {
    transform: rotate(180deg);
  }

  /* Grid en layout aanpassingen voor mobiel */
  .news-grid { grid-template-columns: 1fr; }
  .newsletter-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 600px) {
  .instrument-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .newsletter-row { flex-direction: column; }
  .hero { min-height: 45vh; }
}