/*==================================================
    PROARQ Modern Gallery Styles
    Brand Colors: #FCB402 (Gold), #343047 (Dark)
==================================================*/

:root {
  --gallery-brand-gold: #fcb402;
  --gallery-brand-dark: #343047;
  --gallery-brand-gray: #9a99a6;
  --gallery-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gallery Container */
.proarq-gallery-container {
  position: relative;
  margin-bottom: 50px;
}

/* Main Gallery Swiper */
.gallery-main {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  background: #f8f9fa;
  margin-bottom: 20px;
}

.gallery-main .swiper-slide {
  position: relative;
  cursor: zoom-in;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--gallery-transition);
}

.gallery-main .swiper-slide:hover img {
  transform: scale(1.02);
}

/* Gallery Counter */
.gallery-counter {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.gallery-counter i {
  color: var(--gallery-brand-gold);
  font-size: 1.1rem;
}

/* Expand Button Overlay */
.gallery-expand-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
  padding: 30px 20px 20px;
  opacity: 0;
  transition: var(--gallery-transition);
  pointer-events: none;
}

.gallery-main .swiper-slide:hover .gallery-expand-overlay {
  opacity: 1;
  pointer-events: all;
}

.gallery-expand-btn {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  padding: 12px 28px;
  border-radius: 30px;
  color: var(--gallery-brand-dark);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: var(--gallery-transition);
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.gallery-expand-btn:hover {
  background: var(--gallery-brand-gold);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(252, 180, 2, 0.4);
  border-color: var(--gallery-brand-gold);
}

.gallery-expand-btn i {
  font-size: 1.2rem;
}

/* Navigation Buttons */
.gallery-main .swiper-button-next,
.gallery-main .swiper-button-prev {
  background: rgba(255, 255, 255, 0.9);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: var(--gallery-transition);
}

.gallery-main .swiper-button-next:after,
.gallery-main .swiper-button-prev:after {
  font-size: 20px;
  color: var(--gallery-brand-dark);
  font-weight: bold;
}

.gallery-main .swiper-button-next:hover,
.gallery-main .swiper-button-prev:hover {
  background: var(--gallery-brand-gold);
  transform: scale(1.1);
}

.gallery-main .swiper-button-next:hover:after,
.gallery-main .swiper-button-prev:hover:after {
  color: white;
}

/* Thumbnails Gallery */
.gallery-thumbs {
  padding: 0 40px;
}

.gallery-thumbs .swiper-slide {
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  border: 3px solid transparent;
  transition: var(--gallery-transition);
  opacity: 0.6;
  height: 100px;
}

.gallery-thumbs .swiper-slide-thumb-active {
  opacity: 1;
  border-color: var(--gallery-brand-gold);
  box-shadow: 0 5px 15px rgba(252, 180, 2, 0.3);
}

.gallery-thumbs .swiper-slide:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--gallery-transition);
}

.gallery-thumbs .swiper-slide:hover img {
  transform: scale(1.05);
}

/* Thumbnail Number Badge */
.thumb-number {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 28px;
  height: 28px;
  background: var(--gallery-brand-gold);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(252, 180, 2, 0.5);
  z-index: 2;
  transition: var(--gallery-transition);
}

.gallery-thumbs .swiper-slide:hover .thumb-number {
  transform: scale(1.1);
}

/* Lightbox Styles */
.proarq-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.proarq-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-container {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: scale(0.9);
  transition: all 0.3s ease;
}

.proarq-lightbox.active .lightbox-image {
  opacity: 1;
  transform: scale(1);
}

/* Lightbox Controls */
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  font-size: 30px;
  cursor: pointer;
  transition: var(--gallery-transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100001;
}

.lightbox-close:hover {
  background: var(--gallery-brand-gold);
  border-color: var(--gallery-brand-gold);
  transform: rotate(90deg) scale(1.1);
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  color: var(--gallery-brand-dark);
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--gallery-transition);
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--gallery-brand-gold);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  color: white;
  padding: 10px 25px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  z-index: 100001;
}

.lightbox-counter .current {
  color: var(--gallery-brand-gold);
  font-size: 16px;
}

/* Loading State */
.gallery-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 30;
}

.gallery-loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(252, 180, 2, 0.2);
  border-top-color: var(--gallery-brand-gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
  .gallery-main .swiper-slide {
    height: 350px;
  }

  .gallery-thumbs {
    padding: 0 20px;
  }

  .gallery-thumbs .swiper-slide {
    height: 70px;
  }

  .thumb-number {
    width: 24px;
    height: 24px;
    font-size: 11px;
  }

  .gallery-counter {
    top: 10px;
    right: 10px;
    padding: 8px 15px;
    font-size: 0.85rem;
  }

  .gallery-expand-btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .gallery-main .swiper-button-next,
  .gallery-main .swiper-button-prev {
    width: 40px;
    height: 40px;
  }

  .gallery-main .swiper-button-next:after,
  .gallery-main .swiper-button-prev:after {
    font-size: 16px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .gallery-main .swiper-slide {
    height: 250px;
  }

  .gallery-thumbs .swiper-slide {
    height: 60px;
  }

  .gallery-expand-overlay {
    padding: 20px 15px 15px;
  }

  .gallery-expand-btn span {
    display: none;
  }

  .gallery-expand-btn {
    padding: 10px 15px;
  }
}

/* Dark Mode Support */
html.dark .gallery-main {
  background: #1a1a1a;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

html.dark .gallery-main .swiper-button-next,
html.dark .gallery-main .swiper-button-prev {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

html.dark .gallery-main .swiper-button-next:after,
html.dark .gallery-main .swiper-button-prev:after {
  color: white;
}

html.dark .gallery-thumbs .swiper-slide {
  border-color: rgba(255, 255, 255, 0.1);
}

html.dark .gallery-expand-btn {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border-color: rgba(255, 255, 255, 0.2);
}

html.dark .gallery-expand-btn:hover {
  background: var(--gallery-brand-gold);
  color: var(--gallery-brand-dark);
}