/* Google Fonts - Outfit */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap");

/* Base styles - inspired by original CMDLWD blog */
:root {
  /* Fonts */
  --font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;

  /* Palette */
  --groen-1: #48b69c;
  --groen-2: #00aa84;
  --rood: #e94553;
  --rood-2: #ea5153;
  --blauw: #0886c5;
  --roze: #dc4793;

  --color-primary: #fe49b0;
  --color-background: var(--groen-1); /* Initial state */
  --color-text: #ffffff; /* Reverting to white because these bg colors are dark/vibrant */
  --color-text-secondary: rgba(255, 255, 255, 0.85);
  --color-link: #ffffff;
  --color-link-hover: rgba(255, 255, 255, 0.8);
  
  --max-width: 750px;
  --spacing: 2rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.7;
  /* Ensure content sits above the background layers */
  position: relative; 
  z-index: 1;
}

/* Background Animation Layers */
.bg-layer-base {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background-color: var(--color-background);
  transition: background-color 0s; /* Instant switch after wipe */
}

.bg-layer-wipe {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  z-index: -1;
  background-color: transparent;
  /* Transition handled in JS or via class toggles */
}

a {
  color: var(--color-link);
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

a:hover {
  opacity: 0.8;
}

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

h1, h2, h3, h4, h5, h6 {
  line-height: 1.1;
  margin-bottom: 1rem;
  font-weight: 400; /* Not bold */
}

/* Headings increased significantly */
h1 { font-size: 5.5rem; }
h2 { font-size: 3.5rem; margin-top: 2rem; }
h3 { font-size: 2.75rem; margin-top: 1.5rem; }
h4 { font-size: 2.25rem; }
h5 { font-size: 1.75rem; }
h6 { font-size: 1.5rem; }

p {
  margin-bottom: 1.5rem;
  font-size: 2rem; /* Global minimum */
  line-height: 1.5; /* Slightly tighter line height for large text */
  max-width: 160ch; /* Limit width for readability */
}

/* Site structure */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.site-branding .logo-link {
  display: block;
}

.site-branding .logo {
  width: 80px;
  height: auto;
}

.primary-navigation .menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.primary-navigation a {
  text-decoration: none;
  font-weight: 500;
}

.primary-navigation a:hover {
  text-decoration: underline;
}

/* Main content */
.site-content {
  flex: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing);
  width: 100%;
}

/* Homepage specific styles */
.home-intro {
  max-width: 1400px; /* Significantly increased width container */
  margin: 0 0 5rem 0; 
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}

.intro-content > * {
  opacity: 0; /* Start hidden for animation */
  animation: jazz-enter 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Stagger delays */
.intro-content > *:nth-child(1) { animation-delay: 0.1s; }
.intro-content > *:nth-child(2) { animation-delay: 0.2s; }
.intro-content > *:nth-child(3) { animation-delay: 0.3s; }
.intro-content > *:nth-child(4) { animation-delay: 0.4s; }
.intro-content > *:nth-child(5) { animation-delay: 0.5s; }
.intro-content > *:nth-child(6) { animation-delay: 0.6s; }
.intro-content > .intro-links { animation-delay: 0.8s; }

@keyframes jazz-enter {
  0% {
    opacity: 0;
    transform: translateY(60px) skewY(3deg) scale(0.95);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) skewY(0) scale(1);
    filter: blur(0);
  }
}

.intro-lead {
  font-size: 2.8rem; /* Scaled up relative to 2rem body */
  margin-bottom: 2rem;
  line-height: 1.3;
  max-width: 160ch;
}

.intro-links {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start; /* Ensure links align left */
}

.intro-links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--color-link);
  font-size: 2rem; /* Matches p size */
  position: relative;
  transition: transform 0.2s;
  display: inline-block;
}

.intro-links a:hover {
  text-decoration: none;
  transform: translateX(10px); /* Jazzy hover movement */
}

/* Add a line/arrow before links */
.intro-links a::before {
  content: '';
  display: inline-block;
  width: 0;
  height: 2px;
  background: currentColor;
  vertical-align: middle;
  margin-right: 0;
  transition: width 0.2s, margin-right 0.2s;
}

.intro-links a:hover::before {
  width: 20px;
  margin-right: 10px;
}

.home-stories {
  margin-top: 4rem;
}

.section-header {
  margin-bottom: 2rem;
  text-align: left;
}

.section-title {
  font-size: 4rem; /* Further increased */
  margin-bottom: 0.5rem;
}

.section-description {
  color: var(--color-text-secondary);
}

/* Post list */
.posts-list {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.post-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

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

.post-card a {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
}

.post-card-image-wrapper {
  aspect-ratio: 16/9;
  overflow: hidden;
  background-color: rgba(255,255,255,0.05);
}

.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card-image {
  transform: scale(1.05);
}

.post-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-title {
  font-size: 2rem; /* Further increased */
  margin-bottom: 0.75rem;
  font-weight: 400;
  line-height: 1.2;
}

.post-card-meta {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
}

.post-card-excerpt {
  color: var(--color-text-secondary);
  font-size: 1.25rem; /* Exception: Card excerpts slightly smaller than 2rem to fit */
  line-height: 1.5;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 768px) {
  .posts-list {
    grid-template-columns: 1fr;
  }
}

/* Single post */
.post {
  max-width: var(--max-width);
  margin: 0 auto;
}

.post-header {
  margin-bottom: 2rem;
}

.post-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.post-meta {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 1.5rem;
}

.post-meta time {
  text-transform: capitalize;
}

.post-meta .author {
  margin-left: 1rem;
}

.post-thumbnail {
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
}

.post-thumbnail img {
  width: 100%;
}

.intro-content {
  max-width: 160ch; /* Ensure readable line length */
}

.intro-text {
  font-size: 2rem; /* Matches global p */
  line-height: 1.5;
  max-width: 160ch; 
}

.post-content {
  font-size: 2rem; /* Matches global p */
  line-height: 1.5;
}

.post-content p {
  max-width: 160ch; /* Consistent readability constraint */
}

.about-content {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 2rem; /* Matches global p */
}

.post-content {
  font-size: 1.8rem; /* Increased from 1.5rem */
  line-height: 1.6;
}

.about-content {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 1.8rem; /* Increased from 1.5rem */
}

.post-content {
  font-size: 1.5rem; /* Increased from 1.1rem */
  line-height: 1.6;
}

.post-content p {
  max-width: 65ch; /* Readability constraint */
}

.about-content {
  max-width: var(--max-width);
  margin: 0 auto;
  font-size: 1.5rem; /* Match the new standard */
}

.post-content img {
  margin: 2rem 0;
  border-radius: 8px;
}

.post-content blockquote {
  background: rgba(28, 0, 107, 0.2);
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
  font-style: italic;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.back-link {
  font-weight: 500;
}

/* Page header */
.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2.5rem;
}

.page-description {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Footer */
.site-footer {
  padding: var(--spacing);
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem; /* Increased gap */
  text-align: center;
  font-size: 1.5rem; /* Increased base font size for footer */
}

.footer-navigation {
  display: flex;
  gap: 2rem; /* Increased gap */
}

.footer-navigation a {
  text-decoration: none;
}

.copyright {
  font-size: 1.1rem; /* Increased from 0.875rem */
  opacity: 0.8;
}

/* Footer Language Switcher */
.lang-switch-footer {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin: 1rem 0;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  backdrop-filter: blur(5px);
}

.lang-option {
  text-decoration: none;
  color: var(--color-text);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.6;
  transition: opacity 0.2s, transform 0.2s;
}

.lang-option:hover {
  opacity: 1;
  text-decoration: none;
  transform: scale(1.05);
}

.lang-option.active {
  opacity: 1;
  font-weight: 700;
  cursor: default;
}

/* Flag icons provided by 'flag-icons' css usually, or just emojis if no library */
/* Since we don't have the library installed, we rely on the unicode emojis in the HTML */
.fi {
  font-size: 1.5rem;
  line-height: 1;
}

/* About page */
.about-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --spacing: 1rem;
  }
  
  html {
    font-size: 14px; /* Slightly reduce base font size */
  }

  body {
    font-size: 1.1rem; /* Reset body font size for mobile to be readable but not huge */
  }
  
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 2rem; }

  p, .intro-lead, .intro-text, .post-content, .about-content {
    font-size: 1.25rem; /* readable mobile text size */
    max-width: 100%;
  }

  .site-header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .primary-navigation .menu {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .intro-lead {
      font-size: 1.8rem;
  }

  .intro-links a {
      font-size: 1.4rem;
  }
  
  .posts-list {
    grid-template-columns: 1fr;
  }
  
  .post-card-title {
      font-size: 1.5rem;
  }

  .home-intro {
      margin-bottom: 2rem;
  }
}

/* Utility classes */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Drop cap style from original */
.dropcap {
  font-size: 5.5rem;
  float: left;
  line-height: 1;
  margin-right: 0.05em;
}

/* Color Picker Styles */
.color-picker-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.color-picker-toggle {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid white;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, background 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.color-picker-toggle:hover {
  transform: scale(1.1);
  background: rgba(0, 0, 0, 0.6);
}

.color-picker-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1rem;
  border-radius: 25px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  border: 1px solid rgba(255,255,255,0.2);
}

.color-picker-container.open .color-picker-options {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.color-option {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s;
  padding: 0;
}

.color-option:hover {
  transform: scale(1.2);
  border-color: white;
}

.color-option.active {
  border-color: white;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.3);
  transform: scale(1.1);
}

/* Event Popup */
.event-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.event-popup-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.event-popup-content {
  position: relative;
  background: white;
  padding: 0;
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transform: translateY(50px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.event-popup-overlay.visible .event-popup-content {
  transform: translateY(0) scale(1);
}

.event-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-popup-close:hover {
  background: rgba(0,0,0,0.8);
  transform: scale(1.1);
}

.event-popup-image {
  width: 100%;
  height: auto;
  display: block;
}

.event-popup-info {
  padding: 1.5rem;
  background: #fff;
  color: #333;
  text-align: center;
}

.event-popup-title {
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  font-weight: 700;
  line-height: 1.2;
}

.event-popup-date {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #333;
}

.event-popup-link {
  display: inline-block;
  background: var(--color-primary);
  color: white;
  text-decoration: none;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.25rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.event-popup-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(254, 73, 176, 0.4);
  color: white;
  opacity: 1;
}
