/**
 * News section styles for mobile / tablet (main page)
 * Grid: 2 columns on tablet, 1 column on phone
 */

.news-mobile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

/* --- News section --- */
.news-section {
  padding-top: 10px;
}

/* --- Card link --- */
.news-mobile-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* --- Card --- */
.news-mobile-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 1px 1px 10px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease;
  height: 100%;
}

.news-mobile-card:hover {
  box-shadow: 1px 1px 15px rgba(0,0,0,0.2);
}

/* --- Card image --- */
.news-mobile-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
}

.news-mobile-card-image img {
  width: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-mobile-card:hover .news-mobile-card-image img {
  transform: scale(1.05);
}

/* --- Card content --- */
.news-mobile-card-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.news-mobile-card-title {
  font-size: 17px;
  font-weight: bold;
  color: #ce291c;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.news-mobile-card-desc {
  font-size: 16px;
  color: #666;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}

.news-mobile-card-date {
  font-size: 12px;
  color: #999;
  margin-top: auto;
  text-align: right;
}

/* --- Phone: 1 column (max-width 767px) --- */
@media (max-width: 767px) {
  .news-mobile-grid {
    grid-template-columns: 1fr;
  }

  .news-mobile-card-image {
    height: 200px;
  }

  .news-mobile-card:hover .news-mobile-card-image img {
    transform: none;
  }
}

/* --- Transition between tablet and phone --- */
@media (min-width: 768px) and (max-width: 1023px) {
  .news-mobile-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ===== Hide mobile layout on desktop ===== */
@media (min-width: 1024px) {
  .mobile-news-layout {
    display: none !important;
  }
}
