/* Reusable Home Gallery Styles for Suvira Hospital */
.gallery {
  background: linear-gradient(180deg, var(--cream-50) 0%, #fdf9ef 100%);
  position: relative;
  overflow: hidden;
  padding: 80px 0;
}

.gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(38, 166, 154, 0.12), transparent 40%),
    radial-gradient(circle at 10% 90%, rgba(11, 26, 66, 0.08), transparent 40%);
  pointer-events: none;
}

.gallery>.container {
  position: relative;
  z-index: 1;
}

/* Tabs */
.gtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 36px;
  padding: 6px;
  background: var(--white);
  border-radius: var(--r-pill);
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-sm);
}

.gtab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
  background: transparent;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
  white-space: nowrap;
  border: none;
}

.gtab i {
  font-size: 13px;
  color: var(--teal-600);
  transition: color var(--t-fast);
}

.gtab:hover {
  color: var(--navy-900);
  background: var(--cream-100);
}

.gtab.is-active {
  background: var(--navy-900);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(11, 26, 66, 0.25);
}

.gtab.is-active i {
  color: var(--teal-300);
}

/* Grid */
.ggrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.gitem {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4/3;
  display: block;
  transition: transform var(--t-med), box-shadow var(--t-med), opacity 0.3s ease, filter 0.3s ease;
}

.gitem.is-hidden {
  display: none !important;
}

.gitem:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.gitem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-med);
}

.gitem:hover img {
  transform: scale(1.06);
}

.gitem::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(11, 26, 66, 0.85) 100%);
  pointer-events: none;
  opacity: 0.7;
  transition: opacity var(--t-fast);
}

.gitem:hover::after {
  opacity: 0.95;
}

.gitem__cap {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  z-index: 2;
  color: var(--white);
  font-family: var(--f-display);
}

.gitem__cap strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 3px;
}

.gitem__cap span {
  display: block;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

.gallery__foot {
  text-align: center;
  margin-top: 36px;
}

.gallery__foot .fa-youtube {
  color: #ff0000;
  font-size: 16px;
}

/* Responsive (Tablet) */
@media (max-width: 1024px) {
  .ggrid {
    grid-template-columns: repeat(3, 1fr);
  }
  .gtabs {
    max-width: none;
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
  .gtabs::-webkit-scrollbar {
    display: none;
  }
}

/* Responsive (Mobile) */
@media (max-width: 768px) {
  .gtab {
    flex: 0 0 auto;
    padding: 8px 14px;
    font-size: 12.5px;
  }
  .ggrid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding: 0 18px 12px;
    margin: 0 -18px;
    grid-template-columns: none;
  }
  .ggrid::-webkit-scrollbar {
    display: none;
  }
  .gitem {
    flex: 0 0 80%;
    min-width: 260px;
    scroll-snap-align: start;
  }
}
