/* ============================================================
   gallery.css
   Styles specific to gallery.html
   Depends on: homepage.css (tokens, .btn, .container)
               inner-pages.css (page-hero, utilities)
   ============================================================ */

/* ----------------------------------------------------------
   INTRO
   ---------------------------------------------------------- */
.gal-intro-section {
  padding: 52px 0 32px;
  background: #fff;
}

.gal-intro {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.gal-intro p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 16px;
}

.gal-intro p:last-child { margin-bottom: 0; }

/* ----------------------------------------------------------
   FILTER TABS
   ---------------------------------------------------------- */
.gal-filter-section {
  padding: 0 0 32px;
  background: #fff;
  position: sticky;
  top: 0;             /* sticks below the sticky site-header */
  z-index: 90;
  border-bottom: 2px solid var(--gray-mid, #e2e8f0);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}

.gal-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 20px;
}

.gal-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: 2px solid var(--gray-mid, #e2e8f0);
  border-radius: 100px;
  background: #fff;
  font-family: 'Inter', sans-serif;
  font-size: .875rem;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.gal-filter-btn:hover {
  border-color: var(--blue-mid, #2d7dd2);
  color: var(--blue-deep, #1a4fa0);
  background: #f0f6ff;
}

.gal-filter-btn.active {
  background: var(--blue-deep, #1a4fa0);
  border-color: var(--blue-deep, #1a4fa0);
  color: #fff;
  box-shadow: 0 2px 10px rgba(30,58,79,.25);
}

/* ----------------------------------------------------------
   GALLERY GRID
   ---------------------------------------------------------- */
.gal-grid-section {
  padding: 48px 0 64px;
  background: var(--gray-soft, #f4f6f9);
}

.gal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* ----------------------------------------------------------
   GALLERY CARD
   ---------------------------------------------------------- */
.gal-card {
  background: #fff;
  border-radius: var(--radius-lg, 14px);
  overflow: hidden;
  border: 1px solid var(--gray-mid, #e2e8f0);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: transform .22s, box-shadow .22s;
  display: flex;
  flex-direction: column;
}

.gal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(30,58,79,.14);
}

/* When filtered out */
.gal-card[hidden] {
  display: none;
}

/* Image area */
.gal-card__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.gal-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}

.gal-card:hover .gal-card__img img {
  transform: scale(1.04);
}

/* Portrait photos: show the whole picture (contain) over a blurred,
   darkened copy of itself so nothing is cropped. Add the --fit modifier
   plus a per-photo backdrop class below. */
.gal-card__img--fit {
  position: relative;
  background: var(--blue-deep, #1e3a4f);
}

.gal-card__img--fit::before {
  content: '';
  position: absolute;
  inset: -20px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  filter: blur(18px) brightness(.7);
}

.gal-card__img--fit img {
  position: relative;
  object-fit: contain;
}

.gal-bg-infiniti-tankless::before { background-image: url('../images/wh-bradford-infiniti-tankless.jpg'); }
.gal-bg-tank-closet::before       { background-image: url('../images/wh-bradford-closet-legacy-sticker.jpg'); }

/* Placeholder (before real photos are added) */
.gal-card__img--placeholder {
  background: linear-gradient(145deg, #091a26, var(--blue-deep, #1e3a4f), var(--blue-mid, #3b6e80));
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Caption */
.gal-card__caption {
  padding: 16px 18px 18px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Category tag pill */
.gal-card__tag {
  display: inline-block;
  font-size: .6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--blue-deep, #1a4fa0);
  background: #e8f0fe;
  border-radius: 100px;
  padding: 3px 10px;
  align-self: flex-start;
  margin-bottom: 4px;
}

.gal-card__title {
  font-size: .9375rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  line-height: 1.4;
}


/* ----------------------------------------------------------
   EMPTY STATE
   ---------------------------------------------------------- */
.gal-empty {
  text-align: center;
  padding: 64px 24px;
  color: #9ca3af;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.gal-empty p {
  font-size: 1.0625rem;
  color: #6b7280;
}

/* ----------------------------------------------------------
   PHOTO UPLOAD NOTICE BANNER
   ---------------------------------------------------------- */
.gal-upload-notice-section {
  padding: 24px 0;
  background: #fff;
  border-top: 1px solid var(--gray-mid, #e2e8f0);
}

.gal-upload-notice {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  max-width: 760px;
  margin: 0 auto;
  background: linear-gradient(135deg, #f0f6ff, #e8f0fe);
  border: 1px solid #c7daf9;
  border-left: 4px solid var(--blue-deep, #1a4fa0);
  border-radius: var(--radius, 10px);
  padding: 20px 24px;
}

.gal-upload-notice__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blue-deep, #1a4fa0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gal-upload-notice__copy strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue-deep, #1a4fa0);
  margin-bottom: 6px;
}

.gal-upload-notice__copy p {
  font-size: .9375rem;
  color: #374151;
  line-height: 1.65;
  margin: 0;
}

.gal-upload-notice__copy a {
  color: var(--blue-deep, #1a4fa0);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--orange, #f76a1a);
  text-underline-offset: 3px;
}

.gal-upload-notice__copy a:hover {
  color: var(--orange, #f76a1a);
}

/* ----------------------------------------------------------
   CTA BAND
   ---------------------------------------------------------- */
.gal-cta-section {
  background: linear-gradient(145deg, #091a26, var(--blue-deep, #1e3a4f), var(--blue-mid, #3b6e80));
  padding: 64px 0;
  color: #fff;
}

.gal-cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.gal-cta-inner__heading {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.375rem, 2.5vw, 2rem);
  font-weight: 900;
  color: #fff;
  margin: 0 0 10px;
}

.gal-cta-inner__sub {
  font-size: 1rem;
  color: rgba(255,255,255,.8);
  line-height: 1.7;
  max-width: 560px;
  margin: 0;
}

.gal-cta-inner__actions {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

/* White outline button for dark backgrounds */
.btn--white-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,.7);
  color: #fff;
}

.btn--white-outline:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
}

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

  .gal-cta-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }
}

/* ----------------------------------------------------------
   RESPONSIVE — 768px
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  .gal-intro-section {
    padding: 40px 0 24px;
  }

  .gal-filter-section {
    padding: 0 0 20px;
    position: static; /* un-stick on mobile; too narrow to be useful */
  }

  .gal-filters {
    padding-top: 16px;
    gap: 8px;
  }

  .gal-filter-btn {
    padding: 7px 14px;
    font-size: .8125rem;
  }

  .gal-grid-section {
    padding: 36px 0 48px;
  }

  .gal-cta-section {
    padding: 48px 0;
  }

  .gal-cta-inner__actions {
    width: 100%;
    flex-direction: column;
  }

  .gal-cta-inner__actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ----------------------------------------------------------
   RESPONSIVE — 540px (single column)
   ---------------------------------------------------------- */
@media (max-width: 540px) {
  .gal-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .gal-intro p {
    font-size: .9375rem;
  }

  .gal-upload-notice {
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
  }

  .gal-upload-notice__icon {
    width: 40px;
    height: 40px;
  }
}
