/* ================= ROOT COLORS ================= */
:root {
  --primary: #5e9800;
  --bg-dark: #5f8620;
  --light-green: #f4faf2;
  --soft-green: #e8f5e9;
  --white: #ffffff;
  --text: #2f3e2f;
}

/* ================= RESET ================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #f9fbf9;
  overflow-x: hidden;
}

/* ================= HERO ================= */
.gallery-hero {
  width: 100%;
  height: 500px;
  /* min-height: 280px; */

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  position: relative;
  overflow: hidden;
  /* padding-top: 50px; */
}

.gallery-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/clinic.webp") center/cover no-repeat;
  background-color: rgba(0,0,0,0.5);
  background-blend-mode: overlay;
}

/* CONTENT */
.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  padding: 0 20px;
  max-width: 800px;
}

.hero-content h1 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 10px;

}

.hero-content p {
  font-size: 17px;
  /* opacity: 0.9; */
}

/* ================= FILTER BUTTONS ================= */
.filter-buttons {
  text-align: center;
  margin: 1rem 0;
}

.filter-buttons button {
  padding: 10px 20px;
  margin: 6px;
  border-radius: 30px;
  border: none;
  background: var(--soft-green);
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  transition: 0.3s ease;
}

.filter-buttons button:hover {
  background: var(--primary);
  color: #fff;
}

.filter-buttons button.active {
  background: var(--bg-dark);
  color: #fff;
}

/* ================= GALLERY ================= */
.gallery-container {
  padding: 2rem 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

/* CARD */
.gallery-item {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--soft-green);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
  border-color: var(--primary);
}

/* IMAGE FIX */
.gallery-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* TEXT */
.gallery-item p {
  padding: 12px;
  text-align: center;
  font-weight: 500;
  color: var(--primary);
}

/* ================= SECTION TITLE ================= */
.section-title {
  text-align: center;
  margin-top: 4rem;
  font-size: 32px;
  font-family: 'Sora', sans-serif;
  color: var(--primary);
}

.section-title::after {
  content: "";
  width: 60px;
  height: 3px;
  background: var(--primary);
  display: block;
  margin: 10px auto 0;
}

/* ================= BEFORE AFTER ================= */
.before-after {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 25px;
  margin-top: 2.5rem;
}

/* SLIDER */
.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--soft-green);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.ba-slider:hover {
  border-color: var(--primary);
}

/* IMAGES */
.ba-slider img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.ba-slider .before {
  z-index: 1;
}

.ba-slider .after {
  z-index: 2;
  transform: translateX(100%);
}

/* ACTIVE ANIMATION */
.ba-slider.active .before {
  transform: translateX(-100%);
}

.ba-slider.active .after {
  transform: translateX(0);
}

/* LABELS */
.ba-slider::before {
  content: "Before";
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  z-index: 3;
}

.ba-slider::after {
  content: "After";
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  z-index: 3;
}

/* ================= TABLET ================= */
@media (max-width: 768px) {

  .gallery-container {
    padding: 1rem 1rem;
  }

  /* .gallery-hero {
    height: 35vh;
    min-height: 220px;
  } */

  .section-title {
    font-size: 26px;
  }

  .before-after {
    grid-template-columns: 1fr;
  }

  .filter-buttons button {
    padding: 8px 14px;
    font-size: 14px;
  }
}

/* ================= MOBILE ================= */
@media (max-width: 480px) {

  /* .hero-content h1 {
    font-size: 22px;
  } */

  /* .hero-content p {
    font-size: 13px;
  } */

  .filter-buttons {
    margin: 1.5rem 0;
  }

  .filter-buttons button {
    margin: 4px;
    font-size: 13px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 22px;
  }
}