/* ============================
   DessCare - Our Services
   static/main/css/our_services/desscare.css
   ============================ */

/* Fallback navbar height (can be overridden elsewhere) */
:root {
  --nav-h: 80px;
}

/* ============================
   SECTION LAYOUT
   ============================ */

/* Hero + cards together fill the viewport below navbar */
.services-section {
  width: 100%;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h)); /* better on mobile */
  display: flex;
  flex-direction: column;
  background: #ffffff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

/* ============================
   HERO
   ============================ */

.services-hero {
  position: relative;
  background-image: url("../../img/our_services/desscare-bg.cbf59cebd92f.svg");
  background-size: cover;
  background-position: center;
  color: #ffffff;
  text-align: center;
  padding: 60px 20px 96px;  /* extra bottom padding for overlap effect */
  overflow: hidden;
  flex-shrink: 0;           /* don't let hero collapse in flex layout */
  min-height: 260px;
  z-index: 0;               /* base layer for stacking */
}

/* Black overlay & shadow – must stay under content + cards */
.services-hero::before,
.services-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 0;               /* below hero-inner and cards */
}

/* Black overlay */
.services-hero::before {
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.70);  /* black overlay */
}

/* Shadow casting from the bottom edge of the hero */
.services-hero::after {
  bottom: -5px;
  height: 150px; /* how tall the shadow appears */
  background: linear-gradient(
    to top,
    rgb(0, 0, 0),
    rgba(24, 81, 203, 0)
  );
}

/* Inner content so text sits above overlay */
.services-hero-inner {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  z-index: 1;               /* above overlays */
}

/* Hero text – translucent */
.services-hero h2 {
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: rgba(255, 255, 255, 0.70);
}

.services-hero p {
  font-size: clamp(0.95rem, 1.8vw, 1.3rem);
  color: rgba(255, 255, 255, 0.70);
}

/* ============================
   CARDS STRIP
   ============================ */

.services-cards {
  background: #ffffff;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 150px;                 /* desktop gap between cards */
  padding: 40px 8% 52px;
  margin-top: 45px;
  flex: 1;
  position: relative;
  z-index: 2;                 /* above hero & its overlays */
}

/* Individual card – now an <a> link */
.service-card {
  flex: 1 1 240px;            /* responsive: min width ~240px */
  max-width: 400px;
  text-align: center;
  display: block;

  background: #ffffff;
  border-radius: 12px;
  padding: 28px 20px 32px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); 

  text-decoration: none;      
  color: inherit;             

  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

/* slight lift on hover / focus of the card */
.service-card:hover,
.service-card:focus-visible {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.10);
  transform: translateY(-2px);
  outline: none;
}

/* Circular icon (image stays exactly as before) */
.service-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #0f3e4a;     /* dark teal / navy */
  display: flex;
  align-items: center;
  justify-content: center;
  object-fit: contain;
}

/* ============================
   CARD TEXT + BUTTON
   ============================ */

.service-card h3 {
  font-size: 1.2rem;
  margin-bottom: 6px;
  margin-top: 60px;
  font-weight: 700;
  color: #008c7a;          /* teal heading */
}

.service-card p {
  font-size: 1.05rem;
  color: #777777;
}

/* "Learn more" pill – span inside the <a> */
.service-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 6px 16px;
  border-radius: 999px;

  background: black;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;

  border: none;
}

/* change pill color when card is hovered/focused */
.service-card:hover .service-btn,
.service-card:focus-visible .service-btn {
  background: black;
}

/* ============================
   RESPONSIVE TWEAKS
   ============================ */

/* Tablets / small laptops */
@media (max-width: 900px) {
  .services-hero {
    padding: 50px 16px 70px;
    background-position: center top;
  }

  .services-cards {
    padding: 32px 20px 44px;
    margin-top: 32px;
    gap: 48px;                 /* tighter gaps on tablet */
  }

  .service-card {
    flex: 1 1 45%;             /* 2 cards per row when possible */
    max-width: 340px;
  }

  .service-card h3 {
    margin-top: 40px;
    font-size: 1.1rem;
  }

  .service-card p {
    font-size: 0.95rem;
  }
}

/* Phones */
@media (max-width: 600px) {
  .services-section {
    min-height: auto;          /* allow natural height on very small screens */
  }

  .services-hero {
    padding: 40px 16px 48px;
    background-position: center;
  }

  .services-hero h2 {
    font-size: clamp(1.8rem, 7vw, 2.6rem);
  }

  .services-hero p {
    font-size: 0.95rem;
  }

  .services-cards {
    flex-direction: column;
    align-items: center;
    gap: 80px;
    padding: 24px 16px 32px;
    margin-top: 24px;
  }

  .service-card {
    flex: 0 0 auto;
    max-width: 100%;
  }

  .service-card h3 {
    margin-top: 60px;
  }
}

/* ---------------------------------
   Ticker / running band on small screens
   ----------------------------------*/
@media (max-width: 900px) {
  .stats-ticker,
  .ticker,
  .ribbon {
    position: static !important;  /* no fixed / sticky */
    bottom: auto !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    z-index: 1;                   /* just above background, below nav overlays */
    width: 100%;
  }
}
