/* Phase 3: Mobile responsiveness and section polish only. Header and hero rules intentionally untouched. */
:root{--pp-mobile-gap:18px;--pp-card-border:#dfe7f4;--pp-soft-bg:#f7f9fd;}

/* Global public section resilience */
.wide{max-width:var(--wide);}
.section,.itx-section,.blog-layout,.ss-section{scroll-margin-top:110px;}
.card,.campaign-card,.type-card,.post-card,.ss-story-item,.itx-directory article,.itx-path-lessons article{min-width:0;}
.card p,.campaign-card p,.type-card p,.post-card p,.ss-story-item p,.itx-directory p{overflow-wrap:anywhere;}

/* Reusable responsive grids */
.campaign-grid.four,.type-grid,.post-grid,.itx-directory,.ss-story-grid,.ss-grid{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));}
.campaign-grid.three{grid-template-columns:repeat(auto-fit,minmax(260px,1fr));}

/* Stats sections: prevent squeezed labels and improve stacking */
.stats-bar,.si-stats,.ss-stats{gap:0;overflow:hidden;}
.stats-bar article,.si-stats article,.ss-stats article{min-width:0;align-items:flex-start;}
.si-stats article span,.ss-stats article span,.stats-bar span{line-height:1.55;overflow-wrap:normal;word-break:normal;}
.si-stats article b,.ss-stats article b,.stats-bar b{line-height:1.05;white-space:nowrap;}

/* Filters and search rows */
.ss-filters,.featured-controls,.premium-filter,.feature-filter-bar,.blog-tabs,.res-search{min-width:0;}
.ss-filters input,.ss-filters select,.featured-controls select,.premium-filter input,.premium-filter select,.res-search input{min-width:0;width:100%;}
.ss-filters{align-items:center;}
.ss-filters .ss-reset,.ss-filters a:last-child{white-space:nowrap;}

/* Success Stories dark testimonial polish */
.ss-testimonial{overflow:hidden;}
.ss-testimonial p,.ss-testimonial li,.ss-testimonial span{line-height:1.65;}
.ss-testimonial img{object-fit:cover;}

/* Footer readability */
.footer-grid{align-items:start;}
.footer a,.footer p{overflow-wrap:anywhere;}
.footer-mini,.social{flex-wrap:wrap;}
.mobile-bottom-cta{box-shadow:0 -10px 26px rgba(6,26,91,.12);}

/* Tutorial/resource cards */
.itx-head{gap:18px;}
.itx-head a{white-space:nowrap;}
.itx-directory article footer{gap:12px;}
.itx-path-lessons article{min-width:0;}
.itx-path-lessons article div{min-width:0;}

/* Blog/resource layouts */
.blog-layout{min-width:0;}
.blog-side{min-width:0;}
.post-card img{object-fit:cover;}
.pager{flex-wrap:wrap;gap:8px;}

/* Tablet */
@media(max-width:1180px){
  .wide{width:min(100% - 48px,var(--wide));}
  .type-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  .campaign-grid.four{grid-template-columns:repeat(2,minmax(0,1fr));}
  .si-stats,.ss-stats,.stats-bar{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .si-stats article,.ss-stats article,.stats-bar article{padding:22px 24px!important;}
  .ss-filters{grid-template-columns:1fr 220px 220px 220px auto!important;gap:12px;}
  .footer-grid{grid-template-columns:2fr repeat(2,1fr)!important;gap:28px!important;}
}

@media(max-width:900px){
  .wide{width:min(100% - 34px,var(--wide));}
  .section{padding:38px 0;}
  .section-head,.itx-head,.featured-head{align-items:flex-start;flex-direction:column;gap:14px;}
  .section-head h2,.partners h2,.itx-head h2{font-size:clamp(24px,6vw,32px);}
  .type-grid,.campaign-grid.four,.campaign-grid.three,.post-grid,.itx-directory{grid-template-columns:1fr 1fr;gap:16px;}
  .ss-filters{grid-template-columns:1fr 1fr!important;}
  .ss-filters input{grid-column:1/-1;}
  .ss-filters .ss-reset,.ss-filters a:last-child{justify-self:start;}
  .ss-testimonial{grid-template-columns:1fr!important;padding:30px!important;gap:26px!important;}
  .ss-testimonial:before,.ss-testimonial:after{display:none!important;}
  .blog-layout{grid-template-columns:1fr!important;}
  .blog-side{position:static!important;}
  .footer-grid{grid-template-columns:1fr 1fr!important;}
  .footer-bottom{flex-direction:column;align-items:flex-start!important;gap:10px;}
}

/* Mobile */
@media(max-width:640px){
  .wide{width:min(100% - 24px,var(--wide));}
  body{font-size:15px;}
  .section,.itx-section{padding:30px 0;}
  .section-head,.itx-head{margin-bottom:18px;}
  .type-grid,.campaign-grid.four,.campaign-grid.three,.post-grid,.itx-directory,.itx-path-lessons{grid-template-columns:1fr!important;gap:14px;}
  .campaign-card,.type-card,.post-card,.itx-directory article,.ss-story-item{border-radius:16px;}
  .campaign-img{height:210px;}
  .si-stats,.ss-stats,.stats-bar{grid-template-columns:1fr!important;border-radius:18px!important;}
  .si-stats article,.ss-stats article,.stats-bar article{display:grid!important;grid-template-columns:54px 1fr!important;gap:12px 16px!important;padding:20px!important;border-right:0!important;border-bottom:1px solid var(--pp-card-border)!important;text-align:left!important;}
  .si-stats article:last-child,.ss-stats article:last-child,.stats-bar article:last-child{border-bottom:0!important;}
  .si-stats article i,.ss-stats article i,.stats-bar article i{grid-row:span 2;width:54px!important;height:54px!important;margin:0!important;}
  .si-stats article b,.ss-stats article b,.stats-bar article b{font-size:clamp(24px,8vw,34px)!important;margin:0!important;}
  .si-stats article span,.ss-stats article span,.stats-bar article span{grid-column:2;max-width:none!important;font-size:13px!important;}
  .ss-filters,.featured-controls,.premium-filter,.feature-filter-bar{grid-template-columns:1fr!important;display:grid!important;gap:10px!important;}
  .ss-filters input,.ss-filters select,.ss-filters button,.ss-filters a,.featured-controls select,.featured-controls a,.premium-filter input,.premium-filter select,.premium-filter .btn{width:100%!important;min-height:48px;}
  .res-search{display:grid!important;grid-template-columns:auto 1fr auto!important;gap:8px!important;}
  .res-search input{font-size:16px;}
  .blog-tabs{display:flex!important;overflow:auto;gap:8px;padding-bottom:8px;-webkit-overflow-scrolling:touch;}
  .blog-tabs a{flex:0 0 auto;white-space:nowrap;}
  .ss-testimonial{padding:24px!important;border-radius:18px!important;}
  .ss-testimonial h2{font-size:24px!important;}
  .ss-mini-stats{grid-template-columns:1fr!important;}
  .ss-subscribe{display:grid!important;grid-template-columns:1fr!important;text-align:left!important;padding:24px!important;gap:18px!important;}
  .ss-subscribe form{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;}
  .footer{padding-bottom:80px!important;}
  .footer-grid{grid-template-columns:1fr!important;gap:22px!important;}
  .footer-brand img{max-width:190px;}
  .footer-bottom{font-size:13px;}
  .itx-head a,.section-head a{white-space:normal;}
  .itx-path-lessons article{display:grid!important;grid-template-columns:48px 1fr!important;padding:18px!important;}
}

@media(max-width:420px){
  .wide{width:min(100% - 18px,var(--wide));}
  .btn{width:100%;padding-inline:18px;}
  .campaign-img{height:190px;}
  .mobile-bottom-cta a{font-size:12px;padding:10px 6px;}
}
