/* Light theme as default in root */
:root {
  /* Default light mode colors */
  --bg-color: #f5f5dc; /* Cream colored background */
  --text-color: #202020;
  --primary-color: #0000d6;
  --accent-color: #0000b3;
  --highlight-color: #006652;
  --highlight-bg: rgba(0,0,0,0.1);
  --heading-color: #9900cc;
  --error-color: #cc0000;
  --card-bg: white;
  --calendar-text: #202020;
  --calendar-bg: #f0f0f0;
}

/* Dark theme class */
.dark-mode {
  --bg-color: #2c2c3a; /* Lighter dark blue-gray background */
  --text-color: #f0f0f0; /* Slightly off-white text for reduced harshness */
  --primary-color: #4040cc; /* Lighter blue */
  --accent-color: #ffcc00; /* Brighter yellow */
  --highlight-color: #80ffcc; /* Lighter mint green */
  --highlight-bg: rgba(255,255,255,0.1); /* Lighter highlight background */
  --heading-color: #ffb3e6; /* Lighter pink */
  --error-color: #ff8080; /* Lighter red */
  --card-bg: #3a3a4a; /* Lighter card background */
  --calendar-text: #f0f0f0; /* Slightly off-white text */
  --calendar-bg: #3a3a4a; /* Lighter calendar background */
}

/* Enhanced theme toggle button styling for dark mode */
.dark-mode #theme-toggle {
  background-color: var(--primary-color);
  color: white;
  border: 2px solid var(--accent-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark-mode #theme-toggle:hover, 
.dark-mode #theme-toggle:focus {
  background-color: var(--accent-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Add a subtle transition effect */
#theme-toggle {
  transition: all 0.3s ease;
  /* Improved visibility in light mode */
  background-color: #0000d6;
  color: white;
  border: 2px solid #000080;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: bold;
  /* Improved touch target size */
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
}

#theme-toggle:hover, 
#theme-toggle:focus {
  background-color: #000080;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Make the toggle icon more visible in both modes */
.toggle-icon {
  font-weight: bold;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  font-size: 1.2rem;
}

/* Add a subtle pulse animation to draw attention when in dark mode */
@keyframes subtle-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.dark-mode #theme-toggle:hover .toggle-icon {
  animation: subtle-pulse 1s infinite;
}

/* Reset and base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Verdana, sans-serif;
  font-size: 1rem;
  line-height: 1.4;
  background-color: var(--bg-color);
  color: var(--text-color);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
  /* Adjusted padding for fixed header - responsive value */
  padding-top: 120px;
}

/* Skip link styling - IMPROVED ACCESSIBILITY */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: var(--accent-color);
  padding: 8px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--accent-color);
  outline-offset: 2px;
}

/* Calendar styles - FIXED COLOR CONTRAST ISSUES */
.calendar-preview {
  background-color: var(--calendar-bg);
  color: var(--calendar-text);
  padding: 1.25rem;
  border-radius: 10px;
  max-width: 400px;
  margin: 0 auto;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
  border: 1px solid var(--primary-color);
}

.error {
  border: 2px solid var(--error-color);
  background-color: rgba(255, 107, 107, 0.1);
}

.calendar-preview p {
  color: var(--calendar-text);
}

.calendar-link {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  background-color: var(--primary-color);
  color: white; /* Always white text on primary color background for best contrast */
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s ease;
  /* Improved touch target size */
  min-height: 44px;
}

.calendar-link:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.centered {
  text-align: center;
}

.centered img,
.centered video,
.centered iframe {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

/* New style for side-by-side images */
.image-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 1rem 0;
}

.image-row img {
  max-width: 100%;
  height: auto;
}

/* IMPROVED ACCESSIBILITY - Better color contrast */
h2 {
  color: var(--heading-color);
  font-size: 1.5rem;
  margin: 1rem 0;
  font-weight: bold;
  transition: color 0.3s ease;
}

/* Header and navigation */
header, nav {
  background-color: var(--primary-color);
  text-align: center;
  transition: background-color 0.3s ease;
}

/* Fixed header styles */
.fixed-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  /* Hardware acceleration for smoother scrolling */
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* Header container for logo and theme toggle - UPDATED FOR CENTERED LOGO */
.header-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

#logo {
  display: block;
  padding: 1.25rem 0;
  max-width: 100%;
  height: auto;
  max-height: 75px;
  margin: 0 auto; /* Center the logo */
}

/* Position theme toggle button absolutely to keep logo centered */
#theme-toggle {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

nav {
  padding: 0.625rem 0;
  position: relative;
}

.hamburger {
  display: none;
  font-size: 1.875rem;
  cursor: pointer;
  padding: 0.625rem;
  color: white;
  background: none;
  border: none;
  /* Improved touch target size */
  min-width: 44px;
  min-height: 44px;
}

.nav-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0;
  margin: 0;
}

nav a {
  color: white;
  text-decoration: underline;
  font-weight: bold;
  text-transform: uppercase;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  border-radius: 4px;
  /* Improved touch target size */
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

nav a:hover, nav a:focus {
  color: black;
  background-color: var(--accent-color);
  outline: none;
}

/* Section layout - Fixed for slideshow */
section {
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
  /* Adjusted scroll margin for fixed header - responsive value */
  scroll-margin-top: 120px;
}

/* First section with slideshow - take full viewport */
#section1 {
  height: 100vh;
  min-height: 100vh;
}

/* Other sections can scroll normally */
#section2, #section3, #section4, #section5 {
  min-height: 100vh;
}

/* Slideshow - Fixed to fit remaining space */
.slideshow-container {
  flex: 1;
  position: relative;
  overflow: hidden;
  height: calc(100vh - 140px); /* Subtract header and nav height */
  min-height: 300px;
}

.slide {
  display: none;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.active {
  display: block;
}

/* IMPROVED ACCESSIBILITY - Better button styling */
.nav-arrow {
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  background-color: rgba(0,0,0,0.5);
  padding: 0.75rem;
  color: white;
  z-index: 10;
  border: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  /* Improved touch target size */
  min-width: 44px;
  min-height: 44px;
}

.nav-arrow:hover, .nav-arrow:focus {
  background-color: rgba(0,0,0,0.8);
  outline: 2px solid #fefe00;
}

.left-arrow {
  left: 1rem;
}

.right-arrow {
  right: 1rem;
}

/* Column layout */
.columns {
  display: flex;
  flex-wrap: wrap;
  padding: 1.25rem;
  gap: 1.25rem;
  flex: 1;
}

.columns > div {
  flex: 1 1 300px;
  min-width: 0;
}

/* Links */
a {
  color: var(--accent-color);
  text-decoration: underline;
  transition: color 0.3s ease;
}

a:hover, a:focus {
  color: var(--accent-color);
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Touch active state for better mobile feedback */
.touch-active {
  opacity: 0.7;
  transform: scale(0.98);
}

/* Highlight text - IMPROVED ACCESSIBILITY */
.highlight-green {
  color: var(--highlight-color);
  font-weight: bold;
  background-color: var(--highlight-bg);
  padding: 2px 4px;
  border-radius: 3px;
  transition: color 0.3s ease, background-color 0.3s ease;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
}

/* Video styling - FIXED FOR PROPER DISPLAY */
video {
  width: 100%;
  height: auto;
  max-width: 100%;
  background-color: #000;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  display: block;
  margin: 0 auto;
}

/* Video container for better responsive behavior */
.centered video {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}

/* Video error message styling */
.video-error {
  background-color: rgba(204, 0, 0, 0.1);
  color: var(--error-color);
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid var(--error-color);
  margin: 1rem auto;
  max-width: 640px;
}

/* Form styling - IMPROVED ACCESSIBILITY */
form {
  max-width: 100%;
}

select, input[type="text"] {
  width: 100%;
  max-width: 300px;
  padding: 0.5rem;
  margin: 0.5rem 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  /* Improved touch target size */
  min-height: 44px;
}

select:focus, input[type="text"]:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  border-color: var(--accent-color);
}

input[type="image"] {
  max-width: 100%;
  height: auto;
  /* Improved touch target size */
  min-width: 44px;
  min-height: 44px;
}

/* Form labels - IMPROVED ACCESSIBILITY */
label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
}

/* List styling */
ul {
  padding-left: 0;
}

li {
  margin: 0.5rem 0;
  list-style: none;
}

/* Required field indicator */
.required {
  color: var(--error-color);
  transition: color 0.3s ease;
}

/* Add this to your CSS */
.required-asterisk {
  color: #E10600; /* Bright orange */
  font-weight: bold;
  font-size: 1.2em; /* Make it slightly larger */
}

/* Screen reader only class */
.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;
}

/* For mobile */
@media (max-width: 768px) {
  body {
    font-size: 1rem;
    /* Reduced padding for mobile */
    padding-top: 100px;
  }
  
  section {
    /* Match body padding */
    scroll-margin-top: 100px;
  }
  
  .header-container {
    flex-direction: column;
    padding: 10px;
  }
  
  #logo {
    padding: 0.5rem 0;
    max-height: 60px;
  }
  
  #theme-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
  }
  
  .toggle-text {
    display: none; /* Hide text on small screens */
  }
  
  .hamburger {
    display: block;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary-color);
    z-index: 1000;
    padding: 0.5rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }
  
  .nav-links.show, .nav-links.active {
    display: flex;
  }
  
  nav a {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  .slideshow-container {
    height: calc(100vh - 100px);
  }
  
  .columns {
    flex-direction: column;
  }
  
  .columns > div {
    flex: 1 1 100%;
  }
  
  .image-row {
    flex-direction: column;
  }
  
  /* Improve video display on mobile */
  video {
    max-height: 50vh;
  }
  
  /* Adjust form elements for better mobile experience */
  select, input[type="text"] {
    max-width: 100%;
  }
  
  /* Make navigation arrows larger on touch devices */
  .nav-arrow {
    font-size: 2.5rem;
    padding: 1rem;
  }
}

/* For very small screens */
@media (max-width: 480px) {
  body {
    padding-top: 80px;
  }
  
  section {
    scroll-margin-top: 80px;
  }
  
  #logo {
    max-height: 50px;
  }
  
  .slideshow-container {
    height: calc(100vh - 80px);
  }
  
  h2 {
    font-size: 1.25rem;
  }
  
  /* Further optimize video for very small screens */
  video {
    max-height: 40vh;
  }
}

/* Print styles */
@media print {
  .fixed-header, .nav-arrow, #theme-toggle, .hamburger {
    display: none !important;
  }
  
  body {
    padding-top: 0;
    background-color: white;
    color: black;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  .slideshow-container {
    height: auto;
  }
  
  .slide {
    display: none;
  }
  
  .slide.active {
    display: block;
    position: relative;
    height: auto;
  }
  
  .slide.active img {
    height: auto;
    max-height: 4in;
  }
  
  section {
    min-height: 0;
    page-break-inside: avoid;
  }
}

/* Add this to your styles.css file */
#section3 .centered video {
  max-width: 640px;
  width: 100%;
  height: auto;
  min-height: 360px; /* Set a minimum height */
  object-fit: contain; /* Maintain aspect ratio while filling container */
}

/* For better responsive behavior on different screens */
@media (min-width: 768px) {
  #section3 .centered video {
    min-height: 480px; /* Taller on larger screens */
  }
}

/* Ensure the video container itself has appropriate height */
#section3 .centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 400px;
}

