/* ==========================================================================
   # HOSPITAL GALLERY PAGE STYLES (ITCSS - Pages Layer)
   ========================================================================== */

/* --- Gallery Hero Section --- */
.gallery-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 5rem 0;
  color: var(--color-bg-white);
  overflow: hidden;
}

.gallery-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg, 
    hsla(var(--color-primary-hue), var(--color-primary-saturation), 15%, 0.95) 0%, 
    hsla(var(--color-primary-hue), var(--color-primary-saturation), var(--color-primary-lightness), 0.85) 100%
  );
  z-index: 1;
}

.gallery-hero .container {
  position: relative;
  z-index: 2;
}

.gallery-hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
}

.gallery-breadcrumb {
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0.85;
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.gallery-breadcrumb span.active {
  color: var(--color-secondary);
  font-weight: 700;
}

.gallery-hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-sm);
}

.gallery-hero-content p {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  max-width: 700px;
  line-height: 1.6;
  opacity: 0.9;
}

/* --- Filter Pills Buttons --- */
.gallery-filter-btn {
  padding: 0.6rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  background: var(--color-bg-white);
  color: var(--color-text-dark);
  cursor: pointer;
  transition: all var(--transition-fast) ease-in-out;
}

.gallery-filter-btn.active {
  background: var(--color-primary);
  color: var(--color-bg-white);
  border-color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 95, 115, 0.2);
}

.gallery-filter-btn:hover:not(.active) {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* --- Gallery Grid Layout --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

/* --- Gallery Card Item --- */
.gallery-card-item {
  position: relative;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 280px;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.gallery-card-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 95, 115, 0.08);
  border-color: rgba(0, 95, 115, 0.15);
}

.gallery-card-media {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg-light);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform var(--transition-normal);
}

.gallery-card-item:hover .gallery-img {
  transform: scale(1.05);
}

/* --- Hover Zoom Overlay --- */
.gallery-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg, 
    rgba(0, 35, 43, 0) 30%, 
    rgba(0, 23, 27, 0.85) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-md);
  z-index: 2;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.gallery-card-item:hover .gallery-hover-overlay {
  opacity: 1;
  visibility: visible;
}

.gallery-zoom-icon {
  align-self: flex-end;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-full);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.gallery-zoom-icon svg {
  width: 20px;
  height: 20px;
  fill: var(--color-bg-white);
}

.gallery-card-item:hover .gallery-zoom-icon {
  background: var(--color-secondary);
}

.gallery-info {
  color: var(--color-bg-white);
}

.gallery-cat-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  background: var(--color-secondary);
  color: var(--color-bg-white);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xxs);
}

.gallery-info h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}

/* --- Lightbox Modal --- */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 15, 18, 0.97);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-modal.active {
  opacity: 1;
  visibility: visible;
}

/* --- Lightbox Content Container --- */
.lightbox-content {
  position: relative;
  max-width: 85vw;
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  transition: opacity 0.15s ease-in-out;
}

.lightbox-meta {
  color: var(--color-bg-white);
  text-align: center;
  margin-top: var(--space-md);
  max-width: 600px;
}

.lightbox-meta h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--color-secondary);
}

.lightbox-meta p {
  font-size: 0.925rem;
  line-height: 1.5;
  opacity: 0.8;
  margin: 0;
}

/* --- Close Button --- */
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2.75rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  z-index: 10001;
}

.lightbox-close:hover {
  color: var(--color-bg-white);
}

/* --- Navigation Arrows --- */
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: none;
  border-radius: var(--radius-full);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  transition: background var(--transition-fast), color var(--transition-fast);
  z-index: 10000;
}

.lightbox-arrow svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.lightbox-arrow:hover {
  background: var(--color-secondary);
  color: var(--color-bg-white);
}

.lightbox-arrow-prev {
  left: 24px;
}

.lightbox-arrow-next {
  right: 24px;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .lightbox-arrow {
    width: 44px;
    height: 44px;
    background: rgba(0,0,0,0.5);
  }
  .lightbox-arrow-prev {
    left: 12px;
  }
  .lightbox-arrow-next {
    right: 12px;
  }
  .lightbox-close {
    top: 16px;
    right: 16px;
    font-size: 2.25rem;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}
