/* theopenpress — spacing/padding polish (loaded after style.css + dynamic.css) */

/* border-box everywhere so width:100% + padding never overflows the viewport */
*, *::before, *::after{ box-sizing:border-box; }
html, body{ max-width:100%; overflow-x:hidden; }

/* ---- Global content margins — never touch the screen edges --------------- */
.wrap{ box-sizing:border-box; }
@media (max-width:1240px){
  .wrap{ padding-left:20px; padding-right:20px; }
}
@media (max-width:520px){
  .wrap{ padding-left:16px; padding-right:16px; }
}
/* leaderboard / in-content ads breathe on small screens too */
.tp-ad{ padding-left:20px; padding-right:20px; box-sizing:border-box; }


/* ---- Footer ------------------------------------------------------------- */
/* keep content off the screen edges at every width */
.site-footer .wrap{
  box-sizing:border-box;
  padding-left:24px;
  padding-right:24px;
}
.site-footer .footer-top{
  display:grid;
  grid-template-columns:1.8fr 1fr 1fr;
  gap:40px;
  padding:46px 24px 30px;
}
.site-footer .footer-bottom .wrap{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
}
.site-footer .footer-col h4{
  margin:0 0 16px;
  font-size:16px;
  letter-spacing:.3px;
}
.site-footer .footer-col ul{
  list-style:none;
  margin:0;
  padding:0;
}
.site-footer .footer-col ul li{
  margin-bottom:11px;
  line-height:1.55;
}
.site-footer .footer-col ul li:last-child{ margin-bottom:0; }
.site-footer .footer-col ul li a{ display:inline-block; }
.site-footer .footer-brand p{
  margin:12px 0 0;
  line-height:1.75;
  max-width:340px;
}
.site-footer .footer-brand img{ margin-bottom:4px; }
.site-footer .foot-follow{ margin-top:20px !important; }
.site-footer .footer-bottom .wrap{
  padding-top:16px;
  padding-bottom:16px;
}
.site-footer .fb-links a{ margin-left:16px; }

/* ---- Footer responsive -------------------------------------------------- */
/* keep 3 columns down to mobile */
@media (max-width:900px){
  .site-footer .footer-top{ grid-template-columns:1.3fr 1fr 1fr; gap:20px; padding:32px 18px 22px; }
  .site-footer .footer-brand{ grid-column:auto; }
  .site-footer .footer-brand p{ max-width:none; }
}
@media (max-width:520px){
  .site-footer .footer-top{ grid-template-columns:1fr 1fr 1fr; gap:12px; padding:24px 12px 16px; }
  .site-footer .footer-col h4{ font-size:12.5px; letter-spacing:0; margin-bottom:9px; }
  .site-footer .footer-col ul li{ margin-bottom:8px; }
  .site-footer .footer-col ul li a{ font-size:12.5px; }
  .site-footer .footer-brand p{ display:none; }              /* long text hidden on phones */
  .site-footer .footer-brand img{ height:auto; max-width:160px; }
  .site-footer .foot-follow{ margin-top:12px !important; }
  .site-footer .foot-strip-label{ display:block; margin-bottom:6px; font-size:11.5px; }
  .site-footer .dyn-follow{ display:flex; flex-wrap:wrap; gap:6px; }
  .site-footer .footer-bottom .wrap{ flex-direction:column; text-align:center; }
}

/* ---- Home section rhythm ------------------------------------------------ */
.home-n18 .section,
.home-n18 .rail-sec,
.home-n18 .showbiz{ margin-bottom:34px; }
.tp-ad{ margin:22px 0; }
.ad-box-row{ display:flex; gap:20px; flex-wrap:wrap; margin:22px 0; }
.ad-box-row .ad-box{ flex:1 1 240px; text-align:center; }

/* =========================================================================
   MOBILE RESPONSIVE — stack every multi-column section, kill h-overflow
   ========================================================================= */
@media (max-width:820px){
  html, body{ max-width:100%; overflow-x:hidden; }
  img{ max-width:100%; height:auto; }

  /* top category nav scrolls inside itself instead of overflowing the page */
  .tp-nav .wrap{ overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .tp-menu{ flex-wrap:nowrap; }
  .tp-menu li{ flex:0 0 auto; }
  .tp-trend-links{ overflow:hidden; }

  /* every section grid -> single column */
  .fsec-body,
  .wsec-grid,
  .viral-grid,
  .showbiz-grid,
  .hsec-feat,
  .tvx-grid,
  .vb-grid,
  .dyn-layout{
    display:block !important;
  }
  .fsec-body > *,
  .wsec-grid > *,
  .viral-grid > *,
  .showbiz-grid > *,
  .tvx-grid > *,
  .vb-grid > *,
  .dyn-layout > *{
    width:100% !important;
    margin-bottom:18px;
  }
  .hsec-feat{ display:block !important; }
  .hsec-feat .imgwrap{ margin-bottom:12px; }

  /* ranked / list blocks stack */
  .mr-pro{ grid-template-columns:1fr !important; }
  .ws-list, .vcol-list, .ie-oped-list, .tvx-side, .vside, .sb-side{ display:block !important; }

  /* mini card clusters -> 2 up */
  .sb-mini{ display:grid !important; grid-template-columns:1fr 1fr !important; gap:14px; }

  /* horizontal rails keep scrolling (deals, stories) */
  .rail, .vs-rail, .tvx-side{ }

  /* headings + article body sizing */
  .dyn-article h1{ font-size:24px; line-height:1.3; }
  .n18-head h2{ font-size:20px; }
}

@media (max-width:480px){
  .sb-mini{ grid-template-columns:1fr !important; }
  .ws-row .imgwrap, .vrow .imgwrap{ max-width:110px; }
  .dyn-article h1{ font-size:21px; }
}

/* =========================================================================
   FIX GRID/FLEX H-OVERFLOW — items must be allowed to shrink below content
   ========================================================================= */
.fsec-body, .wsec-grid, .viral-grid, .showbiz-grid, .tvx-grid, .vb-grid,
.sb-mini, .mr-pro, .dyn-layout, .hsec-feat, .fsec-list, .ws-list, .vcol-list,
.ie-oped-list, .tvx-side, .vside, .sb-side{ min-width:0; }

.fsec-body > *, .wsec-grid > *, .viral-grid > *, .showbiz-grid > *,
.tvx-grid > *, .vb-grid > *, .sb-mini > *, .mr-pro > *, .dyn-layout > *,
.hsec-feat > *, .ws-list > *, .vcol-list > *, .ie-oped-list > *,
.tvx-side > *, .vside > *, .dyn-card, .sb-feat, .ws-feat, .ws-row, .vrow,
.mr-item, article{ min-width:0; }

/* long titles/words wrap instead of overflowing */
.n18-head h2, .dyn-card h3, .sb-feat h3, .sb-feat h4, .ws-feat h3,
.ws-row h4, .vrow h4, .mr-title, .dyn-article h1, .dek, .ws-dek, .vdek,
.op-dek, .mr-dek{ overflow-wrap:anywhere; word-break:break-word; }

/* images always fit their box */
.imgwrap img, .dyn-card img, .sb-mini img, .ws-feat img, .mr-thumb img,
.hsec-feat img, .tv-thumb img, .vbig img, .vsm img{ width:100%; height:auto; max-width:100%; }

/* =========================================================================
   PREMIUM POLISH PASS — tighter type rhythm, richer headline scale,
   refined buttons/badges, consistent easing + keyboard focus states.
   Additive only: no existing selector is removed, so nothing upstream breaks.
   ========================================================================= */

/* -- Fluid, higher-impact scale on the biggest headlines (hero / article / category) -- */
.cat-hero h1{ font-size:clamp(26px,4vw,38px); letter-spacing:var(--tracking-tight); }
.dyn-head h1, .dyn-head h2{ font-size:clamp(20px,2.4vw,24px); letter-spacing:var(--tracking-tight); }
.hero-main h2, .dyn-hero .lead h2, .dyn-article h1, .article h1{ text-wrap:balance; }
.author-card-id h1, .team-head, .author-label, .author-articles-head{ letter-spacing:var(--tracking-tight); }

/* -- Editorial body text: balanced headline wrapping + gentler paragraph breaks -- */
.article-body p, .dyn-article-body p, .page-body p{ text-wrap:pretty; }

/* -- Section titles: gradient accent bar + a touch more tracking on the eyebrow pill -- */
.sec-title::before{ background:linear-gradient(180deg, var(--brand), var(--brand-dark)); }
.sec-title small{ letter-spacing:var(--tracking-wide); }
.dyn-widget > h3{ letter-spacing:var(--tracking-wide); }

/* -- Tags / category badges: crisper tracking + a hint of depth -- */
.tag, .dyn-tag, .art-tag{ letter-spacing:var(--tracking-wide); box-shadow:0 1px 3px rgba(16,24,40,.12); }
.art-tag{ box-shadow:none; } /* pill outline style stays flat by design */

/* -- Buttons / CTAs: one consistent premium easing curve + subtle lift -- */
.btn-live, .btn-team-all, .comment-form button, .newsletter button, .dyn-pager .cur, .drawer-cta a{
  transition:background-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
.btn-live:hover, .btn-team-all:hover{ transform:translateY(-1.5px); }
.comment-form button:hover, .newsletter button:hover{ transform:translateY(-1px); box-shadow:var(--sh-2); }

/* -- Cards: use the same easing token so hover motion feels uniform site-wide -- */
.card, .dyn-card{ transition:box-shadow .22s var(--ease), transform .22s var(--ease); }
.team-card{ transition:transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s var(--ease); }

/* -- Widget headers: same gradient accent as sec-title, for visual unity -- */
.widget-head h3::before{ background:linear-gradient(180deg, var(--brand), var(--brand-dark)); }
.dyn-widget > h3{ border-bottom-color:var(--brand); }

@media (prefers-reduced-motion: reduce){
  .btn-live:hover, .btn-team-all:hover, .comment-form button:hover, .newsletter button:hover{ transform:none; }
}

/* -- Inline "LIVE" tag for videos flagged is_live (Phase 409 live-streaming gap) -- */
.live-tag{
  display:inline-flex; align-items:center; gap:4px; margin-left:6px;
  background:#d11a2a; color:#fff; font-size:.65rem; font-weight:700;
  letter-spacing:.04em; padding:1px 7px; border-radius:4px; vertical-align:middle;
}
.live-tag::before{ content:""; width:6px; height:6px; border-radius:50%; background:#fff; }
