/* ================================================================
   WEBDESIGNWALA — GP CONFLICT FIXES
   Add this entire block at the very BOTTOM of style.css
   (after line 1229), OR paste into:
   Appearance → Customize → Additional CSS
================================================================ */


/* ----------------------------------------------------------------
   FIX 1: GeneratePress container constraints — make every WDW
   section truly full-width regardless of GP layout settings.
---------------------------------------------------------------- */

/* Kill GP's default content container padding on our page */
.page-template-page-home .site-content,
.page-template-page-home .content-area,
.page-template-page-home #primary,
.page-template-page-home .entry-content,
.page-template-page-home .inside-article {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

/* Kill GP grid/sidebar on homepage */
.page-template-page-home .site-content .inside-page-hero,
.page-template-page-home #sidebar-primary,
.page-template-page-home .widget-area {
  display: none !important;
}

/* Stretch all our sections to 100vw */
.wdw-hero,
.wdw-ticker-wrap,
.wdw-stats,
.wdw-services,
.wdw-about,
.wdw-process,
.wdw-portfolio,
.wdw-testimonials,
.wdw-tools,
.wdw-cta,
.wdw-footer {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  float: none !important;
  clear: both !important;
}


/* ----------------------------------------------------------------
   FIX 2: Stats text going vertical — GeneratePress or its
   Premium plugin sometimes sets writing-mode on grid children.
   Force horizontal on every element inside stats.
---------------------------------------------------------------- */

.wdw-stats,
.wdw-stats *,
.wdw-stat,
.wdw-stat *,
.wdw-stat__num,
.wdw-stat__num *,
.wdw-stat__label {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  text-combine-upright: none !important;
  transform: none !important;          /* Cancel any inherited rotate */
  display: revert;
}

/* Re-apply our intended display values after the revert above */
.wdw-stats {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 1px !important;
  background: var(--wdw-border) !important;
  width: 100% !important;
}

.wdw-stat {
  display: block !important;
  background: var(--wdw-black) !important;
  padding: 60px 48px !important;
  position: relative !important;
  overflow: hidden !important;
}

.wdw-stat__num {
  display: block !important;
  font-family: var(--font-display) !important;
  font-size: clamp(3rem, 5vw, 5.5rem) !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  letter-spacing: -0.04em !important;
  color: var(--wdw-text) !important;
  margin-bottom: 10px !important;
  white-space: nowrap !important;
}

.wdw-stat__num em {
  display: inline !important;
  color: var(--wdw-accent) !important;
  font-style: normal !important;
}

.wdw-stat__label {
  display: block !important;
  color: var(--wdw-muted) !important;
  font-size: 0.85rem !important;
  font-weight: 400 !important;
  letter-spacing: 0.02em !important;
  white-space: normal !important;
}


/* ----------------------------------------------------------------
   FIX 3: GP typography resets — prevent GP from overriding our
   heading font sizes inside sections.
---------------------------------------------------------------- */

.wdw-hero__h1,
.wdw-section-h2,
.wdw-cta__h2 {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  line-height: 0.95 !important;
  letter-spacing: -0.04em !important;
  color: var(--wdw-text) !important;
  margin: 0 0 20px !important;
}

.wdw-hero__h1 {
  font-size: clamp(3.5rem, 8.5vw, 9rem) !important;
  line-height: 0.92 !important;
  margin-bottom: 48px !important;
}

.wdw-section-h2 {
  font-size: clamp(2.5rem, 5vw, 4.5rem) !important;
  line-height: 1.05 !important;
}

.wdw-cta__h2 {
  font-size: clamp(3rem, 7vw, 7.5rem) !important;
  line-height: 0.95 !important;
  margin-bottom: 32px !important;
}

/* Prevent GP from styling <em> tags as italic body text inside headings */
.wdw-section-h2 em,
.wdw-cta__h2 em,
.wdw-hero__h1 em {
  font-family: 'Instrument Serif', serif !important;
  font-style: italic !important;
  font-weight: 400 !important;
  color: var(--wdw-accent) !important;
}


/* ----------------------------------------------------------------
   FIX 4: GP nav bar appearing above our custom nav — hide it.
---------------------------------------------------------------- */

.page-template-page-home .site-header,
.page-template-page-home .main-navigation,
.page-template-page-home #site-navigation,
.page-template-page-home .inside-header,
.page-template-page-home .header-widget,
.page-template-page-home .generate-back-to-top {
  display: none !important;
}


/* ----------------------------------------------------------------
   FIX 5: GP body adding padding-top for sticky nav — remove it
   since we handle that ourselves.
---------------------------------------------------------------- */

.page-template-page-home body,
.page-template-page-home .site {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Also target the GP sticky nav spacer div */
.page-template-page-home .nav-below-header,
.page-template-page-home .nav-above-header {
  display: none !important;
}


/* ----------------------------------------------------------------
   FIX 6: GP footer that may still peek through — ensure our
   custom footer is the only one showing.
---------------------------------------------------------------- */

.page-template-page-home .site-footer,
.page-template-page-home .inside-site-footer,
.page-template-page-home .footer-bar {
  display: none !important;
}


/* ----------------------------------------------------------------
   FIX 7: Services grid — prevent GP block editor styles from
   overriding our 3-column grid.
---------------------------------------------------------------- */

.wdw-services__grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1px !important;
  background: var(--wdw-border) !important;
}

.wdw-service-card {
  background: var(--wdw-black) !important;
  min-width: 0 !important;        /* Critical: prevents grid blowout */
  overflow: hidden !important;
}


/* ----------------------------------------------------------------
   FIX 8: Portfolio grid blowout guard.
---------------------------------------------------------------- */

.wdw-portfolio__grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 2px !important;
}

.wdw-portfolio__item {
  min-width: 0 !important;
  overflow: hidden !important;
}


/* ----------------------------------------------------------------
   FIX 9: Testimonials grid.
---------------------------------------------------------------- */

.wdw-testimonials__grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1px !important;
  background: var(--wdw-border) !important;
  min-width: 0 !important;
}

.wdw-testimonial {
  min-width: 0 !important;
  overflow: hidden !important;
}


/* ----------------------------------------------------------------
   FIX 10: Process grid connector line — prevent GP from adding
   padding that shifts the step circles off-center.
---------------------------------------------------------------- */

.wdw-process__grid {
  display: grid !important;
  grid-template-columns: repeat(5, 1fr) !important;
  position: relative !important;
  padding: 0 !important;
  max-width: 100% !important;
}

.wdw-process__step {
  padding: 0 20px !important;
  text-align: center !important;
}


/* ----------------------------------------------------------------
   FIX 11: About section two-column grid.
---------------------------------------------------------------- */

.wdw-about__inner {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 80px !important;
  align-items: center !important;
}


/* ----------------------------------------------------------------
   FIX 12: GP paragraph styles bleeding into our text.
---------------------------------------------------------------- */

.wdw-hero__desc,
.wdw-services__header-desc,
.wdw-cta__sub,
.wdw-footer__brand-desc {
  font-family: var(--font-body) !important;
  font-weight: 300 !important;
  font-size: 1rem !important;
  line-height: 1.75 !important;
  margin-bottom: 0 !important;
}

/* Kill GP's default p margin inside our sections */
.wdw-hero p,
.wdw-services p,
.wdw-about p,
.wdw-process p,
.wdw-portfolio p,
.wdw-testimonials p,
.wdw-cta p,
.wdw-footer p {
  margin-bottom: 0 !important;
}


/* ----------------------------------------------------------------
   FIX 13: Responsive overrides — restore correct column counts
   on tablet and mobile (GP media queries can fight ours).
---------------------------------------------------------------- */

@media (max-width: 1024px) {
  .wdw-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .wdw-services__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .wdw-testimonials__grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .wdw-process__grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 40px 0 !important;
  }
  .wdw-about__inner {
    grid-template-columns: 1fr !important;
    gap: 48px !important;
  }
  .wdw-portfolio__grid {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 768px) {
  .wdw-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .wdw-stat {
    padding: 40px 28px !important;
  }
  .wdw-services__grid {
    grid-template-columns: 1fr !important;
  }
  .wdw-testimonials__grid {
    grid-template-columns: 1fr !important;
  }
  .wdw-portfolio__grid {
    grid-template-columns: 1fr !important;
  }
  .wdw-portfolio__item:first-child {
    grid-row: auto !important;
  }
  .wdw-process__grid {
    grid-template-columns: 1fr 1fr !important;
  }
}
