/* CSS Reset and Variables Setup */
:root {
  --primary: #78350f;
  --secondary: #fef3c7;
  --accent: #0d9488;
  --text: #292524;
  --bg: #fdf8f0;
}

/* Global Typography & Font override for Bold-Editorial Style */
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: #ffffff;
  color: #000000;
}

h1, h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

section {
  padding: 48px 16px;
}

@media (min-width: 768px) {
  section {
    padding: 64px 24px;
  }
}

/* Bold-Editorial Elements */
.card {
  border-left: 4px solid #000000;
  padding-left: 20px;
  border-radius: 0;
}

.btn {
  border-radius: 0;
  border: 2px solid #000000;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 0.2s ease-in-out;
}

/* Screen reader class overrides (must be structured exactly as requested) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Gallery CSS Rules */
.gallery-main {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* Height equals width */
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.3s ease-in-out;
}

/* Active slide rules based on checked radio button */
#img-1:checked ~ .gallery-main .slide-1 {
  opacity: 1;
  z-index: 10;
}

#img-2:checked ~ .gallery-main .slide-2 {
  opacity: 1;
  z-index: 10;
}

#img-3:checked ~ .gallery-main .slide-3 {
  opacity: 1;
  z-index: 10;
}

#img-4:checked ~ .gallery-main .slide-4 {
  opacity: 1;
  z-index: 10;
}

/* Thumbnails positioning and styling */
.thumbnails {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: space-between;
}

.thumbnails label {
  flex: 1;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  border: 2px solid transparent;
  overflow: hidden;
  transition: border-color 0.2s ease-in-out;
}

.thumbnails label img {
  width: 100%;
  height: 100%;
  object-cover: cover;
}

/* Active thumbnail styling */
#img-1:checked ~ .thumbnails label[for="img-1"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px #000;
}

#img-2:checked ~ .thumbnails label[for="img-2"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px #000;
}

#img-3:checked ~ .thumbnails label[for="img-3"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px #000;
}

#img-4:checked ~ .thumbnails label[for="img-4"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px #000;
}