/* Hydroposhan — unified responsive grids (load after site-responsive.css) */

/* —— Gallery —— */
.page-gallery {
  --ha-gallery-col: 260px;
  --ha-gallery-gap: clamp(12px, 2vw, 18px);
}

.page-gallery .gallery-panel,
.page-gallery main.container {
  min-width: 0;
  max-width: 100%;
}

.page-gallery [data-gallery-grid],
.page-gallery .gallery-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--ha-gallery-col)), 1fr)) !important;
  gap: var(--ha-gallery-gap) !important;
  align-items: stretch !important;
  justify-items: stretch !important;
}

.page-gallery .gallery-grid > .gallery-skeleton,
.page-gallery .gallery-grid > button.gallery-card,
.page-gallery .gallery-grid > .gallery-empty {
  min-width: 0;
  max-width: 100%;
}

.page-gallery .gallery-grid.is-loading > .gallery-skeleton {
  opacity: 1 !important;
  transform: none !important;
}

.page-gallery button.gallery-card {
  display: grid !important;
  grid-template: 1fr / 1fr !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  justify-self: stretch !important;
  align-self: stretch !important;
}

.page-gallery button.gallery-card > img {
  grid-area: 1 / 1 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  min-height: 100% !important;
  object-fit: cover !important;
}

.page-gallery .gallery-empty {
  grid-column: 1 / -1;
}

/* —— Knowledge Hub / insights —— */
.page-insights .content-card {
  min-width: 0;
  overflow: hidden;
}

.page-insights .featured-article {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  margin-bottom: clamp(32px, 5vw, 48px);
  min-width: 0;
}

.page-insights .featured-img {
  flex: 0 0 50%;
  width: 50%;
  max-width: 50%;
  min-width: 0;
  min-height: clamp(220px, 42vw, 380px);
}

.page-insights .featured-content {
  flex: 1 1 50%;
  width: 50%;
  min-width: 0;
}

.page-insights .article-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)) !important;
  gap: clamp(20px, 3vw, 30px) !important;
  align-items: stretch !important;
}

.page-insights .article-grid .article-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100%;
  min-width: 0;
}

.page-insights .card-img {
  flex-shrink: 0;
  height: clamp(180px, 32vw, 220px);
}

.page-insights .card-img img,
.page-insights .featured-img img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  min-height: 100% !important;
  object-fit: cover !important;
}

/* —— Programs / infra / homepage cards —— */
.programs-grid,
.infra-grid,
.grid-cards,
.programs-showcase-grid,
body.page-home #programs.programs-showcase .grid-3 {
  display: grid !important;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)) !important;
  gap: clamp(18px, 3vw, 28px) !important;
  align-items: stretch;
}

.grid-3 {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)) !important;
  gap: clamp(16px, 2.5vw, 24px) !important;
}

/* —— Testimonials (static grid on testimonials.html only) —— */
.testimonials-grid:not(.testimonials-carousel__track),
#testimonials-grid:not(.testimonials-carousel__track) {
  display: grid !important;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)) !important;
  gap: clamp(16px, 3vw, 24px) !important;
  align-items: stretch;
}

/* Homepage carousel track — flex slider (overrides grid on #testimonials-grid) */
#testimonials-grid.testimonials-carousel__track,
.testimonials-carousel__track.testimonials-grid {
  display: flex !important;
  flex-wrap: nowrap !important;
  grid-template-columns: none !important;
  gap: var(--testimonial-gap, clamp(16px, 3vw, 20px)) !important;
  align-items: stretch !important;
  width: 100%;
  min-width: 0;
}

/* —— Footer (legacy pages only — canonical ha-footer uses footer-premium.css) —— */
footer:not(.ha-footer) .footer-grid {
  display: grid !important;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)) !important;
  gap: clamp(24px, 4vw, 40px) !important;
  align-items: start;
}

html.ha-unified footer.ha-footer .footer-grid,
html.ha-unified footer#contact.ha-footer .footer-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr) minmax(0, 0.78fr) minmax(0, 0.78fr) !important;
  gap: clamp(20px, 2.5vw, 32px) !important;
  align-items: start !important;
  box-sizing: border-box !important;
}

html.ha-unified footer.ha-footer .footer-col,
html.ha-unified footer#contact.ha-footer .footer-col {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow: visible;
  box-sizing: border-box;
}

html.ha-unified footer.ha-footer .footer-col--contact,
html.ha-unified footer#contact.ha-footer .footer-col--contact {
  overflow: visible;
}

html.ha-unified footer.ha-footer .footer-contact-list,
html.ha-unified footer#contact.ha-footer .footer-contact-list,
html.ha-unified footer.ha-footer .footer-contact-card,
html.ha-unified footer#contact.ha-footer .footer-contact-card,
html.ha-unified footer.ha-footer .footer-address-block,
html.ha-unified footer#contact.ha-footer .footer-address-block {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

html.ha-unified footer.ha-footer .footer-contact-card__value,
html.ha-unified footer#contact.ha-footer .footer-contact-card__value {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-wrap: break-word !important;
  word-break: normal !important;
  white-space: normal !important;
  hyphens: none !important;
}

html.ha-unified footer.ha-footer .footer-contact-card--email .footer-contact-card__value,
html.ha-unified footer#contact.ha-footer .footer-contact-card--email .footer-contact-card__value {
  font-size: clamp(0.8rem, 0.82vw, 0.9rem) !important;
  line-height: 1.4 !important;
  letter-spacing: -0.01em !important;
}

@media (min-width: 1100px) {
  html.ha-unified footer.ha-footer .footer-contact-card--email .footer-contact-card__value,
  html.ha-unified footer#contact.ha-footer .footer-contact-card--email .footer-contact-card__value {
    white-space: nowrap !important;
    overflow-wrap: normal !important;
  }
}

html.ha-unified footer.ha-footer .footer-col--links,
html.ha-unified footer#contact.ha-footer .footer-col--links {
  overflow: visible !important;
}

/* —— Batch / contact tiles —— */
.batch-list-container {
  display: grid;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.contact-info-boxes {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)) !important;
  gap: clamp(16px, 3vw, 24px) !important;
}

/* Tablet: 2 columns for dense grids */
@media (min-width: 480px) and (max-width: 899px) {
  .page-gallery [data-gallery-grid],
  .page-gallery .gallery-grid {
    --ha-gallery-col: 220px;
  }

  .page-insights .article-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 899px) {
  .page-insights .featured-article {
    flex-direction: column !important;
  }

  .page-insights .featured-img,
  .page-insights .featured-content {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 auto !important;
  }
}

/* Phone: single column for article cards only */
@media (max-width: 559px) {
  .page-insights .article-grid {
    grid-template-columns: 1fr !important;
  }

  .page-gallery {
    --ha-gallery-col: min(100%, 280px);
  }
}

@media (max-width: 768px) {
  footer:not(.ha-footer) .footer-grid {
    grid-template-columns: 1fr !important;
  }

  /* Canonical ha-footer: layout owned by footer-premium.css (load last) */

  html.ha-unified .programs-grid,
  html.ha-unified .infra-grid,
  html.ha-unified .grid-3,
  html.ha-unified .programs-showcase-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (min-width: 900px) {
  .page-gallery {
    --ha-gallery-col: 240px;
  }
}

@media (min-width: 1200px) {
  .page-gallery {
    --ha-gallery-col: 272px;
  }
}

/* Stagger must not collapse gallery tiles */
html.ha-unified .gallery-grid.is-loading .ha-stagger-item,
html.ha-unified .gallery-grid .gallery-skeleton {
  opacity: 1 !important;
  transform: none !important;
}

html.ha-unified .gallery-grid button.gallery-card.ha-stagger-item:not(.ha-stagger-visible),
html.ha-unified .gallery-grid button.gallery-card:not(.ha-stagger-visible) {
  opacity: 1 !important;
  transform: none !important;
}

/* ==========================================================================
   Site-wide responsive grid completion (all public pages)
   Overrides unsafe minmax() and fixed multi-column layouts on mobile
   ========================================================================== */

html.ha-unified main,
html.ha-unified main.container,
html.ha-unified .content-card,
html.ha-unified .programs-page__card,
html.ha-unified section,
html.ha-unified article {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Shared grid classes — safe auto-fill baseline */
.curr-grid,
.check-list-grid,
.two-column,
.two-col-grid,
.outcomes-grid,
.fit-grid,
.takehome-grid,
.why-choose-grid,
.why-grid,
.about-grid,
.info-grid,
.forms-grid,
.enroll-notes-grid,
.training-gallery-grid,
.image-grid,
.hero-meta,
.batch-meta-grid,
.partner-acc-content ul {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  gap: clamp(16px, 3vw, 28px) !important;
}

.curr-grid,
.check-list-grid,
.outcomes-grid,
.fit-grid,
.takehome-grid,
.why-choose-grid,
.why-grid,
.info-grid,
.image-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)) !important;
}

.about-grid,
.forms-grid,
.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html.ha-unified .two-col-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.enroll-notes-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)) !important;
}

.training-gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)) !important;
}

.partner-acc-content ul {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)) !important;
}

/* Homepage / institutional grids */
html.ha-unified body.page-home .inst-features,
html.ha-unified body.page-home .stats-grid,
html.ha-unified body.page-home .themes-strip {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)) !important;
  gap: clamp(12px, 2vw, 20px) !important;
}

/* Program detail — batch / fee rows */
.batch-list-card,
.program-card-row,
.fee-row {
  min-width: 0;
  max-width: 100%;
}

/* Table wrappers — horizontal scroll only inside wrapper */
.table-responsive,
.program-compare-scroll,
.pf-compare-wrap,
.programs-compare-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Tablet: 2 columns for dense card grids */
@media (min-width: 480px) and (max-width: 899px) {
  .curr-grid,
  .check-list-grid,
  .outcomes-grid,
  .fit-grid,
  .takehome-grid,
  .why-choose-grid,
  .why-grid,
  .info-grid,
  .about-grid,
  .image-grid,
  .training-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Mobile: single column for all multi-column grids */
@media (max-width: 768px) {
  .curr-grid,
  .check-list-grid,
  .two-column,
  .two-col-grid,
  .outcomes-grid,
  .fit-grid,
  .takehome-grid,
  .why-choose-grid,
  .why-grid,
  .about-grid,
  .info-grid,
  .forms-grid,
  .enroll-notes-grid,
  .image-grid,
  .hero-meta,
  .batch-meta-grid,
  html.ha-unified body.page-home .inst-features,
  html.ha-unified body.page-home .stats-grid {
    grid-template-columns: 1fr !important;
  }

  .training-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  /* Inline 2-column form/layout grids (partner, program pages) */
  html.ha-unified main div[style*="grid-template-columns: 1fr 1fr"],
  html.ha-unified main div[style*="grid-template-columns:1fr 1fr"],
  html.ha-unified .content-card div[style*="grid-template-columns: 1fr 1fr"],
  html.ha-unified .content-card div[style*="grid-template-columns:1fr 1fr"],
  html.ha-unified main ul[style*="grid-template-columns: 1fr 1fr"],
  html.ha-unified main ul[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .training-gallery-grid,
  .page-gallery [data-gallery-grid],
  .page-gallery .gallery-grid {
    grid-template-columns: 1fr !important;
  }

  .partner-acc-content ul {
    grid-template-columns: 1fr !important;
  }
}

/* =============================================================================
   SITE-WIDE GRID MASTER — all pages, all breakpoints (load with site-grids.css)
   ============================================================================= */

html.ha-unified main,
html.ha-unified main.container,
html.ha-unified main#program-main,
html.ha-unified main#about-main,
html.ha-unified main#infra-main,
html.ha-unified main#hwt-main,
html.ha-unified main#ins-main,
html.ha-unified main#con-main {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

/* Prevent grid blowout from long words / tables */
html.ha-unified [class*="grid"] > *,
html.ha-unified [class*="-grid"] > *,
html.ha-unified [class*="-stats"] > *,
html.ha-unified [class*="-stat"]:not(.hero-stat),
html.ha-unified .content-card > *,
html.ha-unified .batch-cell,
html.ha-unified .power-stat,
html.ha-unified .program-showcase-card {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* —— Power stats strips (marketing pages) —— */
html.ha-unified .about-power-stats,
html.ha-unified .infra-power-stats,
html.ha-unified .hwt-power-stats,
html.ha-unified .ins-power-stats,
html.ha-unified .con-power-stats,
html.ha-unified .programs-power-stats,
html.ha-unified .power-stats-bar,
html.ha-unified .batch-info-strip {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: min(1000px, 100%) !important;
  margin-inline: auto !important;
  box-sizing: border-box !important;
  gap: clamp(10px, 2vw, 14px) !important;
}

html.ha-unified .about-power-stats,
html.ha-unified .infra-power-stats,
html.ha-unified .hwt-power-stats,
html.ha-unified .ins-power-stats,
html.ha-unified .programs-power-stats,
html.ha-unified .power-stats-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

html.ha-unified .con-power-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  max-width: min(520px, 100%) !important;
}

html.ha-unified .batch-info-strip {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)) !important;
}

/* —— Content / value / action grids —— */
html.ha-unified .ins-value-grid,
html.ha-unified .con-action-grid,
html.ha-unified .con-contact-grid,
html.ha-unified .con-visit-grid,
html.ha-unified .con-help-grid,
html.ha-unified .about-problem-band,
html.ha-unified .about-explore-grid,
html.ha-unified .about-card-grid,
html.ha-unified .infra-units-grid,
html.ha-unified .infra-gallery-grid,
html.ha-unified .ins-path-steps,
html.ha-unified .ins-action-grid,
html.ha-unified .power-daily-grid,
html.ha-unified .batch-gallery,
html.ha-unified .refund-grid,
html.ha-unified .values-grid,
html.ha-unified .facility-grid,
html.ha-unified .partner-grid,
html.ha-unified .framework-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  gap: clamp(14px, 2.5vw, 22px) !important;
}

html.ha-unified .ins-value-grid,
html.ha-unified .about-explore-grid,
html.ha-unified .infra-units-grid,
html.ha-unified .infra-gallery-grid,
html.ha-unified .ins-action-grid,
html.ha-unified .power-daily-grid,
html.ha-unified .batch-gallery,
html.ha-unified .facility-grid,
html.ha-unified .values-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)) !important;
}

html.ha-unified .con-action-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

html.ha-unified .con-contact-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

html.ha-unified .con-visit-grid,
html.ha-unified .con-help-grid,
html.ha-unified .about-problem-band,
html.ha-unified .refund-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

html.ha-unified .ins-path-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

/* methodology-flow: layout owned by home-page.css (steps + arrows alternate in DOM) */

/* —— Program detail composites —— */
html.ha-unified .fee-promo-box,
html.ha-unified .trainer-card,
html.ha-unified .pf-layout {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  gap: clamp(16px, 3vw, 28px) !important;
}

html.ha-unified .fee-promo-box {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) !important;
}

html.ha-unified .trainer-card {
  grid-template-columns: auto minmax(0, 1fr) !important;
  align-items: start !important;
}

html.ha-unified .pf-layout {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px) !important;
  align-items: start !important;
}

/* —— Tablet: 2 columns for dense grids —— */
@media (max-width: 991px) {
  html.ha-unified .pf-layout {
    grid-template-columns: 1fr !important;
  }

  html.ha-unified .con-action-grid,
  html.ha-unified .con-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html.ha-unified .ins-path-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* —— Mobile: stack multi-column layouts —— */
@media (max-width: 768px) {
  html.ha-unified .about-power-stats,
  html.ha-unified .infra-power-stats,
  html.ha-unified .hwt-power-stats,
  html.ha-unified .ins-power-stats,
  html.ha-unified .programs-power-stats,
  html.ha-unified .power-stats-bar,
  html.ha-unified .batch-info-strip,
  html.ha-unified .con-power-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  html.ha-unified body.page-home #about .two-col-grid,
  html.ha-unified .fee-promo-box,
  html.ha-unified .trainer-card,
  html.ha-unified .fit-grid,
  html.ha-unified .con-visit-grid,
  html.ha-unified .con-help-grid,
  html.ha-unified .about-problem-band,
  html.ha-unified .ins-path-steps,
  html.ha-unified .ins-value-grid,
  html.ha-unified .infra-units-grid,
  html.ha-unified .power-daily-grid {
    grid-template-columns: 1fr !important;
  }

  html.ha-unified .con-action-grid,
  html.ha-unified .con-contact-grid {
    grid-template-columns: 1fr 1fr !important;
  }

  html.ha-unified .batch-gallery,
  html.ha-unified .ins-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html.ha-unified body.page-home #programs.programs-showcase .programs-showcase-grid,
  html.ha-unified body.page-home #programs.programs-showcase .grid-3 {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  html.ha-unified .about-power-stats,
  html.ha-unified .infra-power-stats,
  html.ha-unified .hwt-power-stats,
  html.ha-unified .ins-power-stats,
  html.ha-unified .programs-power-stats,
  html.ha-unified .power-stats-bar,
  html.ha-unified .batch-info-strip,
  html.ha-unified .con-power-stats,
  html.ha-unified .con-action-grid,
  html.ha-unified .con-contact-grid,
  html.ha-unified .batch-gallery,
  html.ha-unified .ins-action-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =============================================================================
   GRID COMPLETION — page-specific layouts, utilities, conflict fixes
   ============================================================================= */

/* Shared form / list row utilities */
html.ha-unified .ha-form-row-2,
html.ha-unified .partner-eligible-grid,
html.ha-unified .ha-grid-2-col-list {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

html.ha-unified .ha-form-row-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 15px !important;
}

html.ha-unified .partner-eligible-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)) !important;
  gap: 15px !important;
  margin-bottom: 30px !important;
}

html.ha-unified .ha-grid-2-col-list {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px 30px !important;
}

/* How to Enroll — three equal note cards on desktop */
html.ha-unified body.page-how-to-enroll .enroll-notes-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(20px, 3vw, 30px) !important;
}

/* Homepage — asymmetric about section + three program cards */
html.ha-unified body.page-home #about .two-col-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr) !important;
  gap: clamp(40px, 6vw, 80px) !important;
  align-items: center !important;
}

@media (min-width: 900px) {
  html.ha-unified body.page-home #programs.programs-showcase .programs-showcase-grid.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: clamp(24px, 3vw, 40px) !important;
  }
}

/* About page */
html.ha-unified .about-focus-grid,
html.ha-unified .about-mv-grid,
html.ha-unified .about-diff-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

html.ha-unified .about-focus-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

html.ha-unified .about-mv-grid,
html.ha-unified .about-diff-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
}

/* How We Train outcomes */
html.ha-unified .hwt-outcomes-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

/* Infrastructure why cards */
html.ha-unified .infra-why-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

/* Insights topic explorer */
html.ha-unified .ins-topic-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)) !important;
  gap: 12px !important;
}

/* Legal policy summary strip */
html.ha-unified .policy-summary {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 18px !important;
}

/* Programs spotlight cards */
html.ha-unified .programs-flagship-spotlight {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 280px) !important;
  box-sizing: border-box !important;
}

html.ha-unified .programs-batch-strip {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  box-sizing: border-box !important;
}

html.ha-unified .programs-flagship-highlights {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px 16px !important;
}

/* Tablet: two columns for dense page grids */
@media (max-width: 991px) {
  html.ha-unified body.page-how-to-enroll .enroll-notes-grid {
    grid-template-columns: 1fr !important;
  }

  html.ha-unified .about-focus-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html.ha-unified .infra-why-grid,
  html.ha-unified .policy-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html.ha-unified .programs-flagship-spotlight {
    grid-template-columns: 1fr !important;
  }

  html.ha-unified .programs-batch-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html.ha-unified .programs-batch-cell:nth-child(2n) {
    border-right: none;
  }

  html.ha-unified body.page-programs .programs-batch-cell:nth-child(5) {
    grid-column: 1 / -1;
    border-right: none;
  }
}

/* Mobile: stack remaining multi-column grids */
@media (max-width: 768px) {
  html.ha-unified .ha-form-row-2,
  html.ha-unified .ha-grid-2-col-list,
  html.ha-unified .about-focus-grid,
  html.ha-unified .about-mv-grid,
  html.ha-unified .about-diff-grid,
  html.ha-unified .hwt-outcomes-grid,
  html.ha-unified .infra-why-grid,
  html.ha-unified .policy-summary,
  html.ha-unified .programs-flagship-highlights {
    grid-template-columns: 1fr !important;
  }

  html.ha-unified body.page-home #about .two-col-grid {
    grid-template-columns: 1fr !important;
    gap: clamp(32px, 5vw, 50px) !important;
  }
}

@media (max-width: 640px) {
  html.ha-unified .programs-batch-strip {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  html.ha-unified .about-focus-grid,
  html.ha-unified .infra-why-grid,
  html.ha-unified .policy-summary {
    grid-template-columns: 1fr !important;
  }
}

/* =============================================================================
   GRID MASTER v3 — complete website (all pages, all breakpoints)
   ============================================================================= */

/* Program pages — stacked list grids (replace inline display:grid) */
html.ha-unified .ha-grid-stack,
html.ha-unified main ul[style*="display: grid"]:not(.ha-grid-2-col-list) {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-template-columns: 1fr !important;
  gap: clamp(10px, 2vw, 14px) !important;
  box-sizing: border-box !important;
}

/* Homepage — institutional training band */
html.ha-unified body.page-home .inst-section-container {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: clamp(28px, 5vw, 50px) !important;
  align-items: center !important;
  box-sizing: border-box !important;
}

html.ha-unified body.page-home .inst-image-collage {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) !important;
  grid-template-rows: repeat(2, minmax(0, 1fr)) !important;
  gap: clamp(10px, 2vw, 15px) !important;
  min-height: clamp(260px, 42vw, 500px) !important;
  box-sizing: border-box !important;
}

html.ha-unified body.page-home .inst-features {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

html.ha-unified body.page-home .stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

html.ha-unified body.page-home .themes-strip {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)) !important;
}

/* Partner page — forms & benefits */
html.ha-unified .forms-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: clamp(24px, 4vw, 40px) !important;
  align-items: start !important;
}

html.ha-unified .partner-benefits-grid,
html.ha-unified .partner-framework-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)) !important;
  gap: clamp(14px, 2.5vw, 20px) !important;
}

/* Calendar & company details */
html.ha-unified .calendar-legend,
html.ha-unified .company-details-grid {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)) !important;
  gap: clamp(10px, 2vw, 16px) !important;
}

/* Contact aliases */
html.ha-unified .contact-info-boxes {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: clamp(14px, 2.5vw, 22px) !important;
}

/* All marketing / program hero stat strips */
html.ha-unified .programs-hero-stats,
html.ha-unified .program-power-stats {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: min(1000px, 100%) !important;
  margin-inline: auto !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: clamp(10px, 2vw, 14px) !important;
  box-sizing: border-box !important;
}

/* Tablet — 2 columns for medium-density grids */
@media (min-width: 600px) and (max-width: 991px) {
  html.ha-unified body.page-home .inst-section-container {
    grid-template-columns: 1fr !important;
  }

  html.ha-unified body.page-home .inst-features {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html.ha-unified body.page-home .stats-grid,
  html.ha-unified .programs-hero-stats,
  html.ha-unified .program-power-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html.ha-unified .forms-grid {
    grid-template-columns: 1fr !important;
  }

  html.ha-unified .contact-info-boxes,
  html.ha-unified .con-contact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html.ha-unified body.page-home #programs.programs-showcase .programs-showcase-grid.grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html.ha-unified .infra-grid,
  html.ha-unified body.page-home .infra-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Mobile — stack everything multi-column */
@media (max-width: 768px) {
  html.ha-unified body.page-home .inst-section-container,
  html.ha-unified body.page-home .inst-image-collage {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
    min-height: 0 !important;
  }

  html.ha-unified body.page-home .inst-features,
  html.ha-unified body.page-home .themes-strip {
    grid-template-columns: 1fr !important;
  }

  html.ha-unified .forms-grid,
  html.ha-unified .partner-benefits-grid,
  html.ha-unified .partner-framework-grid,
  html.ha-unified .calendar-legend,
  html.ha-unified .company-details-grid,
  html.ha-unified .contact-info-boxes {
    grid-template-columns: 1fr !important;
  }

  html.ha-unified .programs-hero-stats,
  html.ha-unified .program-power-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  html.ha-unified .ha-grid-2-col-list {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  html.ha-unified .programs-hero-stats,
  html.ha-unified .program-power-stats,
  html.ha-unified body.page-home .stats-grid {
    grid-template-columns: 1fr !important;
  }
}
