@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;700&family=Open+Sans:wght@400;600&display=swap');

:root {
  --accent: #20304c;
  --bg: #f7f7f5;
  --text: #333;
  --purple: #83343C;
  --bg-dark: #1a1a1a;
  --text-dark: #eee;
  --accent-dark: #c9d1d9;
}

/* === SECTION STYLES === */
.image-gallery {
  padding: 4rem 2rem;
  background: var(--bg);
}

.image-gallery h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: var(--accent);
  font-family: 'Playfair Display', serif;
}

body.dark .image-gallery {
  background: var(--bg-dark);
}

body.dark .image-gallery h2 {
  color: var(--accent-dark);
}

/* === Gallery Filter Buttons === */
.filter-buttons {
  text-align: center;
  margin-bottom: 2rem;
}

.filter-buttons button {
  background: var(--purple);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  margin: 0 0.3rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease, transform 0.2s ease;
}

.filter-buttons button:hover,
.filter-buttons button.active {
  background: #b33f4f;
  transform: scale(1.05);
}

body.dark .filter-buttons button {
  background: #a22c3c;
  color: var(--text-dark);
}

body.dark .filter-buttons button:hover,
body.dark .filter-buttons button.active {
  background: #b33f4f;
}

/* === Gallery Grid === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  overflow: hidden;
  border-radius: 8px;
  position: relative;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.gallery-grid img:hover,
.gallery-grid img:focus {
  transform: scale(1.03);
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

/* === Lightbox Styles === */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 1rem;
  animation: fadeIn 0.3s ease-in-out;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.7);
}

/* Close button for lightbox (optional) */
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  border: none;
  cursor: pointer;
}

body.dark .lightbox-close {
  color: var(--text-dark);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.97);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* === Responsive Fixes === */
@media (max-width: 600px) {
  .filter-buttons button {
    display: block;
    margin: 0.5rem auto;
    width: 80%;
  }
}
