/* responsive.css — Mobile-first responsive overrides */

/* ─── Tablet (≤ 1024px) ─────────────────────────────── */
@media (max-width: 1024px) {
  .homepage-grid {
    grid-template-columns: 1fr 1px 1fr;
  }

  /* Hide the third column on tablet */
  .homepage-grid .sidebar-col,
  .homepage-grid .col-divider:last-of-type {
    display: none;
  }

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

  .posts-grid .post-card:nth-child(4n) { border-right: 1px solid var(--rule); }
  .posts-grid .post-card:nth-child(3n) { border-right: none; }

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

  h1 { font-size: var(--text-4xl); }
}

/* ─── Mobile (≤ 768px) ──────────────────────────────── */
@media (max-width: 768px) {
  .homepage-grid {
    grid-template-columns: 1fr;
    border-top: none;
  }

  .col-divider { display: none; }

  .hero-col, .middle-col, .sidebar-col {
    padding: 0;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .sidebar-col { display: none; }

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

  .posts-grid .post-card:nth-child(3n) { border-right: 1px solid var(--rule); }
  .posts-grid .post-card:nth-child(2n) { border-right: none; }


  .masthead-meta { display: none; }

  .masthead-title { font-size: clamp(1.8rem, 8vw, 3rem); }

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

  .subscribe-form {
    flex-direction: column;
  }

  .subscribe-form input,
  .subscribe-form button {
    width: 100%;
    text-align: center;
  }

  h1 { font-size: var(--text-3xl); }
  h2 { font-size: var(--text-2xl); }
  h3 { font-size: var(--text-xl); }

  .drop-cap::first-letter { font-size: 3rem; }

  .pull-quote { font-size: var(--text-xl); }

  .ticker-label { display: none; }

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

  #related-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Small Mobile (≤ 480px) ───────────────────────── */
@media (max-width: 480px) {
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .posts-grid .post-card { border-right: none; }

  .page-wrapper { padding: 0 1rem; }

  .mid-story {
    flex-direction: column;
  }

  .mid-story-img {
    width: 100%;
    height: 160px;
  }
}


/* ─── Print styles ───────────────────────────────────── */
@media print {
  .masthead, .primary-nav, .ticker-bar,
  .subscribe-section, .site-footer,
  .share-bar, .push-banner,
  .sidebar-col, #reading-progress { display: none !important; }

  body { background: white; color: black; }

  .article-body { font-size: 12pt; line-height: 1.6; }
  h1 { font-size: 24pt; }
  h2 { font-size: 18pt; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; color: gray; }
}

