/*
Theme Name: Stichting Single Page
Theme URI: https://stichting.rubenbeuker.com/
Author: Ruben Beuker
Author URI: https://rubenbeuker.com/
Description: Single page theme for Stichting Jongerendebat en Samenleving
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stichting-single-page
*/

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;900&display=swap');

/* CSS Variables */
:root {
  --c-blue: #00529B; /* A strong, professional blue */
  --c-green: #2E7D32; /* A deeper, more corporate green */
  --c-orange: #F57C00; /* A rich, warm orange */
  --c-gray: #F5F7FA; /* A very light, clean gray */
  --c-white: #FFFFFF;
  --c-text: #212121; /* Dark gray for better contrast */
  --c-text-secondary: #757575; /* Standard secondary text color */
}

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

body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  background-color: var(--c-gray);
  color: var(--c-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: var(--c-blue);
}

/* Container */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Layout */
.layout-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  border-bottom: 1px solid #e5e7eb;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 1rem 2.5rem;
  backdrop-filter: blur(4px);
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  order: 1;
}

.site-logo {
  color: var(--c-blue);
  width: auto; /* Allow container to adapt to image width */
  height: 3.5rem;
  flex-shrink: 0;
}

.site-logo .custom-logo {
    max-height: 100%;
    width: auto;
    height: auto;
}

.site-title {
  color: var(--c-blue);
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.025em;
}

.site-title a {
    color: inherit; /* Inherit color from .site-title */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.site-title a:hover {
    color: var(--c-orange);
}

/* Navigation */
.main-navigation {
  display: flex;
  align-items: center;
  gap: 0;
  order: 2;
}

.main-navigation ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

.main-navigation .menu-item {
  position: relative;
  padding: 0 1.5rem;
}

.main-navigation .menu-item:not(:last-child)::after {
  content: "|";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #d1d5db;
  font-size: 1rem;
}

.main-navigation a {
  color: #4b5563;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem 0;
  transition: color 0.15s ease-in-out;
}

.main-navigation a:hover {
  color: var(--c-blue);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  height: 2.75rem;
  padding: 0 1.5rem;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 10px rgba(0,0,0,0.15);
}

.btn-primary {
  background-color: var(--c-orange);
  color: var(--c-white);
}

.btn-primary:hover {
  background-color: #E65100; /* Darker orange */
}

.btn-secondary {
  background-color: var(--c-green);
  color: var(--c-white);
}

.btn-secondary:hover {
  background-color: #1B5E20; /* Darker green */
}

.btn-outline {
  background-color: transparent;
  border: 1px solid #d1d5db;
  color: #374151;
}

.btn-outline:hover {
  background-color: #f3f4f6;
}

/* Header Actions */
.header-actions {
  display: flex;
  gap: 0.75rem;
  order: 3;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--c-blue);
  color: var(--c-white);
  padding: 5rem 0;
  overflow: hidden; /* Hide video overflow */
}

.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

#hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    visibility: hidden;
}

#hero-video.loaded {
    opacity: 1;
    visibility: visible;
}

.hero-video-wrapper iframe,
.hero-video-wrapper video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%);
    pointer-events: none;
    min-width: 100%;
    min-height: 100%;
    border: none;
    outline: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    visibility: hidden;
}

.hero-video-wrapper iframe.loaded,
.hero-video-wrapper video.loaded {
    opacity: 1;
    visibility: visible;
}

.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(10, 42, 67, 0.5), rgba(10, 42, 67, 0.7));
    z-index: 2;
    pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 64rem;
  position: relative; /* Ensure content is on top of video */
  z-index: 2;
}

.hero-title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--c-white);
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 4.5rem;
  }
}

.hero-description {
  font-size: 1.125rem;
  color: #e5e7eb;
  max-width: 32rem;
  margin: 0 auto 2rem;
}

@media (min-width: 768px) {
  .hero-description {
    font-size: 1.25rem;
  }
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* Section Styles */
section {
  padding: 6rem 1rem;
}

.section-gray {
  background-color: var(--c-gray);
}

.section-white {
  background-color: var(--c-white);
}

.section-title {
  font-size: 2.25rem;
  font-weight: 900;
  text-align: center;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 3rem;
  }
}

.section-description {
  font-size: 1.125rem;
  color: var(--c-text-secondary);
  text-align: center;
  max-width: 48rem;
  margin: 0 auto 3rem;
}

/* Grid System */
.grid {
  display: grid;
  gap: 3rem;
}

.grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.grid-3 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Board Section */
.board-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .board-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.board-member {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.board-member-image {
  width: 10rem;
  height: 10rem;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.board-member h3 {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.board-member-role {
  color: var(--c-green);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Donation Section */
.donation-section {
  background-color: var(--c-white);
}

.donation-box {
  max-width: 64rem;
  margin: 0 auto;
  background-color: var(--c-blue);
  border-radius: 0.75rem;
  padding: 3rem;
  color: var(--c-white);
  text-align: center;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
  .donation-box {
    padding: 4rem;
  }
}

.donation-box h2 {
  color: var(--c-white);
  margin-bottom: 1rem;
}

.donation-box p {
  color: #d1d5db;
  max-width: 36rem;
  margin: 0 auto 2rem;
}

.donation-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.donation-amount-btn {
  width: 8rem;
  height: 4rem;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--c-white);
  border: none;
  border-radius: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.donation-amount-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.donation-amount-btn:focus {
  outline: none;
  ring: 2px solid var(--c-orange);
  ring-offset: 2px solid var(--c-blue);
}

.donation-form {
  margin-top: 1rem;
}

/* News & Events Section */
.news-events-section {
  background-color: var(--c-gray);
}

.news-section, .events-section {
  flex: 1;
}

.news-item, .event-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.news-image, .event-image {
  width: 8rem;
  height: 8rem;
  flex-shrink: 0;
  border-radius: 0.5rem;
  background-size: cover;
  background-position: center;
}

.news-content, .event-content {
  flex: 1;
}

.news-category, .event-category {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--c-green);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.news-content h3, .event-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  transition: color 0.15s ease-in-out;
}

.news-content h3:hover, .event-content h3:hover {
  color: var(--c-blue);
}

.read-more {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  color: var(--c-orange);
  text-decoration: none;
  margin-top: 0.75rem;
  transition: text-decoration 0.15s ease-in-out;
}

.read-more:hover {
  text-decoration: underline;
}

/* Partners Section */
.partners-section {
  background-color: var(--c-white);
}

.partners-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 3rem;
}

@media (min-width: 768px) {
  .partners-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

.partner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.partner-logo {
  height: 6rem;
  object-fit: contain;
  margin-bottom: 1rem;
}

.partner h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
}

/* Footer */
.site-footer {
  background-color: var(--c-blue);
  color: var(--c-white);
  padding: 3rem 0;
}

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

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.footer-section h3 {
  color: var(--c-white);
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.footer-section p {
  color: #d1d5db;
  margin-bottom: 0;
}

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

.footer-links li {
  margin-bottom: 0.25rem;
}

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.15s ease-in-out;
}

.footer-links a:hover {
  color: var(--c-white);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.footer-social a {
  color: #d1d5db;
  transition: color 0.15s ease-in-out;
}

.footer-social a:hover {
  color: var(--c-white);
}

.footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #374151;
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-8 {
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 767px) {
  .site-header {
    padding: 1rem;
  }
  
  .main-navigation {
    display: none;
  }
  
  .hero-section {
    min-height: 50vh;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .donation-box {
    padding: 2rem;
  }
  
  .news-item, .event-item {
    flex-direction: column;
  }
  
  .news-image, .event-image {
    width: 100%;
    height: 12rem;
  }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  order: 4;
  width: 24px;
  height: 24px;
  position: relative;
  z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--c-blue);
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}

.mobile-menu-toggle span:nth-child(1) {
  top: 4px;
}

.mobile-menu-toggle span:nth-child(2) {
  top: 11px;
}

.mobile-menu-toggle span:nth-child(3) {
  top: 18px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  top: 11px;
  transform: rotate(135deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
  left: -24px;
}

.mobile-menu-toggle.active span:nth-child(3) {
  top: 11px;
  transform: rotate(-135deg);
}

@media (max-width: 767px) {
  .mobile-menu-toggle {
    display: block;
    z-index: 1000;
  }

  .main-navigation {
    display: flex; /* Use flex for vertical alignment */
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    background-color: var(--c-white);
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    padding: 4rem 2rem;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 999;
  }

  .main-navigation.active {
    transform: translateX(0);
  }
}

/* Animations */
.animate-in {
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Styles */
input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  margin-bottom: 1rem;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px rgba(10, 42, 67, 0.1);
}

input.error, textarea.error, select.error {
  border-color: #ef4444;
}

/* Button States */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn:active {
  transform: scale(0.98);
}

/* Selection Styles */
.donation-amount-btn.selected {
  background-color: var(--c-orange);
  color: var(--c-white);
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  to {
    left: 100%;
  }
}

body.no-scroll {
    overflow: hidden;
}

@media (max-width: 767px) {
    .main-navigation.active .menu-item a { /* Targeting the generated WP menu links */
        font-size: 1.5rem;
        padding: 1rem 0;
        border-bottom: 1px solid var(--c-gray);
        text-align: center;
    }

    .main-navigation.active .menu-item:last-child a {
        border-bottom: none;
    }
}