/* Custom styles - Tailwind handles reset/preflight. Do NOT add * { margin:0; padding:0 }
   as unlayered CSS overrides Tailwind's layered utilities and breaks spacing/padding. */

/* System font stack - avoids Google Fonts CSP; Inter-like on most systems */
body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  letter-spacing: -0.01em;
}

/* CSS Custom Properties for Theme */
:root {
  --ev-green: #42CF33;
  --ev-green-dark: #2FA823;
  --ev-green-light: #A5E739;
  --metallic-silver: #E8E8E8;
  --deep-charcoal: #1A1A1A;
  --electric-blue: #0066FF;
  --warm-gray-50: #F8F9FA;
  --warm-gray-900: #2D3748;
  --animation-ease: cubic-bezier(0.4, 0, 0.2, 1);
  --animation-duration-fast: 200ms;
  --animation-duration-normal: 400ms;
  --animation-duration-slow: 800ms;
}

/* Custom utility classes */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Popup styling for Leaflet */
.popup-content {
  min-width: 200px;
  max-width: 300px;
}

.popup-content img {
  width: 100%;
  height: 128px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
}

/* Map container */
#map {
  z-index: 1;
}

/* Marker styling - ensure they're clickable */
.listing-marker,
.user-location-marker {
  cursor: pointer !important;
  pointer-events: auto !important;
}

.listing-marker {
  z-index: 1000 !important;
}

.user-location-marker {
  z-index: 0 !important;
}

/* Loading states */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mobile Header Redesign */
@media (max-width: 1023px) {
  /* Narrower mobile header */
  #main-nav .max-w-7xl > div:first-child {
    height: 3rem; /* h-12 instead of h-16 */
  }
  
  /* Mobile header layout: hamburger left, logo center, search right */
  #main-nav .mobile-header-container {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    align-items: center;
    width: 100%;
  }
  
  #main-nav .mobile-header-left {
    display: flex;
    justify-content: flex-start;
  }
  
  #main-nav .mobile-header-center {
    display: flex;
    justify-content: center;
  }
  
  #main-nav .mobile-header-right {
    display: flex;
    justify-content: flex-end;
  }
  
  /* Hide desktop nav on mobile */
  #main-nav .desktop-nav {
    display: none;
  }
  
  /* Mobile Menu Slide-Out */
  #mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 50;
    overflow-y: auto;
    padding-top: 3rem; /* Account for header height */
  }
  
  #mobile-menu.open {
    transform: translateX(0);
  }
  
  /* Backdrop overlay */
  #mobile-menu-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 49;
  }
  
  #mobile-menu-backdrop.active {
    opacity: 1;
    visibility: visible;
  }
  
  /* Full-Screen Mobile Search Modal */
  #mobile-search-modal {
    animation: slideUpMobile 0.3s ease-out;
  }
  
  #mobile-search-backdrop {
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  }
  
  #mobile-search-backdrop:not(.hidden) {
    opacity: 1;
    visibility: visible;
  }
  
  /* Mobile Filters Swiper */
  .mobile-filters-swiper {
    padding: 0.5rem 0;
  }
  
  .mobile-filters-swiper .swiper-slide {
    width: auto;
  }
  
  /* Mobile Filter Modal */
  #mobile-filter-modal {
    animation: slideUpMobile 0.3s ease-out;
  }
  
  /* Mobile Results Layout - Listings First */
  @media (max-width: 1023px) {
    #listings-section {
      order: 1;
    }
    
    #map-section {
      order: 2;
    }
    
    /* Hide map by default on mobile, show when map view is active */
    #map-section.mobile-hidden {
      display: none;
    }
    
    #listings-section.mobile-hidden {
      display: none;
    }
    
  /* Improved map popups for mobile */
  .leaflet-popup-content-wrapper {
    font-size: 14px;
    padding: 12px;
    min-width: 250px;
    max-width: 90vw;
  }
  
  .leaflet-popup-content {
    margin: 0;
    line-height: 1.5;
  }
  
  .leaflet-popup-content h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
  }
  
  .leaflet-popup-content p {
    font-size: 13px;
    margin-bottom: 6px;
  }
  
  .leaflet-popup-content a {
    font-size: 14px;
    padding: 8px 16px;
    min-height: 44px; /* Touch-friendly */
  }
  
  /* Dashboard tabs mobile fixes */
  .dashboard-tab {
    min-height: 44px; /* Touch-friendly */
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(66, 207, 51, 0.2);
    position: relative;
    z-index: 1;
  }
  
  .dashboard-tab-content {
    position: relative;
    z-index: 0;
  }
  
  /* Ensure tabs are clickable on mobile */
  .dashboard-tab:active {
    background-color: rgba(66, 207, 51, 0.1);
  }
}
  
  /* Sign in button at top of mobile menu */
  #mobile-menu .mobile-menu-signin {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.5rem;
  }
  
  #mobile-menu .mobile-menu-signin a {
    display: block;
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    background: #42CF33;
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: background 0.2s;
  }
  
  #mobile-menu .mobile-menu-signin a:hover {
    background: #2FA823;
  }
}

@media (min-width: 1024px) {
  /* Hide mobile header elements on desktop */
  #main-nav .mobile-header-container {
    display: none;
  }
  
  #main-nav .mobile-search-btn {
    display: none;
  }
  
  /* Reset mobile menu for desktop */
  #mobile-menu {
    position: static;
    transform: none;
    width: auto;
    height: auto;
    box-shadow: none;
    padding-top: 0;
  }
  
  #mobile-menu-backdrop {
    display: none;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #map {
    height: 300px;
  }
}

/* Custom scrollbar for results list */
#results-list::-webkit-scrollbar,
#top-results-grid::-webkit-scrollbar,
#top-results-list::-webkit-scrollbar {
  width: 8px;
}

#results-list::-webkit-scrollbar-track,
#top-results-grid::-webkit-scrollbar-track,
#top-results-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

#results-list::-webkit-scrollbar-thumb,
#top-results-grid::-webkit-scrollbar-thumb,
#top-results-list::-webkit-scrollbar-thumb {
  background: #cbd5e0;
  border-radius: 10px;
}

#results-list::-webkit-scrollbar-thumb:hover,
#top-results-grid::-webkit-scrollbar-thumb:hover,
#top-results-list::-webkit-scrollbar-thumb:hover {
  background: #42CF33;
}

/* Smooth scrolling */
#top-results-grid,
#top-results-list,
#results-grid,
#results-list {
  scroll-behavior: smooth;
}

/* ============================================
   MODERN 2026 SAAS DESIGN - ANIMATIONS & STYLING
   ============================================ */

/* Respect user preferences for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Animated Gradient Background for Hero */
.hero-gradient-bg {
  position: relative;
  overflow: hidden;
}

.hero-gradient-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #5A8A26 0%, #2A7A1C 50%, #1F6B15 100%);
  z-index: 0;
}

.hero-gradient-bg::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(66, 207, 51, 0.1) 0%, transparent 70%);
  animation: gradient-mesh 30s ease-in-out infinite;
  z-index: 1;
}

@keyframes gradient-mesh {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-30px, 30px) rotate(240deg);
  }
}

.hero-gradient-bg > * {
  position: relative;
  z-index: 2;
}

/* Floating Elements Animation */
.floating-element {
  position: absolute;
  opacity: 0.1;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) translateX(0px);
  }
  25% {
    transform: translateY(-20px) translateX(10px);
  }
  50% {
    transform: translateY(-40px) translateX(-10px);
  }
  75% {
    transform: translateY(-20px) translateX(5px);
  }
}

/* Glassmorphism Effect */
.glass-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.glass-card:focus-within {
  border-color: var(--ev-green);
  box-shadow: 0 8px 32px 0 rgba(66, 207, 51, 0.2), 0 0 0 3px rgba(66, 207, 51, 0.1);
}

/* Fade In Animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--animation-duration-slow) var(--animation-ease),
              transform var(--animation-duration-slow) var(--animation-ease);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Slide Up Animation */
.slide-up {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: opacity var(--animation-duration-slow) var(--animation-ease),
              transform var(--animation-duration-slow) var(--animation-ease);
}

.slide-up.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Staggered Animation Delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }

/* Reduced-motion: show everything immediately */
@media (prefers-reduced-motion: reduce) {
  .fade-in, .slide-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Enhanced Button Styles */
.btn-primary {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ev-green) 0%, var(--ev-green-dark) 100%);
  transition: all var(--animation-duration-normal) var(--animation-ease);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 24px rgba(66, 207, 51, 0.3);
}

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

/* Input Focus Glow Animation */
.input-glow {
  position: relative;
}

.input-glow:focus {
  animation: input-pulse 2s ease-in-out infinite;
}

@keyframes input-pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(66, 207, 51, 0.4);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(66, 207, 51, 0.1);
  }
}

/* Feature Card Hover Effects */
.feature-card {
  transition: all var(--animation-duration-normal) var(--animation-ease);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(66, 207, 51, 0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--animation-duration-normal) var(--animation-ease);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover .feature-icon {
  transform: rotate(5deg) scale(1.1);
}

.feature-icon {
  transition: transform var(--animation-duration-normal) var(--animation-ease);
}

/* Icon Background Gradient Animation */
.icon-bg-gradient {
  background: linear-gradient(135deg, rgba(66, 207, 51, 0.1) 0%, rgba(165, 231, 57, 0.1) 100%);
  position: relative;
  overflow: hidden;
}

.icon-bg-gradient::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(66, 207, 51, 0.1), transparent);
  animation: icon-rotate 3s linear infinite;
}

@keyframes icon-rotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Pricing Card Enhancements */
.pricing-card {
  transition: all var(--animation-duration-normal) var(--animation-ease);
  position: relative;
}

.pricing-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--ev-green), var(--ev-green-dark));
  opacity: 0;
  transition: opacity var(--animation-duration-normal) var(--animation-ease);
}

.pricing-card:hover {
  transform: scale(1.03);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.pricing-card:hover::after {
  opacity: 1;
}

.pricing-card.popular {
  border: 2px solid var(--ev-green);
}

.pricing-card.popular::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--ev-green), var(--ev-green-dark));
  border-radius: inherit;
  z-index: -1;
  opacity: 0.1;
}

/* Popular Badge Pulse Animation */
.popular-badge {
  animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(66, 207, 51, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 8px rgba(66, 207, 51, 0);
  }
}

/* Navigation Enhancements */
.nav-blur {
  transition: all var(--animation-duration-normal) var(--animation-ease);
}

.nav-blur.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.nav-link {
  position: relative;
  transition: color var(--animation-duration-fast) var(--animation-ease);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ev-green);
  transition: width var(--animation-duration-normal) var(--animation-ease);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-logo {
  transition: transform var(--animation-duration-normal) var(--animation-ease);
}

.nav-logo:hover {
  transform: scale(1.05);
}

/* Mobile Navigation Styles */
.nav-link-mobile {
  transition: color var(--animation-duration-fast) var(--animation-ease);
  border-radius: 0.375rem;
}

.nav-link-mobile:hover {
  background-color: rgba(66, 207, 51, 0.1);
  color: var(--ev-green-dark);
}

#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--animation-duration-normal) var(--animation-ease);
  opacity: 0;
  visibility: hidden;
}

#mobile-menu.open {
  max-height: 500px;
  opacity: 1;
  visibility: visible;
}

#menu-close-icon {
  display: none;
}

#mobile-menu-btn.active #menu-open-icon {
  display: none;
}

#mobile-menu-btn.active #menu-close-icon {
  display: block;
}

/* Mobile responsive adjustments */
@media (max-width: 1024px) {
  .nav-link {
    font-size: 0.875rem;
  }
}

@media (max-width: 640px) {
  #main-nav {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  #user-email {
    display: none;
  }
}

/* Number Counter Animation */
.counter-number {
  display: inline-block;
}

/* Section Spacing - Homepage hero and sections */
.section-spacing {
  padding: 2rem 0;
}

@media (min-width: 640px) {
  .section-spacing {
    padding: 2.5rem 0;
  }
}

@media (min-width: 768px) {
  .section-spacing {
    padding: 3rem 0;
  }
}

@media (min-width: 1024px) {
  .section-spacing {
    padding: 3.5rem 0;
  }
}

/* Homepage horizontal breathing room */
.homepage .max-w-7xl,
.homepage .max-w-6xl,
.homepage .max-w-5xl,
.homepage .max-w-4xl {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 640px) {
  .homepage .max-w-7xl,
  .homepage .max-w-6xl,
  .homepage .max-w-5xl,
  .homepage .max-w-4xl {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
  }
}

@media (min-width: 1024px) {
  .homepage .max-w-7xl,
  .homepage .max-w-6xl,
  .homepage .max-w-5xl,
  .homepage .max-w-4xl {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Inner page spacing - content starts immediately below nav */
.inner-page-spacing {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

@media (min-width: 640px) {
  .inner-page-spacing {
    padding-top: 2.5rem;
    padding-bottom: 4rem;
  }
}

@media (min-width: 768px) {
  .inner-page-spacing {
    padding-top: 3rem;
    padding-bottom: 5rem;
  }
}

@media (min-width: 1024px) {
  .inner-page-spacing {
    padding-top: 3.5rem;
    padding-bottom: 6rem;
  }
}

/* Card base - consistent padding at all breakpoints */
.card-padding {
  padding: 1rem;
}

@media (min-width: 640px) {
  .card-padding {
    padding: 1.25rem;
  }
}

@media (min-width: 768px) {
  .card-padding {
    padding: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .card-padding {
    padding: 1.5rem;
  }
}

/* Metallic Border Effect */
.metallic-border {
  position: relative;
  border: 1px solid rgba(232, 232, 232, 0.5);
}

.metallic-border::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(232, 232, 232, 0.1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Hexagonal Badge Style */
.hex-badge {
  clip-path: polygon(30% 0%, 70% 0%, 100% 50%, 70% 100%, 30% 100%, 0% 50%);
  background: linear-gradient(135deg, var(--ev-green), var(--ev-green-dark));
}

/* Smooth Scroll Behavior */
html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Reaction Animations */
.reaction-btn {
  transition: all 0.2s ease;
}

.reaction-btn:hover {
  transform: scale(1.05);
}

.reaction-btn:active {
  transform: scale(0.95);
}

.reaction-emoji {
  transition: transform 0.2s ease;
}

.reaction-btn:hover .reaction-emoji {
  transform: scale(1.2);
}

.reaction-option {
  transition: all 0.15s ease;
}

.reaction-option:hover {
  background-color: rgba(66, 207, 51, 0.1);
}

.reaction-option:active {
  transform: scale(0.9);
}

/* Category Badge Styles */
.category-filter-btn.active {
  background-color: #42CF33;
  color: white;
  border-color: #42CF33;
}

/* Reaction Picker Animation */
#reaction-picker {
  animation: slideUp 0.2s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   IMAGE GALLERY STYLES
   ============================================ */

/* Hero Image Container */
#image-gallery-container {
  position: relative;
}

#hero-image {
  transition: opacity 0.3s ease-in-out;
}

/* Thumbnail Gallery */
#thumbnail-container {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: #f9fafb;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

#thumbnail-container::-webkit-scrollbar {
  height: 6px;
}

#thumbnail-container::-webkit-scrollbar-track {
  background: #e5e7eb;
  border-radius: 3px;
}

#thumbnail-container::-webkit-scrollbar-thumb {
  background: #42CF33;
  border-radius: 3px;
}

.thumbnail-btn {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 0.5rem;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.thumbnail-btn:hover {
  transform: scale(1.05);
  border-color: #42CF33;
}

.thumbnail-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Gallery Navigation Buttons */
#gallery-prev,
#gallery-next {
  transition: all 0.2s ease;
}

#gallery-prev:hover,
#gallery-next:hover {
  transform: translateY(-50%) scale(1.1);
  background: white;
}

#gallery-prev.opacity-0,
#gallery-next.opacity-0 {
  pointer-events: none;
}

/* Image Counter */
#image-counter {
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Fullscreen Modal */
#fullscreen-modal {
  z-index: 9999;
  animation: fadeIn 0.2s ease-out;
}

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

#fullscreen-image {
  animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

#fullscreen-prev,
#fullscreen-next {
  transition: all 0.2s ease;
}

#fullscreen-prev:hover,
#fullscreen-next:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

/* Mobile Action Bar */
#mobile-action-bar {
  animation: slideUpMobile 0.3s ease-out;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

@keyframes slideUpMobile {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Add padding to main content when mobile action bar is visible */
@media (max-width: 1024px) {
  main {
    padding-bottom: 80px;
  }
}

/* Gallery Image Loading */
#hero-image {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

#hero-image[src] {
  background: none;
  animation: none;
}

/* Thumbnail Loading State */
.thumbnail-btn img {
  background: #e5e7eb;
  transition: opacity 0.3s ease;
}

.thumbnail-btn img[src] {
  background: none;
}

/* Touch-friendly gallery controls on mobile */
@media (max-width: 768px) {
  #gallery-prev,
  #gallery-next {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.75rem;
  }
  
  .thumbnail-btn {
    width: 60px;
    height: 60px;
  }
  
  #thumbnail-container {
    padding: 0.75rem;
    gap: 0.375rem;
  }
}
