/* ==========================================================================
   services.css
   MR. MA RENOVATION - Services page styles (Stage 5)
   Depends on: tokens.css, base.css, layout.css, components.css
   Reuses Stage 4 components: .service-card, .media, .benefit-list, .btn
   Styles the classes created by assets/js/services-page.js
   ========================================================================== */

/* ==========================================================================
   PAGE HEADER (navy band at the top of the page)
   ========================================================================== */
.page-header {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-8);
  color: var(--color-white);
  background-color: var(--color-navy);
  background-image:
  linear-gradient(
    90deg,
    rgba(15, 23, 42, 0.96) 0%,
    rgba(31, 41, 55, 0.82) 48%,
    rgba(31, 41, 55, 0.35) 100%
  ),
  url("/assets/img/hero/services-consultation.png");

background-size: cover;
background-position: center right;
}

/* Soft decorative ring, same style as the homepage hero */
.page-header::after {
  content: "";
  position: absolute;
  right: -8%;
  bottom: -60%;
  width: 36rem;
  height: 36rem;
  max-width: 70vw;
  max-height: 70vw;
  border-radius: 50%;
  border: 2px solid rgba(217, 168, 105, 0.25);
  box-shadow: 0 0 0 2rem rgba(217, 168, 105, 0.05);
  pointer-events: none;
}

.page-header__content {
  position: relative;
  z-index: 1;
  max-width: 44rem;
}

.page-header__label {
  margin-bottom: var(--space-3);
  color: var(--color-gold);
}

.page-header__title {
  margin-bottom: var(--space-3);
  color: var(--color-white);
}

.page-header__text {
  max-width: 38rem;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  color: rgba(255, 255, 255, 0.9);
}

@media (max-width: 599px) {
  .page-header {
    padding-block: var(--space-7);
  }
}

/* ==========================================================================
   FILTER BAR
   ========================================================================== */
.services-toolbar {
  margin-bottom: var(--space-5);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
  padding: 0;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  min-height: var(--touch-target);
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-sand);
  border-radius: 999px;
  background-color: var(--color-white);
  color: var(--color-charcoal);
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition);
}

.filter-btn:hover {
  border-color: var(--color-copper);
  color: var(--color-copper);
}

.filter-btn__count {
  font-weight: 500;
  opacity: 0.8;
}

/* Selected filter */
.filter-btn.is-active,
.filter-btn[aria-pressed="true"] {
  background-color: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--color-white);
}

.filter-btn.is-active:hover,
.filter-btn[aria-pressed="true"]:hover {
  background-color: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--color-white);
}

/* Result message under the filters */
.services-count {
  margin: 0;
  font-size: var(--text-small);
  color: var(--color-stone);
}

/* ==========================================================================
   SERVICE CARDS (page-specific additions to the Stage 4 .service-card)
   ========================================================================== */

/* IMPORTANT: .service-card sets display:flex, which would override the
   browser's "hidden" attribute. This rule makes filtered-out cards disappear. */
.service-card[hidden] {
  display: none;
}

/* Keep anchored cards (services.html#tile-installation) below the sticky header.
   Utility bar (desktop) + header are about 8rem tall, plus a small gap. */
.service-card--detailed {
  scroll-margin-top: 6rem;
}

@media (min-width: 1024px) {
  .service-card--detailed {
    scroll-margin-top: 9rem;
  }
}

/* Detailed cards do not lift on hover, because they hold a list and a button.
   They keep a soft shadow change only. */
.service-card--detailed:hover {
  transform: none;
}

/* The Stage 4 card stretches its link over the whole card. This page has a
   real button instead, so the stretched click area is turned off here. */
.service-card--detailed .service-card__link::after {
  content: none;
}

/* Keyboard focus ring when a card is focused after an anchor jump */
.service-card--detailed:focus {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
}

.service-card__includes-title {
  margin-top: var(--space-2);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--color-navy);
}

/* Smaller benefit list inside cards */
.service-card__includes {
  gap: var(--space-1);
  margin: 0;
  font-size: var(--text-small);
  color: var(--color-slate);
}

/* Push the button to the bottom so all buttons line up in a row */
.service-card__cta {
  align-self: flex-start;
  margin-top: auto;
}

.service-card--detailed .service-card__body {
  gap: var(--space-2);
}

.service-card--detailed .service-card__text {
  flex: 0 0 auto;
}

.service-card--detailed .service-card__includes {
  margin-bottom: var(--space-3);
}

/* ==========================================================================
   NO-JAVASCRIPT FALLBACK MESSAGE
   (services-page.js hides this when it runs successfully)
   ========================================================================== */
.services-fallback {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5);
  background-color: var(--color-white);
  border: 2px dashed var(--color-sand);
  border-radius: var(--radius-md);
}

.services-fallback[hidden] {
  display: none;
}

.services-fallback h2 {
  font-size: var(--text-h3);
}

.services-fallback p {
  max-width: 40rem;
  color: var(--color-slate);
}

/* ==========================================================================
   QUOTATION BAND
   (same look as the homepage band; repeated here so this page does not
   need home.css)
   ========================================================================== */
.quote-band__inner {
  display: grid;
  gap: var(--space-5);
  align-items: center;
}

@media (min-width: 1024px) {
  .quote-band__inner {
    grid-template-columns: 1.4fr 1fr;
    gap: var(--space-8);
  }
}

.quote-band h2 {
  margin-bottom: var(--space-3);
}

.quote-band p {
  color: rgba(255, 255, 255, 0.85);
}

.quote-band__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.quote-band__actions .btn {
  width: 100%;
}

.quote-band__contact {
  margin-top: var(--space-2);
  font-size: var(--text-small);
  color: rgba(255, 255, 255, 0.8);
}

.quote-band__contact a {
  color: var(--color-gold);
}

.quote-band__contact a:hover {
  color: var(--color-white);
}