/**
 * ELYSIAN FALSE CEILING — Services Landing Page Styles
 * Styles specific to /services/index.html only.
 * Global tokens, components, and layout in global-assets/css/.
 */


/* ── Hero ────────────────────────────────────────────────────
   Breadcrumb sits inside hero-content above the H1.
   Override hero-content alignment for tighter layout.
──────────────────────────────────────────────────────────── */

.services-hero .hero-content {
  padding-top: calc(var(--navbar-height) + var(--space-12));
}

.services-hero .breadcrumb {
  margin-bottom: var(--space-6);
}

.services-hero .hero-title {
  max-width: 720px;
}


/* ── Filter Bar ──────────────────────────────────────────────
   Sticky below the fixed navbar. Uses a wrapper to prevent
   layout shift when the bar transitions to sticky.
──────────────────────────────────────────────────────────── */

.filter-bar-wrapper {
  /* Prevents layout collapse when .filter-bar goes sticky */
  position: relative;
  z-index: var(--z-sticky);
}

.filter-bar {
  position: sticky;
  top: var(--navbar-height);
  z-index: var(--z-sticky);
  background-color: var(--color-secondary);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: var(--space-3) 0;
  transition: box-shadow 250ms ease;
}

.filter-bar-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.filter-label {
  font-size: var(--text-body-sm);
  color: var(--color-text-muted);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .filter-label {
    display: none;
  }
}

.filter-buttons {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  border: 1.5px solid var(--color-border);
  background: transparent;
  font-family: var(--font-body);
  font-size: var(--text-body-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: border-color 200ms ease,
              color 200ms ease,
              background-color 200ms ease;
  white-space: nowrap;
  position: relative;
}

.filter-btn::after {
  /* Gold underline — visible only on active state */
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
  transition: transform 200ms ease;
}

.filter-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.filter-btn.active {
  border-color: var(--color-accent);
  background: rgba(201, 168, 76, 0.08);
  color: var(--color-accent);
  font-weight: 600;
}

.filter-btn.active::after {
  transform: translateX(-50%) scaleX(1);
}

.filter-count {
  font-size: 11px;
  color: var(--color-text-muted);
  font-weight: 400;
}

.filter-btn.active .filter-count {
  color: var(--color-accent-hover);
}

@media (max-width: 767px) {
  .filter-bar {
    top: var(--navbar-height);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .filter-buttons {
    flex-wrap: nowrap;
    padding-bottom: 2px; /* prevents scrollbar clipping */
  }
}


/* ── Services Cards Grid ─────────────────────────────────────
   3-column desktop → 2-column tablet → 1-column mobile.
   Cards animate in via scroll-reveal (.fade-up).
   Filter adds/removes .card-hidden / .card-visible.
──────────────────────────────────────────────────────────── */

.services-grid-section {
  /* Give the filter bar's sticky a slight visual separation */
  padding-top: var(--space-12);
}

.section-header + .filter-empty,
.section-header + * {
  margin-top: var(--space-6);
}

.services-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  margin-top: var(--space-10);
}

@media (min-width: 640px) {
  .services-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-cards-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
  }
}


/* ── Service Card: Category Label ───────────────────────────
   A small gold pill beneath the image showing the category.
──────────────────────────────────────────────────────────── */

.service-card-category {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
}


/* ── Filter Animation: show / hide ──────────────────────────
   Cards fade out when filtered away; fade in when shown.
   We use max-height + opacity so the grid reflows cleanly.
──────────────────────────────────────────────────────────── */

.service-card {
  transition: opacity 300ms ease,
              transform 300ms ease,
              max-height 300ms ease;
  max-height: 800px;       /* large enough to contain any card */
  overflow: hidden;
}

.service-card.card-visible {
  opacity: 1;
  max-height: 800px;
  pointer-events: auto;
  /* Re-trigger scroll-reveal if needed — handled by scroll-reveal.js */
}

.service-card.card-hidden {
  opacity: 0;
  max-height: 0;
  pointer-events: none;
  /* Remove from layout flow without display:none to keep grid intact */
  padding: 0;
  margin: 0;
  border: none;
}

/* When cards are hidden, collapse the grid gap for those cells */
.services-cards-grid:has(.card-hidden) {
  /* Modern browsers: auto-flow dense re-fills gaps */
  grid-auto-flow: dense;
}


/* ── Empty State ────────────────────────────────────────────
   Shown when no cards match the active filter.
──────────────────────────────────────────────────────────── */

.filter-empty {
  text-align: center;
  padding: var(--space-16) var(--space-4);
  color: var(--color-text-secondary);
  font-size: var(--text-body);
  grid-column: 1 / -1;
}

.filter-reset-link {
  color: var(--color-accent);
  background: none;
  border: none;
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  font-weight: 500;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 200ms ease;
}

.filter-reset-link:hover {
  color: var(--color-accent-hover);
}


/* ── Why Elysian Condensed — 3-Column ───────────────────────
   Three equal-width columns on desktop, single column mobile.
──────────────────────────────────────────────────────────── */

.why-condensed-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-10);
  margin-top: var(--space-12);
}

@media (min-width: 768px) {
  .why-condensed-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-8);
  }
}

.why-condensed-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.why-condensed-number {
  font-family: var(--font-heading);
  font-size: var(--text-h3);
  font-weight: 600;
  color: var(--color-accent);
  line-height: 1;
  display: block;
}

.why-condensed-title {
  font-family: var(--font-heading);
  font-size: var(--text-h4);
  font-weight: 600;
  color: var(--color-text-primary);
  line-height: 1.3;
  margin: 0;
}

.why-condensed-body {
  font-size: var(--text-body);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* Decorative top border on each item */
.why-condensed-item::before {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  margin-bottom: var(--space-2);
}


/* ── Packages Note ──────────────────────────────────────────
   Small note below the packages grid on the dark section.
──────────────────────────────────────────────────────────── */

.packages-note {
  text-align: center;
  margin-top: var(--space-10);
  color: var(--color-text-muted);
  font-size: var(--text-body-sm);
}

.packages-note a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 250ms ease;
}

.packages-note a:hover {
  color: var(--color-accent-hover);
}


/* ── Final CTA ──────────────────────────────────────────────
   Reused from home page — text-center, dark background.
──────────────────────────────────────────────────────────── */

.final-cta-btns {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
  margin-top: var(--space-10);
}

@media (min-width: 480px) {
  .final-cta-btns {
    flex-direction: row;
    justify-content: center;
  }
}
