/* ============================================
   AP Kerk Moot Sentraal — Redesigned Stylesheet
   Aesthetic: Warm, reverent, refined — earthy 
   tones with gold accents, classic serif type
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Source+Sans+3:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* --- CSS Variables --- */
:root {
  --clr-bg:        #faf8f4;
  --clr-bg-alt:    #f0ece4;
  --clr-surface:   #ffffff;
  --clr-text:      #2c2418;
  --clr-text-mid:  #5c4f3d;
  --clr-text-light:#8a7e6d;
  --clr-primary:   #6b4226;
  --clr-primary-light: #8b6240;
  --clr-accent:    #b8860b;
  --clr-accent-light: #d4a940;
  --clr-border:    #d9d2c7;
  --clr-hero-overlay: rgba(30, 18, 8, 0.55);

  --ff-display: 'Cormorant Garamond', Georgia, serif;
  --ff-body:    'Source Sans 3', 'Segoe UI', sans-serif;

  --max-w:      1200px;
  --header-h:   80px;
  --radius:     6px;
  --shadow-sm:  0 1px 3px rgba(44,36,24,0.08);
  --shadow-md:  0 4px 16px rgba(44,36,24,0.10);
  --shadow-lg:  0 8px 32px rgba(44,36,24,0.12);
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  font-size: 16px;
}

body {
  font-family: var(--ff-body);
  color: var(--clr-text);
  background: var(--clr-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--clr-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--clr-accent); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-display);
  color: var(--clr-primary);
  font-weight: 600;
  line-height: 1.25;
}

/* --- Utility --- */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* --- Top Bar --- */
.top-bar {
  background: var(--clr-primary);
  color: rgba(255,255,255,0.85);
  font-size: 0.82rem;
  padding: 0.4rem 0;
  letter-spacing: 0.02em;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.top-bar a { color: var(--clr-accent-light); }
.top-bar a:hover { color: #fff; }

/* --- Header / Navigation --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--clr-accent);
}
.site-logo-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.site-logo-text span {
  font-size: 0.75rem;
  color: var(--clr-text-light);
  font-family: var(--ff-body);
  font-weight: 400;
}

/* Main Nav */
.main-nav { display: flex; align-items: center; }
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0;
}
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: block;
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
  color: var(--clr-primary);
  background: var(--clr-bg-alt);
}

/* Dropdown */
.main-nav .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s ease;
  z-index: 100;
  padding: 0.35rem 0;
}
.main-nav li:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  color: var(--clr-text-mid);
}
.dropdown-menu a:hover {
  background: var(--clr-bg-alt);
  color: var(--clr-primary);
}

/* Mobile Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  margin: 5px 0;
  transition: all var(--transition);
  border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--clr-primary);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--clr-hero-overlay);
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 2rem 1.5rem;
  max-width: 700px;
}
.hero-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: #fff;
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.hero-content .hero-sub {
  font-family: var(--ff-display);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-style: italic;
  color: rgba(255,255,255,0.88);
  margin-bottom: 1.8rem;
  font-weight: 400;
}
.hero-content .hero-tagline {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 2rem;
}

/* Gold divider */
.gold-divider {
  width: 80px;
  height: 3px;
  background: var(--clr-accent);
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

/* CTA Button */
.btn {
  display: inline-block;
  padding: 0.75rem 1.8rem;
  border-radius: var(--radius);
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--clr-accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--clr-accent-light);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(184,134,11,0.3);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.5);
}
.btn-outline:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.btn-sm { padding: 0.5rem 1.2rem; font-size: 0.82rem; }

/* --- Section Layout --- */
.section {
  padding: 4rem 0;
}
.section-alt {
  background: var(--clr-bg-alt);
}
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.5rem;
}
.section-header p {
  color: var(--clr-text-mid);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1rem;
}

/* --- Card System --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}
.card {
  background: var(--clr-surface);
  border-radius: var(--radius);
  border: 1px solid var(--clr-border);
  padding: 2rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}
.card p {
  color: var(--clr-text-mid);
  font-size: 0.92rem;
}
.card-icon {
  width: 48px;
  height: 48px;
  background: var(--clr-bg-alt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: var(--clr-accent);
}

/* --- Content Sections --- */
.content-block {
  max-width: 800px;
  margin: 0 auto;
}
.content-block h2 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}
.content-block h3 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.content-block p {
  margin-bottom: 1rem;
  color: var(--clr-text-mid);
}
.content-block ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.content-block ul li {
  margin-bottom: 0.4rem;
  color: var(--clr-text-mid);
}
.content-block strong { color: var(--clr-text); }
.content-block em { color: var(--clr-text-mid); }

/* Blockquote style for scripture */
.scripture {
  border-left: 3px solid var(--clr-accent);
  padding: 1rem 1.5rem;
  background: var(--clr-bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--clr-text-mid);
}

/* --- Leraar / Profile --- */
.profile-section {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  align-items: start;
}
.profile-img {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--clr-border);
}
.profile-img img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.profile-details dt {
  font-weight: 600;
  color: var(--clr-primary);
  font-size: 0.88rem;
  margin-top: 1rem;
  font-style: italic;
}
.profile-details dd {
  color: var(--clr-text-mid);
  margin-left: 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--clr-border);
}

/* --- Contact Info --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.contact-card {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}
.contact-card h4 {
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--clr-primary);
  margin-bottom: 0.5rem;
}
.contact-card p {
  color: var(--clr-text-mid);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
}

/* --- Almanak / PDF Embed --- */
.almanak-embed {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 1.5rem 0;
}
.almanak-embed object,
.almanak-embed iframe {
  width: 100%;
  height: 600px;
  border: none;
}
.almanak-actions {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--clr-bg-alt);
  border-top: 1px solid var(--clr-border);
}
.almanak-actions span {
  font-weight: 600;
  color: var(--clr-primary);
  font-family: var(--ff-display);
}

/* --- Bank Details --- */
.bank-box {
  background: var(--clr-surface);
  border: 2px solid var(--clr-accent);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 450px;
  margin: 1.5rem auto;
  text-align: center;
}
.bank-box h3 {
  margin-bottom: 1rem;
  color: var(--clr-accent);
}
.bank-box p {
  font-size: 1rem;
  color: var(--clr-text);
  margin: 0;
  line-height: 1.8;
}

/* --- Image Gallery (for uploaded images) --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--clr-border);
  cursor: pointer;
  transition: all var(--transition);
}
.gallery-item:hover {
  box-shadow: var(--shadow-md);
  transform: scale(1.02);
}
.gallery-item img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.9);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90%;
  max-height: 85vh;
  border-radius: var(--radius);
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
}
.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* --- Footer --- */
.site-footer {
  background: var(--clr-primary);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  color: var(--clr-accent-light);
  font-family: var(--ff-display);
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
}
.footer-col p, .footer-col a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}
.footer-col a:hover { color: var(--clr-accent-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}

/* Social icons */
.social-links { display: flex; gap: 0.75rem; margin-top: 0.5rem; }
.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  transition: all var(--transition);
}
.social-links a:hover {
  background: var(--clr-accent);
  color: #fff;
}

/* --- Admin Upload Section (for image/almanak management) --- */
.admin-panel {
  background: var(--clr-surface);
  border: 2px dashed var(--clr-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 2rem 0;
  text-align: center;
}
.admin-panel h3 {
  margin-bottom: 1rem;
}
.upload-zone {
  background: var(--clr-bg-alt);
  border: 2px dashed var(--clr-border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 1rem 0;
  cursor: pointer;
  transition: all var(--transition);
}
.upload-zone:hover {
  border-color: var(--clr-accent);
  background: #fdf8ee;
}
.upload-zone p { color: var(--clr-text-light); margin: 0; }

.form-group { margin-bottom: 1rem; text-align: left; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.3rem;
  color: var(--clr-text);
}
.form-group input[type="file"],
.form-group input[type="text"],
.form-group select {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  font-family: var(--ff-body);
  font-size: 0.9rem;
  background: var(--clr-bg);
}
.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--clr-accent);
  box-shadow: 0 0 0 3px rgba(184,134,11,0.15);
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error { background: #fbe9e7; color: #c62828; border: 1px solid #ef9a9a; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .profile-section {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .profile-img { max-width: 280px; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--clr-surface);
    border-bottom: 1px solid var(--clr-border);
    box-shadow: var(--shadow-md);
    padding: 1rem 0;
  }
  .main-nav.open ul { display: flex; }
  .main-nav > ul > li > a { padding: 0.75rem 1.5rem; }
  .main-nav .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    background: var(--clr-bg-alt);
  }
  .hero { min-height: 50vh; }
  .section { padding: 2.5rem 0; }
  .card-grid { grid-template-columns: 1fr; }
  .top-bar .container { font-size: 0.75rem; }
}

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}
.fade-in-d1 { animation-delay: 0.1s; }
.fade-in-d2 { animation-delay: 0.2s; }
.fade-in-d3 { animation-delay: 0.3s; }
.fade-in-d4 { animation-delay: 0.4s; }

/* Cross / decorative element */
.cross-icon::before {
  content: '✝';
  color: var(--clr-accent);
}
