/* =========================================================
   HOMEPAGE - LATEST CONTENT RESPONSIVE FIX
   Desktop remains four columns, tablet uses two columns,
   and mobile always renders one full-width vertical card.
========================================================= */

.home-page .latest-grid,
.home-page .latest-card,
.home-page .latest-thumb,
.home-page .latest-content,
.home-page .latest-meta {
  box-sizing: border-box;
}

.home-page .latest-thumb,
.home-page .latest-content {
  width: 100%;
  min-width: 0;
}

@media (max-width: 1100px) {
  .home-page .latest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .home-page .latest-section {
    width: 100%;
    margin-top: 64px;
    padding-inline: 16px;
    overflow: visible;
  }

  .home-page .latest-container {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
  }

  .home-page .latest-section .section-heading {
    margin-bottom: 0;
  }

  .home-page .latest-section .section-heading h2 {
    max-width: 100%;
    font-size: clamp(1.85rem, 8vw, 2.35rem);
    line-height: 1.16;
    letter-spacing: -0.035em;
    text-wrap: balance;
  }

  .home-page .latest-section .section-heading p {
    max-width: 100%;
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .home-page .latest-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    gap: 18px;
    width: 100%;
    margin-top: 26px;
    overflow: visible !important;
  }

  .home-page .latest-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 0 !important;
    padding: 12px !important;
    border-radius: 22px;
    overflow: hidden;
  }

  .home-page .latest-thumb {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 16 / 9;
    border-radius: 16px;
    overflow: hidden;
  }

  .home-page .latest-thumb img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    border-radius: 16px;
    object-fit: cover;
  }

  .home-page .latest-content {
    width: 100% !important;
    min-width: 0 !important;
    padding: 16px 4px 4px;
  }

  .home-page .latest-category {
    margin-bottom: 8px;
    font-size: 0.7rem;
    letter-spacing: 0.05em;
  }

  .home-page .latest-content h3 {
    margin-bottom: 14px;
    font-size: 1.08rem;
    line-height: 1.42;
    -webkit-line-clamp: 3;
  }

  .home-page .latest-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    margin-top: auto;
    padding-top: 10px;
    font-size: 0.76rem;
  }

  .home-page .latest-meta span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .home-page .latest-meta span:last-child {
    flex-shrink: 0;
    white-space: nowrap;
  }
}

@media (max-width: 420px) {
  .home-page .latest-section {
    padding-inline: 14px;
  }

  .home-page .latest-card {
    padding: 10px !important;
    border-radius: 20px;
  }

  .home-page .latest-thumb,
  .home-page .latest-thumb img {
    border-radius: 14px;
  }

  .home-page .latest-content {
    padding: 14px 4px 4px;
  }

  .home-page .latest-content h3 {
    font-size: 1.02rem;
  }
}
