@import "../../styles/variables.css";

.gallery {
  font-family: 'Quicksand', sans-serif;
}

.gallery, .gallery__title {
  font-weight: var(--font-weight-semibold);
  color: #000000; !important;
  font-size: var(--font-size-h4) !important;
}

.gallery__title {
  font-family: 'Quicksand', sans-serif;
  margin-bottom: var(--spacing-5xl);
}

.gallery__grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--spacing-3xl);
  max-width: 1200px;
}

.gallery__item {
  cursor: pointer;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery__item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(12, 69, 84, 0.15);
}

.gallery__image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Quicksand', sans-serif;
}

.gallery-modal--active {
  display: flex;
}

.gallery-modal__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

body.modal-open {
  overflow: hidden;
  height: 100%;
}

.gallery-modal__content {
  position: relative;
  z-index: 1001;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-lg);
}

.gallery-modal__close {
  position: absolute;
  top: -50px;
  right: -50px;
  background: none;
  border: none;
  color: var(--color-light);
  font-size: 32px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.gallery-modal__close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.gallery-modal__image-container {
  max-width: 100%;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.gallery-modal__image {
  width: 1221px;
  height: 623px;
  object-fit: contain;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  transform: translateX(0);
  opacity: 1;
}

.gallery-modal__image.slide-left {
  transform: translateX(-150%);
  opacity: 0;
}

.gallery-modal__image.slide-right {
  transform: translateX(150%);
  opacity: 0;
}

.gallery-modal__image.slide-in {
  transform: translateX(0);
  opacity: 1;
}

.gallery-modal__navigation {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
  margin-top: var(--spacing-lg);
}

.gallery-modal__nav {
  background: none;
  border: none;
  color: var(--color-light);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.gallery-modal__nav:hover {
  transform: scale(1.05);
}

.gallery-modal__nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  color: var(--color-light-gray);
}

.gallery-modal__nav:disabled:hover {
  transform: none;
}

.gallery-modal__nav img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.gallery-modal__nav:disabled img {
  filter: brightness(0) invert(0.6);
}

.gallery-modal__counter {
  color: var(--color-light);
  font-size: 20px;
  font-weight: var(--font-weight-medium);
  min-width: 60px;
  text-align: center;
}

@media (max-width: 768px) {
  .gallery__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .gallery__title {
    font-size: var(--font-size-h4) !important;
    margin-bottom: var(--spacing-2xl);
    color: #000000 !important;
  }
  
  .gallery__image {
    height: 200px;
  }
  
  .gallery-modal {
    align-items: stretch;
    justify-content: stretch;
  }
  
  .gallery-modal__content {
    max-width: 100vw;
    max-height: 100vh;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0;
  }
  
  .gallery-modal__close {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    top: 20px;
    right: 20px;
    z-index: 1002;
  }
  
  .gallery-modal__image-container {
    flex: 1;
    max-height: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
  }
  
  .gallery-modal__image {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    object-fit: contain;
    border-radius: 0;
    box-shadow: none;
  }
  
  .gallery-modal__navigation {
    position: fixed;
    bottom: var(--spacing-lg);
    left: 50%;
    transform: translateX(-50%);
    gap: var(--spacing-lg);
    margin-top: 0;
    z-index: 1002;
  }
  
  .gallery-modal__nav {
    width: 40px;
    height: 40px;
  }
  
  .gallery-modal__nav img {
    width: 20px;
    height: 20px;
  }
}

.button:disabled, button.hs-download__button:disabled, button.payment__button--checkout:disabled, button:disabled {
  background-color: transparent;
}

.gallery--close {
  filter: brightness(0) saturate(100%) invert(100%) sepia(1%) saturate(7471%) hue-rotate(284deg) brightness(126%) contrast(99%);
}
