/* ======================================== */
/* NEON GALLERY HP HYDRA CSS - VERSION 250805-027 */
/* ======================================== */
/* Date: 2025-08-05 at 13:27:17 */
/* Description: y */
/* ======================================== */
/* Version Log: */
/* - Version bump for deployment */
/* - y */
/* ======================================== */
body {
  padding: 0;
  margin: 0; 
}


@keyframes fadeUpDescription {
  0% {
      opacity: 0;
  }
  100% {
      opacity: 1;
  }
}

/* Common styles for all description types */
.lightbox-description,
.lightbox-video-description,
.singles-mode .lightbox-description,
.singles-mode .lightbox-video-description {
  display: none;
  opacity: 0;
  animation: fadeUpDescription 0.5s ease forwards;
  animation-delay: 0.5s;
}

/* Special handling for rich text editor paragraphs */
.lightbox-description p.rteBlock,
.lightbox-video-description p.rteBlock,
.lightbox-description div.rteBlock,
.lightbox-video-description div.rteBlock {
  display: inline !important; /* Make paragraphs flow like inline text */
}

/* Mobile specific animations */
@media (max-aspect-ratio: 1/1) {
  .mobile-description,
  .mobile-video-description {
      opacity: 0;
      animation: fadeUpDescription 0.5s ease forwards;
      animation-delay: 0.5s;
  }
}

.neon-lightbox.singles-mode {
  position: relative !important; /* Changed from fixed */
  height: 100vh !important; /* Use full viewport height */
  width: auto !important;
  background-color: rgba(var(--lightbox-bg-color), var(--lightbox-bg-opacity));
  margin-left: var(--multi-spacing);
  margin-right: var(--multi-spacing);
  overflow: visible;
  background: transparent !important;
  z-index: 999900 !important;
  transition: height 0.3s ease-out;
  display: flex !important;
  align-items: center !important;
  transform: translateY(0) !important; /* Reset transform */
  top: auto !important; /* Reset top */
  left: auto !important; /* Reset left */
  right: auto !important; /* Reset right */
  outline: none;
  border: none;
  box-shadow: none;
  position: relative !important; /* Ensure proper positioning context for buttons */
}
/* Adjust content container to work with fixed positioning */
.singles-mode .neon-lightbox-content {
  height: 95vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Start from top to eliminate extra spacing */
  align-items: center;
  box-sizing: border-box;
  background: transparent !important;
  z-index: 999990 !important;
  padding-top: 0 !important; /* Remove top padding to allow proper centering */
  max-height: 100vh !important; /* Match parent max-height */
  overflow-y: visible; /* auto will Allow scrolling if content is too tall */
}

/* Update image container constraints */
.singles-mode .lightbox-image-container {
  width: 100% !important; /* Fixed: Use full width instead of fit-content for proper centering */
  max-width: calc(100% - 60px) !important; /* Account for arrow space relative to container */
  height: 100%; /* Take full height for proper centering */
  min-height: 60vh; /* Ensure minimum height for centering */
  max-height: 80vh !important; /* Adjust to leave room for description */
  display: flex;
  flex-direction: column !important; /* Fixed: Ensure proper flex direction */
  justify-content: center; /* Fixed: Center vertically */
  align-items: center !important;
  z-index: 2 !important;
  position: relative !important; /* Ensure proper positioning context for overlays */
}

/* Also constrain the content wrapper in singles mode */
.singles-mode .lightbox-content-wrapper {
  max-width: calc(100% - 60px) !important; /* Account for arrow space relative to container */
}

/* Hide close button in singles mode */
.singles-mode .neon-lightbox-close-btn {
  display: none !important;
}

.singles-mode .lightbox-image-container img {
  width: auto;
  height: auto;
  max-width: calc(100% - 60px) !important; /* Match container constraint to account for arrow space */
  max-height: 80vh !important; /* Match container constraint */
  object-fit: contain;
  display: block !important; /* Fixed: Ensure proper display for centering */
  margin: 0 auto !important; /* Fixed: Center the image horizontally */
}

/* Description styling for singles mode */
.singles-mode .lightbox-description,
.singles-mode .lightbox-video-description {
  margin-top: .5rem;
  text-align: left;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  font-size: 1rem;
  line-height: 1.2;
  padding: 0;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
  width: calc(100% - 60px) !important; /* Match image container width */
  max-width: calc(100% - 60px) !important; /* Match image container max-width constraint */
  max-height: 14vh;
  overflow-y: visible;
  margin-left: 0 !important; /* Align with left edge of image */
  margin-right: auto !important; /* Allow right margin to auto-adjust */
}


.lightbox-description strong,
.mobile-description strong {
    display: block;
    margin-bottom: 0.5em;
}
/* Ensure strong and em combinations stay inline */
.lightbox-description strong,
.lightbox-description em,
.lightbox-description strong em,
.lightbox-description em strong,
.mobile-description strong,
.mobile-description em,
.mobile-description strong em,
.mobile-description em strong,
.horiz-description strong,
.horiz-description em,
.horiz-description strong em,
.horiz-description em strong {
    display: inline !important;
    margin: 0;
    padding: 0;
}

/* Handle paragraph formatting */
.lightbox-description p.rteBlock,
.mobile-description p.rteBlock,
.horiz-description p.rteBlock {
    display: inline;
    margin: 0;
    padding: 0;
}

/* Show descriptions in singles mode when showDescription is true */
body.show-description .singles-mode .lightbox-description,
body.show-description .singles-mode .lightbox-video-description {
  display: block !important;
}

/* Hide descriptions in singles mode when showDescription is false */
body:not(.show-description) .singles-mode .lightbox-description,
body:not(.show-description) .singles-mode .lightbox-video-description {
  display: none !important;
}

/* ALWAYS hide grid overview in Singles mode */
.singles-mode .grid-overview-container,
.neon-lightbox.singles-mode ~ .grid-overview-container,
.gallery-wrapper .singles-mode ~ .grid-overview-container {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Descriptions on demand - hide by default when enabled */
.description-on-demand {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
  pointer-events: none !important;
}

/* Show descriptions when on-demand is active - HIGHER SPECIFICITY */
.lightbox-description.description-on-demand.show,
.lightbox-video-description.description-on-demand.show {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: absolute !important;
  top: 35% !important; /* Start 35% from the top */
  left: 0 !important;
  right: 0 !important;
  bottom: 15% !important; /* End 15% from the bottom */
  background: transparent !important; /* Remove dark background */
  color: var(--menu-color, rgb(130, 130, 130)) !important; /* Use menu color instead of white */
  padding: 2rem !important;
  z-index: 100005 !important;
  overflow-y: auto !important; /* Enable vertical scrolling */
  font-size: 1.1rem !important;
  line-height: 1.6 !important;
  text-align: left !important; /* Left-align the text content */
  width: 70% !important; /* Set width to 70% */
  margin: 0 auto !important; /* Center horizontally */
  /* Opacity handled by JavaScript for smooth fade-in animation */
  animation: fadeInDescription 0.8s ease-in-out forwards !important; /* Add smooth fade-in animation */
  transform: translateY(0) !important; /* Ensure proper vertical centering */
  box-sizing: border-box !important; /* Ensure padding is included in dimensions */
  max-height: none !important; /* Override the 15vh constraint */
  max-width: none !important; /* Override the 90vw constraint */
  transition: opacity 0.8s ease-in-out !important; /* Add smooth transition as fallback */
  /* CRITICAL: Force percentage-based positioning */
  top: 35% !important;
  bottom: 15% !important;
  height: auto !important;
  min-height: 200px !important; /* Ensure minimum height for content */
}



/* Adjust description positioning for vertical images */
@media (max-aspect-ratio: 1/1) {
  .lightbox-description.description-on-demand.show,
  .lightbox-video-description.description-on-demand.show {
    top: 50% !important; /* Better vertical centering for mobile */
    bottom: 10% !important; /* Better vertical centering for mobile */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important; /* Center content vertically within the overlay */
    align-items: center !important; /* Center content horizontally */
    text-align: center !important; /* Center text content */
  }
  
  /* Override any body.show-description rules for mobile */
  body.show-description .lightbox-description.description-on-demand.show,
  body.show-description .lightbox-video-description.description-on-demand.show {
    top: 50% !important; /* Force mobile positioning */
    bottom: 10% !important; /* Force mobile positioning */
    display: flex !important; /* Force flexbox */
    flex-direction: column !important;
    justify-content: center !important; /* Force vertical centering */
    align-items: center !important; /* Force horizontal centering */
    text-align: center !important; /* Force text centering */
  }
  
  /* Maximum specificity override for mobile */
  body.show-description .neon-lightbox.singles-mode .lightbox-description.description-on-demand.show,
  body.show-description .neon-lightbox.singles-mode .lightbox-video-description.description-on-demand.show {
    top: 50% !important; /* Force mobile positioning */
    bottom: 10% !important; /* Force mobile positioning */
    display: flex !important; /* Force flexbox */
    flex-direction: column !important;
    justify-content: center !important; /* Force vertical centering */
    align-items: center !important; /* Force horizontal centering */
    text-align: center !important; /* Force text centering */
  }
  
  /* Override any inline or computed styles for mobile */
  @media (max-aspect-ratio: 1/1) {
    .lightbox-description.description-on-demand.show[style*="top"],
    .lightbox-video-description.description-on-demand.show[style*="top"] {
      top: 50% !important; /* Override any inline top styles */
    }
    
    .lightbox-description.description-on-demand.show[style*="display"],
    .lightbox-video-description.description-on-demand.show[style*="display"] {
      display: flex !important; /* Override any inline display styles */
    }
  }
  
  /* Force the description element to be positioned at viewport center on mobile */
  @media (max-aspect-ratio: 1/1) {
    .lightbox-description.description-on-demand.show,
    .lightbox-video-description.description-on-demand.show {
      top: 50vh !important; /* Position at 50% of viewport height */
      bottom: 5% !important; /* Give more space at bottom */
      transform: translateY(-50%) !important; /* Center the element itself */
    }
    
    /* Maximum specificity override for mobile positioning */
    body.show-description .neon-lightbox.singles-mode .lightbox-description.description-on-demand.show,
    body.show-description .neon-lightbox.singles-mode .lightbox-video-description.description-on-demand.show {
      top: 50vh !important; /* Force mobile positioning */
      bottom: 5% !important; /* Force bottom spacing */
      transform: translateY(-50%) !important; /* Center the element itself */
    }
  }
}

/* Force description content to be centered within the flex container */
.lightbox-description.description-on-demand.show > *,
.lightbox-video-description.description-on-demand.show > * {
  max-width: 100% !important;
  width: 100% !important;
  text-align: left !important;
}

/* Center single-line text, left-align multi-line text for descriptions */
.lightbox-description.description-on-demand.show p:only-child,
.lightbox-video-description.description-on-demand.show p:only-child,
.lightbox-description.description-on-demand.show div:only-child,
.lightbox-video-description.description-on-demand.show div:only-child {
  text-align: center !important;
}

/* When there are multiple paragraphs or elements, keep left-aligned */
.lightbox-description.description-on-demand.show p:not(:only-child),
.lightbox-video-description.description-on-demand.show p:not(:only-child),
.lightbox-description.description-on-demand.show div:not(:only-child),
.lightbox-video-description.description-on-demand.show div:not(:only-child) {
  text-align: left !important;
}

/* Add fade-in animation for descriptions */
@keyframes fadeInDescription {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

/* Dim the image when description is shown - smooth fade transition */
.lightbox-image-container.has-overlay img {
  opacity: 0.15 !important; /* Stronger dimming for better text contrast */
  transition: opacity 0.8s ease-in-out !important; /* Smooth, longer transition */
  animation: none !important; /* Disable conflicting animation */
  animation-fill-mode: forwards !important; /* Ensure animation state is maintained */
}

/* Ensure the image container also has the transition for smooth dimming */
.lightbox-image-container {
  position: relative !important;
  transition: all 0.8s ease-in-out !important; /* Smooth, longer transitions for all changes */
}

/* Ensure images have transition by default */
.lightbox-image-container img {
  transition: opacity 0.8s ease-in-out !important; /* Ensure smooth transition is always applied */
  animation-fill-mode: forwards !important; /* Ensure animation state is maintained */
}

/* Ensure the image container can handle overlays */

/* Removed the dark overlay background - just using image dimming */

/* Info and Overview buttons container */
.info-overview-buttons {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 100010;
}

/* Ensure buttons are visible in both singles mode and regular lightbox */
.singles-mode .info-overview-buttons,
.neon-lightbox .info-overview-buttons {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 15px;
  z-index: 100010;
}

/* Info and Overview button styles */
.info-button,
.overview-button {
  background: transparent !important;
  border: none !important;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  padding: 0 !important;
  font-family: var(--menu-font, inherit) !important;
  font-size: var(--menu-font-size, inherit) !important;
  font-weight: var(--menu-font-weight, inherit) !important;
  font-style: var(--menu-font-style, inherit) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  cursor: pointer;
  border-radius: 0 !important;
  transition: color 0.2s ease;
  min-width: auto !important;
  text-align: center;
  text-decoration: none !important;
  box-shadow: none !important;
  outline: none !important;
  margin: 0 !important;
  line-height: 1 !important;
  display: inline !important;
}

.info-button:hover,
.overview-button:hover {
  background: transparent !important;
  border: none !important;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  opacity: 0.8;
  transform: none !important;
}

.info-button.active,
.overview-button.active {
  background: transparent !important;
  color: rgba(130, 130, 130, 0.5) !important;
  border: none !important;
  opacity: 1;
}

/* Mobile adjustments for buttons */
@media (max-aspect-ratio: 1/1) {
  .info-overview-buttons {
    bottom: 10px;
    gap: 10px;
  }
  
  .singles-mode .info-overview-buttons {
    bottom: 10px; /* Increased from 20px to account for 100vh container height */
  }
  
  .info-button,
  .overview-button {
    padding: 0 !important;
    font-size: var(--menu-font-size, inherit) !important;
    min-width: auto !important;
  }
}

/* Ensure buttons don't interfere with existing elements */
.singles-mode .info-overview-buttons {
  bottom: 10px; /* Increased from 40px to account for 100vh container height */
  z-index: 100020 !important; /* Higher z-index to ensure buttons are above images */
  position: absolute !important;
  pointer-events: auto !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: auto !important; /* Don't force full width */
  text-align: center !important;
  display: flex !important;
  gap: 15px !important;
  background: transparent !important; /* Ensure no background interference */
}

/* Ensure lightbox content has proper positioning context for buttons */
.singles-mode .neon-lightbox-content {
  position: relative !important;
}

/* Ensure description overlays are positioned correctly in Singles mode */
.singles-mode .lightbox-description.description-on-demand.show,
.singles-mode .lightbox-video-description.description-on-demand.show {
  position: absolute !important;
  top: 35% !important;
  left: 15% !important; /* Center the 70% width */
  right: 15% !important; /* Center the 70% width */
  bottom: 15% !important;
  display: block !important;
  background: transparent !important;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  padding: 2rem !important;
  z-index: 100005 !important;
  overflow-y: auto !important;
  font-size: 1.1rem !important;
  line-height: 1.6 !important;
  text-align: left !important;
  width: 70% !important;
  margin: 0 auto !important;
  /* Opacity and transition handled by JavaScript for smooth fade-in */
  transform: translateY(0) !important;
  box-sizing: border-box !important;
  max-height: none !important;
  max-width: none !important;
}

/* Show info text when active - opacity handled by JavaScript */
.singles-mode .lightbox-description.description-on-demand.show,
.singles-mode .lightbox-video-description.description-on-demand.show {
  /* Opacity is set by JavaScript for smooth fade-in */
}

/* Hide buttons in autoplay mode */
.singles-mode.autoplay-mode .info-overview-buttons {
  display: none !important;
}

/* Singles mode specific button styles */
.singles-mode .info-button,
.singles-mode .overview-button {
  background: transparent !important;
  border: none !important;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  padding: 0 !important;
  font-family: var(--menu-font, inherit) !important;
  font-size: var(--menu-font-size, inherit) !important;
  font-weight: var(--menu-font-weight, inherit) !important;
  font-style: var(--menu-font-style, inherit) !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  cursor: pointer !important;
  border-radius: 0 !important;
  transition: color 0.2s ease;
  min-width: auto !important;
  text-align: center;
  text-decoration: none !important;
  box-shadow: none !important;
  outline: none !important;
  margin: 0 !important;
  line-height: 1 !important;
  display: inline !important;
  z-index: 100021 !important; /* Ensure buttons are above everything */
  position: relative !important;
  pointer-events: auto !important;
}

.singles-mode .info-button:hover,
.singles-mode .overview-button:hover {
  background: transparent !important;
  border: none !important;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  opacity: 0.8;
  transform: none !important;
}

.singles-mode .info-button.active,
.singles-mode .overview-button.active {
  background: transparent !important;
  color: rgba(130, 130, 130, 0.5) !important;
  border: none !important;
  opacity: 1;
}

/* Adjust arrows for singles mode */
.singles-mode .arrow {
  position: fixed !important; /* Use fixed positioning like grid lightbox */
  top: 50% !important;
  transform: translateY(-50%) !important;
  z-index: 100003 !important; /* Higher z-index to appear above content */
  background-color: rgba(255, 255, 255, 0.04);
  width: 30px !important; /* Half the original size */
  height: 30px !important; /* Half the original size */
  display: flex !important;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease-out;
  font-size: 1.5rem; /* Reduced font size to match smaller button */
  padding: 0; /* Remove padding to center arrow properly */
}

.singles-mode .left-arrow {
  left: 30px !important; /* Fixed distance from left edge of gallery container */
}

.singles-mode .right-arrow {
  right: 30px !important; /* Fixed distance from right edge of gallery container */
}



/* Singles mode filename styles */
.singles-mode .lightbox-filename {
  display: block;
  margin-top: 0.3rem;
  text-align: left;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  opacity: 0.7;
  font-size: 1.1rem;
  padding: 0;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
  width: 100%;
  max-width: 100% !important;
  margin-bottom: 0.3rem;
}

/* Hide filenames when feature is disabled */
body:not(.show-filename) .lightbox-filename,
body:not(.show-filename) .singles-mode .lightbox-filename {
  display: none !important;
}

/* Show filenames when feature is enabled */
body.show-filename .lightbox-filename,
body.show-filename .singles-mode .lightbox-filename {
  display: block !important;
}

/* Singles mode filename styles */
.singles-mode .lightbox-filename {
  font-size: 1.1rem;
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
}

/* Mobile adjustments for singles mode */
@media (max-aspect-ratio: 1/1) {
  .neon-lightbox.singles-mode {
    height: 80vh !important;  /* Set a fixed height to center against */
    margin-left: 0px;
    margin-right: 0px;
    margin-top: 10vh !important; /* Add top margin to center the 80vh container in the viewport */
    display: flex;
    align-items: center;
}

.lightbox-filename {
  font-size: 1rem;
  margin-top: 0.3rem;
  padding: 0 3%;
  width: 94%;
}

.singles-mode .neon-lightbox-content {
    height: 100% !important;  /* Take full height of parent */
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;  /* Center content vertically */
    align-items: center;
    position: relative !important; /* Ensure proper positioning context for buttons */
}

.singles-mode .lightbox-image-container {
    width: fit-content !important; /* Match grid lightbox */
    max-width: calc(100% - 40px) !important; /* Account for arrow space relative to container */
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1;  /* Take available space */
    z-index: 1; /* Lower z-index so buttons appear above */
}

/* Also constrain the content wrapper in singles mode on mobile */
.singles-mode .lightbox-content-wrapper {
    max-width: calc(100% - 40px) !important; /* Account for arrow space relative to container */
}

.singles-mode .lightbox-image-container img {
    width: auto;
    height: auto;
    max-width: calc(100% - 40px) !important; /* Match container constraint to account for arrow space */
    max-height: 60vh !important;  /* Leave room for description */
    object-fit: contain;
}
  
  .singles-mode .lightbox-description,
  .singles-mode .lightbox-video-description {
      max-height: 14vh;
      font-size: 1rem;
      margin-top: 0.1rem; /* Much tighter spacing for mobile */
      display: flex !important;
      flex-direction: column !important;
      justify-content: center !important; /* Center content vertically */
      align-items: center !important; /* Center content horizontally */
  }
  
  /* Mobile arrow adjustments */
  .singles-mode .arrow {
      width: 20px !important; /* Half the original mobile size */
      height: 20px !important; /* Half the original mobile size */
      background-color: rgba(255, 255, 255, 0.15);
      opacity: 1;
      animation: fadeOutArrows 2s forwards;
      font-size: 1rem; /* Smaller font for mobile */
      padding: 0; /* Remove padding to center arrow properly */
  }
  
  .singles-mode .left-arrow {
      left: 20px !important; /* Fixed distance from left edge of gallery container on mobile */
  }
  
  .singles-mode .right-arrow {
      right: 20px !important; /* Fixed distance from right edge of gallery container on mobile */
  }
  
  /* Add fade animation */
  @keyframes fadeOutArrows {
      0% { opacity: 1; }
      70% { opacity: 1; }
      100% { opacity: 0; }
  }
}

/* Mobile landscape mode */
@media (max-aspect-ratio: 13/9) and (min-aspect-ratio: 1/1) {
  .neon-lightbox.singles-mode {
      height: auto !important;
      min-height: 0 !important;
  }
}

/* Reset container size when returning to desktop */
@media (min-aspect-ratio: 13/9) {
  .neon-lightbox.singles-mode {
      height: auto !important;
      min-height: 0 !important;
  }
}

/* Reset container size when returning to desktop */
@media (min-aspect-ratio: 13/9) {
  .neon-lightbox.singles-mode {
      height: auto !important;
      min-height: 0 !important;
  }
}

.masonry-container {
  max-height: none;
  background-color: transparent !important;
  margin-top: var(--multi-spacing);
  margin-left: var(--multi-spacing);
  margin-right: var(--multi-spacing); 
  margin-bottom: var(--multi-spacing);
}

.masonry {
  column-gap: var(--grid-spacing);
  background-color: transparent !important;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: var(--grid-spacing);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.8s ease; /* Match the rollover image transition time */
  opacity: 1;
  will-change: opacity; /* Performance optimization for transitions */
}


.masonry-item .rollover-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: opacity;
}

.masonry-item .play-button,
.masonry-item .play-button svg {
  opacity: .6;
  transition: opacity 0.8s ease;
}

.masonry-item:hover img,
.masonry-item:not(:hover) img,
.masonry-item:hover .rollover-image,
.masonry-item:not(:hover) .rollover-image,
.masonry-item:hover .grid-image-overlay,
.masonry-item:not(:hover) .grid-image-overlay {
  transition: opacity 0.8s ease;
}

.masonry-item:hover .rollover-image {
  opacity: 1;
}

.masonry-item:hover .play-button,
.masonry-item:hover .play-button svg {
  opacity: 1;
}

.masonry-item.title-is-overlay:hover .play-button {
  opacity: 0;
}

.text-block {
  max-width: 66%;
  padding: 0;
  text-align: left;
  margin-bottom: 1vw;
}

.text-block:empty {
  display: none;
}

.text-block h3 {
  max-width: 66%;
  margin-bottom: 1em;
}

.grid-overview-container {
  display: none;
  margin-bottom: 0;
  margin-left: var(--multi-spacing);
  margin-right: var(--multi-spacing);
  padding: 1rem 0;
  background: transparent;
  font-family: var(--menu-font, inherit);
  font-size: var(--menu-font-size, 1rem);
  color: var(--menu-color, rgb(130, 130, 130));
  line-height: 1.6;
  /* Add smooth transition for fade-in animation */
  transition: opacity 0.8s ease-in-out;
}

.grid-overview-content {
  max-width: 100%;
  word-wrap: break-word;
  overflow-wrap: break-word;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  font-family: var(--menu-font, inherit) !important;
  font-size: var(--menu-font-size, 1rem) !important;
}

.grid-overview-content h1,
.grid-overview-content h2,
.grid-overview-content h3,
.grid-overview-content h4,
.grid-overview-content h5,
.grid-overview-content h6 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-weight: bold;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  font-family: var(--menu-font, inherit) !important;
  font-size: var(--menu-font-size, 1rem) !important;
}

.grid-overview-content p {
  /* Preserve natural paragraph spacing from rich text editor */
  margin-top: 1em !important; /* Standard paragraph spacing */
  margin-bottom: 1em !important; /* Standard paragraph spacing */
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  font-family: var(--menu-font, inherit) !important;
  font-size: var(--menu-font-size, 1rem) !important;
  font-weight: var(--menu-font-weight, normal) !important;
}

/* Force grid overview text color with maximum specificity */
.grid-overview-container .grid-overview-content p,
.grid-overview-container .grid-overview-content div,
.grid-overview-container .grid-overview-content span,
.grid-overview-container .grid-overview-content strong,
.grid-overview-container .grid-overview-content em,
.grid-overview-container .grid-overview-content a {
  color: var(--menu-color, rgb(130, 130, 130)) !important;
}

.grid-overview-content p:last-child {
  margin-bottom: 0 !important; /* Remove bottom margin from last paragraph */
}

/* Handle empty paragraphs with line breaks that rich text editors often insert */
.grid-overview-content p:only-child:has(br:only-child),
.grid-overview-content p:has(br:only-child) {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  line-height: 0 !important;
}

/* Alternative rule for browsers that don't support :has() */
.grid-overview-content p br:only-child {
  display: none !important;
}

/* More specific rule for empty paragraphs with only a br tag */
.grid-overview-content p:empty,
.grid-overview-content p:blank {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  line-height: 0 !important;
  display: none !important;
}

/* Target paragraphs that contain only whitespace and br tags */
.grid-overview-content p:has(br:only-child),
.grid-overview-content p:has(br:first-child:last-child) {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  line-height: 0 !important;
  display: none !important;
}

.grid-overview-content strong {
  font-weight: bold;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
}

.grid-overview-content em {
  font-style: italic;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
}

.grid-overview-content a {
  color: inherit;
  text-decoration: underline;
}

.grid-overview-content a:hover {
  opacity: 0.8;
}

/* Mobile responsiveness for grid overview */
@media (max-aspect-ratio: 1/1) {
  .grid-overview-container {
    margin-bottom: 0;
    margin-left: var(--multi-spacing);
    margin-right: var(--multi-spacing);
    padding: 0.5rem 0;
    font-size: var(--menu-font-size, 0.9rem);
  }
  
  .grid-overview-content h1,
  .grid-overview-content h2,
  .grid-overview-content h3,
  .grid-overview-content h4,
  .grid-overview-content h5,
  .grid-overview-content h6 {
    margin-bottom: 0.75rem;
  }
  
  .grid-overview-content p {
    /* Preserve natural paragraph spacing from rich text editor */
    margin-top: 1em !important; /* Standard paragraph spacing */
    margin-bottom: 1em !important; /* Standard paragraph spacing */
  }
}

.description-overlay {
  display: none;
  position: fixed;
  z-index: 100000;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44vw;
  height: 33vh;
  background-color: rgba(var(--lightbox-bg-color), var(--lightbox-bg-opacity));
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
  padding: 20px 40px 20px 20px;
  overflow: hidden;
  opacity: 0;
  animation: fade-up 0.3s ease-out forwards;
}

.description-overlay-text {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none; /* For Firefox */
  -ms-overflow-style: none; /* For Internet Explorer and Edge */
  color: rgb(var(--lightbox-close-color, 0, 0, 0));
}

.description-overlay-text::-webkit-scrollbar {
  display: none; /* For Chrome, Safari, and Opera */
}


.description-overlay h3 {
  margin-top: 0;
  text-align: left;
  color: rgb(var(--lightbox-close-color, 0, 0, 0));
}

.description-overlay p {
  text-align: left;
  text-decoration: none;
  line-height: 1.5;
  color: rgb(var(--lightbox-close-color, 0, 0, 0));
}

.description-overlay-content {
  display: flex;
  height: 100%;
  position: relative;
}

.description-overlay-image {
  max-height: 100%;
  width: auto;
  margin-right: 1vw;
  object-fit: contain;
}


.description-overlay .neon-lightbox-close-btn {
  position: absolute;
  top: 1vw;
  right: 1vw;
  font-size: 24px;
  color: rgb(var(--lightbox-close-color, 0, 0, 0));
  cursor: pointer;
  z-index: 1;
  width: auto;
  height: auto;
}

.description-overlay-shim {
  display: none;
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.01);
}

@keyframes fade-up {
  0% {
    opacity: 0;
    transform: translate(-50%, -48%);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.masonry-item.fade-in {
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.masonry-item.fade-in.visible {
  opacity: 1;
}

@keyframes fadeUpGrid {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.grid-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(var(--grid-image-overlay-color), var(--grid-image-overlay-opacity));
  display: flex;
  justify-content: var(--title-text-align, center);
  align-items: center;
  opacity: 0;
  transition: opacity .8s;
  pointer-events: none;
  padding: 0 1rem;
}

.masonry-item:hover .grid-image-overlay {
  opacity: 1;
}

.grid-image-title {
  transition: opacity 0.3s ease;
  text-align: var(--title-text-align, center);
  padding-top: .5rem; 
}

.grid-image-title h3 {
  margin: 0;
  text-align: var(--title-text-align, center);
}

.hero-wrapper {
  position: absolute;
  left: 0;
  right: 0;
  box-sizing: border-box;
}

.hero-wrapper .masonry-item {
  width: 100% !important;
  height: auto !important;
}

.hero-wrapper .masonry-item img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.hero-spacer {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Add new CSS just for fixed hero masking */
.fixed-hero-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  z-index: -1;
}

.hero-wrapper.fixed-hero .mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.hero-wrapper.fixed-hero .fixed-hero-content {
  position: absolute;
  top: 50%;  /* Changed from bottom positioning */
  left: 20%; 
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  z-index: 2;
  text-decoration: none;
  cursor: pointer;
  text-align: left; 
  width: 90%; /* Give some space on sides */
}

.hero-wrapper.fixed-hero .fixed-hero-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  color: var(--menu-color, rgb(130, 130, 130));
  text-align: left;
}

.hero-wrapper.fixed-hero .fixed-hero-link-text {
  font-size: 1rem;
  text-align: left;
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.4);
  color: var(--menu-color, rgb(130, 130, 130));
  border: 1px solid var(--menu-color, rgb(130, 130, 130));
  padding: 0.5rem 1rem;
  display: inline-block; /* Makes the border box wrap the text nicely */
}

/* To fix the background image showing when scrolling */
.fixed-hero-background {
  position: fixed;
  top: 4vh;
  left: 0;
  width: 100vw;
  height: 92vh;
  background-size: cover;
  background-position: center;
  z-index: -1;
  overflow: hidden; 
  clip: rect(0, auto, 94vh, 0);
  background-color: white; 
}






:root {
  --lightbox-on-mobile: 0; /* 0 for false, 1 for true */
  --description-text-color: #000000;
  --grid-image-overlay-color: 130, 130, 130;
  --grid-image-overlay-opacity: 0.5;
  --grid-spacing: 7px; /* Default value, will be overwritten by JS */
  --spacing: 7px; /* Default value, will be overwritten by JS */
  --multi-spacing: 7px;
  --fade-duration: 500ms;
  --lightbox-bg-color: 255, 255, 255;
  --lightbox-bg-opacity: 1;
  --lightbox-close-color: #000000;
  --lightbox-arrow-color: #000000;
  --title-text-align: center;
  --autoplay-transition: 1s;
}
/* Core container styles */
.gallery-wrapper {
  position: relative;
  width: 100%;
  height: auto !important;
  min-height: auto !important;
  overflow: visible;
}

.horizontal-scroller-wrapper {
  width: 100%;
  margin-top:2vh;
  height: 100vh;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  position: relative; /* Add this to contain the arrows */
}


.horizontal-scroller-wrapper::-webkit-scrollbar { 
  width: 0;
  height: 0;
  display: none;
}

.horizontal-gallery-container {
  display: flex;
  height: 100%;
  position: relative; /* Add this to contain the arrows */
}

/* Arrow positioning */
.gallery-wrapper .arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1000;
  cursor: pointer;
  font-size: 28px;
  color: var(--lightbox-arrow-color);
  background: rgba(53, 53, 53, 0.02);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.gallery-wrapper .left-arrow {
  left: 20px; /* Position relative to container */
}

.gallery-wrapper .right-arrow {
  right: 20px; /* Position relative to container */
}

.text-container {
  height: 100%;
  margin-left: calc(var(--spacing) * 6);
  margin-right: calc(var(--spacing) * 6);
  box-sizing: border-box;
  overflow-y: auto;
  z-index: 2;
  font-family: var(--menu-font-family, Arial, sans-serif);
  font-size: var(--menu-font-size, 16px);
}

.horiz-gallery {
  display: flex;
  height: 100%;
  align-items: flex-start;
  margin: 0 70px; /* Add margin to prevent images overlapping with arrows */
}

.horiz-gallery::-webkit-scrollbar {
  display: none;
}

.horiz-item-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
}

.horiz-gallery img {
  width: auto;
  height: 100%;
  object-fit: contain;
}

.horiz-description {
  width: 100%;
  margin-top: 10px;
  overflow-wrap: break-word;
  padding: 5px;
  box-sizing: border-box;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  min-height: 1px;
  max-height: 1px;
  overflow-y: auto;
}

.horiz-video-wrapper {
  height: 100%;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.horiz-video {
  width: 100%;
  height: 100%;
  border: none;
}

/* Dynamic cursor styles */
.horizontal-scroller-wrapper.dynamic-cursor {
  cursor: none;
}

.horizontal-scroller-wrapper.dynamic-cursor:hover {
  cursor: none;
}

/* Arrow hover effects */
.gallery-wrapper .arrow:hover {
  background: rgba(0, 0, 0, 0.4);
}

/* Neon Lightbox */


.neon-lightbox {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(var(--lightbox-bg-color), var(--lightbox-bg-opacity));
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  outline: none;
  border: none;
  box-shadow: none;
}


.neon-lightbox-content {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  position: relative;
  z-index: 100001;
  height:95vh;
}

.lightbox-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100% !important; /* Fixed: Use full width instead of fit-content for proper centering */
  max-width: 90vw;
  max-height: 90vh;
}

/* Override for singles mode to prevent centering of descriptions */
.singles-mode .lightbox-content-wrapper {
  align-items: flex-start !important; /* Don't center descriptions */
}

/* Fix description alignment in regular lightbox mode */
.lightbox-content-wrapper {
  align-items: center !important; /* Center the content horizontally */
  gap: 0.5rem !important; /* Control spacing between image and description */
}

.lightbox-description,
.lightbox-video-description {
  align-self: flex-start !important;
  margin-top: 0 !important; /* Remove default margin */
  margin-bottom: 0 !important; /* Remove default margin */
  width: 100% !important;
  max-width: 100% !important;
  order: 2 !important; /* Ensure description comes after image */
}

/* Ensure image has no bottom margin and centers properly */
.lightbox-content-wrapper img {
  margin-bottom: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
  order: 1 !important; /* Ensure image comes first */
  display: block !important; /* Ensure block display for centering */
}

/* Mobile-specific centering fixes */
@media (max-aspect-ratio: 1/1) {
  .neon-lightbox-content {
    justify-content: center !important; /* Center content vertically in lightbox */
    align-items: center !important;
    height: 100vh !important; /* Use full viewport height */
    height: 100dvh !important; /* Use dynamic viewport height for mobile */
    min-height: 100vh !important; /* Fallback */
  }
  
  .lightbox-content-wrapper {
    align-items: center !important;
    justify-content: center !important; /* Center vertically on mobile */
    gap: 0.5rem !important;
    min-height: 100vh !important; /* Ensure full height for centering */
    min-height: 100dvh !important; /* Dynamic viewport height for mobile */
    display: flex !important; /* Ensure flexbox is applied */
    flex-direction: column !important; /* Ensure vertical stacking */
  }
  
  /* Fix mobile lightbox image container centering */
  .lightbox-image-container {
    height: 100% !important; /* Take full height for proper centering */
    min-height: 50vh !important; /* Ensure minimum height for centering */
    max-height: 70vh !important; /* Smaller max height on mobile */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important; /* Center vertically */
    align-items: center !important;
    width: 100% !important;
  }
  
  .lightbox-image-container img {
    max-width: calc(100% - 6vw) !important; /* Leave space for arrows */
    max-height: 70vh !important; /* Match container max height */
    height: auto !important;
    width: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important; /* Center horizontally */
  }
  
  .lightbox-description,
  .lightbox-video-description {
    margin: 0 !important;
    width: calc(100% - 6vw) !important; /* Match image container width */
    max-width: calc(100% - 6vw) !important; /* Match image width constraint */
    text-align: left !important; /* Left align text on mobile */
  }
}

/* Additional mobile-specific fixes for actual mobile devices */
@media (max-width: 768px) and (max-aspect-ratio: 1/1) {
  .neon-lightbox-content {
    justify-content: center !important;
    align-items: center !important;
    height: 100vh !important;
    height: 100dvh !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  
  .lightbox-content-wrapper {
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    /* Better centering for mobile - add more top padding to center images properly */
    padding-top: 120px !important;
  }
  
  /* Ensure mobile lightbox image container has proper centering */
  .lightbox-image-container {
    height: 100% !important;
    min-height: 50vh !important;
    max-height: 70vh !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
  }
  
  .lightbox-image-container img {
    max-width: calc(100% - 6vw) !important;
    max-height: 70vh !important;
    height: auto !important;
    width: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
  }
}

.lightbox-content-wrapper img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  height: auto;
  width: auto;
}


.lightbox-description-columns {
  display: flex;
  gap: 2rem;
  width: 100% !important;
  max-width: 100% !important;
}

.lightbox-description,
.lightbox-video-description {
  display: none;
  margin-top: .5rem;
  text-align: left;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  font-size: 1rem;
  line-height: 1.4;
  padding: 0;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word;
  width: 90vw; /* Match image container width */
  max-width: 90vw; /* Match image container max-width */
  max-height: 10vh;
  margin-left: 0; /* Align with left edge of image */
  margin-right: auto; /* Allow right margin to auto-adjust */
}

.lightbox-description-columns {
  display: flex;
  gap: 2rem;
  width: 100%;
}

.lightbox-description-column-left {
  flex: 1;
}

.lightbox-description-column-right {
  flex: 2;
}

.neon-lightbox-close-btn {
  position: absolute;
  top: 2vh;
  right: -2vh;
  font-size: 1.5rem;
  color: rgb(var(--lightbox-close-color, 0, 0, 0));
  cursor: pointer;
  z-index: 100003;
  width: 60px;
  height: 60px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-image-container {
  max-width: 90vw;
  max-height: 80vh;
  height: 100%; /* Take full height for proper centering */
  min-height: 60vh; /* Ensure minimum height for centering */
  z-index: 100002;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.lightbox-image-container img {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  opacity: 0;
  animation: fade-in var(--fade-duration) ease forwards;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.lightbox-video-wrapper {
  width: 80vw;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding-bottom: 56.25%; 
}

.lightbox-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.vp-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover; 
  background-position: center; 
}




@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.arrow {
  position: fixed;
  top: 50% !important; /* Override any inline styles */
  transform: translateY(-50%);
  width: 30px !important; /* Half the original size */
  height: 30px !important; /* Half the original size */
  background-color: rgba(255, 255, 255, 0.04);
  display: flex !important; /* Override any inline styles */
  justify-content: center;
  align-items: center;
  font-size: 1.5rem; /* Reduced font size to match smaller button */
  padding: 0; /* Remove padding to center arrow properly */
  color: rgb(var(--lightbox-arrow-color, 0, 0, 0));
  cursor: pointer;
  z-index: 1000;
  transition: background-color 0.3s ease, opacity 0.3s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.left-arrow {
  color: rgb(var(--lightbox-arrow-color, 0, 0, 0));
  left: 2vw; /* Increased distance from edge to prevent overlap */
}

.right-arrow {
  color: rgb(var(--lightbox-arrow-color, 0, 0, 0));
  right: 2vw; /* Increased distance from edge to prevent overlap */
}

.arrow:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

@media (max-aspect-ratio: 1/1) {
  .masonry,
  .horiz-gallery,
  .mobile-vertical-scroller {
    flex-direction: column;
    height: auto !important;
    min-height: auto !important;
    background-color: transparent !important;
  }

  .gallery-wrapper {
    height: auto !important;
    min-height: auto !important;
    overflow: visible;
    background-color: transparent !important;
  }

  .masonry-item,
  .horiz-item-wrapper,
  .mobile-gallery-item {
    display: flex !important;
    flex-direction: column;
    break-inside: avoid;
    margin-bottom: var(--grid-spacing);
    width: 100% !important;
    height: auto !important;
    margin-right: 0;
    position: relative;
  }

  .masonry-item img,
  .horiz-gallery img,
  .mobile-gallery-item img,
  .mobile-video-wrapper,
  .horiz-video-wrapper {
    order: 1;
    width: 100% !important;
    height: auto !important;
    object-fit: contain;
    display: block;
  }

  .mobile-video-wrapper,
  .horiz-video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    margin-top: 0;
    margin-bottom: 0;
  }

  .mobile-video,
  .horiz-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
  }

  .desktop-title {
    display: none;
  }

  .mobile-title {
    display: block;
    text-align: left;
    padding-top: 0.2rem;    /* Reduced from 1vh */
    padding-bottom: 1rem;
    order: 2;
  }

  .mobile-title h3 {
    text-align: left;
    padding-top: 1vh;
    margin: 0;
  }

  .mobile-description,
  .mobile-video-description,
  .horiz-description,
  .mobile-item-description {
    margin-top: .5rem;
    text-align: left;
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    order: 3;
    width: 100% !important;
    color: var(--menu-color, rgb(130, 130, 130)) !important;
  }

  .lightbox-description-columns {
    flex-direction: column;
    gap: 1rem;
  }
  
  .lightbox-description-column-left,
  .lightbox-description-column-right {
    flex: none;
    width: 100%;
  }

  .play-button {
    display: none !important;
  }

  /* Disable all overlays on mobile */
  .grid-image-overlay {
    display: none !important;
  }

  /* Horizontal scroller styles */
  .horizontal-scroller-wrapper {
    width: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .horizontal-gallery-container {
    display: block;
    height: auto;
    margin: var(--multi-spacing);
  }

  .text-container {
    width: 100%;
    margin-left: 0;
    margin-bottom: var(--multi-spacing);
  }

  /* Hide arrows for horizontal scroller */
  .gallery-wrapper .horizontal-scroller-wrapper .arrow {
    display: none !important;
  }

  /* Reset any desktop-specific styles */
  .horiz-item-wrapper,
  .horiz-gallery img,
  .horiz-video-wrapper,
  .horiz-description,
  .mobile-gallery-item,
  .mobile-gallery-item img,
  .mobile-item-description {
    max-height: none !important;
    max-width: none !important;
  }

  /* Grid layout - Lightbox on mobile enabled */
  body.lightbox-on-mobile .masonry-item {
    cursor: pointer;
  }

  body.lightbox-on-mobile .masonry-item img {
    pointer-events: auto;
  }

  body.lightbox-on-mobile .masonry-item.video-item {
    position: relative;
  }

  body.lightbox-on-mobile .masonry-item.video-item > img:first-child {
    display: block;
    position: relative;
  }

  body.lightbox-on-mobile .masonry-item.video-item .play-button {
    display: flex !important;
    position: absolute;
    
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 1;
    pointer-events: none;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto !important;
  }



  body.lightbox-on-mobile .masonry-item .mobile-description,
  body.lightbox-on-mobile .masonry-item .mobile-video-description {
    display: none !important;
  }

  body.lightbox-on-mobile .masonry-item .mobile-video-wrapper {
    display: none;
  }

  /* Grid layout - Lightbox on mobile disabled */
  body:not(.lightbox-on-mobile) .masonry-item {
    cursor: default;
  }

  body:not(.lightbox-on-mobile) .masonry-item img {
    pointer-events: none;
  }

  body:not(.lightbox-on-mobile) .masonry-item.video-item > img:first-child {
    display: none;
  }

  body:not(.lightbox-on-mobile) .masonry-item .mobile-video-wrapper {
    display: block;
  }

  body:not(.lightbox-on-mobile) .masonry-item .mobile-description,
  body:not(.lightbox-on-mobile) .masonry-item .mobile-video-description {
    display: block;
  }

  /* Horizontal scroller - always show inline content */
  .horiz-item-wrapper,
  .mobile-gallery-item {
    cursor: default;
  }

  .horiz-gallery img,
  .mobile-gallery-item img {
    pointer-events: none;
  }

  .horiz-item-wrapper .play-button,
  .mobile-gallery-item .play-button {
    display: none !important;
  }

  .horiz-description,
  .mobile-item-description {
    display: block;
    margin-top: 1rem;
  }

  .horiz-item-wrapper.video-item > img:first-child,
  .mobile-gallery-item.video-item > img:first-child {
    display: none;
  }

  .horiz-video-wrapper,
  .mobile-gallery-item .mobile-video-wrapper {
    display: block;
  }

  /* Lightbox content adjustments */
  .neon-lightbox-content {
    flex-direction: column;
    overflow-x: hidden;
  }

  .lightbox-image-container,
  .lightbox-video-wrapper {
    width: 100%;
    max-width: calc(100% - 6vw); /* Match the width of images and descriptions */
    max-height: 70vh;
  }

  .lightbox-description,
  .lightbox-video-description {
    width: 100% !important;
    max-width: calc(100% - 6vw) !important; /* Match image width */
    margin-top: .5rem !important;
  }

/* Show arrows for lightbox when lightbox is enabled on mobile */
body.lightbox-on-mobile .neon-lightbox .arrow,
body.lightbox-on-mobile .neon-lightbox .left-arrow,
body.lightbox-on-mobile .neon-lightbox .right-arrow {
  display: flex !important;
  width: 30px !important;
  height: 30px !important;
  font-size: 1rem !important;
  padding: 1rem !important;
  min-width: 30px !important;
  min-height: 30px !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

body.lightbox-on-mobile .neon-lightbox .left-arrow {
  left: 1vw !important;
}

body.lightbox-on-mobile .neon-lightbox .right-arrow {
  right: 1vw !important;
}

/* Ensure lightbox content doesn't use dynamic cursor on mobile */
body.lightbox-on-mobile .neon-lightbox-content {
  cursor: default !important;
}
}

/* Additional styles to ensure proper desktop view */
@media (min-aspect-ratio: 1/1) {
.masonry-item .mobile-description,
.masonry-item .mobile-video-description,
.masonry-item .mobile-video-wrapper,
.masonry-item .mobile-title {
  display: none;
}

.masonry-item .play-button {
  display: flex;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: .6;
}

.masonry-item:hover .play-button {
  opacity: 1;
  z-index: 1;
}

.masonry-item img {
  pointer-events: auto;
}
}

.lightbox-description,
.lightbox-video-description {
  display: none; 
  font-size: 1rem;
max-height: 15vh;
max-width: 90vw;
}

/* Show descriptions in lightbox when showDescription is true AND descriptions are not on demand */
body.show-description .lightbox-description:not(.description-on-demand),
body.show-description .lightbox-video-description:not(.description-on-demand) {
display: block;
}

/* Force hide descriptions with description-on-demand class, even when body has show-description */
body.show-description .lightbox-description.description-on-demand,
body.show-description .lightbox-video-description.description-on-demand {
display: none !important;
visibility: hidden !important;
opacity: 0 !important;
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
width: 0 !important;
height: 0 !important;
overflow: hidden !important;
pointer-events: none !important;
}



.filter-menu-container {
display: flex;
padding-top: 0;
justify-content: center;
width: 80vw;
margin: 0 auto 1rem;
background-color: transparent;
}

.filter-menu-item {
padding: 0.5rem 1rem;
border: none;
cursor: pointer;
margin-right: 0.5rem;
font-size: 1rem;
opacity: 0.8;
transition: opacity 0.3s;
background-color: transparent;
}

.filter-menu-item.hover {
opacity: 0.9;
}

.filter-menu-item.active {
opacity: 1;
}

.filter-menu-dropdown {
  position: relative;
  display: inline-block;
  margin: 1rem auto;
}

.current-selection {
  display: flex;
  align-items: center;
  font-size: 1rem;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  cursor: pointer;
  background-color: transparent;
}

.dropdown-arrow {
  margin-left: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 1em;
}

.dropdown-list {
  display: none;
  position: absolute;
  font-size: 1rem;
  top: 100%;
  left: 0;
  z-index: 1000;
  min-width: 100%;
  padding: 0.5rem 0;
  margin: 0.125rem 0 0;
  list-style: none;
  background-color: rgba(var(--lightbox-bg-color), var(--lightbox-bg-opacity));
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.dropdown-list.show {
  display: block;
}

.dropdown-list li {
  padding: 0.25rem 1rem;
  cursor: pointer;
}

.dropdown-list li:hover {
  background-color: rgba(var(--lightbox-arrow-color), 0.1); 
}

.play-button {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 60px;
height: 60px;
background-color: rgba(255, 255, 255, 0);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
transition: opacity 0.3s ease;
z-index: 1;
touch-action: manipulation;
-webkit-tap-highlight-color: transparent;
pointer-events: auto !important;
}

.play-button svg {
fill: #fff;
width: 50px;
height: 50px;
transition: opacity 0.3s ease;
z-index: 1;
}

/* Hide descriptions when showDescription is false */
body:not(.show-description) .lightbox-description,
body:not(.show-description) .lightbox-video-description,
body:not(.show-description) .horiz-description {
  display: none !important;
}

/* Mobile descriptions should respect info on demand setting */
@media (max-aspect-ratio: 1/1) {
  /* Show mobile descriptions only when showDescription is true AND descriptions are not on demand */
  body.show-description .mobile-description:not(.description-on-demand),
  body.show-description .mobile-video-description:not(.description-on-demand) {
    display: block !important;
  }
  
  /* Hide mobile descriptions when showDescription is false OR when descriptions are on demand */
  body:not(.show-description) .mobile-description,
  body:not(.show-description) .mobile-video-description,
  .mobile-description.description-on-demand,
  .mobile-video-description.description-on-demand {
    display: none !important;
  }
  
  /* MOBILE OVERRIDE: Show lightbox descriptions when .show class is present, even on mobile */
  .lightbox-description.description-on-demand.show,
  .lightbox-video-description.description-on-demand.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important;
    top: 30% !important; /* More centered for mobile */
    left: 0 !important;
    right: 0 !important;
    bottom: 5% !important; /* More space for content */
    background: transparent !important;
    color: var(--menu-color, rgb(130, 130, 130)) !important;
    padding: 2rem !important;
    z-index: 100005 !important;
    overflow-y: auto !important;
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    text-align: left !important;
    width: 70% !important;
    margin: 0 auto !important;
    animation: fadeInDescription 0.8s ease-in-out forwards !important;
    transform: translateY(0) !important;
    box-sizing: border-box !important;
    max-height: none !important;
    max-width: none !important;
    transition: opacity 0.8s ease-in-out !important;
    height: auto !important;
    min-height: 300px !important; /* More height for mobile content */
  }
  
  /* CRITICAL: Override body.show-description rules for .show class on mobile */
  body.show-description .lightbox-description.description-on-demand.show,
  body.show-description .lightbox-video-description.description-on-demand.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: absolute !important;
    top: 30% !important; /* More centered for mobile */
    left: 0 !important;
    right: 0 !important;
    bottom: 5% !important; /* More space for content */
    background: transparent !important;
    color: var(--menu-color, rgb(130, 130, 130)) !important;
    padding: 2rem !important;
    z-index: 100005 !important;
    overflow-y: auto !important;
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    text-align: left !important;
    width: 70% !important;
    margin: 0 auto !important;
    animation: fadeInDescription 0.8s ease-in-out forwards !important;
    transform: translateY(0) !important;
    box-sizing: border-box !important;
    max-height: none !important;
    max-width: none !important;
    transition: opacity 0.8s ease-in-out !important;
    height: auto !important;
    min-height: 300px !important; /* More height for mobile content */
  }
}




/* Ensure proper sizing for Wistia videos */
.wistia_embed {
  width: 100%;
  height: 100%;
}

/* Ensure proper visibility of play button on desktop */
@media (min-aspect-ratio: 1/1) {
  .masonry-item .play-button {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
  }

  .masonry-item:hover .play-button {
    opacity: 1;
    z-index: 1;
  }

  .desktop-title {
    display: block;
  }
  .mobile-title {
    display: none;
  }
}

/* Autoplay mode styles */
/* Autoplay mode styles */
.neon-lightbox.singles-mode.autoplay-mode {
  background-color: rgba(var(--lightbox-bg-color), var(--lightbox-bg-opacity)) !important;
}

/* CRITICAL FIX: Remove padding-top from autoplay mode content */
.neon-lightbox.singles-mode.autoplay-mode .neon-lightbox-content {
  padding-top: 0 !important; /* Remove the 60px padding that pushes images down */
  width: 100% !important; /* Ensure content has full width */
  height: 100% !important; /* Ensure content has full height */
  position: relative !important; /* Ensure proper positioning context */
}

/* CRITICAL FIX: Ensure autoplay mode image container has proper positioning */
.neon-lightbox.singles-mode.autoplay-mode .lightbox-image-container {
  position: relative !important;
  overflow: hidden;
  width: 100% !important; /* Full width instead of fit-content */
  height: 100% !important; /* Full height */
  min-height: 60vh !important; /* Match normal singles mode */
  max-height: 80vh !important; /* Match normal singles mode */
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 2 !important;
}

/* Content wrapper styling */
.lightbox-content-wrapper {
  position: relative;
  z-index: 1;
  transition: opacity var(--autoplay-transition, 1s) ease;
}

/* CRITICAL FIX: When in relative positioning mode (for autoplay) */
.lightbox-content-wrapper.autoplay-new,
.lightbox-content-wrapper.autoplay-transitioning {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

.lightbox-content-wrapper.autoplay-new {
  z-index: 2 !important;
}

.lightbox-content-wrapper.autoplay-transitioning {
  pointer-events: none !important;
  z-index: 1 !important;
}

/* CRITICAL FIX: Ensure images are properly centered and sized */
.lightbox-content-wrapper.autoplay-new img,
.lightbox-content-wrapper.autoplay-transitioning img {
  max-width: 100% !important;
  max-height: 80vh !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
}

/* When in relative positioning mode (for autoplay) */
.lightbox-content-wrapper.autoplay-new,
.lightbox-content-wrapper.autoplay-transitioning {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

.lightbox-content-wrapper.autoplay-new {
  z-index: 2 !important;
}

.lightbox-content-wrapper.autoplay-transitioning {
  pointer-events: none !important;
  z-index: 1 !important;
}

/* Ensure images are properly centered and sized */
.lightbox-content-wrapper.autoplay-new img,
.lightbox-content-wrapper.autoplay-transitioning img {
  max-width: 100% !important;
  max-height: 80vh !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  width: auto;
  height: auto;
  display: block !important;
}

/* Ensure autoplay mode has a normal cursor */
.neon-lightbox.singles-mode.autoplay-mode,
.neon-lightbox.singles-mode.autoplay-mode .lightbox-image-container,
.neon-lightbox.singles-mode.autoplay-mode .neon-lightbox-content,
.neon-lightbox.singles-mode.autoplay-mode .lightbox-content-wrapper {
  cursor: default !important;
}

/* Prevent any dynamic cursor styles from being applied */
.neon-lightbox.singles-mode.autoplay-mode .neon-lightbox-content:hover {
  cursor: default !important;
}
/* Hide arrows completely in autoplay mode */
.neon-lightbox.singles-mode.autoplay-mode .arrow,
.neon-lightbox.singles-mode.autoplay-mode .left-arrow,
.neon-lightbox.singles-mode.autoplay-mode .right-arrow {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Ensure autoplay mode images display properly - match normal singles mode */
.neon-lightbox.singles-mode.autoplay-mode .lightbox-image-container img {
  width: auto;
  height: auto;
  max-width: calc(100% - 60px) !important; /* Match normal singles mode - account for arrow space */
  max-height: 80vh !important; /* Match normal singles mode */
  object-fit: contain;
  display: block;
}

/* Add fade animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* Autoplay layer styles - these are essential for autoplay visibility */
.autoplay-layer-a,
.autoplay-layer-b,
.autoplay-current-layer,
.autoplay-next-layer {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important; /* Use 100% to fill the container */
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  z-index: 100002 !important; /* Match the working image z-index */
  transition: opacity var(--autoplay-transition, 1s) ease !important;
  visibility: visible !important; /* Ensure layers are visible when they have content */
}

/* Active autoplay layer should be visible */
.autoplay-layer-a.active,
.autoplay-layer-b.active,
.autoplay-current-layer.active,
.autoplay-next-layer.active {
  opacity: 1 !important;
  z-index: 12 !important;
}

/* CRITICAL FIX: Ensure autoplay layers with content are visible */
.autoplay-layer-a:has(img),
.autoplay-layer-b:has(img),
.autoplay-current-layer:has(img),
.autoplay-next-layer:has(img) {
  visibility: visible !important;
  display: flex !important;
}

/* Additional fix for browsers that don't support :has() */
.autoplay-layer-a img,
.autoplay-layer-b img,
.autoplay-current-layer img,
.autoplay-next-layer img {
  visibility: visible !important;
}

/* Ensure autoplay layer images are properly sized */
.autoplay-layer-a img,
.autoplay-layer-b img,
.autoplay-current-layer img,
.autoplay-next-layer img {
  max-width: 100% !important;
  max-height: 80vh !important;
  object-fit: contain !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
}


.lightbox-description strong,
.lightbox-description h1,
.lightbox-description h2,
.lightbox-description h3,
.lightbox-description h4,
.lightbox-description h5,
.lightbox-description h6,
.lightbox-filename,
.lightbox-title,
.lightbox-description [style*="font-size"],
.lightbox-description [style*="color"],
.lightbox-description [style*="font-family"] {
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  font-size: 1.2rem !important;
  font-family: var(--menu-font-family, inherit) !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  margin-bottom: 0.5rem !important;
}

/* Also ensure lightbox filename follows the same color scheme */
.singles-mode .lightbox-filename {
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  opacity: 0.8;
}

/* Additional safety selectors to override inline styles */
.lightbox-description *,
.lightbox-content-wrapper [style*="font-size: xxx-large"],
.lightbox-image-container + * [style*="color"],
.neon-lightbox [style*="font-size: xxx-large"] {
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  font-size: 1.2rem !important;
  font-family: inherit !important;
}


/* Base font for all gallery text */
.gallery-wrapper,
.neon-lightbox,
.lightbox-description,
.lightbox-video-description,
.horiz-description,
.mobile-description,
.grid-image-title,
.mobile-title,
.filter-menu-item,
.lightbox-filename {
  font-family: var(--menu-font-family, inherit) !important;
}

/* Title elements */
.lightbox-description strong,
.lightbox-description h1,
.lightbox-description h2,
.lightbox-description h3,
.lightbox-description h4,
.lightbox-description h5,
.lightbox-description h6,
.grid-image-title h3,
.mobile-title h3,
.singles-mode .lightbox-filename {
  font-family: var(--menu-font-family, inherit) !important;
}

/* Scale font sizes based on menu font size */
.lightbox-description,
.lightbox-video-description,
.mobile-description,
.mobile-video-description,
.horiz-description {
  /* Use calc to maintain relative size to the menu font */
  font-size: calc(var(--menu-font-size, 16px) * 0.95) !important;
  line-height: 1.4 !important;
}

/* Titles with slightly larger font */
.lightbox-description strong,
.lightbox-description h1,
.lightbox-description h2,
.lightbox-description h3,
.grid-image-title h3,
.mobile-title h3 {
  font-size: calc(var(--menu-font-size, 16px) * 1.15) !important;
  line-height: 1.3 !important;
}

/* Filter menu items */
.filter-menu-item {
  font-size: var(--menu-font-size, 16px) !important;
}

/* Smaller text elements */
.lightbox-filename {
  font-size: calc(var(--menu-font-size, 16px) * 0.85) !important;
}

/* Catch any elements with inline styles */
.neon-lightbox [style*="font-size"],
.neon-lightbox [style*="font-family"] {
  font-family: var(--menu-font-family, inherit) !important;
}


/* Apply menu color to all title elements */
.grid-image-title h3,
.desktop-title h3, 
.mobile-title h3 {
  color: var(--menu-color, inherit) !important;
  font-family: var(--menu-font-family, inherit) !important;
  font-size: calc(var(--menu-font-size, 16px) * 1.1) !important;
  font-weight: normal;
}


/* Also ensure consistent font styling for titles */
.grid-image-title,
.desktop-title, 
.mobile-title {
  font-family: var(--menu-font-family, inherit) !important;
  font-size: calc(var(--menu-font-size, 16px) * 1.1) !important;
  font-weight: normal;
}


.masonry-item.title-under .rollover-image {
  /* Position absolute but only at the top part of the container */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  /* Set a specific height instead of auto */
  height: 88%; /* Match exactly the image area height */
  /* Use object-fit: cover to ensure the image fills the entire area */
  object-fit: cover;
  /* Keep original transition */
  transition: opacity 0.8s ease;
  /* Remove transform that centers it vertically */
  transform: translateX(-50%) translateY(0);
  /* Fix left position to work with transform */
  left: 50%;
}



.singles-mode .overview-toggle:hover {
  background: rgba(255, 255, 255, 0.9);
}



.singles-mode .overview-overlay.active {
  display: block;
  animation: fadeUpOverview 0.3s ease forwards;
}

.singles-mode .overview-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  line-height: 1.6;
  font-family: var(--menu-font-family, inherit) !important;
  font-size: var(--menu-font-size, 1.1rem) !important;
  font-weight: var(--menu-font-weight, normal) !important;
  font-style: var(--menu-font-style, normal) !important;
  text-align: left !important;
  /* Changed from flex to block to allow proper text alignment classes to work */
  /* Flexbox was centering all content, overriding text-wrapped/text-single-line classes */
  display: block;
  min-height: 100%;
  width: 100%; /* Ensure full width within the 70% container */
}

/* Force overview content to use menu color regardless of global CSS */
.singles-mode .overview-content,
.singles-mode .overview-content *,
.lightbox-image-container .overview-overlay .overview-content,
.lightbox-image-container .overview-overlay .overview-content * {
  color: var(--menu-color, rgb(130, 130, 130)) !important;
}

.singles-mode .overview-content h1,
.singles-mode .overview-content h2,
.singles-mode .overview-content h3,
.singles-mode .overview-content h4 {
  /* Inherit color from .overview-overlay or set explicitly if needed */
  color: var(--menu-color, rgb(130, 130, 130)) !important; /* Explicitly set */
  font-family: var(--menu-font-family, inherit) !important;
  font-size: var(--menu-font-size, inherit) !important;
  font-weight: var(--menu-font-weight, normal) !important;
  font-style: var(--menu-font-style, normal) !important;
  margin-top: 0;
  margin-bottom: 1em; /* Add some space below headings */
}

/* --- NEW RULE: Target specific block elements within overview-content --- */
.singles-mode .overview-content address,
.singles-mode .overview-content blockquote,
.singles-mode .overview-content dl,
.singles-mode .overview-content figure,
.singles-mode .overview-content form,
.singles-mode .overview-content ol,
.singles-mode .overview-content p,
.singles-mode .overview-content pre,
.singles-mode .overview-content table,
.singles-mode .overview-content ul {
  margin-top: 0; /* Keep original margin */
  margin-bottom: var(--menu-font-size, 1em); /* Use menu font size for spacing */
  /* Set the color using the menu color variable */
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  /* Use menu font variables for consistent typography */
  font-style: var(--menu-font-style, normal) !important;
  font-weight: var(--menu-font-weight, normal) !important;
  font-size: var(--menu-font-size, inherit) !important;
  font-family: var(--menu-font-family, inherit) !important;
}


.singles-mode .overview-content a {
  /* Inherit color from .overview-overlay or set explicitly if needed */
  color: var(--menu-color, rgb(130, 130, 130)); /* Explicitly set */
  text-decoration: underline;
}




/* Updated overview toggle button positioning */
.singles-mode .overview-toggle {
  position: absolute;
  top: 10px;  /* Moved up further to create space */
  right: 20px;
  border: none;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
    z-index: 999999; /* Extremely high z-index */
    pointer-events: auto !important; /* Force pointer events */
    cursor: pointer !important; /* Force pointer cursor */
  transition: background 0.3s ease, opacity 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: var(--menu-color, rgb(130, 130, 130));
}

.singles-mode .neon-lightbox-content {
  height: 95vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  /* Changed from 'center' to 'flex-start' to align content to the top */
  justify-content: flex-start !important;
  align-items: center;
  box-sizing: border-box;
  background: transparent !important;
  z-index: 999990 !important;
  /* This padding-top is crucial for reserving space for the overview button */
  padding-top: 30px !important;
  max-height: 90vh !important;
  overflow-y: visible; /* Allows content to scroll if it exceeds max-height */
}

/* Adjust lightbox image container to account for the added space */
.singles-mode .lightbox-image-container {
  margin-top: 10px; /* Add margin to push image down a bit */
  max-height: calc(80vh - 40px) !important; /* Adjust max height to account for added space */
}

/* Ensure the overview overlay covers the entire content area */
.singles-mode .overview-overlay {
  position: absolute;
  top: 28%; /* Start 35% from the top */
  left: 0;
  right: 0;
  bottom: 15%; /* End 15% from the bottom */
  background: transparent; /* Remove dark background */
  z-index: 100005; /* Same as description overlay */
  overflow-y: auto; /* Enable vertical scrolling */
  display: block; /* Always visible for animation */
  padding: 2rem;
  box-sizing: border-box;
  color: var(--menu-color, rgb(130, 130, 130)); /* Use menu color instead of white */
  width: 70%; /* Set width to 70% */
  margin: 0 auto; /* Center horizontally */
  opacity: 0; /* Start invisible for fade-in */
  visibility: hidden; /* Hidden by default */
  font-size: 1.1rem;
  line-height: 1.6;
  text-align: left; /* Left-align the text content */
  transition: opacity 0.5s ease, visibility 0.5s ease; /* Smooth transitions */
}

/* Show overview overlay when active */
.singles-mode .overview-overlay.active {
  opacity: 1; /* Fade in */
  visibility: visible; /* Make visible */
  /* Removed conflicting animation - let transition handle the fade */
}

/* Ensure the overview overlay is positioned relative to the image container */
.lightbox-image-container .overview-overlay {
  position: absolute;
  top: 28%; /* Start 35% from the top */
  left: 0;
  right: 0;
  bottom: 15%; /* End 15% from the bottom */
  background: transparent;
  z-index: 100005;
  overflow-y: auto; /* Enable vertical scrolling */
  display: block; /* Always visible for animation */
  padding: 2rem;
  box-sizing: border-box;
  color: var(--menu-color, rgb(130, 130, 130)) !important; /* Match INFO overlay exactly */
  width: 70%;
  margin: 0 auto;
  opacity: 0;
  visibility: hidden; /* Hidden by default */
  font-size: var(--menu-font-size, 1.1rem) !important; /* Use menu font size */
  line-height: 1.6 !important; /* Match INFO overlay exactly */
  text-align: left !important; /* Match INFO overlay exactly */
  transform: translateY(0) !important; /* Ensure proper vertical centering */
  transition: opacity 0.5s ease, visibility 0.5s ease; /* Smooth transitions */
}

.lightbox-image-container .overview-overlay.active {
  opacity: 1 !important; /* Fade in */
  visibility: visible !important; /* Make visible */
  /* Removed conflicting animation - let transition handle the fade */
}

/* Target specific block elements within lightbox image container overview overlay */
.lightbox-image-container .overview-overlay .overview-content address,
.lightbox-image-container .overview-overlay .overview-content blockquote,
.lightbox-image-container .overview-overlay .overview-content dl,
.lightbox-image-container .overview-overlay .overview-content figure,
.lightbox-image-container .overview-overlay .overview-content form,
.lightbox-image-container .overview-overlay .overview-content ol,
.lightbox-image-container .overview-overlay .overview-content p,
.lightbox-image-container .overview-overlay .overview-content pre,
.lightbox-image-container .overview-overlay .overview-content table,
.lightbox-image-container .overview-overlay .overview-content ul {
  margin-top: 0; /* Keep original margin */
  margin-bottom: var(--menu-font-size, 1em); /* Use menu font size for spacing */
  /* Set the color using the menu color variable */
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  /* Use menu font variables for consistent typography */
  font-style: var(--menu-font-style, normal) !important;
  font-weight: var(--menu-font-weight, normal) !important;
  font-size: var(--menu-font-size, inherit) !important;
  font-family: var(--menu-font-family, inherit) !important;
}

/* Target headings within lightbox image container overview overlay */
.lightbox-image-container .overview-overlay .overview-content h1,
.lightbox-image-container .overview-overlay .overview-content h2,
.lightbox-image-container .overview-overlay .overview-content h3,
.lightbox-image-container .overview-overlay .overview-content h4 {
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  font-family: var(--menu-font-family, inherit) !important;
  font-size: var(--menu-font-size, inherit) !important;
  font-weight: var(--menu-font-weight, normal) !important;
  font-style: var(--menu-font-style, normal) !important;
  margin-top: 0;
  margin-bottom: 1em;
}

/* Add fade-in animation for overview */
@keyframes fadeInOverview {
  0% {
    opacity: 0;
    transform: translateY(0px); /* Reduced from 20px to 10px */
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUpOverview {
  0% {
    opacity: 0;
    transform: translateY(0px); /* Reduced from 10px to 5px */
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}


/* Mobile adjustments */
@media (max-aspect-ratio: 1/1) {
  .singles-mode .overview-toggle {
    top: 5px;
    right: 10px;
    padding: 4px 10px;
    font-size: 0.8rem;
  }
  
  .singles-mode .neon-lightbox-content {
    padding-top: 30px !important;
  }
  
  .singles-mode .lightbox-image-container {
    margin-top: 10px;
    max-height: calc(80vh - 30px) !important;
  }
  
  .singles-mode .overview-overlay {
    padding: 40px 10px 10px;
  }
}

/* Updated overview toggle button styling */
.singles-mode .overview-toggle {
  position: absolute;
  top: 10px;
  right: 20px;
  background: transparent !important; /* Remove background */
  color: var(--menu-color, rgb(130, 130, 130));
  border: none;
  padding: 20px 20px;
  border-radius: 0px;
  font-size: 0.9rem;
  width: auto; /* Ensure width is based on content */
  display: inline-block; /* Make button only as wide as it needs to be */
  z-index: 999999;
  pointer-events: auto !important;
  cursor: pointer !important;
  transition: opacity 0.3s ease;
  box-shadow: none; /* Remove box shadow */
  text-align: right; /* Ensure text is right-aligned within the button */
}

/* Remove hover background */
.singles-mode .overview-toggle:hover {
  background: transparent !important;
  opacity: 0.8; /* Just change opacity on hover instead */
}

/* Style for the close "x" button when overview is active */
.singles-mode .overview-toggle.active {
  position: absolute;
  top: 10px;
  right: 20px;
  background: transparent !important;
  width: auto;
  text-align: right;
  z-index: 1000000; /* Ensure it's above the overlay */
  color: var(--menu-color, rgb(130, 130, 130));
}

/* Animation for overlay appearance */
@keyframes fadeUpOverview {
  0% {
    opacity: 0;
    transform: translateY(5px); /* Reduced from 10px to 5px */
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile adjustments */
@media (max-aspect-ratio: 1/1) {
  .singles-mode .overview-toggle,
  .singles-mode .overview-toggle.active {
    top: 5px;
    right: 10px;
    padding: 4px 8px;
    font-size: 0.8rem;
  }
  
  .singles-mode .overview-overlay {
    padding: 20px;
  }
}

/* Fix for caption alignment with the image */
.singles-mode .lightbox-description,
.singles-mode .lightbox-video-description {
  max-width: 40vw !important; /* Adjust this value as needed */
  margin-left: 0 !important; /* Ensure left alignment */
  align-self: flex-start !important; /* Align to the start of the flex container */
}


.lightbox-image-container.zoomable-hover {
  /* Using a standard cursor, but you could use a custom SVG URL */
  cursor: zoom-in;
}

/* Style for the container when the image is zoomed */
.lightbox-image-container.zoomed {
  cursor: grab; /* Indicate panning is possible */
  overflow: hidden; /* Important: Hide parts of the image outside the container */
}

/* Style for the container during active panning */
.lightbox-image-container.zoomed.panning {
  cursor: grabbing; /* Indicate active panning */
}

/* Style for the image itself when zoomed */
.lightbox-image-container.zoomed img {
  position: absolute; /* Allow positioning via transform */
  max-width: none;    /* Remove size constraints */
  max-height: none;
  width: auto;        /* Let the image use its natural width */
  height: auto;       /* Let the image use its natural height */
  cursor: grab;       /* Match container cursor */
  /* Optional: Add a transition for smoother zoom-out, but might affect panning performance */
  /* transition: transform 0.2s ease-out; */
  will-change: transform; /* Optimize for transform changes */
  user-select: none; /* Prevent text selection during drag */
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Style for the image during active panning */
.lightbox-image-container.zoomed.panning img {
  cursor: grabbing; /* Match container cursor */
}

/* Ensure content wrapper allows absolute positioning */
.lightbox-content-wrapper {
  position: relative; /* Or ensure it's already relative/absolute */
  width: 100%; /* Take full width of container */
  height: 100%; /* Take full height of container */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- End Lightbox Zoom Styles --- */

/* Add this rule if not already present to ensure container takes space */
.lightbox-image-container {
  /* Ensure it has dimensions and positioning context */
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 60vh; /* Fixed: Add minimum height for proper centering */
  max-height: 80vh; /* Fixed: Add maximum height constraint */
  display: flex;        /* Use flexbox for centering */
  align-items: center;    /* Center vertically */
  justify-content: center; /* Center horizontally */
}

/* Modify existing image styles slightly if needed to work with zoom */
.lightbox-image-container img {
  /* Keep existing max-width/max-height for initial view */
  max-width: 100%;
  max-height: 80vh; /* Or your existing max-height */
  /* Ensure block display and auto margins work for centering */
  display: block;
  margin: 0 auto !important; /* Fixed: Use 0 auto for proper centering without top margin */
  padding: 0 !important; /* Fixed: Remove padding that was causing positioning issues */
  /* Reset position for initial view */
  position: relative;
  /* Add transition for smooth zoom-out (apply carefully) */
  /* transition: transform 0.2s ease-out, max-width 0s, max-height 0s; */
}

/* Reduce vertical spacing between paragraphs in descriptions */
.lightbox-description p,
.lightbox-video-description p {
  margin-top: 0.2em; /* Adjust as needed, 0 removes space completely */
  margin-bottom: 0.2em; /* Adjust as needed, 0 removes space completely */
}

/*
 * Styles for the Lemon Squeezy "BUY NOW" button in the Neon Gallery lightbox.
 */

/* --- BUY NOW Button and lightbox color overrides--- */
/* Using ID for maximum specificity to override frameworks like Pico */
#neon-lightbox .lightbox-content-wrapper .neon-buy-now-button {
  /* Display & Box Model */
  display: inline-block; /* Inherit text-align from parent */
  box-sizing: border-box; /* Include border/padding in element's total width/height */

  /* --- Explicit Border Properties using Menu Color --- */
  border-width: 1px !important;
  border-style: solid !important;
  border-color: var(--menu-color, rgb(130, 130, 130)) !important; /* Use --menu-color, fallback to gray */

  padding: 0.2em 0.6em;
  margin-top: 0.8em;
  margin-bottom: 0.5em;

  /* Typography - Use Menu Variables */
  color: var(--menu-color, rgb(130, 130, 130)) !important; /* Use --menu-color, fallback to gray */
  font-family: var(--menu-font-family, inherit) !important; /* Use --menu-font-family */
  /* Use menu font size, slightly smaller */
  font-size: calc(var(--menu-font-size, 16px) * 0.9) !important;
  text-decoration: none !important; /* Ensure no underline */

  /* Appearance */
  background-color: transparent !important; /* Ensure no background */
  cursor: pointer;
  transition: opacity 0.2s ease;
}

/* Optional: Add a subtle hover effect */
#neon-lightbox .lightbox-content-wrapper .neon-buy-now-button:hover { /* Increased specificity */
  opacity: 0.8;
  /* Optionally change border/text color on hover using menu hover color */
  /* border-color: var(--menu-hover-color, #3a6d96) !important; */
  /* color: var(--menu-hover-color, #3a6d96) !important; */
}

/* --- Description & Other Lightbox Elements --- */

/* Reduce vertical spacing between paragraphs in descriptions */
#neon-lightbox .lightbox-description p,
#neon-lightbox .lightbox-video-description p { /* Increased specificity */
  margin-top: 0.2em;
  margin-bottom: 0.2em;
  color: var(--menu-color, rgb(130, 130, 130)) !important; /* Use menu color for paragraphs */
  font-family: var(--menu-font-family, inherit) !important; /* Use menu font */
  font-size: var(--menu-font-size, 16px) !important; /* Use menu font size */
}

/* Ensure description text color is applied, overriding potential conflicts */
#neon-lightbox .lightbox-description,
#neon-lightbox .lightbox-video-description { /* Increased specificity */
  color: var(--menu-color, rgb(130, 130, 130)) !important; /* Use menu color */
  font-family: var(--menu-font-family, inherit) !important; /* Use menu font */
  font-size: var(--menu-font-size, 16px) !important; /* Use menu font size */
}

/* Ensure arrow color is applied */
#neon-lightbox .arrow { /* Increased specificity */
  color: var(--menu-color, rgb(130, 130, 130)) !important; /* Use menu color for arrows */
  background-color: rgba(255, 255, 255, 0.04);
}
#neon-lightbox .arrow:hover { /* Increased specificity */
   background-color: rgba(255, 255, 255, 0.3); /* Keep hover effect */
   color: var(--menu-hover-color, #3a6d96) !important; /* Use menu hover color */
}

/* Ensure close button color is applied */
#neon-lightbox .neon-lightbox-close-btn { /* Increased specificity */
  color: var(--menu-color, rgb(130, 130, 130)) !important; /* Use menu color for close button */
}
#neon-lightbox .neon-lightbox-close-btn:hover {
  color: var(--menu-hover-color, #3a6d96) !important; /* Use menu hover color */
}

/* Add top spacing to lightbox content */
.neon-lightbox .neon-lightbox-content {
  padding-top: 20px !important; /* Add 20px padding at the top */

}

.singles-mode .neon-lightbox-content {
  height: 95vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  /* Changed from 'center' to 'flex-start' to align content to the top */
  justify-content: flex-start !important;
  align-items: center;
  box-sizing: border-box;
  background: transparent !important;
  z-index: 999990 !important;
  /* Explicitly set paddings to avoid shorthand conflicts and ensure top padding is applied.
     The original 'padding: 2vh 0;' set top/bottom to 2vh and left/right to 0.
     We are now making sure padding-top is 60px as intended. */
  padding-top: 33px !important; /* This padding-top is crucial for reserving space for the overview button */
  padding-right: 0;
  padding-bottom: 1vh;
  padding-left: 0;
  max-height: 90vh !important;
  overflow-y: visible; /* Allows content to scroll if it exceeds max-height */
}

/* Ensure the overview toggle button remains correctly positioned and visible */
.singles-mode .overview-toggle {
  position: absolute;
  top: 10px;
  right: 20px;
  background: transparent !important;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  border: none;
  padding: 20px 20px; /* Increased padding for easier clicking */
  border-radius: 0px; /* Consistent with existing style */
  font-size: 0.9rem; /* Consistent with existing style */
  width: auto;
  display: inline-block;
  z-index: 999999; /* Ensure it's above other elements */
  pointer-events: auto !important;
  cursor: pointer !important;
  transition: opacity 0.3s ease;
  box-shadow: none; /* Consistent with existing style */
  text-align: right;
}


.masonry-item .play-button,
.masonry-item .play-button svg {
  opacity: .7 !important; /* Default opacity */
  transition: opacity 0.8s ease !important; /* Ensures transition applies on hover and rollout */
}


.masonry-item:hover img,
.masonry-item:not(:hover) img,
.masonry-item:hover .rollover-image,
.masonry-item:not(:hover) .rollover-image,
.masonry-item:hover .grid-image-overlay,
.masonry-item:not(:hover) .grid-image-overlay {
  transition: opacity 0.8s ease;
}

/*
  Hover state for the play button and its SVG icon (global).
*/
.masonry-item:hover .play-button,
.masonry-item:hover .play-button svg {
  opacity: 1 !important; /* Opacity on hover */
}


@media (min-aspect-ratio: 1/1) {
  /* Base state for the play button itself on desktop */
  .masonry-item .play-button {
    opacity: .7; /* Default opacity on desktop */
    pointer-events: auto;
    z-index: 1;
    transition: opacity 0.8s ease; /* Ensure transition is also defined here for robustness */
  }


  .masonry-item .play-button svg {
    opacity: .7; /* Default opacity for SVG on desktop, matching parent */
    transition: opacity 0.8s ease; /* Ensure transition for SVG as well */
  }

  /* Hover state for the play button on desktop */
  .masonry-item:hover .play-button {
    opacity: 1; /* Opacity on hover for desktop */
    z-index: 1;
  }

  /* Hover state for the SVG icon within the play button on desktop */
  .masonry-item:hover .play-button svg {
    opacity: 1; /* Opacity on hover for SVG on desktop, matching parent */
  }
}

/* Add these CSS rules to handle P tags in horizontal scroller descriptions */

/* Reset P tag styling within horizontal descriptions */
.horiz-description p {
  display: inline !important; /* Make paragraphs flow like inline text */
  margin: 0 !important; /* Remove default margins */
  padding: 0 !important; /* Remove default padding */
  color: inherit !important; /* Inherit color from parent */
  font-size: inherit !important; /* Inherit font size from parent */
  font-family: inherit !important; /* Inherit font family from parent */
  line-height: inherit !important; /* Inherit line height from parent */
}

/* Handle multiple P tags with spacing */
.horiz-description p + p {
  margin-left: 0.5em !important; /* Add small space between inline paragraphs */
}

/* Also handle any DIV tags that might be used instead of P */
.horiz-description div {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font-size: inherit !important;
  font-family: inherit !important;
  line-height: inherit !important;
}

.horiz-description div + div {
  margin-left: 0.5em !important;
}

/* Handle rich text editor blocks specifically */
.horiz-description p.rteBlock,
.horiz-description div.rteBlock {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure strong and em tags within P tags maintain inline display */
.horiz-description p strong,
.horiz-description p em,
.horiz-description p strong em,
.horiz-description p em strong {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  font-family: inherit !important;
}

/* Handle any potential BR tags to prevent line breaks */
.horiz-description br {
  display: none !important; /* Hide line breaks to keep everything inline */
}
/* Add these CSS rules to handle P tags in ALL description types */
/* HIGH SPECIFICITY RULES - These should override any conflicting styles */

/* Handle legacy FONT tags that might have size/face attributes */
.horiz-description font,
.mobile-description font,
.mobile-video-description font,
.mobile-item-description font,
.text-container font,
.horiz-description p font,
.mobile-description p font,
.mobile-video-description p font,
.mobile-item-description p font,
.text-container p font {
  font-size: var(--menu-font-size, 16px) !important; /* Use menu font size */
  font-family: var(--menu-font-family, Arial, sans-serif) !important; /* Use menu font family */
  color: var(--menu-color, rgb(130, 130, 130)) !important; /* Override any color attribute */
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  background: none !important;
}

/* Extra specific font tag rules to override any framework CSS */
div.horiz-description font[face],
div.horiz-description font[size],
div.horiz-description font[color],
div.mobile-description font[face],
div.mobile-description font[size],
div.mobile-description font[color],
div.mobile-video-description font[face],
div.mobile-video-description font[size],
div.mobile-video-description font[color],
div.mobile-item-description font[face],
div.mobile-item-description font[size],
div.mobile-item-description font[color],
div.text-container font[face],
div.text-container font[size],
div.text-container font[color],
div.horiz-description p font[face],
div.horiz-description p font[size],
div.horiz-description p font[color],
div.mobile-description p font[face],
div.mobile-description p font[size],
div.mobile-description p font[color],
div.text-container p font[face],
div.text-container p font[size],
div.text-container p font[color] {
  font-size: var(--menu-font-size, 16px) !important;
  font-family: var(--menu-font-family, Arial, sans-serif) !important;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  background: transparent !important;
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: inherit !important;
}

/* Reset P tag styling within horizontal and mobile descriptions AND text-container */
div.horiz-description p,
div.mobile-description p,
div.mobile-video-description p,
div.mobile-item-description p,
div.text-container p,
.horiz-description > p,
.mobile-description > p,
.mobile-video-description > p,
.mobile-item-description > p,
.text-container > p {
  display: inline !important; /* Make paragraphs flow like inline text */
  margin: 0 !important; /* Remove default margins */
  padding: 0 !important; /* Remove default padding */
  color: var(--menu-color, rgb(130, 130, 130)) !important; /* Use menu color */
  font-size: var(--menu-font-size, 16px) !important; /* Use menu font size */
  font-family: var(--menu-font-family, Arial, sans-serif) !important; /* Use menu font family */
  line-height: inherit !important; /* Inherit line height from parent */
}

/* Extra specific rules with higher specificity */
div.mobile-description > p:first-child,
div.horiz-description > p:first-child,
div.mobile-video-description > p:first-child,
div.mobile-item-description > p:first-child,
div.text-container > p:first-child {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--menu-color, rgb(130, 130, 130)) !important; /* Use menu color */
}

/* Handle multiple P tags with spacing */
div.horiz-description p + p,
div.mobile-description p + p,
div.mobile-video-description p + p,
div.mobile-item-description p + p,
div.text-container p + p,
.horiz-description > p + p,
.mobile-description > p + p,
.mobile-video-description > p + p,
.mobile-item-description > p + p,
.text-container > p + p {
  margin-left: 0.5em !important; /* Add small space between inline paragraphs */
}

/* Also handle any DIV tags that might be used instead of P */
.horiz-description div,
.mobile-description div,
.mobile-video-description div,
.mobile-item-description div,
.text-container div {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--menu-color, rgb(130, 130, 130)) !important; /* Use menu color */
  font-size: var(--menu-font-size, 16px) !important;
  font-family: var(--menu-font-family, Arial, sans-serif) !important;
  line-height: inherit !important;
}

.horiz-description div + div,
.mobile-description div + div,
.mobile-video-description div + div,
.mobile-item-description div + div,
.text-container div + div {
  margin-left: 0.5em !important;
}

/* Handle rich text editor blocks specifically */
.horiz-description p.rteBlock,
.horiz-description div.rteBlock,
.mobile-description p.rteBlock,
.mobile-description div.rteBlock,
.mobile-video-description p.rteBlock,
.mobile-video-description div.rteBlock,
.mobile-item-description p.rteBlock,
.mobile-item-description div.rteBlock,
.text-container p.rteBlock,
.text-container div.rteBlock {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure strong and em tags within P tags maintain inline display */
.horiz-description p strong,
.horiz-description p em,
.horiz-description p strong em,
.horiz-description p em strong,
.mobile-description p strong,
.mobile-description p em,
.mobile-description p strong em,
.mobile-description p em strong,
.mobile-video-description p strong,
.mobile-video-description p em,
.mobile-video-description p strong em,
.mobile-video-description p em strong,
.mobile-item-description p strong,
.mobile-item-description p em,
.mobile-item-description p strong em,
.mobile-item-description p em strong,
.text-container p strong,
.text-container p em,
.text-container p strong em,
.text-container p em strong {
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--menu-color, rgb(130, 130, 130)) !important; /* Use menu color */
  font-family: inherit !important;
}

/* Ensure links within descriptions work properly */
.horiz-description p a,
.horiz-description a,
.mobile-description p a,
.mobile-description a,
.mobile-video-description p a,
.mobile-video-description a,
.mobile-item-description p a,
.mobile-item-description a,
.text-container p a,
.text-container a {
  display: inline !important;
  color: var(--menu-color, inherit) !important; /* Use menu color or inherit from parent */
  text-decoration: underline !important; /* Ensure links are visually distinct */
  opacity: 0.8; /* Slightly different from regular text */
}

.horiz-description p a:hover,
.horiz-description a:hover,
.mobile-description p a:hover,
.mobile-description a:hover,
.mobile-video-description p a:hover,
.mobile-video-description a:hover,
.mobile-item-description p a:hover,
.mobile-item-description a:hover,
.text-container p a:hover,
.text-container a:hover {
  opacity: 1; /* Full opacity on hover */
}
/* Fix em element sizing with higher specificity */
.lightbox-description.show-description em,
.lightbox-video-description em,
.mobile-description em,
.mobile-video-description em,
.horiz-description em {
  font-size: calc(var(--menu-font-size, 16px) * 0.95) !important;
  font-family: var(--menu-font-family, inherit) !important;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  line-height: 1.4 !important;
  font-weight: normal !important;
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Override any potential browser default em styling */
div.lightbox-description.show-description p em {
  font-size: inherit !important;
  font-style: italic !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}
/* Fix i element sizing (in addition to em elements) */
.lightbox-description.show-description i,
.lightbox-video-description i,
.mobile-description i,
.mobile-video-description i,
.horiz-description i {
  font-size: calc(var(--menu-font-size, 16px) * 0.95) !important;
  font-family: var(--menu-font-family, inherit) !important;
  color: var(--menu-color, rgb(130, 130, 130)) !important;
  line-height: 1.4 !important;
  font-weight: normal !important;
  display: inline !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Override any potential browser default i styling */
div.lightbox-description.show-description i {
  font-size: inherit !important;
  font-style: italic !important;
  font-weight: inherit !important;
  line-height: inherit !important;
}

/* Ensure description overlay text is also centered as a block */
.lightbox-description.description-on-demand.show, .lightbox-video-description.description-on-demand.show {
  /* Removed flexbox centering - using text-align instead */
}

/* Only center text when the entire content block is a single line */
.grid-overview-content:has(.text-single-line:only-child),
.grid-overview-content:has(.text-single-line:first-child:last-child) {
  text-align: center !important;
}

/* Default to left alignment for all text content */
.grid-overview-content,
.grid-overview-content p,
.grid-overview-content .text-single-line,
.grid-overview-content .text-wrapped {
  text-align: left !important;
}

/* Center single-line text only when it's the only element in the container */
.singles-mode .overview-content:has(.text-single-line:only-child),
.lightbox-image-container .overview-overlay .overview-content:has(.text-single-line:only-child),
.lightbox-description:has(.text-single-line:only-child),
.lightbox-description.description-on-demand.show:has(.text-single-line:only-child),
.lightbox-video-description:has(.text-single-line:only-child),
.lightbox-video-description.description-on-demand.show:has(.text-single-line:only-child) {
  text-align: center !important;
}

/* Default to left alignment for all other cases */
.singles-mode .overview-content,
.lightbox-image-container .overview-overlay .overview-content,
.lightbox-description,
.lightbox-description.description-on-demand.show,
.lightbox-video-description,
.lightbox-video-description.description-on-demand.show {
  text-align: left !important;
}

/* Override the conflicting rules with higher specificity for text-single-line */
.singles-mode .overview-content.text-single-line,
.lightbox-image-container .overview-overlay .overview-content.text-single-line,
.lightbox-description.text-single-line,
.lightbox-description.description-on-demand.show.text-single-line,
.lightbox-video-description.text-single-line,
.lightbox-video-description.description-on-demand.show.text-single-line {
  text-align: center !important;
}

/* Ensure text-wrapped elements are left-aligned with higher specificity */
.singles-mode .overview-content.text-wrapped,
.lightbox-image-container .overview-overlay .overview-content.text-wrapped,
.lightbox-description.text-wrapped,
.lightbox-description.description-on-demand.show.text-wrapped,
.lightbox-video-description.text-wrapped,
.lightbox-video-description.description-on-demand.show.text-wrapped {
  text-align: left !important;
}

/* Additional fallback rules for better browser compatibility */
.overview-content .text-single-line,
.lightbox-description .text-single-line,
.lightbox-video-description .text-single-line {
  text-align: center !important;
}

.overview-content .text-wrapped,
.lightbox-description .text-wrapped,
.lightbox-video-description .text-wrapped {
  text-align: left !important;
}

/* Direct element centering - when the element itself has the class */
.lightbox-description.text-single-line,
.lightbox-video-description.text-single-line,
.overview-content.text-single-line {
  text-align: center !important;
}

.lightbox-description.text-wrapped,
.lightbox-video-description.text-wrapped,
.overview-content.text-wrapped {
  text-align: left !important;
}

/* Dimmed state for info and overview buttons */
.info-button.dimmed,
.overview-button.dimmed,
.singles-mode .info-button.dimmed,
.singles-mode .overview-button.dimmed {
  opacity: 0 !important;
  pointer-events: none !important;
  cursor: default !important;
}