/**
 * ═══════════════════════════════════════════════════════════════════════════════
 * GALLERY COMPONENT — proprietate.html
 * ═══════════════════════════════════════════════════════════════════════════════
 * 
 * Galerie imagini WOW cu:
 * - Grid layout (1 mare + 4 mici)
 * - Lightbox fullscreen
 * - Touch swipe support
 * - Thumbnails navigation
 * 
 * ═══════════════════════════════════════════════════════════════════════════════
 */

/* ─────────────────────────────────────────────────────────
   Gallery Container
   ───────────────────────────────────────────────────────── */
.property-gallery-wow {
  position: relative;
  margin-top: 72px; /* header height */
  overflow: hidden;
  background: transparent; /* No gray background */
}

.gallery-container {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-6);
  background: transparent;
}

/* ─────────────────────────────────────────────────────────
   Gallery Grid (1 + 4 layout)
   ───────────────────────────────────────────────────────── */
.gallery-grid,
.gallery-grid-wow {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-3);
  border-radius: var(--radius-2xl);
  overflow: visible;
  height: 500px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.gallery-main,
.gallery-main-large {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.gallery-main img,
.gallery-main-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
  border-radius: var(--radius-xl);
}

.gallery-main:hover img,
.gallery-main-large:hover img {
  transform: scale(1.03);
}

/* Overlay Info (rating badge) */
.gallery-overlay-info {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  z-index: 2;
}

.gallery-rating {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  color: #fbbf24;
  font-weight: var(--font-bold);
  font-size: var(--text-sm);
}

.gallery-rating svg {
  width: 16px;
  height: 16px;
  fill: #fbbf24;
}

/* ─────────────────────────────────────────────────────────
   Side Grid (4 images)
   ───────────────────────────────────────────────────────── */
.gallery-side,
.gallery-side-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--space-2);
}

.gallery-item,
.gallery-side-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: var(--radius-xl);
}

.gallery-item img,
.gallery-side-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
  border-radius: var(--radius-xl);
}

.gallery-item:hover img,
.gallery-side-item:hover img {
  transform: scale(1.05);
}

/* Gallery Item Button */
.gallery-item-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}

/* Gallery Overlay */
.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: background var(--transition-base);
}

.gallery-item:hover .gallery-overlay,
.gallery-side-item:hover .gallery-overlay,
.gallery-main:hover .gallery-overlay {
  background: rgba(0, 0, 0, 0.3);
}

.gallery-zoom-icon {
  opacity: 0;
  transform: scale(0.8);
  transition: opacity var(--transition-base), transform var(--transition-base);
  color: white;
}

.gallery-zoom-icon svg {
  width: 32px;
  height: 32px;
}

.gallery-item:hover .gallery-zoom-icon,
.gallery-side-item:hover .gallery-zoom-icon,
.gallery-main:hover .gallery-zoom-icon {
  opacity: 1;
  transform: scale(1);
}

/* Gallery More Overlay */
.gallery-overlay-more {
  background: rgba(0, 0, 0, 0.5);
}

.gallery-more-icon,
.gallery-more-text {
  color: white;
  text-align: center;
}

.gallery-more-icon svg {
  width: 24px;
  height: 24px;
  margin-bottom: var(--space-2);
}

.gallery-more-text {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
}

/* Gallery Actions - BELOW GALLERY */
.gallery-actions-below {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  margin-top: var(--space-4);
}

.gallery-action-btn-modern {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: transparent;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  white-space: nowrap;
}

.gallery-action-btn-modern:hover {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: white;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(var(--color-primary-rgb), 0.3);
}

.gallery-action-btn-modern svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.gallery-action-btn-modern:hover svg {
  transform: scale(1.1);
}

/* Buton Salvează - stil special cu inimă */
.btn-save-heart {
  border-color: rgba(225, 29, 72, 0.4);
  color: #f43f5e;
}

.btn-save-heart:hover {
  background: linear-gradient(135deg, #e11d48, #be123c);
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(225, 29, 72, 0.4);
}

.btn-save-heart:hover svg {
  fill: white;
}

.gallery-action-btn svg,
.gallery-action-btn .icon-3d {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.gallery-action-btn:hover svg {
  transform: scale(1.1);
}

.gallery-action-btn .action-text {
  display: inline;
}

/* Gallery Background Glow */
.gallery-bg-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--color-primary-light), transparent 70%);
  opacity: 0.3;
  pointer-events: none;
}

/* More photos overlay on last item */
.gallery-item-more .gallery-overlay-more,
.gallery-side-item.has-more::after {
  content: attr(data-more);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  transition: background var(--transition-base);
}

.gallery-side-item.has-more:hover::after {
  background: rgba(0, 0, 0, 0.7);
}

/* ─────────────────────────────────────────────────────────
   All Photos Button
   ───────────────────────────────────────────────────────── */
.gallery-all-btn {
  position: absolute;
  bottom: var(--space-6);
  right: var(--space-8);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: white;
  color: var(--color-bg);
  border: none;
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
}

.gallery-all-btn:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-xl);
}

.gallery-all-btn .icon {
  width: 18px;
  height: 18px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   LIGHTBOX (Fullscreen Gallery)
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Modal fullscreen pentru galerie */
.modal-fullscreen,
#galleryModal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 9999);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.modal-fullscreen[hidden],
#galleryModal[hidden] {
  display: none;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal, 9999);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.gallery-lightbox:not([hidden]) {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
}

/* Container principal lightbox */
.lightbox-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

/* Lightbox Toolbar - top bar with controls */
.lightbox-toolbar {
  position: absolute;
  top: calc(var(--space-4) + 40px);
  left: var(--space-4);
  right: var(--space-4);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.lightbox-toolbar > * {
  pointer-events: auto;
}

/* Tool buttons (rotate, etc) */
.lightbox-tool-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  color: white;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-tool-btn:hover {
  background: rgba(99, 102, 241, 0.8);
  border-color: rgba(99, 102, 241, 0.5);
  transform: scale(1.05);
}

.lightbox-tool-btn:active {
  transform: scale(0.95) rotate(90deg);
}

.lightbox-tool-btn svg {
  width: 22px;
  height: 22px;
}

/* Modern close button */
.lightbox-close-modern {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-close-modern:hover {
  background: rgba(239, 68, 68, 0.8);
  border-color: rgba(239, 68, 68, 0.5);
  transform: scale(1.05);
}

.lightbox-close-modern .close-text {
  opacity: 0.9;
}

.lightbox-close-modern .close-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close-modern .close-icon svg {
  width: 16px;
  height: 16px;
}

/* Old close button - hide */
.lightbox-close {
  display: none;
}

/* Mobile close button - hidden on desktop */
.lightbox-close-mobile {
  display: none;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.lightbox-close svg {
  width: 24px;
  height: 24px;
}

/* Navigation arrows */
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: var(--radius-full);
  color: white;
  cursor: pointer;
  transition: all var(--transition-base);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-nav svg {
  width: 28px;
  height: 28px;
}

/* Mobile nav row - hidden on desktop */
.lightbox-nav-row {
  display: none;
}

/* Mobile nav buttons - visible only on mobile */
.lightbox-prev-mobile,
.lightbox-next-mobile {
  display: none;
}

.lightbox-prev {
  left: var(--space-4);
}

.lightbox-next {
  right: var(--space-4);
}

/* Main image - fullscreen */
.lightbox-image {
  max-width: 98vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-xl);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: lightboxFadeIn 0.3s ease-out;
}

@keyframes lightboxFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Footer lightbox (contains counter and thumbs) */
.lightbox-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-4);
  pointer-events: none;
}

.lightbox-footer > * {
  pointer-events: auto;
}

/* Counter */
.lightbox-counter {
  padding: var(--space-2) var(--space-4);
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  color: white;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-2);
}

/* Thumbnails */
.lightbox-thumbs {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-2);
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-lg);
  max-width: 90%;
  overflow-x: auto;
}

.lightbox-thumb {
  width: 64px;
  height: 48px;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.lightbox-thumb:hover,
.lightbox-thumb.active {
  opacity: 1;
}

.lightbox-thumb.active {
  box-shadow: 0 0 0 2px var(--color-primary);
}

.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .gallery-grid-wow {
    height: 400px;
  }
}

@media (max-width: 768px) {
  /* Gallery container - full width */
  .property-gallery-wow,
  .gallery-container {
    max-width: 100%;
    overflow-x: hidden;
    padding: var(--space-3);
  }
  
  .gallery-grid-wow {
    grid-template-columns: 1fr;
    height: auto;
    padding: 0;
  }
  
  .gallery-main-large {
    height: 280px;
    border-radius: var(--radius-lg);
  }
  
  .gallery-side-grid {
    display: none; /* Show only main on mobile, use button for all */
  }
  
  .gallery-all-btn {
    bottom: var(--space-3);
    right: var(--space-3);
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
  }
  
  /* Gallery actions - full width on mobile */
  .gallery-actions-below {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    margin-top: var(--space-3);
    gap: var(--space-3);
  }
  
  .gallery-action-btn-modern {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
  }
  
  /* Lightbox truly fullscreen on mobile */
  .gallery-lightbox,
  #galleryModal {
    z-index: 9999999 !important;
  }
  
  .lightbox-backdrop,
  .modal-backdrop {
    background: #000 !important;
  }
  
  .lightbox-content,
  .lightbox-container {
    padding: 0;
    background: #000;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  
  .lightbox-image-container {
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    position: relative;
  }
  
  /* Hide visually-hidden title that might show */
  .lightbox-image-container .visually-hidden,
  #galleryModalTitle {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }
  
  .lightbox-image {
    max-width: 100vw;
    max-height: 70vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #000;
    border-radius: 0;
    box-shadow: none;
  }
  
  .lightbox-close {
    position: fixed;
    top: env(safe-area-inset-top, 16px);
    right: 16px;
    width: 48px;
    height: 48px;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.3);
    z-index: 99999999;
    display: none;
  }
  
  /* Hide desktop toolbar on mobile */
  .lightbox-toolbar {
    display: none;
  }
  
  /* Mobile close button - positioned lower for easier reach */
  .lightbox-close-mobile {
    display: flex;
    position: fixed;
    top: calc(env(safe-area-inset-top, 16px) + 40px);
    right: 16px;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    z-index: 99999999;
    cursor: pointer;
  }
  
  .lightbox-close-mobile svg {
    width: 24px;
    height: 24px;
  }
  
  /* Hide desktop navigation arrows on mobile */
  .lightbox-nav-desktop,
  .lightbox-prev#lightboxPrev,
  .lightbox-next#lightboxNext {
    display: none !important;
  }
  
  /* Show mobile navigation row */
  .lightbox-nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
  }
  
  /* Mobile rotate button styling */
  .lightbox-rotate-mobile {
    display: flex;
    width: 56px;
    height: 56px;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.3);
    border: 2px solid rgba(99, 102, 241, 0.5);
    border-radius: 50%;
    color: white;
    z-index: 99999999;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .lightbox-rotate-mobile:active {
    background: rgba(99, 102, 241, 0.5);
    transform: rotate(90deg);
  }
  
  .lightbox-rotate-mobile svg {
    width: 24px;
    height: 24px;
  }
  
  /* Mobile nav buttons styling */
  .lightbox-prev-mobile,
  .lightbox-next-mobile {
    display: flex;
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    transform: none;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    z-index: 99999999;
    align-items: center;
    justify-content: center;
  }
  
  .lightbox-prev-mobile:active,
  .lightbox-next-mobile:active {
    background: rgba(255, 255, 255, 0.2);
  }
  
  .lightbox-prev-mobile svg,
  .lightbox-next-mobile svg {
    width: 28px;
    height: 28px;
  }
  
  /* Remove old nav styles */
  .lightbox-nav {
    display: none;
  }
  
  .lightbox-prev,
  .lightbox-next {
    display: none;
  }
  
  /* Bottom controls container */
  .lightbox-footer {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    width: 100%;
    padding: 24px 16px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
    z-index: 99999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }
  
  /* Swipe indicator and counter */
  .lightbox-counter {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  /* Swipe icon animation */
  .lightbox-counter .swipe-icon {
    animation: swipeHint 2s ease-in-out infinite;
  }
  
  @keyframes swipeHint {
    0%, 100% { transform: translateX(-4px); opacity: 0.5; }
    50% { transform: translateX(4px); opacity: 1; }
  }
  
  /* Remove pseudo-element swipe hint since we have icon now */
  .lightbox-counter::before {
    display: none;
  }
  
  .lightbox-thumbs {
    display: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   COVER SLIDESHOW COMPONENT
   Auto-sliding gallery for main cover image
   ═══════════════════════════════════════════════════════════════════════════════ */

.gallery-slideshow {
  position: relative;
  overflow: hidden;
  cursor: default;
}

.slideshow-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.slideshow-track .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
              visibility 0.8s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.05);
}

.slideshow-track .slide.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 2;
}

.slideshow-track .slide.prev {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  z-index: 1;
}

.slideshow-track .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
}

/* Slideshow Navigation Arrows */
.slideshow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
              0 2px 8px rgba(0, 0, 0, 0.1);
  opacity: 0;
  pointer-events: none;
}

.gallery-slideshow:hover .slideshow-nav {
  opacity: 1;
  pointer-events: auto;
}

.slideshow-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.2),
              0 4px 12px rgba(0, 0, 0, 0.15);
}

.slideshow-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.slideshow-nav svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-primary);
}

.slideshow-prev {
  left: 16px;
}

.slideshow-next {
  right: 16px;
}

/* Slideshow Dots */
.slideshow-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
  padding: 10px 16px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 30px;
}

.slideshow-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s ease;
}

.slideshow-dots .dot:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: scale(1.2);
}

.slideshow-dots .dot.active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}

/* Slideshow Counter */
.slideshow-counter {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.5px;
}

/* Fullscreen Button */
.slideshow-fullscreen-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.slideshow-fullscreen-btn:hover {
  background: #fff;
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.slideshow-fullscreen-btn svg {
  width: 20px;
  height: 20px;
  color: var(--color-text-primary);
}

/* Progress Bar Animation */
.gallery-slideshow::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, 
    var(--color-primary), 
    var(--color-accent));
  z-index: 15;
  animation: slideshowProgress 5s linear infinite;
}

.gallery-slideshow.paused::after {
  animation-play-state: paused;
}

@keyframes slideshowProgress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* Ken Burns Effect on Active Slide */
.slideshow-track .slide.active img {
  animation: kenBurns 10s ease-in-out infinite alternate;
}

@keyframes kenBurns {
  0% {
    transform: scale(1);
  }
  100% {
    transform: scale(1.08);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .slideshow-nav {
    width: 40px;
    height: 40px;
    opacity: 1;
    pointer-events: auto;
  }
  
  .slideshow-prev {
    left: 8px;
  }
  
  .slideshow-next {
    right: 8px;
  }
  
  .slideshow-nav svg {
    width: 18px;
    height: 18px;
  }
  
  .slideshow-dots {
    bottom: 12px;
    padding: 8px 12px;
    gap: 6px;
  }
  
  .slideshow-dots .dot {
    width: 6px;
    height: 6px;
  }
  
  .slideshow-dots .dot.active {
    width: 18px;
  }
  
  .slideshow-counter {
    top: 12px;
    left: 12px;
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .slideshow-fullscreen-btn {
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
  }
  
  .slideshow-fullscreen-btn svg {
    width: 18px;
    height: 18px;
  }
  
  /* Disable Ken Burns on mobile for performance */
  .slideshow-track .slide.active img {
    animation: none;
  }
}

/* Touch/Swipe visual feedback */
.gallery-slideshow.swiping .slideshow-track .slide {
  transition: none;
}

/* Paused state (on hover) */
.gallery-slideshow:hover::after {
  animation-play-state: paused;
}

/* Preload next slide hint */
.slideshow-track .slide.next {
  opacity: 0;
  transform: translateX(30px) scale(0.98);
}

