/* ==========================================================================
   Responsive fixes for the public site (loaded last).
   Breakpoints follow Bootstrap: phones < 576, large phones < 768,
   tablets < 992, small laptops < 1200.
   ========================================================================== */

/* ---------- Services carousel: whole cards only, no cut-off "peek" ---------- */
@media (max-width: 1199.98px) {
  .d2w-services-carousel .d2w-service-slide { width: calc((100% - 16px) / 3); }
}
@media (max-width: 991.98px) {
  .d2w-services-carousel .d2w-service-slide { width: calc((100% - 8px) / 2); }
}
@media (max-width: 575.98px) {
  .d2w-services-carousel .d2w-service-slide { width: 100%; }
}

/* ---------- Testimonials: one quote at a time below laptop width ---------- */
@media (max-width: 991.98px) {
  .d2w-testimonial-carousel .d2w-testimonial-slide { width: 100%; }
  .d2w-testimonial-carousel { padding: 0 28px; }
}
@media (max-width: 767.98px) {
  .testimino-back { border-width: 10px; }
  .testo-inner,
  .d2w-sv-page .testo-inner { padding: 28px 22px 24px; min-height: 0; }
  .wd-testimon-text { font-size: 16px; padding-bottom: 18px; }
  /* Swipe and dots are enough on phones; the arrows covered the quote. */
  .d2w-testimonial-carousel { padding: 0; }
  .d2w-testimonial-carousel .d2w-carousel-arrow { display: none; }
}

/* ---------- Newsletter: stack the field and the button on phones ---------- */
@media (max-width: 767.98px) {
  .newsletter-form,
  .tnp-subscription { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
  .newsletter-form input,
  input#tnp-1 { padding: 16px 18px; }
  .tnp-submit,
  .newsletter-form button { position: static; transform: none; width: 100%; padding: 14px 21px; }
}

/* ---------- Footer: 2 columns on tablets, 1 on phones ---------- */
.footer-social { flex-wrap: wrap; margin-bottom: 24px; }
@media (max-width: 991.98px) {
  .sec-footer { padding: 0 24px 24px; }
  .sec-footer .row > [class*="col-"] { margin-bottom: 18px; }
}
@media (max-width: 575.98px) {
  .sec-footer { padding: 0 16px 16px; }
  .sec-footer .row > [class*="col-"] { text-align: left; }
}

/* ---------- Hero ---------- */
@media (max-width: 575.98px) {
  .hero-badge li { font-size: 11px; letter-spacing: 0.06em; padding: 7px 14px; white-space: nowrap; }
  .sec-1 h1 { font-size: 40px !important; line-height: 1.1 !important; }
}

/* ---------- About (home + about page): centred photo on tablets ---------- */
@media (max-width: 991.98px) {
  .about-photo-wrap { max-width: 560px; margin-left: auto; margin-right: auto; }
}

/* ---------- Membership box: centred heading on small screens ---------- */
@media (max-width: 767.98px) {
  .membership-box h2 { text-align: center; font-size: 22px; }
  .membership-box, #popup-inner-sec { padding: 24px 20px 26px; }
}

/* ---------- Partners: 2 per row on phones ---------- */
@media (max-width: 767.98px) {
  .partner-photo img { height: 220px; }
  .partner-photo h3 { font-size: 18px; }
}
@media (max-width: 575.98px) {
  .partner-photo img { height: 150px; border-radius: 14px; }
  .partner-photo h3 { font-size: 14px; line-height: 1.25; gap: 6px; margin-top: 4px; }
  .partner-photo h3::after { font-size: 13px; }
}

/* ---------- Icon cards (Debt Elimination / Wealth Accumulation) ---------- */
@media (max-width: 575.98px) {
  body.d2w-site .icon-card p { font-size: 14px; line-height: 1.45; }
  .icon-card h4 { font-size: 18px; }
}

/* ---------- Tighter vertical rhythm on tablets and phones ---------- */
@media (max-width: 991.98px) {
  .sec-2 { padding-top: 80px; }
  .sec-4 { padding-top: 70px; margin-top: 0; }
  .sec-6, .membership-sec { padding-top: 70px; padding-bottom: 70px; }
  .sec-11, .d2w-sv-page .sec-11 { padding-top: 70px; }
  .sec-11 .sec-intro { padding-bottom: 40px; }
  .pre-footer { padding: 110px 0 32px; }
  .d2w-pi { padding-top: 70px; }
  .d2w-pi-intro { padding-bottom: 36px; }
  .d2w-pi-goal { margin-top: 60px; }
}
@media (max-width: 767.98px) {
  .sec-2 { padding-top: 56px; }
  .sec-3 { padding-top: 60px; padding-bottom: 50px; }
  .sec-4 { padding-top: 50px; }
  .sec-6, .membership-sec { padding-top: 50px; padding-bottom: 50px; }
  .sec-7 { padding-top: 50px; padding-bottom: 50px; }
  .sec-11, .d2w-sv-page .sec-11 { padding-top: 50px; }
  .sec-11 .sec-intro, .sec-12 .sec-intro, .sec-intro { padding-bottom: 28px; }
  .sec-12 { padding-top: 40px; }
  .pre-footer { padding: 70px 0 28px; }
  .pre-footer h2 { margin-bottom: 0; }
  .d2w-pi { padding-top: 50px; }
  .d2w-pi .sec-intro h2, .d2w-pi-goal h2 { font-size: 30px; }
  .d2w-pi-card { padding: 32px 22px 26px; }
  .d2w-pi-card h3 { font-size: 22px; }
  .d2w-pi-goal { margin-top: 44px; }
  .d2w-pi-pillars { margin-top: 20px; }
}

/* Partner titles: keep the ↗ right after the text when the title wraps. */
@media (max-width: 991.98px) {
  .partner-photo h3 { display: block; }
  .partner-photo h3::after { display: inline-block; margin-left: 6px; }
}

/* ---------- Mobile / tablet menu ---------- */
@media (max-width: 991.98px) {
  .d2w-header .navbar-collapse { padding: 14px 0 18px; }
  .d2w-header .d2w-nav .nav-item { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .d2w-header .d2w-nav .nav-link { padding: 12px 4px !important; font-size: 18px; }
  .d2w-header .d2w-nav .dropdown-menu { margin: 0 0 10px; }
  .d2w-header-actions { display: flex; gap: 10px; margin-top: 18px; }
  .d2w-header .d2w-header-actions a.btn { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin: 0 !important; padding: 12px 16px !important; font-size: 15px !important; }
}

/* ---------- Small laptops (992–1399px): keep the header on one line ---------- */
@media (min-width: 992px) and (max-width: 1399.98px) {
  .d2w-header .d2w-nav .nav-link { font-size: 17px; padding: 8px 10px !important; white-space: nowrap; }
  .d2w-header .d2w-header-actions { gap: 8px; }
  .d2w-header .d2w-header-actions a.btn { white-space: nowrap; padding: 14px 18px !important; font-size: 14px !important; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
  .d2w-logo img { width: 130px; max-width: 130px; height: 94px; }
  .d2w-header .d2w-nav .nav-link { font-size: 16px; padding: 8px 8px !important; }
  .d2w-header .d2w-header-actions a.btn { padding: 12px 14px !important; }
  .pre-footer { padding-top: 120px; }
}

/* ---------- Phone heading sizes (requested) ---------- */
@media (max-width: 767px) {
  .col-lg-6.sec-about.is-visible {
    padding-top: 30px;
  }

  .sec-4 h2 {
    font-size: 30px;
  }

  .sec6-vid h2 {
    font-size: 31px;
  }

  .sec-7 h2 {
    font-size: 22px;
  }

  section.sec-11 h2 {
    font-size: 22px;
    line-height: 33px;
  }

  section.sec-12 h2 {
    font-size: 22px;
  }

  .pre-footer h2 {
    font-size: 22px;
  }
}
