/* Comic-Style News Grid Styling */
.manga-panel {
  background-color: white;
  border: 4px solid var(--manga-border-color);
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.4);
  padding: 20px;
  margin-bottom: 25px;
  position: relative;
  overflow: hidden;
}

/* Categories with subtle rounded corners */
.news-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 15px;
  margin-bottom: 20px;
  background-color: #f9f9f9;
  border: 2px solid var(--manga-border-color);
  border-radius: 12px;
  position: relative;
  justify-content: center;
}

.category-link {
  padding: 8px 16px;
  border: 2px solid var(--primary-color);
  border-radius: 12px;
  color: var(--dark-color);
  text-decoration: none;
  transition: all 0.2s ease;
  font-weight: 600;
  position: relative;
  background-color: white;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.1);
}

.category-link:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

.category-link.active {
  background-color: var(--primary-color);
  color: white;
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.2);
}

/* News Grid Container */
.news-grid-container {
  padding: 10px;
}

/* Grid Layout for Desktop */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.news-grid-item {
  transition: transform 0.2s ease;
}

.news-grid-item:hover {
  transform: translateY(-5px);
}

/* News Card Styling */
.news-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 3px solid var(--manga-border-color);
  border-radius: 12px;
  overflow: hidden;
  background-color: white;
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.news-card:hover {
  box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.3);
}

.news-image-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-image {
  transform: scale(1.05);
}

.news-category-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 10px;
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.news-content {
  padding: 15px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-title {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.3;
}

.news-title a {
  color: var(--dark-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.news-title a:hover {
  color: var(--primary-color);
}

.news-meta {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 10px;
}

.news-excerpt {
  margin-bottom: 15px;
  line-height: 1.5;
  color: #555;
  font-size: 0.9rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  flex-grow: 1;
}

/* Comic-style pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  padding: 15px;
  flex-wrap: wrap;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  color: var(--dark-color);
  text-decoration: none;
  border: 2px solid #ddd;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}

.page-link:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
}

.page-link.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  box-shadow: inset 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Empty data styling */
.empty-data-container {
  padding: 50px 20px;
  text-align: center;
  background: white;
  border-radius: 10px;
  border: 3px dashed var(--manga-border-color);
  grid-column: 1 / -1;
}

.empty-data-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: #ddd;
}

.empty-data-message {
  font-size: 1.2rem;
  font-weight: bold;
  color: #777;
}

/* Tablet Responsive */
@media (max-width: 992px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Responsive - Switch to Tile Layout */
@media (max-width: 768px) {
  .news-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .manga-panel {
    padding: 15px 10px;
  }

  .news-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    height: auto;
  }

  .news-image-container {
    height: 100%;
    aspect-ratio: unset;
  }

  .news-content {
    padding: 10px;
  }

  .news-title {
    font-size: 1rem;
    margin-bottom: 5px;
  }

  .news-excerpt {
    -webkit-line-clamp: 2;
    font-size: 0.85rem;
    margin-bottom: 8px;
  }

  .news-meta {
    font-size: 0.8rem;
    margin-bottom: 5px;
  }

  .news-read-more {
    font-size: 0.85rem;
  }

  .news-category-badge {
    top: 5px;
    left: 5px;
    padding: 2px 8px;
    font-size: 0.65rem;
  }

  .news-categories {
    padding: 10px;
  }

  .category-link {
    padding: 5px 10px;
    font-size: 0.85rem;
    border-radius: 8px;
  }

  .page-link {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
  .news-card {
    grid-template-columns: 90px 1fr;
  }

  .news-content {
    padding: 8px;
  }

  .news-title {
    font-size: 0.9rem;
  }

  .news-excerpt {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
  }

  .news-read-more {
    padding: 3px 0;
  }
}
