/* Load Quicksand font from Google Fonts with fallbacks */
@import url("https://fonts.googleapis.com/css2?family=Quicksand:wght@400;600&display=swap");

/* ========== BASE STYLES ========== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f9f9f9;
  color: #333;
  overflow-x: hidden;
}

body.lightbox-open {
  overflow: auto !important;
}

/* Ensure vertical videos are not cut off in Lightbox */
#modalVideo {
  max-height: 90vh;
  max-width: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: auto;
}

/* ========== HEADER ========== */
header,
.header-content {
  background-color: #ff4500;
  color: white;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 10px 20px;
  box-sizing: border-box;
}

header a {
  color: #fff;
  text-decoration: none;
  padding: 0 5px;
  font-weight: bold;
}

.logo img {
  height: 100px;
  width: auto;
}

.header-content .logo img {
  height: 100px;
}

/* ========== NAVIGATION ========== */
nav a {
  color: white;
  margin: 0 5px;
  font-size: 1.1em;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

/* ========== MAIN DROPDOWN MENU STYLES ========== */
.menu-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ff4500;
  padding: 10px 20px;
  flex-wrap: wrap;
}

.menu-toggle {
  display: none;
  font-size: 1.8em;
  background: none;
  color: white;
  border: none;
  cursor: pointer;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 0;
  padding: 0;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

.nav-links a:hover {
  text-decoration: underline;
}

.nav-links a.active {
  background-color: rgba(255, 255, 255, 0.25);
  border-radius: 5px;
  padding: 6px 12px;
}

/* Dropdown menus */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #ff4500;
  padding: 10px;
  border-radius: 5px;
  min-width: 180px;
  z-index: 1000;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
  display: block;
  padding: 6px 12px;
  font-weight: normal;
  white-space: nowrap;
}

/* Mobile styles */
@media (max-width: 1000px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #ff4500;
    padding: 10px 0;
  }

  .nav-links.open {
    display: flex;
  }

  .dropdown-menu {
    position: static;
    background: #ff7043;
    padding-left: 20px;
  }
}

/* ========== HERO SECTION ========== */
.hero {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 70vh;
  min-height: 380px;
  max-height: 800px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 60px 20px;
  box-sizing: border-box;
  transition: background-image 1s ease-in-out;
  margin-top: 100px;
}

.hero h1 {
  font-family: "Pacifico", cursive;
  font-size: 3em;
  margin: 0;
}

.hero p {
  font-size: 1.5em;
}

/* ========== STRUCTURE & LAYOUT ========== */

.pagetitle-header {
  margin-top: 140px;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 15px;
  box-sizing: border-box;
}

.section {
  margin: 20px 0;
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

section[id] {
  scroll-margin-top: 150px;
}

/* ========== ABOUT / EVENTS / CONTACT ========== */
.about p,
.contact p {
  font-size: 1.2em;
  line-height: 1.8;
  text-align: center;
}

.events {
  text-align: center;
}

.events ul {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 0;
  margin: 0;
  list-style: none;
}

.events li {
  background: #ffd700;
  margin: 10px;
  padding: 10px;
  border-radius: 5px;
  font-size: 1.1em;
  flex: 0 0 auto;
  min-width: 200px;
  max-width: 300px;
  box-sizing: border-box;
}

.no-event-message {
  font-size: 1.2rem;
  color: #ff4500;
  font-weight: bold;
  text-align: center;
  margin: 20px 0;
}

.hash-history-img {
  height: 220px;
  width: auto;
  object-fit: cover;
  border: 1px solid #ccc;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
}

/* ========== GALLERY ========== */
.gallery,
#latestGalleryPhotos {
  width: 100%;
  padding: 0 15px;
  text-align: center;
  box-sizing: border-box;
}

.gallery img,
#latestGalleryPhotos img {
  width: 100%;
  max-width: 120px;
  height: auto;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

#latestGalleryPhotos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
}

#latestGalleryPhotos a {
  display: block;
  max-width: 120px;
  width: 100%;
}

.gallery-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.gallery-container.few-items {
  justify-content: center;
}

.gallery-card {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  margin-bottom: 15px;
  cursor: pointer;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-card .card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  text-align: center;
  padding: 5px;
}

/* ========== PHOTO GRID (RUN PHOTOS) ========== */
.photo-col {
  padding: 8px;
  flex: 0 0 100%;
  max-width: 100%;
}

@media (min-width: 576px) {
  .photo-col {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (min-width: 768px) {
  .photo-col {
    flex: 0 0 25%;
    max-width: 25%;
  }
}

@media (min-width: 1200px) {
  .photo-col {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

#run-photos .photo-col:nth-child(1):nth-last-child(2),
#run-photos .photo-col:nth-child(2):nth-last-child(1),
#run-photos .photo-col:only-child {
  flex: 0 0 50%;
  max-width: 50%;
}

#run-photos-section {
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  padding: 5px;
  margin: 10px 0;
}

.square-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* ========== TABS & LABELS ========== */
.nav-tabs .nav-link {
  color: #007bff !important;
}

.nav-tabs .nav-link.active {
  background-color: #007bff !important;
  color: #fff !important;
}

.nav-tabs {
  border-bottom: 1px solid #ddd !important;
}

.new-label {
  position: absolute;
  top: -10px;
  right: -15px;
  font-size: 10px;
  background-color: #007bff;
  color: white;
  padding: 3px 6px;
  border-radius: 5px;
  font-weight: bold;
}

/* ========== MISC ========== */
.hidden {
  display: none;
}

main.main {
  padding-top: 20px; /* Matches your header height */
}

/* ========== FOOTER ========== */

.footer,
footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 20px;
  box-sizing: border-box;
}

.site-footer {
  background-color: #ff4500;
  color: white;
  text-align: center;
  padding: 20px 10px;
  font-family: "Quicksand", sans-serif;
  margin-top: auto;
}

.site-footer .container {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer p,
.site-footer small {
  font-weight: bold;
  color: #ffffff;
  font-size: 1.1rem;
  text-align: center;
  margin-top: 0px;
}

/* Make footer stick to bottom on short pages */
html,
body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* ========== FORMS & UPLOAD ========== */
#dropzone {
  background-color: #f7f9fc;
  cursor: pointer;
}

/* ========== JOIN SECTION (Extended) ========== */
.join .form-container {
  max-width: 400px;
  width: 90%;
  margin: 30px auto;
  padding: 30px;
  background: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

.join form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.join input,
.join select,
.join textarea,
.join button {
  padding: 12px 14px;
  margin: 10px 0;
  font-size: 1em;
  width: 100%;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: white;
}

.join textarea {
  resize: vertical;
  min-height: 80px;
}

.join select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px;
}

.join button {
  background: #ff4500;
  color: white;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.join button:hover {
  background: #e23e00;
}

.join form label {
  margin: 5px 0 0;
  font-size: 0.95rem;
  color: #333;
  width: 100%;
}

.join form label input[type="checkbox"] {
  margin-right: 8px;
  vertical-align: middle;
}

.join #responseMessage {
  margin-top: 15px;
  font-weight: bold;
  text-align: center;
}

/* ========== MISMANAGEMENT TEAM ========== */
.mismanagement .team {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.mismanagement .team-member {
  text-align: center;
  max-width: 150px;
}

.mismanagement .team-member img {
  width: 100%;
  border-radius: 50%;
  max-width: 150px;
  height: auto;
}

.mismanagement .team-member h3 {
  margin: 10px 0 5px;
}

.mismanagement .team-member p {
  margin: 0;
  font-size: 0.9em;
  color: #666;
}

/* ========== RUNS LIST ========== */
#runsList {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 0;
  margin: 20px 0;
  list-style: none;
}

#runsList li {
  background: #ffd700;
  padding: 10px 15px;
  border-radius: 8px;
  font-size: 1em;
  min-width: 220px;
  max-width: 300px;
  box-sizing: border-box;
  flex: 1 1 220px;
}

/* ========== PAGE HEADER TITLE ========== */
.pagetitle-header {
  width: 100%;
  background: linear-gradient(to right, #edb250, #2f4263);
  color: white;
  text-align: center;
  padding: 20px;
}

.pagetitle-header h1 {
  margin: 0;
  font-size: 2.5em;
}

/* ========== DATATABLES & STATS TABLE ========== */

/* Length menu wrapper */
.dataTables_length {
  margin-bottom: 10px;
}

.dataTables_length label {
  font-weight: bold;
  margin-right: 10px;
}

.dataTables_length select {
  width: auto;
  padding: 4px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #fff;
  color: #333;
}

.dataTables_length select option {
  background-color: #fff;
  color: #333;
}

.dataTables_length select:focus {
  outline: none;
  border-color: #66afe9;
  box-shadow: 0 0 5px rgba(102, 175, 233, 0.6);
}

/* Center table content */
table.dataTable td,
table.dataTable th {
  text-align: center;
}

/* Custom adjustments for #hashstats table */
#hashstats th {
  white-space: normal !important;
  word-wrap: break-word;
  line-height: 1.5;
}

#hashstats {
  min-width: 100%;
}

/* Responsive wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dataTables_wrapper {
  width: 100%;
  overflow-x: auto;
}

/* Ensure table has a minimum width */
table.dataTable {
  width: 100% !important;
  min-width: 800px;
}

/* Custom styling for special rows */
.milestone {
  font-weight: bold;
  color: red;
}

.remaining-runs {
  font-weight: bold;
  color: #007bff;
}

/* ========== MAP & LOADING SPINNER ========== */

#map {
  height: 600px;
  width: 100%;
  max-width: 100%;
}

#fullscreen-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
}

.loading-spinner {
  display: none;
  height: 2px;
  width: 100%;
  background-color: #f0f0f0;
  position: relative;
  overflow: hidden;
}

.loading-spinner::before {
  content: "";
  display: block;
  position: absolute;
  width: 50%;
  height: 100%;
  background-color: #333;
  animation: progress 2s linear infinite;
}

@keyframes progress {
  0% {
    left: -50%;
  }

  100% {
    left: 100%;
  }
}

.leaflet-control-attribution {
  display: none !important;
}

/* ========== GALLERY PAGE TITLE HEADER ========== */

.gallery-header {
  background: linear-gradient(to right, #edb250, #2f4263);
  color: white;
  text-align: center;
  padding: 30px 10px;
}

.card-img-top {
  height: 200px;
  object-fit: cover;
}

.col-lg-5th {
  flex: 0 0 20%;
  max-width: 20%;
}

@media (min-width: 992px) {
  .custom-col-5 {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

@media (min-width: 1200px) {
  .col-xl-5th {
    flex: 0 0 20%;
    max-width: 20%;
  }
}

/* Shared badge style for uploader links */
#uploaderLinks .uploader-badge {
  background-color: #e0e0e0;
  color: #000;
  font-size: 1rem;
  padding: 8px 12px;
  border-radius: 20px;
  margin: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
  cursor: pointer;
  text-decoration: none;
}

#uploaderLinks .uploader-badge:hover {
  background-color: #d0d0d0;
  color: #000;
}

/* Active badge (selected uploader) */
#uploaderLinks .uploader-badge.active {
  background-color: #007bff;
  color: white;
}

/* ========== GALLERY ACCESS LOGIN SECTION ========== */
.access-form {
  max-width: 360px;
  margin: 0 auto;
  padding: 2rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* * {
  outline: 1px solid rgba(255, 0, 0, 0.2);
} */
