/* ================================================================
   Peak Digital Marketing — Shared Responsive Stylesheet
   Loaded last in <head> so these rules override page-level <style>.
   ================================================================ */

/* ─── Container ─────────────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
  box-sizing: border-box;
}

/* ─── Nav CTA: never wrap text ───────────────────────────────────── */
.nav-cta {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ─── Nav gap: tighten slightly at 1200px to give CTA room ─────── */
@media (max-width: 1200px) {
  .nav-links { gap: 24px; }
}
@media (max-width: 1100px) {
  .nav-links { gap: 20px; }
}

/* ─── Hamburger at 1100px ───────────────────────────────────────── */
/* Override any page-level 767px nav rules for the 768–1100px range */
@media (max-width: 1100px) {
  .nav-links  { display: none !important; }
  .nav-cta    { display: none !important; }
  .burger     { display: block !important; }
}

/* Below 768px: page-level rules also fire; this keeps things consistent */
@media (max-width: 767px) {
  .nav-links  { display: none !important; }
  .nav-cta    { display: none !important; }
  .burger     { display: block !important; }
}

/* ─── Hero: single column at 900px ──────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }
  /* Show hero image stacked below on LP pages; page-level 767px hides it */
  .hero-img {
    display: block !important;
  }
  .hero-img img {
    height: auto !important;
    max-height: 340px;
    object-fit: cover;
    width: 100%;
  }
}

/* ─── Grid children: prevent blowout ────────────────────────────── */
.hero-inner > *,
.two-col > *,
.proof-grid > *,
.steps-grid > *,
.service-grid > *,
.case-grid > *,
.contact-inner > * {
  min-width: 0;
}

/* Long email/phone values must wrap on small screens */
.cd-value,
.cd-text {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ─── Sticky CTA bar ─────────────────────────────────────────────── */
/* Ensure bar never exceeds viewport */
.sticky-cta {
  box-sizing: border-box;
  max-width: 100vw;
}

/* On narrow screens: text wraps, bar grows; do NOT hide text */
@media (max-width: 767px) {
  .sticky-cta-inner {
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 16px;
    justify-content: flex-start !important;
  }
  .sticky-cta-text {
    display: block !important;   /* override page-level display:none */
    flex: 1 1 200px;
    font-size: 0.82rem;
    line-height: 1.45;
  }
  .sticky-cta-btn {
    flex: 0 0 auto !important;
    max-width: none !important;
    white-space: nowrap;
  }
  .sticky-dismiss {
    flex-shrink: 0;
  }
}

/* ─── Cookie banner ──────────────────────────────────────────────── */
/* box-sizing so padding is inside left:0/right:0 bounds */
#pdm-cookie-banner {
  box-sizing: border-box !important;
}

/* Buttons wrap below text on narrow screens */
@media (max-width: 600px) {
  #pdm-cookie-banner > div {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
  #pdm-cookie-banner > div > div:last-child {
    width: 100%;
    flex-shrink: 1 !important;
    justify-content: flex-end;
  }
}

/* ─── Section padding: reduce on small screens ───────────────────── */
@media (max-width: 900px) {
  section {
    padding-top: clamp(36px, 6vw, 64px);
    padding-bottom: clamp(36px, 6vw, 64px);
  }
}

/* ─── Two-column sections: collapse at 900px ─────────────────────── */
@media (max-width: 900px) {
  .two-col {
    grid-template-columns: 1fr !important;
    gap: 28px;
  }
  /* Image typically second in markup; if visually first in two-col,
     order:2 keeps text first in DOM and visually on mobile too */
}

/* ─── Footer ─────────────────────────────────────────────────────── */
/* Footer links must wrap at tablet — 12 links don't fit a single row */
@media (max-width: 1100px) {
  .footer-links {
    flex-wrap: wrap;
    gap: 14px 20px;
  }
}
@media (max-width: 767px) {
  .footer-inner {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
  }
  .footer-links {
    flex-wrap: wrap;
    gap: 14px 16px;
  }
}

/* ─── Buttons: ensure they don't overflow on tiny screens ────────── */
@media (max-width: 400px) {
  .btn {
    font-size: 0.88rem;
    padding: 12px 18px;
  }
}

/* ─── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
