/* Shared menu button styles (extracted from index.html styles.css) */

.menu-bar-btn {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  pointer-events: auto;
  z-index: 100;
  padding: 0;
  touch-action: manipulation;
  border-radius: 8px;
}

.menu-bar-icon {
  width: 28px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}

.menu-bar-line {
  width: 100%;
  height: 1px;
  background: var(--red-dark);
  border-radius: 2px;
}

/* Hover/active subtle feedback */
.menu-bar-btn:active {
  transform: translateY(-50%) scale(0.98);
}

/* Shared sidebar styles (extracted from global styles) */

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease, pointer-events 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Disable background interactions when sidebar is open (site-wide) */
body.sidebar-open {
  overflow: hidden;
}
body.sidebar-open * {
  pointer-events: none !important;
}
body.sidebar-open #sidebar,
body.sidebar-open #sidebar *,
body.sidebar-open #sidebar-overlay {
  pointer-events: auto !important;
}

.sidebar {
  position: fixed;
  top: 0;
  left: -20rem;
  width: 20rem;
  height: 100%;
  background: var(--beige);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  transition: left 0.3s ease;
}

.sidebar.active {
  left: 0 !important;
}

.sidebar-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin: 2.2rem 1.2rem 1.5rem;
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2%;
}
.sidebar-menu img {
  margin-left: -0.4rem !important;
  width: 1.2rem !important;
  height: 1.2rem !important;
}

.sidebar-link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 5% 10%;
  background: none;
  border: none;
  color: var(--red-dark);
  font-family: 'Ode', serif;
  font-size: 1.3em;
  cursor: pointer;
  text-align: left;
  line-height: 1.2;
  text-decoration: none;
  gap: 1rem;
}

.sidebar-link svg {
  flex-shrink: 0;
  width: 16px !important;
  height: 16px !important;
  transition: transform 0.6s ease;
}

.sidebar-link:hover svg {
  transform: rotate(360deg);
}

.sidebar-link:hover,
.sidebar-link:focus {
  background: var(--orange);
}

.sidebar-footer {
  background: url('./src/ProgrammeAssets/SectionDivide.png') no-repeat center/cover;
  background-size: 100% 100%;
  padding: 2rem 2rem 1rem 2rem;
  margin-top: auto;
}

/* Sidebar footer buttons */
.footer-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.5rem;
  justify-items: center;
}

/* First button spans the first row */
.footer-buttons .footer-btn:first-child {
  grid-column: 1 / -1;
  grid-row: 1;
}

/* All other buttons on row 2 */
.footer-buttons .footer-btn:nth-child(n+2) {
  grid-row: 2;
}

.footer-btn {
  background: none;
  border: none;
  font-family: 'Ode', serif;
  font-size: 0.9rem;
  color: var(--red-dark);
  cursor: pointer;
  padding: 0.5rem;
  text-align: left;
  line-height: 1.2;
}

.footer-btn.social-btn {
  padding: 0.25rem;
  width: 2.5rem;
  height: 2.5rem;
  text-align: center;
}

.footer-btn.social-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-copyright {
  text-align: center;
  font-size: 0.7rem;
  color: var(--red-dark);
  font-family: 'Ode', serif;
  padding-top: 1rem;
  font-weight: 100;
}

.sidebar-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
}

.sidebar-close-icon {
  position: relative;
  width: 2rem;
  height: 2rem;
}

.sidebar-close-icon::before,
.sidebar-close-icon::after {
  content: '';
  position: absolute;
  width: 2rem;
  height: 1px;
  background: var(--red-dark);
  top: 50%;
  left: 0;
}

.sidebar-close-icon::before {
  transform: rotate(45deg);
}

.sidebar-close-icon::after {
  transform: rotate(-45deg);
}

@media (max-width: 600px) {
  .sidebar {
    max-width: 90vw;
  }
  .sidebar-header{
    margin:  1.5rem 1.5rem 1rem;
  }
  .sidebar-link{
    padding: 4% 10%;
  }
  .sidebar-footer {
    font-size: 0.95rem;
    padding-bottom: 18px;
  }
}

/* ==========================================================================
   AUDIO CONTROLS
   ========================================================================== */

   .audio-mute-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }
  
  .audio-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 22px;
    position: relative;
  }
  
  .bar {
    width: 3px;
    background: var(--red-dark);
    border-radius: 1px;
    transition: height 0.2s ease;
    height: 10px;
  }
  
  .bar1 { height: 10px; }
  .bar2 { height: 16px; }
  .bar3 { height: 22px; }
  .bar4 { height: 16px; }
  .bar5 { height: 10px; }
  
  /* Audio Bar Animations */
  @keyframes bar1-anim {
    0%, 100% { height: 10px; }
    20% { height: 22px; }
    40% { height: 16px; }
    60% { height: 22px; }
    80% { height: 12px; }
  }
  
  @keyframes bar2-anim {
    0%, 100% { height: 16px; }
    20% { height: 10px; }
    40% { height: 22px; }
    60% { height: 12px; }
    80% { height: 22px; }
  }
  
  @keyframes bar3-anim {
    0%, 100% { height: 22px; }
    20% { height: 16px; }
    40% { height: 10px; }
    60% { height: 16px; }
    80% { height: 22px; }
  }
  
  @keyframes bar4-anim {
    0%, 100% { height: 16px; }
    20% { height: 22px; }
    40% { height: 12px; }
    60% { height: 10px; }
    80% { height: 22px; }
  }
  
  @keyframes bar5-anim {
    0%, 100% { height: 10px; }
    20% { height: 12px; }
    40% { height: 22px; }
    60% { height: 16px; }
    80% { height: 10px; }
  }
  
  /* Playing State */
  .audio-mute-btn.playing .bar1 { animation: bar1-anim 1.2s infinite linear; }
  .audio-mute-btn.playing .bar2 { animation: bar2-anim 1.2s infinite linear; }
  .audio-mute-btn.playing .bar3 { animation: bar3-anim 1.2s infinite linear; }
  .audio-mute-btn.playing .bar4 { animation: bar4-anim 1.2s infinite linear; }
  .audio-mute-btn.playing .bar5 { animation: bar5-anim 1.2s infinite linear; }
  
  /* Muted State */
  .audio-mute-btn.muted .bar {
    height: 4px;
    animation: none;
  }