/* Gallery Styles */

.gallery-date-section {
  margin: 40px 0;
}

.gallery-date-header {
  font-family: 'Playfair Display', serif;
  color: #4a2c1a;
  font-size: 1.8em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(212, 175, 55, 0.4);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.gallery-item {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  border-radius: 8px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  background: rgba(250, 245, 235, 0.9);
  aspect-ratio: 1;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4);
  border-color: rgba(212, 175, 55, 0.6);
}

.gallery-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

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

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 15px 10px 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.gallery-title {
  color: #fff8dc;
  font-size: 0.9em;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  display: block;
}

/* Lightbox Styles */
.gallery-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

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

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

.gallery-lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(212, 175, 55, 0.3);
  border: 3px solid rgba(212, 175, 55, 0.5);
}

.gallery-lightbox-caption {
  color: #fff8dc;
  font-family: 'Playfair Display', serif;
  font-size: 1.2em;
  margin-top: 20px;
  text-align: center;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  padding: 10px 20px;
  background: rgba(85, 120, 85, 0.3);
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.gallery-close,
.gallery-prev,
.gallery-next {
  position: absolute;
  color: #fff8dc;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  padding: 10px 15px;
  background: rgba(85, 120, 85, 0.3);
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

.gallery-close:hover,
.gallery-prev:hover,
.gallery-next:hover {
  color: #d4af37;
  background: rgba(85, 120, 85, 0.5);
  border-color: rgba(212, 175, 55, 0.6);
  transform: scale(1.1);
}

.gallery-close {
  top: 20px;
  right: 30px;
  font-size: 50px;
  line-height: 1;
}

.gallery-prev {
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
}

.gallery-next {
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
}

/* Gallery Pagination */
.gallery-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 40px 0;
  padding: 20px;
  font-family: 'Playfair Display', serif;
}

.gallery-pagination-link {
  color: #6b4423;
  text-decoration: none;
  padding: 10px 20px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 6px;
  background: rgba(250, 245, 235, 0.9);
  transition: all 0.3s ease;
}

.gallery-pagination-link:hover {
  color: #d4af37;
  border-color: rgba(212, 175, 55, 0.6);
  background: rgba(250, 245, 235, 1);
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.gallery-pagination-info {
  color: #4a2c1a;
  font-size: 1.1em;
  padding: 10px 20px;
}

.gallery-pagination .disabled {
  opacity: 0.4;
  pointer-events: none;
}

/* Month navigation */
.gallery-month-nav {
  margin: 30px 0;
  padding: 20px;
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: 8px;
  background: rgba(250, 245, 235, 0.9);
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  align-items: center;
  color: #2b1c10;
}

.gallery-month-nav strong {
  color: inherit;
  font-family: 'Playfair Display', serif;
}

.gallery-month-nav-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.gallery-month-nav-list a {
  text-decoration: none;
  color: #6b4423;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 4px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.8);
  transition: all 0.2s ease;
}

.gallery-month-nav-list a:hover,
.gallery-month-nav-list a:focus {
  color: #d4af37;
  border-color: rgba(212, 175, 55, 0.8);
  box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

@media (prefers-color-scheme: dark) {
  .gallery-month-nav {
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(20, 20, 20, 0.8);
    color: #f5f0e6;
  }

  .gallery-month-nav-list a {
    color: #f5f0e6;
    background: rgba(40, 40, 40, 0.9);
    border-color: rgba(212, 175, 55, 0.4);
  }

  .gallery-month-nav-list a:hover,
  .gallery-month-nav-list a:focus {
    color: #ffe7b3;
    border-color: rgba(212, 175, 55, 0.9);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.5);
  }
}

/* Responsive Gallery */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .gallery-month-nav {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .gallery-month-nav-list {
    width: 100%;
  }
  
  .gallery-lightbox-content {
    max-width: 95%;
  }
  
  .gallery-close {
    top: 10px;
    right: 15px;
    font-size: 35px;
  }
  
  .gallery-prev,
  .gallery-next {
    font-size: 30px;
    padding: 8px 12px;
  }
  
  .gallery-prev {
    left: 10px;
  }
  
  .gallery-next {
    right: 10px;
  }
  
  .gallery-pagination {
    flex-direction: column;
    gap: 10px;
  }
}

