/* ==========================================================================
   Services page
   ========================================================================== */
.services-hero { min-height: 60vh; }

.service-grid-full.marquee-viewport {
  margin-top: 4px;
  overflow: hidden;
  width: 100%;
  position: relative;
}

/* Force OUR OFFERINGS section header and paragraph to stack in rows instead of side-by-side columns */
.section-label-row {
  flex-direction: column !important;
  align-items: flex-start !important;
}

.service-grid-full .marquee-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  width: max-content;
  will-change: transform;
}

.service-tile {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
  min-width: 0;
  flex: 0 0 clamp(220px, 24vw, 300px);
  opacity: 1 !important;
  /* Fix jagged corners on Safari during hover scale without breaking overflow */
  isolation: isolate;
  -webkit-backface-visibility: hidden;
  -webkit-transform: translateZ(0);
}

.service-tile:hover { transform: translateY(-6px); box-shadow: var(--shadow-med); }
.service-tile-img {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.service-tile-img a { display: block; width: 100%; height: 100%; }
.service-tile-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .5s ease; }
.service-tile:hover .service-tile-img img { transform: scale(1.03); }
.service-tile-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; }
.service-tile-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--light-green); display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.service-tile-icon svg { width: 16px; height: 16px; stroke: var(--dark-green); }
.service-tile h3 { font-size: 14px; margin-bottom: 4px; line-height: 1.25; }
.service-tile p { font-size: 12px; color: var(--muted); line-height: 1.45; flex: 1; }
.service-tile-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--green); margin-top: 7px; }

@media (max-width: 767px) {
  .service-tile { flex-basis: 76vw; }
}

/* ---------- FAQ Section ---------- */
.faq-section { background: var(--white); padding: var(--sp-6) 0; border-top: 1px solid var(--border); }
.faq-accordion { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; margin-top: 32px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--warm-white); overflow: hidden; transition: box-shadow var(--transition); }
.faq-item:hover { box-shadow: var(--shadow-soft); }
.faq-question { padding: 18px 24px; font-size: 16px; font-weight: 600; color: var(--dark-green); cursor: pointer; display: flex; align-items: center; justify-content: space-between; list-style: none; }
.faq-question::-webkit-details-marker { display: none; }
.faq-question svg { width: 20px; height: 20px; stroke: var(--green); transition: transform var(--transition); }
.faq-item[open] .faq-question svg { transform: rotate(180deg); }
.faq-answer { padding: 0 24px 20px; font-size: 15px; color: var(--muted); line-height: 1.6; }

/* ---------- Individual Service Templates ---------- */

/* Sidebar Layout (Template 2) */
.service-template-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  padding-bottom: var(--sp-8);
}
@media (min-width: 992px) {
  .service-template-layout.has-sidebar {
    grid-template-columns: 2fr 1fr;
  }
}

  .service-sidebar-inner {
    position: sticky;
    top: calc(var(--header-h) + var(--sp-6));
    background: var(--white);
    padding: var(--sp-5);
    border: 1px solid var(--border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-soft);
  }

  /* Grid for Key Points and What We Do in service articles */
  .service-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }
  @media (min-width: 768px) {
    .service-features-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }

  /* Mild hover effect for all cards/features in these grids */
  .service-features-grid > div {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
  }
  .service-features-grid > div:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.05) !important;
    border-color: var(--green, #22c55e) !important;
  }

.service-content-area h2 {
  font-size: 28px;
  margin-top: 32px;
  margin-bottom: 16px;
  color: var(--charcoal);
}

.service-content-area p {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.6;
}

.service-content-area ul {
  margin-bottom: 24px;
  padding-left: 20px;
}

.service-content-area li {
  margin-bottom: 10px;
  color: var(--muted);
}

/* Modal Styles (Templates 3 & 4) */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-window {
  background: var(--white);
  width: 90%;
  max-width: 500px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-6);
  position: relative;
  transform: translateY(20px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal-window {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--charcoal);
}

.modal-close svg {
  width: 24px;
  height: 24px;
}

/* Sticky Action Button (Template 3) */
.sticky-action-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--white);
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
}

/* Modal Form Row Responsive */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
@media (min-width: 600px) {
  .form-row {
    flex-direction: row;
  }
}
.form-row > div {
  flex: 1;
}
/* ---------- Responsive Tables ---------- */
@media (max-width: 768px) {
  .responsive-table, 
  .responsive-table thead, 
  .responsive-table tbody, 
  .responsive-table th, 
  .responsive-table td, 
  .responsive-table tr { 
    display: block; 
  }
  
  .responsive-table thead tr { 
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  .responsive-table tr { 
    border: 1px solid var(--border); 
    border-radius: var(--r-md);
    margin-bottom: 16px;
    background: var(--white);
    padding: 8px 0;
  }
  
  .responsive-table td { 
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
    position: relative;
    padding: 12px 16px 12px 45% !important; 
    text-align: left;
    min-height: 40px;
  }
  .responsive-table td:last-child {
    border-bottom: none !important;
  }
  
  .responsive-table td:before { 
    position: absolute;
    top: 12px;
    left: 16px;
    width: 40%; 
    padding-right: 10px; 
    white-space: normal;
    content: attr(data-label);
    font-weight: 600;
    color: var(--charcoal);
  }
}

/* ---------- Content Split Layouts ---------- */
.content-split {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: center;
  margin-bottom: 0;
}
.content-split h2 {
  margin-bottom: 24px !important;
}
@media (min-width: 768px) {
  .content-split {
    flex-direction: row;
    gap: 60px;
  }
  .content-split.reverse {
    flex-direction: row-reverse;
  }
  .content-split > div {
    flex: 1;
  }
}
.content-split img {
  width: 90%;
  margin: 0 auto;
  display: block;
  border-radius: var(--r-lg);
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

/* ---------- Section Spacing ---------- */
.section-pad {
  padding: 64px 0 35px 0;
}
@media (min-width: 992px) {
  .section-pad {
    padding: 100px 0 10px 0;
  }
}

/* Custom top padding reduction for OUR OFFERINGS section */
#offerings.section-pad { padding-top: 58px; }
@media (min-width: 992px) { #offerings.section-pad { padding-top: 90px; } }
