
/* Base Styles */
body {
  background-color: #0f1419;
  color: #e6e6e6;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Photo Title - Above the photo */
.photo-title {
  font-size: 28px;
  margin-bottom: 15px;
  text-align: center;
}

/* Main Photo Container */
.photo-container {
  text-align: center;
  margin-bottom: 30px;
}

.photo-display img, .video-player video {
  max-width: 100%;
  height: auto;
  border: 3px solid #333;
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  display: block;
  margin: 0 auto;
}

/* The horizontal row containing thumbnails and description */
.content-row {
  display: table;
  width: 100%;
  margin: 20px 0;
  border-spacing: 15px 0;
}

/* Table-based layout for reliable positioning */
.thumbnail-cell {
  display: table-cell;
  width: 20%;
  vertical-align: top;
  position: relative;
}

.description-cell {
  display: table-cell;
  width: 60%;
  vertical-align: top;
  text-align: center;
}

/* Thumbnail styling */
.thumbnail-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  background-color: rgba(15, 20, 25, 0.7);
  border: 3px solid #446;
  border-radius: 8px;
  padding: 4px;
  transition: transform 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
}

.thumbnail-wrapper:hover {
  transform: scale(1.05);
  border-color: #6d9eeb;
}

.thumbnail-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 150px;
  object-fit: contain;
  border-radius: 4px;
}

/* Thumbnail labels */
.thumbnail-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-weight: bold;
  pointer-events: none;
  z-index: 10;
}

/* Photo description */
.photo-description {
  margin: 0 auto 15px auto;
  line-height: 1.6;
  text-align: center;
  font-size: 16px;
}

.photo-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
  font-size: 14px;
  color: #a0a0a0;
}

/* Category Links */
.category-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.breadcrumbs, .breadcrumbs_current {
  display: inline-block;
  margin: 5px;
  background-color: #2a3038;
  padding: 6px 12px;
  border-radius: 15px;
  font-size: 14px;
}

.breadcrumbs a, .breadcrumbs_current a {
  color: #e6e6e6;
  text-decoration: none;
  border: none;
  background-color: transparent;
  padding: 0;
  font-style: normal;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs_current {
  background-color: #6d9eeb;
}

.breadcrumbs_current a {
  color: #0f1419;
  font-weight: bold;
}

/* Navigation Menu */
.site-navigation {
  margin-top: 40px;
  border-top: 1px solid #333;
  padding-top: 20px;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-section h4 {
  color: #6d9eeb;
  margin-bottom: 10px;
  text-align: center;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links li {
  margin: 4px;
}

.nav-links a {
  display: inline-block;
  background-color: #2a3038;
  color: #e6e6e6;
  padding: 6px 12px;
  border-radius: 15px;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.nav-links a:hover {
  background-color: #3a4555;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }

  .photo-title {
    font-size: 22px;
    margin-top: 0;
  }
  
  /* Convert table to stack on mobile */
  .content-row {
    display: block;
    width: 100%;
  }
  
  .description-cell {
    display: block;
    width: 100%;
    margin-bottom: 20px;
  }
  
  /* Create a new flex row for thumbnails on mobile */
  .thumbnails-mobile {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 20px;
  }
  
  .thumbnail-cell {
    display: block;
    width: auto; /* Don't display these at all */
  }
  
  .thumbnail-cell.mobile {
    display: block;
    width: 25%; /* 1/4 of screen width */
  }
  
  .thumbnail-wrapper img {
    max-height: 100px;
  }
  
  .thumbnail-label {
    font-size: 12px;
    padding: 3px 6px;
  }

  .nav-section h4 {
    margin-bottom: 8px;
  }

  /* Mobile-specific nav links */
  .mobile-nav-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0 auto;
    max-width: 300px;
  }

  .mobile-nav-grid a {
    text-align: center;
    background-color: #2a3038;
    color: #e6e6e6;
    padding: 8px 4px;
    border-radius: 15px;
    text-decoration: none;
    font-size: 14px;
    display: block;
  }
}

/* Legacy support classes */
.thumbs img {
  border: 3px solid #9eA0Ba;
  border-radius: 4px;
  padding: 8px;
  margin: .5em;
}

.updates_thumbs {
  border: 6px solid #9A9Ac8;
  border-radius: 15px;
  margin: 6px;
  object-fit: cover;
}

.code {
  background-color: #dddddd;
  font-size: large;
  border: 4px solid #555555;
  padding: 6px;
  color: #222222;
}

.search_box {
  background-color: #333344;
  padding: 2px;
  border: 3px #888899 solid;
  margin: 4px 1em 4px 0px;
  text-align: center;
  width: 175px;
}

.search_input {
  margin: 4px;
  border: 2px #9999aa solid;
  background: #d2d2e5;
  color: #222233;
}

.search_submit {
  border: 4px #9999bb inset;
  color: #444455;
  background-color: #e2e2f4;
  margin: 4px;
}

.sections li {
  font-size: large;
  margin-bottom: .5em;
}

.categories li {
  font-size: larger;
  margin-bottom: .5em;
}

.categories, .sections ul {
  text-align: left;
}

.links_list {
  margin: 1em 4em 1em 4em;
  text-align: center;
}

.links-list a {
  margin-left: 1em;
  margin-right: 1em;
}

.links_list a:hover {
  background-color: #30405A;
}

/* Hide desktop elements on mobile and vice versa */
@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
}

@media (min-width: 769px) {
  .mobile-only {
    display: none !important;
  }
}
