/* ============================================
   THE GRIND GUIDE — Responsive Styles
   ============================================ */

/* ── Tablet (640px - 1024px) ── */
@media (max-width: 1024px) {
  :root {
    --nav-height: 64px;
  }

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

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

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

  .featured-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }

  .post-list-item__image {
    width: 200px;
    height: 140px;
  }

  .article__title {
    font-size: var(--text-3xl);
  }
}

/* ── Mobile (< 640px) ── */
@media (max-width: 639px) {
  :root {
    --nav-height: 60px;
  }

  /* ── Navigation ── */
  .navbar__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    background: var(--bg-primary);
    padding: var(--space-8) var(--space-6);
    gap: var(--space-1);
    transform: translateX(100%);
    transition: transform var(--transition-base);
    z-index: 999;
    border-top: 1px solid var(--border-color);
  }

  .navbar__links.active {
    transform: translateX(0);
  }

  .navbar__link {
    font-size: var(--text-lg);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--border-radius);
    width: 100%;
  }

  .navbar__link:hover {
    background: var(--bg-secondary);
  }

  .navbar__link::after {
    display: none;
  }

  .navbar__menu-toggle {
    display: flex;
  }

  /* ── Hero ── */
  .hero {
    padding: var(--space-16) var(--space-6);
  }

  .hero__title {
    font-size: var(--text-3xl);
  }

  .hero__subtitle {
    font-size: var(--text-base);
  }

  .hero__buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero__buttons .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* ── Post Grids ── */
  .posts-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .related-posts__grid {
    grid-template-columns: 1fr;
  }

  /* ── Category Page List ── */
  .post-list-item {
    flex-direction: column;
  }

  .post-list-item__image {
    width: 100%;
    height: 200px;
  }

  /* ── Article ── */
  .article {
    padding: var(--space-8) var(--space-4);
  }

  .article__title {
    font-size: var(--text-2xl);
  }

  .article__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .article__meta-dot {
    display: none;
  }

  .article__content {
    font-size: var(--text-base);
  }

  .article__content h2 {
    font-size: var(--text-xl);
  }

  .article__content h3 {
    font-size: var(--text-lg);
  }

  /* ── Author Box ── */
  .author-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* ── Share Buttons ── */
  .share-buttons {
    flex-wrap: wrap;
  }

  /* ── Newsletter ── */
  .newsletter {
    margin: 0;
    border-radius: 0;
  }

  .newsletter__title {
    font-size: var(--text-2xl);
  }

  .newsletter__form {
    flex-direction: column;
  }

  /* ── Footer ── */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }

  /* ── Section Titles ── */
  .section__title {
    font-size: var(--text-2xl);
  }

  .section {
    padding: var(--space-12) var(--space-4);
  }

  /* ── Category Header ── */
  .category-header {
    padding: var(--space-12) var(--space-4);
  }

  .category-header__title {
    font-size: var(--text-3xl);
  }

  /* ── About Page ── */
  .about-hero__title {
    font-size: var(--text-3xl);
  }

  /* ── Contact ── */
  .contact-section {
    padding: var(--space-12) var(--space-4);
  }

  /* ── Ad Containers ── */
  .ad-container--leaderboard {
    max-width: 100%;
  }

  /* ── Cookie Banner ── */
  .cookie-banner {
    flex-direction: column;
    gap: var(--space-3);
    text-align: center;
  }

  /* ── 404 ── */
  .error-page__code {
    font-size: 5rem;
  }

  /* ── Featured Posts ── */
  .featured-post__image {
    width: 64px;
    height: 64px;
  }
}

/* ── Very small screens ── */
@media (max-width: 380px) {
  .hero__title {
    font-size: var(--text-2xl);
  }

  .btn--lg {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-base);
  }
}

/* ── Print Styles ── */
@media print {
  .navbar,
  .reading-progress,
  .back-to-top,
  .cookie-banner,
  .newsletter,
  .ad-container,
  .share-buttons,
  .theme-toggle,
  .footer {
    display: none !important;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  .article {
    max-width: 100%;
    padding: 0;
  }
}
