/* ==========================================================================
   Global Reset & Overflow Protection
   ========================================================================== */
html, body {
  overflow-x: hidden !important; /* Strictly prevents right-side blank space */
  width: 100%;
  max-width: 100vw;
  position: relative;
  margin: 0;
  padding: 0;
}

*, *::before, *::after {
  box-sizing: border-box !important; /* Forces padding to stay INSIDE element widths */
}

/* ==========================================================================
   Global Typeface Overrides
   ========================================================================== */
body, p, div, a { 
  font-family: "Lato", sans-serif; 
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6, .wc-wide { 
  font-family: "EB Garamond", serif !important; 
  font-weight: 500;
}

/* ----------------------------------------------------------------------
   3. RESPONSIVE NAVIGATION BREAKPOINT (Swaps Nav Layouts at 1205px)
   ---------------------------------------------------------------------- */
@media (max-width: 1205px) {
  .desktop-nav { 
    display: none !important; 
  }
  
  .mobile-nav { 
    display: block !important; 
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box !important;
  }
  
  .mobile-flex-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box !important;
  }

  .mobile-flex-wrapper > div {
    flex: 1 1 auto;
    min-width: 0 !important;
  }

  .mobile-flex-wrapper .wc-button {
    flex-shrink: 0 !important;
  }

  #navDemo { 
    margin-top: 52px !important; 
    padding-top: 10px !important; 
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  #navDemo .wc-bar-item {
    display: block !important;
    width: 100% !important;
    text-align: right !important;
    padding-right: 24px !important;
    box-sizing: border-box !important;
  }
}

/* ----------------------------------------------------------------------
   4. DESKTOP SYSTEM RENDERING (1206px and up)
   ---------------------------------------------------------------------- */
@media (min-width: 1206px) {
  .mobile-nav { display: none !important; }
  .desktop-nav { display: block !important; }
  #navDemo { display: none !important; } /* Guarantees mobile dropdown menu is killed */
}

/* Hover protection adjustments for touch devices up to nav transition boundary */
@media (max-width: 1205px) and (hover: hover) {
  .mobile-nav .wc-button:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
  }
}

/* ==========================================================================
   Music Selector & Track Elements Styles
   ========================================================================== */
.audio-container-limited {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.track-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 20px 0;
}

.track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  margin-bottom: 10px;
  background-color: #f9f9f9;
  border-left: 4px solid #2b4c7e;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.track-item:hover {
  background-color: #f1f5f9;
  transform: translateX(4px);
}

.track-item.active-track {
  background-color: #e2e8f0;
  border-left-color: #c93b2b;
}

.track-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.track-meta h4 {
  margin: 0;
  font-size: 18px;
  color: #2b4c7e;
}

.track-meta p {
  margin: 2px 0 0 0;
  font-size: 14px;
  color: #666;
}

.track-duration {
  font-weight: 600;
  color: #444;
}

/* ==========================================================================
   Adaptive Custom Media Dock Base Styling Rules
   ========================================================================== */
.floating-audio-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #274c77;
  color: #ffffff;
  box-shadow: 0 -10px 25px rgba(0,0,0,0.3);
  z-index: 1000;
  padding: 14px 24px;
  font-family: "Lato", sans-serif;
}

.player-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

/* ----------------------------------------------------------------------
   Ping-Pong Back-and-Forth Scrolling Framework
   ---------------------------------------------------------------------- */
.player-track-display {
  flex: 1;
  min-width: 260px;
  max-width: 420px; 
  overflow: hidden;
}

.marquee-wrapper {
  overflow: hidden;
  white-space: nowrap;
  display: block;
  width: 100%;
}

.marquee-text {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  width: 100%;
}

.animate-marquee {
  animation: bounceTicker linear infinite alternate;
  animation-delay: 0.5s; 
}

#player-current-title {
  font-family: "Lato", sans-serif !important;
  font-size: 18px; 
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.5px;
  display: inline-block;
}

#player-current-artist {
  font-size: 14px; 
  margin: 2px 0 0 0;
  opacity: 0.8;
  font-weight: 400;
  display: inline-block;
  letter-spacing: 0.3px;
}

@keyframes bounceTicker {
  0%, 8% {
    transform: translate3d(0, 0, 0);
  }
  92%, 100% {
    transform: translate3d(var(--scroll-distance, 0px), 0, 0);
  }
}

.player-center-stack {
  display: flex;
  flex-direction: row;
  flex: 2;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-btn {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
}

.player-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ff9e93;
}

.player-btn:focus-visible {
  outline: 2px solid #ff9e93;
  outline-offset: 2px;
}

.player-btn:active {
  transform: scale(0.92);
}

.player-btn.btn-main {
  font-size: 36px;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.08);
}

.player-btn.btn-main:hover {
  background: rgba(255, 255, 255, 0.2);
}

.player-timeline-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.time-stamp {
  font-size: 12px;
  font-family: "Lato", sans-serif;
  font-weight: 600;
  width: 38px;
  text-align: center;
  opacity: 0.8;
}

.timeline-slider {
  width: 100%;
  accent-color: #ff9e93;
  cursor: pointer;
  height: 6px;
  border-radius: 3px;
}

.player-volume-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
}

.player-volume-wrapper i {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.volume-slider {
  width: 90px;
  accent-color: #ff9e93;
  cursor: pointer;
  height: 5px;
}


/* ==========================================================================
   Responsive Media Queries Overrides
   ========================================================================== */
@media (min-width: 993px) {
  .column-left { padding-right: 70px !important; }
  .column-right { padding-left: 70px !important; }
  
  .card-header-flex { display: block; }
  .card-header-flex i { margin-right: 15px; }
}

/* ----------------------------------------------------------------------
   Tablet Mode Viewport Mechanics Layer (601px to 992px)
   ---------------------------------------------------------------------- */
@media (max-width: 992px) and (min-width: 601px) {
  .column-left { padding-right: 20px !important; }
  .column-right { padding-left: 20px !important; }
  
  .player-container {
    display: grid !important;
    grid-template-columns: 1fr 2fr 1fr !important;
    gap: 20px;
  }
  
  .player-track-display {
    max-width: 100% !important; 
  }
  
  .player-center-stack {
    flex-direction: column !important;
    gap: 6px !important;
    width: 100%;
  }
  
  .player-timeline-wrapper {
    width: 100% !important;
  }

  .player-volume-wrapper {
    display: flex !important;
    justify-content: flex-end !important;
  }
  
}

/* ----------------------------------------------------------------------
   Mobile Smartphone Viewport Mechanics Layer (600px and under)
   ---------------------------------------------------------------------- */
@media (max-width: 600px) {
  .mobile-top-space {
    padding-top: 40px !important;
  }

  .slideshow-img {
    height: 45vh !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  .wc-leftbar {
    border-left: none !important;            
    border-top: 4px solid #2b4c7e !important; 
    text-align: center !important;
  }

  .card-header-flex {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 12px;
  }

  .card-header-flex i {
    font-size: 28px !important;
    margin-right: 0 !important;
    margin-bottom: 8px !important;
    color: #2b4c7e;
    display: block;
  }
  
  .floating-audio-player {
    padding: 12px 16px;
  }
  .player-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px;
  }
  .player-track-display {
    text-align: center;
    max-width: 100% !important;
  }
  .player-center-stack {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
  }
  .player-timeline-wrapper {
    width: 100% !important;
  }
  
  .player-volume-wrapper {
    display: none !important;
  }
  
}

/* ----------------------------------------------------------------------
   Desktop vs Mobile Breakpoint Visibility Overrides
   ---------------------------------------------------------------------- */
@media (max-width: 1075px) {
  .desktop-nav { display: none !important; }
  
  /* 1. Prevent the bar from expanding beyond the screen */
  .mobile-nav { 
    display: block !important; 
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box !important;
  }
  
  /* 2. Enforce strict flexbox boundaries */
  .mobile-flex-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box !important;
  }

  /* 3. Force the left container to shrink if necessary */
  .mobile-flex-wrapper > div {
    flex: 1 1 auto;
    min-width: 0 !important;
  }

  /* 4. Lock the hamburger button in place */
  .mobile-flex-wrapper .wc-button {
    flex-shrink: 0 !important;
  }
  
  .mySlides .slideshow-logo {
    display: none !important;
  }

  .mySlides .wc-display-bottommiddle {
    display: none !important;
  }

  #navDemo { 
    margin-top: 52px !important; 
    padding-top: 10px !important; 
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important; /* Forces container to stay within screen */
    overflow-x: hidden !important; /* Prevents horizontal scroll */
  }
  
  #navDemo .wc-bar-item {
    display: block !important;
    width: 100% !important;
    text-align: right !important;
    padding-right: 24px !important;
    box-sizing: border-box !important; /* Forces padding inside the 100% width */
  }

  .mobile-nav .wc-button:focus,
  .mobile-nav .wc-button:active {
    background-color: transparent !important;
    color: inherit !important;
  }
}

@media (max-width: 1075px) and (hover: hover) {
  .mobile-nav .wc-button:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
  }
}

/* ----------------------------------------------------------------------
   Gallery Footer Adjustment for Media Player
   ---------------------------------------------------------------------- */

/* Default (Desktop) */
body.page-gallery {
  padding-bottom: 60px;
}

/* Tablet */
@media (max-width: 992px) and (min-width: 601px) {
  body.page-gallery {
    padding-bottom: 100px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  body.page-gallery {
    padding-bottom: 150px;
  }
}

/* =========================================
   Global Footer Styles
   ========================================= */

/* Emblem / Logo */
.wc-footer-emblem-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 10px;
}

.wc-footer-emblem {
    height: 60px;
    width: auto;
    display: block;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

/* Social Links */
.wc-footer-social {
    margin-top: 10px;
}

.wc-footer-social-link {
    text-decoration: none;
    color: inherit;
    margin: 0 15px;
    display: inline-block;
}

.wc-footer-social-link i {
    cursor: pointer;
}

/* Tri-Column Grid Layout */
.wc-footer-row {
    max-width: 1100px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Info Boxes (Address & Email) */
.wc-footer-block-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.wc-footer-info-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.wc-footer-info-text {
    text-align: left;
}

.wc-footer-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: none; /* Hidden on desktop, shown on mobile */
}

/* Mobile adjustments for the info boxes */
@media (max-width: 600px) {
    .wc-footer-info-box {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    .wc-footer-info-text {
        text-align: center;
    }
    .wc-footer-label {
        display: block;
    }
}

/* Donate Block */
.wc-footer-donate {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: inherit;
}

.wc-footer-donate-text {
    font-weight: bold;
    font-size: 18px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wc-footer-donate-img {
    width: 120px;
    height: auto;
    margin-bottom: 8px;
    flex-shrink: 0;
}

/* Copyright & Legal Links */
.wc-footer-copyright {
    margin-bottom: 8px;
}

.wc-footer-legal {
    font-size: 14px;
    opacity: 0.85;
}

.wc-footer-legal a {
    color: inherit;
    text-decoration: none;
}

.wc-footer-separator {
    margin: 0 12px;
    opacity: 0.5;
}

/* ==========================================================================
   Image & Video Gallery Component
   ========================================================================== */
.gallery-wrapper {
    max-width: 1000px;
    margin: 20px auto;
}

.hero-section {
    width: 100%;
    height: 500px;
    background-color: rgba(0,0,0,0); /* Dark background masks letterboxing on videos/images */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 15px;
}

#hero-img, 
#video-placeholder iframe {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none;
}

.thumb-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 45px; /* Safely offsets thumbnails away from overlapping buttons */
}

.thumbnail-selector {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding: 15px 0;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.thumbnail-selector::-webkit-scrollbar { display: none; }

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(39, 76, 119, .8);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 100;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}
.scroll-btn svg { width: 24px; height: 24px; fill: white; flex-shrink: 0; }
.scroll-btn.left { left: 0px; }
.scroll-btn.right { right: 0px; }

.thumb {
    width: 120px;
    height: 80px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
}
.thumb.active, .thumb:hover { border-color: #2b4c7e; transform: scale(1.05); }

/* Mobile View Scaling */
@media (max-width: 600px) {
    .hero-section { height: 250px; }
    .scroll-btn { width: 32px; height: 32px; }
    .scroll-btn svg { width: 18px; height: 18px; }
}

/* ==========================================================================
   MODERN MODULE COMPONENTS (SUPPORT, ABOUT, CONTACT, JOIN)
   ========================================================================== */

/* --- 1. Primary Layout Grid --- */
.support-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  width: 100%;
}

/* --- 2. Modern Surface Cards --- */
.card-modern {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(39, 76, 119, 0.08); /* Color fixed to brand accent alpha */
}

/* --- 3. Dynamic Information Panels --- */
.callout-friendly {
  background-color: rgba(39, 76, 119, 0.05); /* Color fixed to brand accent alpha */
  border-left: 4px solid #274c77; /* Color fixed to primary #274c77 */
  border-radius: 0 8px 8px 0;
  padding: 16px;
}

/* --- 4. Interactive Action Buttons --- */
.btn-primary-modern {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #274c77; /* Color fixed to primary #274c77 */
  color: #ffffff !important;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none !important;
  font-size: 15px;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary-modern:hover {
  background-color: #1a324f; /* Fixed to clean cohesive darker brand contrast hue */
}

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

/* --- 5. Typographic Hierarchies --- */
.support-heading {
  color: #1a324f; /* Fixed to deep contrast tone */
  font-weight: 600;
  margin-top: 0;
}

.text-muted {
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 16px;
}
.text-muted:last-child {
  margin-bottom: 0;
}

/* --- 6. Corporate Sponsor Array --- */
.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.sponsor-item {
  background: #ffffff;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.sponsor-item:hover {
  border-color: #274c77; /* Color fixed to primary #274c77 */
  box-shadow: 0 4px 6px rgba(39, 76, 119, 0.1); /* Color fixed to brand accent alpha */
}


/* ==========================================================================
   SITE-WIDE MEDIA VIEWPORT BREAKPOINTS
   ========================================================================== */

/* --- Mobile Breakpoint (0px to 600px) --- */
@media (max-width: 600px) {
  .mobile-top-space {
    margin-top: 24px;
  }
  .card-modern {
    padding: 16px;
  }
}

/* --- Medium / Tablet Breakpoint (992px and up) --- */
@media (min-width: 992px) {
  .support-grid {
    grid-template-columns: 1.1fr 0.9fr; 
    gap: 40px;
  }
}

/* --- Large Desktop Breakpoint (1205px and up) --- */
@media (min-width: 1205px) {
  .support-grid {
    gap: 64px;
  }
}

/* ==========================================================================
   Mobile-Specific Overrides (600px and under Viewports)
   ========================================================================== */
@media (max-width: 600px) {
  /* 1. Expand layout wrappers to take advantage of maximum width */
  #media-gallery-page {
    padding-top: 24px !important;
    padding-bottom: 32px !important;
  }
  
  .gallery-section-container,
  .audio-section-container {
    padding-left: 8px !important;
    padding-right: 8px !important;
    margin-bottom: 2rem !important;
  }

  /* 2. Tighten card padding internal parameters */
  .gallery-card-padding {
    padding: 8px !important;
  }
  
  .audio-card-padding {
    padding: 16px 12px !important;
  }

  /* 3. Fluid Responsive Typography Reductions */
  .media-header {
    margin-bottom: 1.75rem !important;
    padding: 0 12px;
  }
  
  .main-gallery-title {
    font-size: 1.85rem !important;
    margin-bottom: 0.25rem !important;
  }
  
  .main-gallery-subtitle {
    font-size: 1rem !important;
    line-height: 1.4 !important;
  }

  .audio-main-title {
    font-size: 1.35rem !important;
    padding-bottom: 8px !important;
    margin-bottom: 1rem !important;
  }

  .audio-callout-margin {
    padding: 12px !important;
    margin-bottom: 1.5rem !important;
  }
  
  .audio-callout-text {
    font-size: 0.9rem !important;
  }

  .audio-category-legend {
    font-size: 1.05rem !important;
    margin-bottom: 0.5rem !important;
  }

  /* 4. Track List Component Fine-Tuning */
  .track-item {
    padding: 8px 6px !important;
    gap: 8px !important;
  }

  .track-play-icon {
    font-size: 1.65rem !important; /* Prevents large touch icons from overcrowding metadata */
  }

  .track-meta h4 {
    font-size: 14px !important;
    line-height: 1.3 !important;
  }

  .track-meta p {
    font-size: 12px !important;
  }

  .track-duration {
    font-size: 12px !important;
  }
}