body {
  font-family: Arial, sans-serif;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
}


  h1 {
      margin-top: 10px;
      margin-bottom: 0.1rem;
      color: #0078D4;
    }

h2 {
  text-align: center;       /* Centers the text horizontally */
  font-size: 2.2em;         /* Makes the font twice the base size */
  margin: 20px 0 10px;      /*  adds vertical breathing room.    */
  color: #0078D4;           /* Applies a bold Microsoft-style blue */
  font-weight: 700;
  font-family: 'Segoe UI', sans-serif;
  margin-bottom: 5.1rem;

}

header {
   margin-top: 10px;
   display: flex;
   align-items: center;
   gap: 1em;                 /* adds space between flag and title */
   justify-content: center;  /* centers the whole group horizontally */
   margin-bottom: 0.1rem;
}

.page-title {
  text-align: center;     /* Centers the text horizontally */
  font-size: 2.2em;         /* Makes the font twice the base size */
  margin: 20px 0 10px;     /*  adds vertical breathing room.    */
  color: #0078D4;         /* Applies a bold Microsoft-style blue */
  font-weight: 700;
  font-family: 'Segoe UI', sans-serif;
}

@keyframes zoomIn {
  0% {
    transform: scale(0.95);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
  }

@media (max-width: 900px) {
  .gallery-container {
    display: contents;
  }

  .side-border {
    display: none;
  }

  .gallery-frame {
    width: 100%;
    flex: none;
    padding: 10px;
  }
}

#gallery {
  display: contents;           /* ✅ allows injected content to define height */
}

.gallery-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.gallery-container {
  flex: 1;
  display: flex;
  flex-direction: row;         /* ✅ forces horizontal layout */
  align-items: stretch;
  flex-wrap: nowrap;
  width: 100%;
  overflow-x: hidden;          /* prevents scroll */
}

.gallery-frame {
  flex: 1 1 auto%;
  padding: 10px;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  max-width: 100%;
  min-width: 0; /* prevents overflow from child content */
  min-height: 600px; /* fallback for empty state */
  background-color: rgba(255, 255, 255, 0.8);
}

.side-border {
  flex: 0 0 180px;                  /* fixed width */
  height: auto;
  background-repeat: no-repeat;
  background-size: auto 90%;
  background-position: center center;
  background-color: white;
}

.left-border {
  background-image: url('/images/textures/Compass-left.jpg'); 
}

.right-border {
  background-image: url('/images/textures/Compass-right.jpg'); 
}

 .home-icon {
  width: 40px;
  height: 40px;
  position: fixed;
  top: 1rem;
  right: 1rem;
  text-decoration: none;
  z-index: 1000;
}

.home-icon img {
  width: 40px;
  height: 40px;
  transition: transform 0.2s ease, filter 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3); /* Drop shadow */
  border-radius: 4px; /* Optional: softens corners if image isn't already rounded */
}

.home-icon:hover img {
  transform: scale(1.1);
  filter: brightness(1.2);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); /* Slightly stronger on hover */
}

 #map {
  width: 100%;
  max-width: 1000px;
  border: 3px solid #B0C4DE;   /* Light blue border */
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  margin: 20px auto;
  animation: zoomIn 0.6s ease-out;
}

#map-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999;
  font-family: sans-serif;
  font-size: 1.2em;
  color: #333;
}

#lightgallery {
  width: 80%;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;                   /* ✅ Reduce this to tighten spacing */
  padding: 8px;
}

#lightgallery img {
  width: 100%;
  height: 150px;                             /* Fixed height */
  border: 2px solid #B0C4DE;              /* Light blue border */
  border-radius: 6px;                     /* Rounded corners */
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);  /* Soft drop shadow */
  transition: transform 0.2s ease;        /* Smooth hover effect */
  object-fit: cover;                      /* Crops to fill without distortion */
  margin: 8px;

}

#lightgallery img:hover {
  transform: scale(1.03);                 /* Slight zoom on hover */
  box-shadow: 0 6px 12px rgba(0,0,0,0.4); /* Stronger shadow on hover */
}


/* 🎥 Main video wrapper */
#video-wrapper {
  margin-bottom: 1rem;
  text-align: center;
}

/* 🎬 Featured video styling */
.gallery-video {
  display: block;
  margin: 20px auto;
  max-width: 100%;
  border: 4px solid #B0C4DE; /* Light blue border */
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Soft drop shadow */
}

/* 🎞️ Thumbnail strip layout */
.video-thumbnails {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

/* 📺 Thumbnail container */
.video-thumb-container {
  position: relative;
  width: 110px;
  height: 61px;
  cursor: pointer;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.3s ease;
  flex-shrink: 0;
}

.video-thumb-container:hover {
  border-color: #0077cc;
}

/* 📼 Thumbnail video itself */
.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: inline-block;                    /* ✅ Prevents full-width stretching */
  max-width: unset !important;              /* ✅ Cancels inherited max-width */
}


/* ✅ Highlight for currently playing video */
.now-playing {
  width: 120px;               /* Slightly larger */
  height: 68px;
  border-color: #FF5722;      /* Distinctive orange highlight */
  box-shadow: 0 0 10px rgba(255, 87, 34, 0.6);
  z-index: 1;
}

.video-thumb-container.now-playing:hover::after {
  content: 'Now Playing';
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #FF5722;
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  z-index: 3;
}

#featured-video {
  flex: 1;                   /* ✅ Take remaining space */
  max-width: 600px;
  }

.video-layout {
  display: flex;
  flex-direction: row;       /* ✅ Ensure horizontal layout */
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  flex-wrap: nowrap;         /* ✅ Prevent wrapping below */
  width: 100%;
  max-width: 900px;          /* Optional: constrain overall width */
  margin: 0 auto;
  }

.video-thumb-column {
  flex: 0 0 140px;           /* ✅ Fixed width for left column */
  display: flex;
  flex-direction: column;
  align-items: left;
  
}

.video-divider {
  width: 2px;
  background-color: #0078D4;
  min-height: 200px;          /* ✅ fallback height */
  align-self: center;         /* ✅ Vertically center within layout */
  opacity: 0.5;
  padding-top: 40px;          /* ✅ Adds space above */
  padding-bottom: 40px;       /* ✅ Adds space below */
}

.video-thumb-column h3 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0078D4;
  border-bottom: 2px solid #0078D4;
  padding-bottom: 2px;
  text-align: center;
}


.video-thumbnails {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}


.flag-icon {
  width: 32px;
  height: 24px;
  vertical-align: middle;
  margin-right: 8px;
  border-radius: 3px;
}



.navigation-bar {
  margin-top: 0.9rem;                    /* reduce from default or remove entirely */
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 0;                            /* 10px left and right */
  flex-wrap: wrap;
}

.action-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;                                    /*  ✅ Adds space between icon and text */
  padding: 6px 16px;
  background-color: #0078d4;                   /* Microsoft blue */
  color: #FFF;                                /* Controls text and icon color */
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 3px 3px 0 #888888, 2px 2px 8px rgba(0, 0, 0, 0.2); /* grey offset shadow */
  transform: translateY(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.action-button:hover {
  background-color: #005ea2;
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 #666666, 4px 4px 12px rgba(0, 0, 0, 0.3); /* deeper grey shadow */
}

.action-button:active {
  transform: translateY(1px);
  box-shadow: 2px 2px 0 #999999, 3px 3px 8px rgba(0, 0, 0, 0.2); /* pressed look */
}

.action-button.disabled {
  pointer-events: none;
 background-color: #cccccc;
  color: #666666;
  cursor: default;
  box-shadow: none;
}

.action-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  transition: filter 0.3s ease;
  filter: brightness(100%) sepia(0%) saturate(0%) hue-rotate(0deg);
  fill: currentColor;
}

.action-button:hover .action-icon {
  filter: brightness(120%) sepia(80%) saturate(300%) hue-rotate(20deg);
}

.spinning-globe {
  animation: spin 6s linear infinite;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  vertical-align: middle;
  fill: #ffffff;
  transition: fill 0.3s ease;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.4));             /* Slightly stronger contrast */
}

/* Left and right sections share equal space */
  .nav-left,
  .nav-center,
  .nav-right {
  flex: 1;
  display: flex;
  align-items: center;
}

/* Align left button to start */
.nav-left {
  justify-content: flex-start;
}

/* Center button stays centered and doesn't grow */
.nav-center {
  justify-content: center;
}

/* Align right button to end */
.nav-right {
  justify-content: flex-end;
}


#pagination-controls {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.pagination-controls button.active {
  background-color: #0078d4;
  color: white;
  border: none;
  font-weight: bold;
}

.pagination-controls button {
  margin: 0 4px;
  padding: 8px 14px;
  border: none;
  background-color: #f9f9f9;
  color: #333;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 3px 3px 0 #888888, 3px 3px 8px rgba(0, 0, 0, 0.2); /* grey offset shadow */
  transform: translateY(0);
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.pagination-controls button:hover {
  background-color: #e0e0e0;
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 #666666, 4px 4px 16px rgba(0, 0, 0, 0.3); /* deeper shadow */
}

.pagination-controls button:active {
  transform: translateY(1px);
  box-shadow: 2px 2px 0 #999999, 2px 2px 8px rgba(0, 0, 0, 0.2); /* pressed look */
}

.popup-content {
  text-align: center;
  max-width: 220px;
  font-family: 'Segoe UI', sans-serif;
  padding: 6px;
}

.popup-flag {
  width: 32px;
  height: 24px;
  border-radius: 3px;
  margin-bottom: 6px;
}

.popup-content h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: #2a4d7c;
}

.popup-thumb {
  width: 100%;
  border-radius: 6px;
  border: 2px solid #B0C4DE; 
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  margin-bottom: 6px;
}

.popup-link {
  background-color: #e0f0ff;
  padding: 6px 10px;
  border-radius: 4px;
  color: #005a9c;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s ease;
}

.popup-link:hover {
  background-color: #cce4ff;
}

.popup-story-link {
  display: block;
  margin-top: 8px;
  text-align: center;
  text-decoration: none;
}

.popup-story-link .popup-link {
  background-color: #ffe5e5;           /* soft red background */
  padding: 6px;
  border-radius: 4px;
  color: #b30000;                  /* deep red text */
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.popup-story-link .popup-link:hover {
  background-color: #ffcccc;      /* slightly brighter on hover */
}

/* Wrapper to center content */
  .story-wrapper {
  max-width: 800px;
  text-align: left;  
  gap: 2rem;
  margin: 0 auto;             /* centers the block horizontally */
  padding: 3rem;              /* adds breathing room inside the wrapper */
  background: url('images/textures/paper.jpg') repeat; 
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  border-radius: 8px;
  page-break-inside: avoid;
  margin-top: 0;            /* remove any top margin that pushes content down */
  margin-bottom: 0.5rem;
  padding-top: 0;          /* optional: tighten spacing */
}

/* Story container */
  #story-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 0.1rem; /* reduce if it's currently larger */
}

#story-title {
  text-align: center;     /* Centers the text horizontally */
  font-size: 2.2em;         /* Makes the font twice the base size */
  margin: 20px 0 10px;     /*  adds vertical breathing room.    */
  color: #0078D4;         /* Applies a bold Microsoft-style blue */
  font-weight: 700;
  font-family: 'Segoe UI', sans-serif;
}

.story-block h2 {
  grid-column: 1 / -1;
  text-align: center;
  font-family: 'Georgia', serif;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.story-media {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  flex-wrap: wrap;            /* allows wrapping on smaller screens */
  Margin-top: 0;             /* remove any top margin that pushes content down */
  margin-bottom: 0.5rem;
  padding-top: 5rem;             /* optional: tighten spacing */
}

.story-columns {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  margin-bottom: 1rem;
}

.story-text {
  font-size: 13px;
  flex: 2;
  font-family: 'Georgia', serif;
  line-height: 1.5;
}

.story-block p {
  font-family: 'Georgia', serif;
  line-height: 1.5;
  margin-top: 0;
  margin-bottom: 0.rem;
  padding: 0;
}

.story-block:last-child {
  margin-bottom: 0;
}

.story-images {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.story-image {
  max-width: 90%;
  height: auto;
  border: 3px solid #B0C4DE;              /* Light blue border */
  border-radius: 6px;                     /* Rounded corners */
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);  /* Soft drop shadow */
  margin: 8px;
}

.story-flag {
  width: 32px;
  height: 24px;
  margin-top: 10px;
  vertical-align: middle;
  border: 2px solid #ccc;           /* soft border */
  border-radius: 4px;               /* gentle rounding */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); /* subtle shadow */
}

.spinner {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #0078D4;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

.spinning-globe {
  animation: spin 6s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
  fill: #ffffff;
  transition: fill 0.3s ease;
  filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.4));             /* Slightly stronger contrast */
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.action-button:hover .spinning-globe {
  fill: #555555;      /*  medium grey */
}

.hidden {
  display: none;
}
