/* ================================================
   CC Beauty — Gallery Page Styles
   File: gallery.css
   Folder: C:\Users\tc97h\OneDrive\Desktop\CC Beauty
   ================================================ */


/* ------------------------------------------------
   FILTER BAR
   ------------------------------------------------ */
.gallery-filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 2.5rem 2rem 0.5rem;
  background: var(--ivory);
}

.filter-btn {
  font-family: 'Jost', sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 0.6rem 1.5rem;
  border: 1px solid var(--sage-light);
  background: var(--ivory);
  color: var(--text-mid);
  cursor: pointer;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(20, 20, 18, 0.02);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.filter-btn:hover {
  border-color: var(--sage);
  color: var(--sage-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(78, 95, 71, 0.08);
}

.filter-btn.active {
  background: var(--sage-dark);
  border-color: var(--sage-dark);
  color: var(--ivory);
  box-shadow: 0 4px 12px rgba(78, 95, 71, 0.2);
}


/* ------------------------------------------------
   GALLERY GRID
   ------------------------------------------------ */
.gallery-section {
  background: var(--ivory);
  padding: 2.5rem 3rem 5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  gap: 1.25rem;
  max-width: 1300px;
  margin: 0 auto;
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  cursor: zoom-in;
  position: relative;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(20, 20, 18, 0.04);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(20, 20, 18, 0.12);
}

/* Wide item spans 2 columns — used for before/after */
.gallery-item--wide {
  grid-column: span 2;
}

.gallery-item.hidden {
  display: none;
}

.gallery-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--sage-muted);
  border-radius: 8px;
}

/* Wide items have a more landscape ratio */
.gallery-item--wide .gallery-img-wrap {
  aspect-ratio: 16 / 9;
}

.gallery-img-wrap img,
.gallery-img-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.4s ease;
}

.gallery-img-wrap img.pos-top,
.gallery-img-wrap video.pos-top {
  object-position: center top;
}

.gallery-img-wrap img.pos-bottom,
.gallery-img-wrap video.pos-bottom {
  object-position: center bottom;
}

.gallery-item:hover .gallery-img-wrap img,
.gallery-item:hover .gallery-img-wrap video {
  transform: scale(1.04);
}

/* Play indicator for video items */
.gallery-item--video .gallery-img-wrap::after {
  content: "";
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  background: rgba(20, 20, 18, 0.65);
  border: 0.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
  background-size: 14px;
  background-position: 10.5px center;
  background-repeat: no-repeat;
  z-index: 2;
  pointer-events: none;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}

.gallery-item--video:hover .gallery-img-wrap::after {
  transform: scale(1.1);
  background-color: var(--sage);
  border-color: var(--ivory);
}

/* Hover overlay */
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(78, 95, 71, 0.0);
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  transition: background 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  background: rgba(78, 95, 71, 0.45);
}

.overlay-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ivory);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.25s ease;
}

.gallery-item:hover .overlay-label {
  opacity: 1;
  transform: translateY(0);
}


/* ------------------------------------------------
   LIGHTBOX
   ------------------------------------------------ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 20, 18, 0.95);
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.lightbox.open {
  display: flex;
}

.lightbox-inner {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img,
.lightbox-video {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  display: block;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(20, 20, 18, 0.4);
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ivory);
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background-color 0.2s;
  line-height: 1;
  border-radius: 50%;
  z-index: 1010;
}

.lightbox-close:hover {
  border-color: var(--ivory);
  background-color: rgba(20, 20, 18, 0.8);
}

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(20, 20, 18, 0.4);
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: var(--ivory);
  font-size: 1rem;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background-color 0.2s;
  border-radius: 50%;
  z-index: 1010;
}

.lightbox-prev { left: 1.5rem; }
.lightbox-next { right: 1.5rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  border-color: var(--ivory);
  background-color: rgba(20, 20, 18, 0.8);
}

.lightbox-caption {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  background: rgba(20, 20, 18, 0.6);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1010;
}


/* ------------------------------------------------
   INSTAGRAM SECTION
   ------------------------------------------------ */
.instagram-section {
  background: var(--ivory-dark);
  padding: 5rem 2rem;
  text-align: center;
  border-top: 0.5px solid var(--sage-light);
}

.instagram-inner {
  max-width: 540px;
  margin: 0 auto;
}

.instagram-icon {
  color: var(--sage);
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.instagram-heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.instagram-heading em {
  font-style: italic;
  color: var(--sage-dark);
}

.instagram-sub {
  color: var(--text-mid);
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.instagram-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 2.25rem;
  background: var(--sage);
  color: var(--ivory);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
}

.instagram-btn:hover {
  background: var(--sage-dark);
}


/* Before & After slider styles removed - now displayed as a unified, polished grid */


/* ------------------------------------------------
   RESPONSIVE
   ------------------------------------------------ */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .gallery-section { padding: 2rem 1rem 4rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .gallery-item--wide { grid-column: span 2; }
  .gallery-filter-bar { gap: 0.5rem; padding: 1.5rem 1rem 0; }
  .filter-btn { font-size: 0.65rem; padding: 0.4rem 0.9rem; }
  .lightbox-prev { left: 0.5rem; }
  .lightbox-next { right: 0.5rem; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item--wide { grid-column: span 1; }
  .gallery-img-wrap { aspect-ratio: 4/3; }
}
