/**
 * services-page.css
 *
 * Styles for page--services.html.twig
 * Place in: /themes/custom/greenandgrow/css/services-page.css
 * (or import into your theme's main stylesheet)
 *
 * Design tokens mirror the existing Green & Grow brand:
 *   Primary green : #044704
 *   Accent orange : #e87722  (logo orange)
 *   Light bg      : #f5f7f5
 *   Dark bg       : #1a2b1a  (footer/utility bar)
 *   Text          : #222
 */

/* ============================================================
   SERVICE INTRO
   ============================================================ */
.service-intro {
  padding-block: 3rem 2rem;
  background: var(--color-bg);
}
.service-content {
  max-width: 800px;
  margin-inline: auto;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--color-text);
  text-align: center;
}
.service-content p { margin-block: .75rem; }

.service-content h4 {
  color: black;
}

/* Gallery */
.service-gallery {
  margin-top: 2rem;
}
.service-gallery__list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.service-gallery__item {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--color-border);
}
.service-gallery__item figure {
  margin: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--color-border);
}
.service-gallery__item img {
  width: 100%; height: 200px;
  object-fit: cover;
  display: block;
}

.service-gallery--text-columns .service-gallery__text-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  text-align: center;
}

/* Video variant */
.service-gallery__video {
  max-width: 720px;
  margin-inline: auto;
  margin: 2rem auto;
}
.service-gallery__video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: var(--radius-md);
}
.service-gallery__video-caption {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-text-light);
  text-align: center;
}

/* Video-split variant: two-column row */
.service-gallery--video-split .service-gallery__split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.service-gallery--video-split .service-gallery__split-content {
  text-align: left;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--color-text);
  padding-right: 3rem;
}
.service-gallery--video-split .service-gallery__split-title {
  color: var(--color-primary, #044704);
  text-align: center;
  /* font-size: 1.5rem; */
  margin: 0 0 1rem;
}
.service-gallery--video-split .service-gallery__split-video {
  position: sticky;
}
@media (max-width: 768px) {
  .service-gallery--video-split .service-gallery__split-row {
    grid-template-columns: 1fr;
  }
  .service-gallery--video-split .service-gallery__split-video {
    position: static;
  }
}

/* content-gallery-split variant: two-column row */
.service-gallery--content-gallery-split .service-gallery__split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
.service-gallery--content-gallery-split .service-gallery__split-content {
  text-align: left;
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--color-text);
  padding-right: 5rem;
}
.service-gallery--content-gallery-split .service-gallery__split-title {
  color: var(--color-primary, #044704);
  text-align: center;
  /* font-size: 1.5rem; */
  margin: 0 0 1rem;
}
.service-gallery--content-gallery-split .service-gallery__split-gallery {
  position: sticky;
}
@media (max-width: 768px) {
  .service-gallery--content-gallery-split .service-gallery__split-row {
    grid-template-columns: 1fr;
  }
  .service-gallery--content-gallery-split .service-gallery__split-gallery {
    position: static;
  }
}

/* ============================================================
   CTA BAND
   ============================================================ */
.cta-band {
  background-color: #044704;
  color: #fff !important;
  text-align: center;
  padding: .5rem 0 1.5rem;
  position: relative;
  z-index: 4;
}

.cta-band-blog {
  margin-top: 2rem;
}

.cta-phone {
  font-size: clamp(1.8rem, 8vw, 3rem); /* Scales down on mobile, caps at 3rem on desktop */
  font-weight: 700;
  color: var(--color-accent-light);
  text-shadow: 0em 0.1em 0.1em rgba(0, 0, 0, 0.4);
  /* margin-bottom: 5px; */
  /* Forces the text to stay on one line */
  white-space: nowrap; 
}

.cta-heading {
  font-size: clamp(1.3rem, 8vw, 2.5rem);
  font-weight: 700;
  color: #fff !important;
  text-shadow: 0em 0.1em 0.1em rgba(0, 0, 0, 0.4);
  margin: 0 !important;
  /* Forces the text to stay on one line */
  white-space: nowrap; 
}

.cta-text {
  font-size: clamp(.5rem, 8vw, 1.1rem);
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 20px;
  line-height: 1.6;
}

.cta-locations {
  font-size: clamp(.55rem, 8vw, 1.15rem);
}

.cta-button {
  display: inline-block;
  padding: 16px 40px;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 0em 0.1em 0.1em rgba(0, 0, 0, 0.4);
  background-color: var(--color-accent-light);
  /* border: 2px solid #F58220; */
  border-radius: 3px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background-color: #d96e0e;
  border-color: #d96e0e;
  color: #fff;
  box-shadow: 0 4px 12px rgba(245, 130, 32, 0.3);
}

/* ============================================================
   RELATED ARTICLES
   ============================================================ */
.related-articles {
  background: var(--color-bg-alt);
  padding-block: 3rem;
}
.related-articles__heading {
  text-align: center;
  color: var(--color-primary);
  font-size: clamp(1.2rem, 2.5vw, 1.75rem);
  margin-bottom: 2rem;
}

/*
  The view outputs a grid of teasers.
  These styles work when the view's wrapper class is .view-service-related-articles
  and items use .views-row.
*/
.view-service-related-articles .view-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 900px) {
  .view-service-related-articles .view-content {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .view-service-related-articles .view-content {
    grid-template-columns: 1fr;
  }
}

.view-service-related-articles .views-row {
  background: var(--color-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.view-service-related-articles .views-row:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
}
.view-service-related-articles .views-row img {
  width: 100%; height: 180px;
  object-fit: cover;
  display: block;
}
.view-service-related-articles .node__title {
  font-size: 1rem;
  font-weight: 700;
  margin: .75rem .9rem .4rem;
}
.view-service-related-articles .node__title a {
  color: var(--color-primary);
  text-decoration: none;
}
.view-service-related-articles .node__title a:hover { text-decoration: underline; }
.view-service-related-articles .field--name-body {
  font-size: .875rem;
  color: var(--color-text-light);
  padding-inline: .9rem;
  flex: 1;
  line-height: 1.55;
}
.view-service-related-articles .more-link {
  display: block;
  text-align: right;
  padding: .6rem .9rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
}
.view-service-related-articles .more-link:hover { text-decoration: underline; }

/* Collapse to single column on mobile */
@media (max-width: 768px) {
  .service-gallery--text-columns .service-gallery__text-columns {
    grid-template-columns: 1fr;
  }
}