/* Shared mobile / overflow fixes for main site + HIT modules */

b,
strong {
  font-family: inherit;
  font-size: inherit;
  font-weight: 700;
  line-height: inherit;
  letter-spacing: inherit;
}

/* Article / listing full-width when sidebars are absent or collapsed */
.page.page-with-sidebars:not(:has(> .page-side-column)) {
  grid-template-columns: minmax(0, 1fr) !important;
}

.page-with-sidebars .article-page,
.page-with-sidebars .article-full,
.page-with-sidebars .news-listing-page {
  width: 100%;
  max-width: 100%;
}

@media (max-width: 780px) {
  .page.page-with-sidebars {
    padding-left: 0;
    padding-right: 0;
    gap: 0;
  }

  .page-with-sidebars .article-full {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }

  .page-with-sidebars .article-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-with-sidebars .news-page-head,
  .page-with-sidebars .news-listing-card {
    margin-left: 12px;
    margin-right: 12px;
  }

  .page-with-sidebars .news-listing-card {
    width: auto;
  }
}

/* Homepage hero carousel — match site homepage fonts */
.hero-carousel,
.hero-carousel .hero-in,
.hero-carousel p,
.hero-carousel .badge,
.hero-carousel .meta,
.hero-carousel .react,
.hero-carousel .react a,
.hero-carousel .engage-btn,
.hero-carousel h1,
.hero-carousel h1 a {
  font-family: var(--font-ui) !important;
}

.hero-carousel h1,
.hero-carousel h1 a {
  font-weight: 700 !important;
  font-size: clamp(15px, 1.7vw, 18px) !important;
}

.hero-carousel .hero-summary {
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.45 !important;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 62ch;
}

html {
  overflow-x: clip;
}

img,
video,
svg {
  max-width: 100%;
}

/* ---- Main site refinements ---- */
@media (max-width: 780px) {
  .header-inner {
    grid-template-columns: 1fr;
  }

  .logo {
    min-width: 0;
  }

  .brand {
    white-space: normal;
  }

  .search-row {
    width: 100%;
  }

  .nav-inner {
    overscroll-behavior-x: contain;
  }

  .quick-inner {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    grid-template-columns: none;
  }

  .quick-inner::-webkit-scrollbar {
    display: none;
  }

  .quick {
    min-width: 148px;
    flex: 0 0 auto;
  }

  .grid-top > .card,
  .grid-top > .tripzant-widget,
  .grid-second > .card,
  .grid > .card {
    min-height: 0;
  }

  .tripzant-widget {
    min-height: 0 !important;
  }

  .article-hero {
    height: min(280px, 52vw);
  }

  .world-news-card-image {
    height: 180px;
  }

  .page-with-sidebars {
    gap: 16px;
  }

  .footer-ask-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 10px 12px;
  }

  .search input {
    font-size: 16px; /* avoid iOS zoom */
  }

  .ai-chat-form input {
    font-size: 16px;
  }

  .article-content {
    padding: 14px 12px 18px;
  }

  .article-title {
    font-size: clamp(20px, 6.2vw, 28px);
  }

  .breaking div {
    font-size: 12px;
  }

  .location-menu,
  .language-menu {
    left: 0;
    right: 0;
    min-width: 0;
    width: 100%;
  }
}

/* ---- HIT: kill horizontal bleed / tighten stacks ---- */
body.hit-tv-page,
body.hit-fm-page,
body.hit-market-page,
body.hit-jobs-page,
body.hit-sports-page,
body.hit-events-page,
body.hit-civic-page,
body.hit-faith-page,
body.hit-diaspora-page,
body.hit-matrimonial-page,
body.hit-cartoons-page,
body.hit-horoscope-page,
body.ai-horoscope-page {
  overflow-x: clip;
}

.hit-cartoons-page .header,
.hit-cartoons-page .nav {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: clamp(16px, 4vw, 42px) !important;
  padding-right: clamp(16px, 4vw, 42px) !important;
  box-sizing: border-box;
}

.hit-cartoons-page .nav {
  justify-content: flex-start !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.hit-cartoons-page .nav a {
  flex-shrink: 0;
  white-space: nowrap;
}

.hit-market-page .page-shell-white {
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.hit-faith-page .nav,
.hit-diaspora-page .nav {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  justify-content: flex-start;
  scrollbar-width: none;
}

.hit-faith-page .nav::-webkit-scrollbar,
.hit-diaspora-page .nav::-webkit-scrollbar {
  display: none;
}

.hit-faith-page .nav a,
.hit-diaspora-page .nav a {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .hit-market-page .category-grid-wrap {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .hit-market-page .category-grid.category-grid-single-row {
    width: max-content;
    min-width: min(960px, max-content);
  }

  .hit-market-page .page-shell-inner {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 980px) {
  .hit-events-page .header-search {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 780px) {
  .hit-market-page .page-shell-inner {
    padding-left: 14px;
    padding-right: 14px;
  }

  .hit-tv-page .top,
  .hit-fm-page .top,
  .hit-tv-page .hero,
  .hit-fm-page .hero,
  .hit-jobs-page .hero,
  .hit-sports-page .hero,
  .hit-faith-page .hero,
  .hit-diaspora-page .hero,
  .hit-civic-page .hero,
  .hit-matrimonial-page .hero,
  .hit-events-page .hero,
  .hit-cartoons-page .hero {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .hit-jobs-page .search,
  .hit-jobs-page .pipeline-actions,
  .hit-civic-page .header-search,
  .hit-sports-page .header-search,
  .hit-matrimonial-page .head-search,
  .hit-faith-page .hero-search,
  .hit-diaspora-page .hero-search,
  .hit-tv-page .hero-search,
  .hit-fm-page .hero-search,
  .ai-horoscope-page .hero-form,
  .ai-horoscope-page .hero-search {
    grid-template-columns: 1fr !important;
  }

  .hit-sports-page .matches,
  .hit-sports-page .sports-browse-grid,
  .hit-matrimonial-page .profiles-section,
  .hit-matrimonial-page .profiles {
    grid-template-columns: 1fr !important;
  }

  .hit-matrimonial-page .grid12 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .hit-market-page .hero-orbit,
  .hit-market-page .hero-circle-fill,
  .hit-market-page .hero-photo {
    width: min(100%, 320px) !important;
    max-width: 100% !important;
    margin-inline: auto;
  }

  .hit-tv-page .hero h1,
  .hit-fm-page .hero h1,
  .hit-jobs-page .hero h1,
  .hit-sports-page .hero h1,
  .hit-faith-page .hero h1,
  .hit-diaspora-page .hero h1,
  .hit-civic-page .hero h1,
  .hit-matrimonial-page .hero h1,
  .hit-events-page .hero h1,
  .hit-cartoons-page .hero h1,
  .hit-market-page .hero h1 {
    font-size: clamp(28px, 8vw, 42px) !important;
    letter-spacing: -1px;
    max-width: 100%;
  }

  .hit-tv-page .hero p,
  .hit-fm-page .hero p,
  .hit-jobs-page .hero p,
  .hit-sports-page .hero p,
  .hit-faith-page .hero p,
  .hit-diaspora-page .hero p,
  .hit-civic-page .hero p,
  .hit-matrimonial-page .hero p,
  .hit-events-page .hero p,
  .hit-cartoons-page .hero p,
  .hit-market-page .hero p {
    font-size: 16px !important;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hit-matrimonial-page .mm-chat-bubble {
    max-width: 92%;
  }

  .hit-matrimonial-page .grid12 {
    grid-template-columns: 1fr !important;
  }

  .hit-market-page .service-row,
  .hit-market-page .provider-row,
  .hit-market-page .category-grid {
    grid-template-columns: 1fr !important;
  }

  .hit-market-page .category-grid.category-grid-single-row {
    grid-template-columns: repeat(8, minmax(120px, 1fr));
  }
}

/* ---- UX polish: sticky nav, touch targets, reading ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
}

.quick:hover,
.quick:focus-visible {
  border-color: #93c5fd;
  background: #f8fbff;
}

.article-title {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.world-news-card-body h3 {
  line-height: 1.35;
}

.world-news-card-body p {
  color: #475569;
}

img[loading="lazy"] {
  content-visibility: auto;
}

@media (max-width: 780px) {
  .nav a {
    min-height: 42px;
    padding: 0 12px;
    font-size: 11px;
  }

  .header-inner {
    padding: 10px 12px;
    gap: 10px;
  }

  .quick {
    min-width: 148px;
    padding: 10px;
  }

  .search {
    max-width: none;
    height: 40px;
  }

  .search input {
    font-size: 16px;
  }

  .ai-chat-trigger,
  .pill,
  .location-btn,
  .language-btn,
  .btn {
    height: 40px;
  }

  .article-body p {
    font-size: 16px;
    line-height: 1.5;
  }

  .story-link h4,
  .media-story-body h4 {
    font-size: 14px;
    line-height: 1.4;
  }

  .news-page-head h1 {
    font-size: clamp(24px, 7vw, 30px);
  }
}
