/* Gallery Layouts */
:root {
  --gallery-gap: 1.5rem;
  --gallery-thumb-aspect: 3/2;
}

/* Teaser Grid */
.gallery-teaser-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gallery-gap);
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .gallery-teaser-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.gallery-teaser-item {
  position: relative;
  aspect-ratio: var(--gallery-thumb-aspect);
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.gallery-teaser-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.gallery-teaser-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  padding: 1rem;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

/* Event List */
.gallery-event-list {
  display: grid;
  gap: 2rem;
}

.event-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.event-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (min-width: 640px) {
  .event-card {
    flex-direction: row;
    height: 200px;
  }

  .event-card-image {
    width: 300px;
    flex-shrink: 0;
  }
}

.event-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.event-card-date {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.event-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.event-card-desc {
  color: #374151;
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Event Gallery View */
.event-gallery-header {
  margin-bottom: 2rem;
}

.event-gallery-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: var(--gallery-gap);
}

@media (min-width: 640px) {
  .event-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .event-gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.photo-item {
  aspect-ratio: var(--gallery-thumb-aspect);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background-color: #f3f4f6;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-item img.loaded {
  opacity: 1;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-caption {
  color: #fff;
  text-align: center;
  margin-top: 1rem;
  font-size: 1.1rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.5rem;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  padding: 1rem;
  cursor: pointer;
  font-size: 1.5rem;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

/* Utilities */
.hidden {
  display: none !important;
}

.btn-primary {
  display: inline-block;
  background-color: #000;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
  border: none;
}

.btn-outline {
  display: inline-block;
  background-color: transparent;
  color: #000;
  border: 1px solid #000;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  cursor: pointer;
}

.text-center {
  text-align: center;
}

.mt-8 {
  margin-top: 2rem;
}

.mb-8 {
  margin-bottom: 2rem;
}
