/* ========================================
   ARTICLE.CSS - TABLET RESPONSIVE STYLES (768px - 1023px)
   ======================================== */

@media (min-width: 768px) and (max-width: 1023px) {
  .home-articles {
    display: flex;
    flex-direction: column;
    margin: 1%;
    gap: 2%;
    height: auto;
    min-height: auto;
  }

  .articleList {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 50vh;
    margin-bottom: 1rem;
    order: 3;
  }

  .article-section-latest {
    width: 100%;
    order: 1;
    padding: 2%;
    margin-bottom: 1rem;
  }

  .article-section-latest h2 {
    font-size: 1.8rem;
    margin: 1rem 0;
  }

  .article-section-side {
    width: 100%;
    height: auto;
    margin-right: 0;
    margin-bottom: 1rem;
    order: 2;
    display: flex;
    flex-direction: row;
    gap: 2%;
  }

  .article-section-side > div {
    flex: 1;
    min-width: 0;
  }

  .article-section-like,
  .article-section-comment {
    width: 48%;
  }

  /* Latest Articles - Horizontal Layout for Tablet */
  .latest-content {
    flex-direction: row;
    gap: 2%;
    flex-wrap: wrap;
  }

  .latest-article-main {
    width: 100%;
    height: 50vh;
    max-height: 400px;
    margin-bottom: 2%;
  }

  .latest-grid {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 2%;
  }

  .latest-article-small {
    width: 48%;
    height: 35vh;
    max-height: 280px;
  }

  .latest-article-content h2 {
    font-size: 1.5rem;
  }

  .latest-article-small .latest-article-content h2 {
    font-size: 1.2rem;
  }


  .popular-articles-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5%;
    padding: 0 2%;
    max-width: 100%;
  }

  .popular-articles-grid .popular-article:nth-child(n+5) {
    display: none;
  }

  .popular-article {
    height: 150px;
    width: 100%;
  }

  .popular-article-content h3 {
    font-size: 1rem;
  }

  /* Article View Page */
  .article-body {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2%;
  }

  .article-container {
    max-width: 100%;
  }

  .article-sidebar {
    width: 100%;
    position: static;
  }

  /* Article cards on sidebars */
  .article-section-side .article {
    min-height: 200px;
  }

  .article-content {
    padding: 1.5rem;
  }

  .article-content h2 {
    font-size: 1.2rem;
  }
}
