/* Custom CSS Variables & Base Setup */
:root {
  --primary: #a21caf;
  --secondary: #fdf4ff;
  --accent: #0284c7;
  --text: #4a044e;
  --bg: #fdf2f8;
}

/* Base Styles with GLASS-FROST design system */
body {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  font-size: clamp(14px, 4vw, 16px);
  margin: 0;
  padding: 0;
}

h1 {
  font-size: clamp(22px, 5vw, 36px);
}

section {
  padding: 32px 16px;
}

@media (min-width: 768px) {
  section {
    padding: 64px 16px;
  }
}

/* Glassmorphism Card Style */
.card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
}

/* Glass Button Style */
.btn {
  border-radius: 12px;
  background: #fff;
  color: #764ba2;
  font-weight: 700;
  transition: all 0.3s ease;
}

/* Screen Reader Only Utility */
.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;
}

/* Pure CSS Gallery System */
.gallery-main {
  position: relative;
  width: 100%;
  padding-bottom: 100%; /* Explicit height based on container width */
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  z-index: 1;
  transition: opacity 0.4s ease-in-out;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Thumbnails Grid */
.thumbnails {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  justify-content: flex-start;
  overflow-x: auto;
}

.thumbnails label {
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  overflow: hidden;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.thumbnails label img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnails label:hover {
  border-color: rgba(255, 255, 255, 0.6);
}

/* Gallery Selector States */
#img-1:checked ~ .gallery-main .slide-1,
#img-2:checked ~ .gallery-main .slide-2,
#img-3:checked ~ .gallery-main .slide-3,
#img-4:checked ~ .gallery-main .slide-4 {
  opacity: 1;
  z-index: 10;
}

#img-1:checked ~ .thumbnails label[for="img-1"],
#img-2:checked ~ .thumbnails label[for="img-2"],
#img-3:checked ~ .thumbnails label[for="img-3"],
#img-4:checked ~ .thumbnails label[for="img-4"] {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(2, 132, 199, 0.5);
}