/* ==========================================================================
   CardForge — Responsive Fixes (Sprint 14)
   Addresses: missing 1024px main grid rules, missing 375px breakpoint,
   4-col footer variant responsive, touch target enforcement
   ========================================================================== */

/* ==========================================================================
   1024px — Tablet Landscape (supplemental)
   Main breakpoints jump from 1200px to 768px; missing intermediate rules
   ========================================================================== */

@media (max-width: 1024px) {
  /* Grid: 3-col to 2-col (was only done at 1200px for 4-col) */
  .cf-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Content area: sidebar stacks (was only at 768px) */
  .cf-content-wrap {
    grid-template-columns: 1fr;
  }

  .cf-sidebar {
    position: static;
  }

  /* Share floating: hide at tablet */
  .cf-share--floating {
    display: none;
  }

  .cf-share--mobile {
    display: flex;
  }

  /* Footer: 2-col at tablet */
  .cf-footer__widgets-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==========================================================================
   375px — iPhone SE / Small Phone Minimum
   ========================================================================== */

@media (max-width: 375px) {
  :root {
    --cf-sp-md: 0.75rem;
    --cf-sp-lg: 0.875rem;
  }

  /* Header */
  .cf-header__logo-img {
    height: 30px;
    max-width: 130px;
  }

  .cf-header__site-name {
    font-size: 1.125rem;
  }

  .cf-header__container {
    height: 54px;
  }

  /* Hero: minimum height */
  .cf-hero .swiper {
    height: 220px;
  }

  .cf-hero__title {
    font-size: 1.0625rem;
  }

  /* Cards */
  .cf-card__body {
    padding: 0.625rem 0.75rem;
  }

  .cf-card__title {
    font-size: 0.9375rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
    overflow: hidden;
  }

  /* Article */
  .cf-article__title {
    font-size: 1.375rem;
  }

  /* Section header: fully stacked */
  .cf-section__header {
    gap: 0.375rem;
  }

  .cf-section__title {
    font-size: 1.0625rem;
  }

  /* Pagination */
  .cf-pagination .page-numbers {
    min-width: 34px;
    height: 34px;
    font-size: 0.75rem;
  }

  /* 404 */
  .cf-404__code {
    font-size: 4rem;
  }

  /* Container */
  .cf-container {
    padding: 0 0.75rem;
  }

  /* Footer legal links */
  .cf-footer__nav .menu li a {
    font-size: 0.75rem;
    padding: 0.25rem 0;
  }

  /* Back to top */
  .cf-back-to-top {
    width: 40px;
    height: 40px;
    bottom: 70px;
  }

  /* Filter tabs: smaller */
  .cf-filter__tab {
    font-size: 0.75rem;
    padding: 6px 12px;
  }
}

/* ==========================================================================
   Touch Target Enforcement
   ========================================================================== */

@media (max-width: 1024px) {
  .cf-hamburger {
    min-width: 44px;
    min-height: 44px;
  }

  .cf-search-toggle {
    min-width: 44px;
    min-height: 44px;
  }

  .cf-share__btn {
    min-width: 44px;
    min-height: 44px;
  }

  .cf-filter__tab {
    min-height: 44px;
  }

  .cf-mobile-nav__link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}
