/**
 * Solvync Industry & Location Page Enhancement CSS
 * Matches homepage quality: icons, animations, metrics, responsive
 * Targets: .svil-card, .svil-step, .svil-feat-list, .svil-section
 */

/* ================================================================
   FOUC PREVENTION — hide content area until JS has run DOM Rescue
   Body gets .sv-il-enhanced after JS completes; until then, page
   content is hidden to prevent flash of broken layout on pages
   where WordPress blocks have escaped .entry-content (e.g. distribution).
   The hero section stays visible since it's outside entry-content.
   ================================================================ */
.site-content .ast-container {
  opacity: 0;
  transition: opacity 0.3s ease;
}
body.sv-il-enhanced .site-content .ast-container {
  opacity: 1;
}

/* ================================================================
   COHERENCY FIXES — match homepage computed styles exactly
   Homepage reference: solvync.com (captured March 2026)
   ================================================================ */

/* H1: Remove extra Georgia fallback to match homepage exactly */
body.sv-il-enhanced .sv-il-hero h1,
body.sv-il-enhanced .entry-content h1.wp-block-heading {
  font-family: "Libre Baskerville", serif !important;
}

/* Card H3 titles: Homepage uses Libre Baskerville, NOT Montserrat
   Must override .entry-content h3.wp-block-heading from inline styles */
body.sv-il-enhanced .entry-content .svil-card h3,
body.sv-il-enhanced .entry-content .svil-card h3.wp-block-heading,
body.sv-il-enhanced .entry-content .svil-step h3,
body.sv-il-enhanced .entry-content .svil-step h3.wp-block-heading,
body.sv-il-enhanced .svil-card h3,
body.sv-il-enhanced .svil-step h3 {
  font-family: "Libre Baskerville", serif !important;
}

/* Section H2: Remove extra Georgia fallback */
body.sv-il-enhanced .svil-section-hdr h2,
body.sv-il-enhanced .entry-content h2.wp-block-heading {
  font-family: "Libre Baskerville", serif !important;
}

/* Step card border: Homepage uses transparent border, not visible gray */
body.sv-il-enhanced .entry-content .svil-step {
  border-color: transparent !important;
}

/* Badge: Match homepage style — teal tint bg, teal border, pill 50px */
body.sv-il-enhanced .sv-il-hero-badge {
  background-color: rgba(0, 168, 168, 0.09) !important;
  border: 1px solid rgba(0, 168, 168, 0.35) !important;
  border-radius: 50px !important;
  color: rgb(0, 109, 109) !important;
}
body.sv-il-enhanced .sv-il-hero-badge .badge-pulse {
  background-color: rgb(0, 168, 168) !important;
}
body.sv-il-enhanced .sv-il-hero-badge span:first-child {
  color: rgb(0, 168, 168) !important;
}

/* Feature list strong titles: Use Libre Baskerville like card titles */
body.sv-il-enhanced .entry-content .svil-feat-list li strong {
  font-family: "Libre Baskerville", serif !important;
}

/* Related card & Service card H3: also match */
body.sv-il-enhanced .sv-il-related-card h3,
body.sv-il-enhanced .sv-il-svc-card h3 {
  font-family: "Libre Baskerville", serif !important;
}

/* ================================================================
   ICON CONTAINERS — for module cards and steps
   ================================================================ */
.svil-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(14,165,233,0.08) 0%, rgba(20,184,166,0.08) 100%);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}
.svil-icon-wrap svg {
  display: block;
}

/* Icon in step cards — slightly smaller */
.svil-step .svil-icon-wrap {
  width: 62px;
  height: 62px;
  margin-bottom: 14px;
  border-radius: 14px;
}

/* Icon hover lift */
.svil-card:hover .svil-icon-wrap,
.svil-step:hover .svil-icon-wrap {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(14,165,233,0.15);
}

/* Feature list icon — inline with text */
.svil-feat-has-icon {
  display: flex !important;
  align-items: flex-start !important;
  gap: 16px !important;
}
.svil-feat-icon {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px;
  margin-bottom: 0 !important;
  border-radius: 12px;
  margin-top: 2px;
}
.svil-feat-icon svg {
  width: 38px !important;
  height: 38px !important;
}

/* ================================================================
   ANIMATION BASE STATES
   ================================================================ */
.sv-il-enhanced .sv-anim-ready {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
.sv-il-enhanced .sv-anim-in {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* CTA gets a slight scale */
.sv-il-enhanced .sv-il-cta.sv-anim-ready {
  transform: translateY(28px) scale(0.97);
}
.sv-il-enhanced .sv-il-cta.sv-anim-in {
  transform: translateY(0) scale(1) !important;
}

/* ================================================================
   CARD HOVER EFFECTS
   ================================================================ */
.sv-il-enhanced .svil-card {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.3s ease;
}
.sv-il-enhanced .svil-card.sv-card-hover,
.sv-il-enhanced .svil-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 12px 36px rgba(0, 168, 168, 0.12),
              0 4px 16px rgba(0, 0, 0, 0.05) !important;
  border-color: rgba(0, 168, 168, 0.2) !important;
}

.sv-il-enhanced .svil-step {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.sv-il-enhanced .svil-step.sv-card-hover,
.sv-il-enhanced .svil-step:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 8px 28px rgba(0, 168, 168, 0.1),
              0 2px 12px rgba(0, 0, 0, 0.04) !important;
  border-color: rgba(0, 168, 168, 0.2) !important;
}

/* Related card hover */
.sv-il-enhanced .sv-il-related-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.sv-il-enhanced .sv-il-related-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(0,168,168,0.1);
  border-color: rgba(0,168,168,0.2);
}

/* Step number hover effect */
.sv-il-enhanced .svil-step:hover .svil-step-num {
  background: linear-gradient(135deg, #0ea5e9, #14b8a6);
  color: #fff !important;
  transform: rotate(-3deg) scale(1.05);
  box-shadow: 0 4px 16px rgba(14,165,233,0.3);
}
.svil-step-num {
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* ================================================================
   METRICS SECTION — matches homepage sc-br-metrics style
   Light pastel background, individual white cards
   ================================================================ */
.sv-il-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 56px auto 0;
  padding: 0;
  text-align: center;
}

.sv-il-metric {
  background: #fff;
  border: 1px solid rgba(0,150,179,0.14);
  border-radius: 18px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 2px 14px rgba(0,0,0,0.04);
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease, box-shadow 0.3s ease;
}
.sv-il-metric.sv-met-visible {
  opacity: 1;
  transform: translateY(0);
}
.sv-il-metric:hover {
  box-shadow: 0 6px 24px rgba(0,150,179,0.1);
  transform: translateY(-3px);
}

.sv-il-metric-value {
  font-family: Montserrat, sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  color: #0096b3;
  line-height: 1;
  margin-bottom: 8px;
}

.sv-il-metric-label {
  font-family: Montserrat, sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #122d41;
  margin-bottom: 6px;
  line-height: 1.4;
}

.sv-il-metric-sub {
  font-family: Montserrat, sans-serif;
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* ================================================================
   FEATURE LIST ENHANCEMENTS
   ================================================================ */
.sv-il-enhanced .svil-feat-list li {
  padding: 20px 24px !important;
  border-radius: 12px;
  margin-bottom: 12px !important;
  transition: background 0.3s ease, transform 0.3s ease;
}
.sv-il-enhanced .svil-feat-list li:hover {
  background: rgba(14,165,233,0.04);
  transform: translateX(4px);
}

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

/* Laptop 1400 */
@media (max-width: 1400px) {
  .sv-il-metrics {
    max-width: 960px;
    gap: 16px;
  }
  .sv-il-metric-value {
    font-size: 2rem;
  }
}

/* Tablet 768 */
@media (max-width: 768px) {
  .sv-il-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 40px 16px 0;
  }
  .sv-il-metric {
    padding: 24px 16px;
    border-radius: 14px;
  }
  .sv-il-metric-value {
    font-size: 1.8rem;
  }
  .sv-il-metric-label {
    font-size: 0.8rem;
  }

  .svil-icon-wrap {
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
  }
  .svil-icon-wrap svg {
    width: 50px;
    height: 50px;
  }
  .svil-step .svil-icon-wrap {
    width: 52px;
    height: 52px;
  }

  .svil-feat-has-icon {
    gap: 12px !important;
  }
  .svil-feat-icon {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
  }
  .svil-feat-icon svg {
    width: 32px !important;
    height: 32px !important;
  }
}

/* Phone 480 */
@media (max-width: 480px) {
  .sv-il-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 32px 12px 0;
  }
  .sv-il-metric {
    padding: 20px 12px;
    border-radius: 12px;
  }
  .sv-il-metric-value {
    font-size: 1.5rem;
  }
  .sv-il-metric-label {
    font-size: 0.72rem;
  }
  .sv-il-metric-sub {
    font-size: 0.68rem;
  }

  .svil-icon-wrap {
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
    border-radius: 12px;
  }
  .svil-icon-wrap svg {
    width: 42px;
    height: 42px;
  }

  /* Feature icons hidden on small phone */
  .svil-feat-has-icon {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .svil-feat-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
  }
}

/* Phone Small 375 */
@media (max-width: 375px) {
  .sv-il-metrics {
    gap: 10px;
    margin: 28px 8px 0;
  }
  .sv-il-metric {
    padding: 16px 10px;
  }
  .sv-il-metric-value {
    font-size: 1.3rem;
  }
}

/* Visually hidden but present for SEO and screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
