:root {
  --gallery-bg: #fff1f9;
  --gallery-border: rgba(255, 255, 255, 0.6);
  --gallery-shadow: 0 30px 120px rgba(255, 38, 126, 0.35);
  --gallery-text: #2c103e;
  --gallery-muted: rgba(44, 16, 62, 0.65);
  --gallery-accent: #ff1493;
  --gallery-accent-soft: #ff8ed1;
  --gallery-card-bg: rgba(255, 255, 255, 0.9);
}

.methany-gallery {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 1.5rem;
}

.gallery-section {
  background: var(--gallery-card-bg);
  border-radius: 32px;
  border: 2px solid var(--gallery-border);
  box-shadow: var(--gallery-shadow);
  padding: 2.5rem clamp(1.5rem, 5vw, 3rem);
  position: relative;
  overflow: hidden;
}

.gallery-section::after,
.gallery-section::before {
  content: "";
  position: absolute;
  inset: 1.5rem;
  border-radius: 28px;
  border: 1px dashed rgba(255, 20, 147, 0.2);
  pointer-events: none;
}

.gallery-section::after {
  inset: 1rem;
  border-color: rgba(255, 142, 209, 0.25);
  filter: blur(0.5px);
}

.gallery-headline {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
  position: relative;
  align-items: center;
  text-align: center;
}

.gallery-eyebrow {
  font-family: "Fredoka", "Nunito", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-size: 0.9rem;
  color: var(--gallery-accent);
}

.gallery-title {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: var(--gallery-text);
  text-shadow: 0 10px 30px rgba(255, 20, 147, 0.2);
}

.gallery-description {
  font-family: "Nunito", sans-serif;
  font-size: clamp(1rem, 3vw, 1.2rem);
  color: var(--gallery-muted);
  max-width: 680px;
}

.gallery-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.gallery-card {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 20, 147, 0.15), rgba(255, 142, 209, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.gallery-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 25px 60px rgba(255, 20, 147, 0.25);
}

.gallery-card-frame {
  position: relative;
  width: 100%;
}

.gallery-card--portrait .gallery-card-frame {
  padding-bottom: 125%;
}

.gallery-card--square .gallery-card-frame {
  padding-bottom: 100%;
}

.gallery-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
}

.gallery-card-meta {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gallery-text);
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.05) 80%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-card-meta {
  opacity: 1;
}

.gallery-card-meta span {
  background: rgba(255, 255, 255, 0.9);
  color: var(--gallery-accent);
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: inset 0 0 0 1px rgba(255, 20, 147, 0.5);
}

.gallery-card-meta svg {
  width: 1.15rem;
  height: 1.15rem;
}

.gallery-footer {
  margin-top: 2rem;
  font-family: "Nunito", sans-serif;
  font-size: 0.95rem;
  color: var(--gallery-muted);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.gallery-footer svg {
  width: 1.1rem;
  height: 1.1rem;
  color: var(--gallery-accent);
  flex-shrink: 0;
}

.gallery-loading,
.gallery-error {
  text-align: center;
  font-family: "Nunito", sans-serif;
  color: var(--gallery-muted);
  padding: 4rem 0;
}

.gallery-error {
  color: #c20a74;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.gallery-lightbox.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(255, 20, 147, 0.35), rgba(12, 0, 16, 0.95));
  backdrop-filter: blur(6px);
}

.gallery-lightbox__panel {
  position: relative;
  width: min(90vw, 640px);
  max-height: 90vh;
  border-radius: 32px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 30px 120px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  background: rgba(6, 0, 12, 0.85);
}

.gallery-lightbox__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #0a0010;
}

.gallery-lightbox__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, background 0.2s ease;
}

.gallery-lightbox__close:hover {
  transform: scale(1.05);
  background: rgba(255, 20, 147, 0.8);
}

@media (max-width: 640px) {
  .methany-gallery {
    gap: 2rem;
  }
  .gallery-section {
    padding: 2rem 1.5rem;
  }

  .gallery-section::before,
  .gallery-section::after {
    inset: 0.5rem;
  }

  .gallery-lightbox__panel {
    width: 92vw;
    border-radius: 24px;
  }

  .gallery-lightbox__close {
    width: 2.5rem;
    height: 2.5rem;
  }
}
