/* ================================================================
   MICHAEL'S CREEK FARMS — services.css
   Specific styles for the Services & FAQ page
================================================================ */

/* ================================================================
   1. PAGE HEADER (Inner Page Hero)
================================================================ */
.page-header {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-block: var(--sp-20) var(--sp-12);
  margin-top: -1px; /* Seamless pull up to header */
}

.page-header-bg {
  position: absolute;
  inset: 0;
  z-index: var(--z-back);
}

.page-header-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.05);
  animation: subtlePan 15s ease-out forwards;
}

@keyframes subtlePan {
  from { transform: scale(1.05) translateY(0); }
  to   { transform: scale(1) translateY(-2%); }
}

.page-header-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 22, 9, 0.75) 0%,
    rgba(20, 40, 18, 0.55) 100%
  );
}

.page-header-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.page-title {
  font-family: var(--font-heading);
  font-size: clamp(var(--fs-4xl), 6vw, var(--fs-6xl));
  font-weight: var(--fw-bold);
  color: var(--clr-white);
  margin-bottom: var(--sp-4);
  line-height: 1.1;
}

.page-title em {
  color: var(--clr-gold-400);
  font-style: italic;
}

.page-subtitle {
  font-size: var(--fs-lg);
  color: rgba(255, 255, 255, 0.85);
  line-height: var(--lh-loose);
  max-width: 50ch;
  margin-inline: auto;
}


/* ================================================================
   2. SERVICES LISTING
================================================================ */
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(var(--sp-8), 8vw, var(--sp-16));
  align-items: center;
}

/* Reverse layout for alternating rows */
.service-row.reverse .service-visual {
  order: 2;
}

.service-row.reverse .service-content {
  order: 1;
}

/* Service Visual (Image) */
.service-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.service-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-row:hover .service-visual img {
  transform: scale(1.05);
}

/* Decorative frame behind image */
.service-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  z-index: 1;
  pointer-events: none;
}

/* Service Content (Text) */
.service-content > p {
  color: var(--clr-text-mid);
  line-height: var(--lh-loose);
  margin-bottom: var(--sp-6);
  font-size: var(--fs-md);
}

/* Features List with Checkmarks */
.service-features {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}

.service-features li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
  color: var(--clr-text);
  line-height: var(--lh-snug);
}

.service-features .fa-check {
  color: var(--clr-primary);
  font-size: var(--fs-base);
  margin-top: 2px;
}

/* Divider between services */
.service-divider {
  border: none;
  height: 1px;
  background-color: var(--clr-border);
  margin-block: clamp(var(--sp-12), 10vw, var(--sp-20));
}


/* ================================================================
   3. FAQ ACCORDION
================================================================ */
.faq-container {
  max-width: 800px; /* Keeps reading line length comfortable */
}

.accordion {
  border-top: 1px solid var(--clr-border);
}

.accordion-item {
  border-bottom: 1px solid var(--clr-border);
}

/* Accordion Header (Clickable area) */
.accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: var(--sp-6);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}

.accordion-title {
  font-family: var(--font-heading);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  color: var(--clr-text);
  transition: color 0.3s ease;
  padding-right: var(--sp-4);
  line-height: var(--lh-tight);
}

.accordion-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--clr-bg);
  color: var(--clr-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.4s ease, background 0.3s ease, color 0.3s ease;
}

/* Accordion Hover State */
.accordion-header:hover .accordion-title {
  color: var(--clr-primary);
}

.accordion-header:hover .accordion-icon {
  background: var(--clr-green-100);
}

/* Accordion Active/Open State */
.accordion-item.active .accordion-title {
  color: var(--clr-primary-dk);
}

.accordion-item.active .accordion-icon {
  background: var(--clr-primary);
  color: var(--clr-white);
  transform: rotate(180deg);
}

/* Accordion Content (The hidden text) */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.accordion-content p {
  padding-bottom: var(--sp-6);
  color: var(--clr-text-mid);
  line-height: var(--lh-loose);
  margin: 0;
}


/* ================================================================
   4. RESPONSIVE ADJUSTMENTS
================================================================ */

/* Tablet (≤ 1024px) */
@media (max-width: 1024px) {
  .service-row {
    gap: var(--sp-8);
  }
}

/* Mobile (≤ 768px) */
@media (max-width: 768px) {
  .page-header {
    min-height: 40vh;
  }
  
  /* Stack service rows vertically */
  .service-row,
  .service-row.reverse {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
  
  /* Reset the alternating layout on mobile */
  .service-row.reverse .service-visual,
  .service-row .service-visual {
    order: 1;
  }
  
  .service-row.reverse .service-content,
  .service-row .service-content {
    order: 2;
  }
  
  .service-visual img {
    aspect-ratio: 16 / 9; /* Wider image on mobile */
  }
  
  .accordion-title {
    font-size: var(--fs-md);
  }
}

/* Small Mobile (≤ 480px) */
@media (max-width: 480px) {
  .service-features li {
    font-size: var(--fs-xs);
  }
  
  .accordion-header {
    padding-block: var(--sp-5);
  }
}