/* Gallery Page Specific Styling */

/* Body specific style for gallery page */
.gallery-page {
  background: linear-gradient(145deg, #0f0f0f 0%, #181818 50%, #0f0f0f 100%);
}

/* Active navigation state */
.nav-links a.active {
  color: var(--accent-light);
}

.nav-links a.active:before {
  width: 100%;
}

/* Wines Hero when used on Gallery Page */
.gallery-page .wines-hero {
  height: 50vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  position: relative;
  text-align: center;
  padding-top: 8rem;
}

.gallery-page .wines-hero:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(138, 15, 30, 0.3) 0%,
    rgba(15, 15, 15, 0.7) 100%
  );
  z-index: 1;
}

.gallery-page .wines-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.gallery-page .wines-hero-content h1 {
  font-size: 5rem;
  color: var(--off-white);
  margin-bottom: 2rem;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  position: relative;
  display: inline-block;
}

.gallery-page .wines-hero-content h1:after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.gallery-page .wines-hero-content p {
  font-size: 1.8rem;
  color: var(--text);
  max-width: 700px;
  margin: 2rem auto 0;
  line-height: 1.7;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Gallery Hero Section */
.gallery-hero {
  height: 50vh;
  min-height: 400px;
  display: flex;
  align-items: center;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
    url("/test_sites/2/2.jpg") center/cover no-repeat fixed;
  position: relative;
  text-align: center;
  padding-top: 8rem;
}

.gallery-hero:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(138, 15, 30, 0.3) 0%,
    rgba(15, 15, 15, 0.7) 100%
  );
  z-index: 1;
}

.gallery-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
}

.gallery-hero-content h1 {
  font-size: 5rem;
  color: var(--off-white);
  margin-bottom: 2rem;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
  position: relative;
  display: inline-block;
}

.gallery-hero-content h1:after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
}

.gallery-hero-content p {
  font-size: 1.8rem;
  color: var(--text);
  max-width: 700px;
  margin: 2rem auto 0;
  line-height: 1.7;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* Gallery Categories Section */
.gallery-categories {
  background: linear-gradient(
    to right,
    rgba(20, 20, 20, 0.9),
    rgba(25, 25, 25, 0.9),
    rgba(20, 20, 20, 0.9)
  );
  padding: 2rem 0;
  position: sticky;
  top: 80px;
  z-index: 900;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
}

.category-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.category-tab {
  padding: 1rem 2rem;
  background: transparent;
  border: 1px solid rgba(212, 161, 82, 0.3);
  color: var(--text);
  font-size: 1.5rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 50px;
  text-transform: uppercase;
}

.category-tab:hover {
  background: rgba(138, 15, 30, 0.2);
  border-color: rgba(212, 161, 82, 0.5);
  transform: translateY(-3px);
}

.category-tab.active {
  background: linear-gradient(
    135deg,
    rgba(138, 15, 30, 0.8) 0%,
    rgba(183, 42, 56, 0.8) 100%
  );
  color: var(--off-white);
  border-color: transparent;
  box-shadow: 0 5px 15px rgba(138, 15, 30, 0.3);
}

/* Gallery Grid */
.gallery-grid {
  padding: 5rem 0;
  position: relative;
}

.gallery-grid:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(138, 15, 30, 0.05) 0%,
    rgba(212, 161, 82, 0.05) 100%
  );
  z-index: 0;
}

.gallery-masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 3rem;
  position: relative;
  z-index: 1;
}

.gallery-item {
  transition: all 0.5s ease;
  transform-origin: center;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
  height: auto;
  opacity: 1;
  transform: scale(1);
}

.gallery-item.hidden {
  opacity: 0;
  transform: scale(0.8);
  height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.gallery-item-inner {
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 1/1;
  background: linear-gradient(145deg, #171717, #1a1a1a);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.8s ease;
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.9) 0%,
    rgba(0, 0, 0, 0.6) 40%,
    rgba(0, 0, 0, 0) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 2.5rem;
  opacity: 0;
  transition: all 0.4s ease;
}

.gallery-info {
  transform: translateY(30px);
  transition: all 0.5s ease;
}

.gallery-info h3 {
  color: var(--accent-light);
  font-size: 2rem;
  margin-bottom: 0.8rem;
  position: relative;
  padding-bottom: 1rem;
}

.gallery-info h3:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.gallery-info p {
  color: var(--text);
  font-size: 1.5rem;
  line-height: 1.6;
  max-width: 100%;
}

/* Hover effects */
.gallery-item:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  transform: translateY(-10px);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover .gallery-info {
  transform: translateY(0);
}

/* Full-screen gallery modal */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 1200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.95);
  opacity: 0;
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
}

.gallery-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.gallery-modal-content {
  width: 90%;
  max-width: 1200px;
  position: relative;
  text-align: center;
}

.gallery-modal-image {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: 5px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.gallery-modal-caption {
  color: var(--off-white);
  text-align: center;
  padding: 2rem 0;
  max-width: 800px;
  margin: 0 auto;
}

.gallery-modal-caption h3 {
  color: var(--accent-light);
  font-size: 2.4rem;
  margin-bottom: 1rem;
}

.gallery-modal-caption p {
  font-size: 1.7rem;
  line-height: 1.6;
}

.gallery-modal-close {
  position: absolute;
  top: -50px;
  right: 0;
  font-size: 4rem;
  color: var(--off-white);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1210;
}

.gallery-modal-close:hover {
  color: var(--accent-light);
  transform: rotate(90deg);
}

.gallery-modal-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.gallery-modal-prev,
.gallery-modal-next {
  font-size: 3.5rem;
  color: var(--off-white);
  background-color: rgba(0, 0, 0, 0.6);
  width: 6rem;
  height: 6rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 1.5rem;
}

.gallery-modal-prev:hover,
.gallery-modal-next:hover {
  background-color: rgba(138, 15, 30, 0.8);
  color: var(--off-white);
  transform: scale(1.1);
}

/* Call to Action Section */
.gallery-cta {
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
    url("/test_sites/2/3.jpg") center/cover no-repeat fixed;
  padding: 8rem 0;
  position: relative;
  text-align: center;
}

.gallery-cta:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(138, 15, 30, 0.4) 0%,
    rgba(15, 15, 15, 0.6) 100%
  );
  z-index: 1;
}

.cta-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
}

.cta-content h2 {
  font-size: 3.6rem;
  color: var(--off-white);
  margin-bottom: 2rem;
}

.cta-content p {
  font-size: 1.8rem;
  color: var(--text);
  margin-bottom: 3rem;
}

.cta-content .btn {
  font-size: 1.6rem;
  padding: 1.5rem 3.5rem;
  background: linear-gradient(
    135deg,
    rgba(138, 15, 30, 0.9) 0%,
    rgba(183, 42, 56, 0.9) 100%
  );
  border: none;
  box-shadow: 0 10px 25px rgba(138, 15, 30, 0.4);
}

.cta-content .btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(138, 15, 30, 0.5);
}

/* Responsive styles */
@media (max-width: 1024px) {
  .gallery-masonry {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
  }

  .gallery-hero-content h1 {
    font-size: 4rem;
  }

  .gallery-modal-image {
    max-height: 70vh;
  }
}

@media (max-width: 768px) {
  .gallery-hero {
    min-height: 350px;
  }

  .gallery-hero-content h1 {
    font-size: 3.2rem;
  }

  .gallery-hero-content p {
    font-size: 1.6rem;
  }

  .category-tabs {
    gap: 1rem;
  }

  .category-tab {
    padding: 0.8rem 1.5rem;
    font-size: 1.3rem;
  }

  .gallery-masonry {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }

  .gallery-info h3 {
    font-size: 1.8rem;
  }

  .gallery-info p {
    font-size: 1.4rem;
  }

  .gallery-modal-prev,
  .gallery-modal-next {
    width: 5rem;
    height: 5rem;
    font-size: 3rem;
  }

  .cta-content h2 {
    font-size: 3rem;
  }
}

@media (max-width: 576px) {
  .gallery-hero-content h1 {
    font-size: 2.8rem;
  }

  .gallery-hero-content p {
    font-size: 1.5rem;
  }

  .gallery-categories {
    top: 70px;
    padding: 1.5rem 0;
  }

  .category-tabs {
    overflow-x: auto;
    padding-bottom: 1rem;
    justify-content: flex-start;
    flex-wrap: nowrap;
  }

  .category-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .gallery-masonry {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .gallery-modal-nav {
    width: 90%;
    margin: 0 auto;
  }

  .gallery-modal-prev,
  .gallery-modal-next {
    width: 4rem;
    height: 4rem;
    font-size: 2.5rem;
    margin: 0;
  }
}
