/* ==========================================================================
   SCP HUB - Enterprise Responsive Architecture
   ========================================================================== */

/* Prevent horizontal overflow across all viewports */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

/* Responsive Grid Utility Classes */
.grid-2-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
}

.grid-2-col-center {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 1280px) {
  .container { max-width: 1180px; }
  .container-wide { max-width: 100%; padding: 0 1.5rem; }
  .mega-menu { width: 680px; }
}

@media (max-width: 1024px) {
  .container { max-width: 960px; }
  .container-wide { max-width: 100%; padding: 0 1.25rem; }
  
  .hero-enterprise-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .grid-2-col, .grid-2-col-center {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .trust-band-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-grid-2, .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-hero-split {
    padding: 4rem 0 3.5rem 0;
    text-align: center;
  }

  .hero-text-col {
    text-align: center;
    align-items: center;
  }

  .hero-text-col .badge {
    align-self: center;
  }

  .hero-text-col h1, .hero-text-col p {
    text-align: center;
  }

  .hero-text-col .hero-btn-group {
    justify-content: center;
  }

  .transformation-grid {
    grid-template-columns: 1fr;
  }

  .process-roadmap-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .process-roadmap-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .process-step-card {
    padding: 1.75rem 1.35rem;
  }

  .process-step-title {
    min-height: auto;
  }
  /* TOP PROMO ANNOUNCEMENT BAR MOBILE FIX */
  .top-promo-bar {
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.8rem;
    line-height: 1.35;
    text-align: center;
  }

  .top-promo-link {
    font-size: 0.75rem;
    padding: 0.2rem 0.75rem;
  }

  .nav-menu, .header-cta { display: none; }
  .hamburger { display: flex; }

  .section { padding: 3rem 0; }
  .page-hero { padding: 2.5rem 0; }

  /* HERO BANNER MOBILE TYPOGRAPHY & LAYOUT FIX */
  .hero-enterprise {
    min-height: auto;
    padding: 2rem 0 2.5rem 0;
  }

  .hero-title-main {
    font-size: 1.85rem;
    line-height: 1.25;
    margin-bottom: 0.85rem;
    letter-spacing: -0.02em;
  }

  .hero-badge-pill {
    font-size: 0.72rem;
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.85rem;
    max-width: 100%;
    line-height: 1.3;
  }

  .hero-sub-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
  }

  .hero-quick-stats {
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
  }

  .quick-stat-val {
    font-size: 1.2rem;
  }

  .quick-stat-lbl {
    font-size: 0.75rem;
  }

  .trust-band-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-grid-2, .card-grid-3, .card-grid-4 {
    grid-template-columns: 1fr;
  }

  .grid-2-col, .grid-2-col-center {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* REDUCE CARD PADDING ON MOBILE TO PREVENT SQUISHED TEXT */
  [style*="padding: 2.5rem"], [style*="padding: 3rem"], [style*="padding: 3.5rem"], [style*="padding: 3.5rem 2.5rem"] {
    padding: 1.5rem 1.25rem !important;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .btn { width: 100%; }
  .trust-band-grid { grid-template-columns: 1fr; }

  .hero-title-main {
    font-size: 1.65rem;
  }

  .hero-dashboard-card img {
    height: 220px;
  }
}

/* BLOG FEATURED ARTICLE CARD RESPONSIVE (MOBILE-FIRST) */
.featured-article-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  min-width: 0;
}

.featured-img-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  min-height: 240px;
  overflow: hidden;
}

.featured-content-wrap {
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
}

.featured-article-title {
  font-size: clamp(1.25rem, 3vw, 1.85rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 0.85rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

@media (min-width: 901px) {
  .featured-article-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    flex-direction: unset;
  }
  .featured-img-wrap {
    height: 100%;
    min-height: 380px;
  }
  .featured-content-wrap {
    padding: 2.75rem;
  }
  .featured-article-title {
    font-size: 1.85rem;
  }
}

@media (max-width: 480px) {
  .featured-content-wrap {
    padding: 1.25rem 0.85rem !important;
  }
  .featured-img-wrap {
    height: 200px !important;
    min-height: 200px !important;
  }
}

/* BLOG SINGLE ARTICLE CARD & TYPOGRAPHY RESPONSIVE */
.article-single-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3.5rem;
  align-items: start;
}

.article-main-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  box-shadow: var(--shadow-sm);
}

.article-title-h1 {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

@media (max-width: 1024px) {
  .article-single-grid {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }
  .article-main-card {
    padding: 2rem 1.5rem !important;
  }
  .article-title-h1 {
    font-size: 2.1rem !important;
  }
}

@media (max-width: 640px) {
  .article-main-card {
    padding: 1.25rem 1rem !important;
    border-radius: 12px !important;
  }
  .article-title-h1 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
}

/* UNIVERSAL GRID & FLEX OVERFLOW PREVENTER */
.article-single-grid,
.article-single-grid > *,
.featured-article-card,
.featured-article-card > *,
.article-main-card,
.article-main-card > * {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

h1, h2, h3, h4, h5, h6, p, span, a, div {
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
}
