@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@300;400;500;600;700&display=swap');
html, body, *, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: "Public Sans", Times, serif;
  /* background-image: url(assets/images/background5.png);
  background-size: cover; 
  background-position: center; 
  background-repeat: no-repeat; 
  background-attachment: fixed; 
  position: relative; */
  height: 100%;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
  width: 100vw;
}

/* ===== MAIN HEADER (ALWAYS VISIBLE) ===== */
.main-header {
  box-sizing: border-box;
  border-bottom: 1.5px solid #111; 
  padding: 1rem 0 0.5rem 0;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
}

.main-header {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
}

.video-wrapper {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: 10;
}

.video-bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  z-index: 10;
  object-fit: cover;
  object-position: center;
  display: block;
}

.main-header h1 {
  font-size: clamp(3rem, 10vw, 10rem);
  margin: 0 0 0.5rem 0;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: white;
  text-align: center;
}

.main-menu-toggle {
  position: fixed;
  top: 2rem;
  right: 1.5rem;
  z-index: 100;
}

#language-toggle {
  display: block;
  margin: 2rem auto 0 auto;
  background: none;
  border: 1px solid #000;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  font-weight: 500;
  color: #000; 
}

#language-toggle:hover {
  background: #000;
  color: #fff;
}

/* Navigation (hidden by default) */
.main-nav {
  position: fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  box-sizing: border-box;
  visibility: hidden;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  padding: 2rem;
  overflow-y: auto;
  z-index: 10;
}

.main-header.expanded .main-nav {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0); 
}

.main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* gap: 1.5rem; */
}

.main-nav ul li a {
  width: 100vw;
  font-size: 2rem !important; 
  display: inline-block;
  text-decoration: none;
  color: #000;
  font-weight: 900;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
}

.main-nav ul li a:hover {
  color: #666;
  background-color: black;
  color: white;
  border-radius: 0;
}

/* ===== HEADER BURGER MENU ===== */
.main-menu-toggle {
  background: none;
  border: none;
  width: 30px;
  height: 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  order: -1;
}

.main-menu-toggle span {
  width: 18px;
  height: 2px;
  background: #000;
  border-radius: 1px;
  transition: all 0.3s ease;
}

.main-menu-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.main-menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.main-menu-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .main-header {
    padding: 1rem 1.5rem 0.5rem 1.5rem;
  }
  
  .main-header h1 {
    margin-bottom: 0.3rem;
  }
  
  .main-nav ul li a {
    font-size: 0.95rem;
  }
  
  #language-toggle {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    margin-top: 1.2rem;
  }

  .main-menu-toggle {
    padding: 0 50px;
  }
}

/* ===== RIGHT AUDIO MENU ===== */
.right-audio-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 80px;
  height: 100vh;
  height: 100dvh;
  background: rgba(255, 255, 255, 0.9);
  border-left: 1.5px solid #111;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 2rem 0 2rem 0;
  box-sizing: border-box;
  transition: none;
}

body.ready .right-audio-menu {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== AUDIO MENU TOGGLE (CENTER-RIGHT, VERTICAL) ===== */
.audio-menu-toggle {
  position: fixed;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  z-index: 9;
  background: transparent;
  border: none;
  width: 24px;
  height: 50px;
  display: none; /* Hidden by default, shown on mobile */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 10px; 
}

.audio-menu-toggle:hover {
  transform: translateY(-50%) scale(1.1);
}

.audio-menu-toggle span {
  width: 5px;
  height: 5px;
  background: #000000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.8;
}

.audio-menu-toggle:hover span {
  opacity: 1;
  background: #333;
}

.audio-menu-toggle.open span:nth-child(1) {
  transform: translateX(5px);
}

.audio-menu-toggle.open span:nth-child(3) {
  transform: translateX(5px);
}

/* ===== MOBILE BEHAVIOR ===== */
@media (max-width: 768px) {
  .right-audio-menu {
    z-index: 2;
    width: 60px;
    transform: translateX(100%);
  }
  
  .right-audio-menu.open {
    transform: translateX(0); /* Slides in */
  }
  
  .audio-menu-toggle {
    color: black;
    display: flex;
  }
  
  .audio-menu-toggle.open {
    right: calc(60px + 1rem); /* Moves with the menu */
  }
}

/* ===== DESKTOP BEHAVIOR ===== */
@media (min-width: 769px) {
  .audio-menu-toggle {
    display: none; /* Hidden on desktop */
  }
}

/* ===== GENERAL STYLES ===== */
ul {
  list-style-type: none;
  padding: 0;
}

h2 {
  padding: 50px 0 0 0;
}

.first-section { 
  padding: 0;
}

.language-content .greeting-message,
.language-content .greeting-message-fr {
  margin-bottom: 75px;
}

.constitution {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
}

.playground {
  font-style: italic;
  font-weight: 600;
}

hr {
  margin: 50px 0;
}

#content-en {
  display: none;
}

ul {
  list-style-type: none;
  padding: 0;
}

nav ul {
  list-style-type: none;
  padding: 0;
}

nav ul li {
  display: inline;
  margin: 0 10px;
}

nav ul li a {
  text-decoration: none;
  color: #000000;
  transition: 0.3s ease, color 0.3s ease;
  padding: 5px;
  border-radius: 5px;
}

nav ul li a:hover {
  color: #b7b7b7;
}

h2 {
  padding: 50px 0 0 0;
}

/* ===== CONTENT STYLES ===== */
.main-content {
  position: absolute;
  top: 100vh;
  left: 0;
  width: 100vw;
  min-height: 100vh;
  overflow-y: auto;
  z-index: 1;
  padding: 6rem 6rem 6rem 6rem; 
  /* margin-top: 20px; */
  box-sizing: border-box;
  max-width: 100vw;
  overflow-x: hidden;
  background: #fff;
}

.language-content .greeting-message,
.language-content .greeting-message-fr {
  margin-bottom: 50px;
}

hr {
  margin: 50px 0;
}
/* Media query for mobile devices */
@media (max-width: 700px) {
  body {
    font-size: 14px; /* Reduce font size for mobile devices */
  }

  .main-menu-toggle {
    padding: 0;
    top: 1rem;
    right: 1rem;
  }

  .main-content {
    margin-top: 50px;
    padding: 0 40px 20px 20px; 
  }

  nav ul li {
    display: block; 
    margin: 10px 0;
  }

  nav ul li a {
    display: block; 
    text-align: center; 
  }
}

.nav-language-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
}

nav {
  flex-grow: 1;
  text-align: center;
}

/* Audio player wrapper */
.audio-player {
  height: auto;
  width: 100%;
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* Time display */
.time-display {
  font-size: 0.75rem;
  font-weight: 400;
  color: #111;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
  text-align: center;
  min-width: 40px;
}

/* Progress slider - hidden by default */
.audio-progress {
  position: absolute;
  bottom: 280px;
  right: -112px;
  width: 300px;
  height: 16px;
  transform: rotate(-90deg);
  background: transparent;
  border: none;
  outline: none;
  opacity: 1;
  visibility: visible;
  transition: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: pan-x;
}

/* Mobile specific fixes for audio progress */
@media (max-width: 768px) {
  .audio-progress {
    right: -122px;
    height: 20px; 
    touch-action: none; 
  }
}

/* Custom slider track: thin black line */
.audio-progress::-webkit-slider-runnable-track {
  height: 2px;
  background: #111;
  border-radius: 0;
}

.audio-progress::-moz-range-track {
  height: 2px;
  background: #111;
  border-radius: 0;
}

.audio-progress::-ms-fill-lower,
.audio-progress::-ms-fill-upper {
  background: #111;
  border-radius: 0;
}

/* Custom slider thumb: black circle */
.audio-progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #111;
  border-radius: 50%;
  border: none;
  margin-top: -5px; 
  cursor: pointer;
  transition: background 0.2s;
}

.audio-progress::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #111;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.audio-progress::-ms-thumb {
  width: 12px;
  height: 12px;
  background: #111;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

/* Remove default outline and background for all browsers */
.audio-progress:focus {
  outline: none;
  box-shadow: none;
  background: transparent;
}

/* Remove white highlight on mobile touch */
.audio-progress:focus::-webkit-slider-thumb,
.audio-progress:active::-webkit-slider-thumb {
  background: #111;
}

.audio-progress:focus::-moz-range-thumb,
.audio-progress:active::-moz-range-thumb {
  background: #111;
}

/* Remove tap highlight on mobile */
.audio-progress {
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Hide the ugly focus border in Firefox */
.audio-progress::-moz-focus-outer {
  border: 0;
}

/* Keep existing audio button styles */
.audio-btn {
  background: #000 !important;
  opacity: 50%;
  color: #fff !important;
  border: 1px solid #000 !important;
  border-radius: 0 !important;
  padding: 6px;
  font-size: 14px !important;
  cursor: pointer !important;
  transition: background 0.2s !important;
}

.audio-btn:hover {
  background: #333 !important;
}

/* --- PLAYGROUND two-column list styles --- */
.playground-list {
  border: solid;
  padding: 20px;
  margin: 0;
}
.playground-list li {
  display: flex;
  align-items: baseline;
  gap: 0.5em;
  margin-bottom: 0.5em;
}
.playground-list .playground {
  min-width: 110px;
  font-style: italic;
  font-weight: bold;
  flex-shrink: 0;
}
.playground-list .desc {
  flex: 1;
  word-break: break-word;
}
@media (max-width: 600px) {
  .playground-list {
    font-size: 0.6rem;
  }
  .playground-list .playground {
    min-width: 80px;
    font-size: 0.95em;
  }
  .playground-list li {
    gap: 0.3em;
  }
}