@import url("./global.css");

/* News Page Styles */

/* News Grid */
.news-grid-section {
  padding: 3rem 0 5rem;
}

/* Hidden utility class */
.hidden {
  display: none !important;
}

/* Filter Section */
.news-filter {
  margin-bottom: 3rem;
  text-align: center;
}

.filter-title {
  font-size: var(--h3-size);
  font-weight: var(--h3-weight);
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  transition: opacity 0.3s ease;
}

.news-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.news-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--secondary-color)
  );
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.news-card:hover::before {
  transform: scaleX(1);
}

/* News Card Image Styles */
.news-image {
  width: 100%;
  height: 18.75rem;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
  transform: scale(1.05);
}

/* Placeholder for news without images */
.news-image-placeholder {
  background: linear-gradient(
    135deg,
    var(--secondary-color) 0%,
    var(--primary-color) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.news-placeholder-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.placeholder-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: white;
  line-height: 1.3;
}

.placeholder-date {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

/* Mini Hero Placeholder for News Without Images */
.mini-hero-placeholder {
  width: 100%;
  height: 34rem;
  background: linear-gradient(
    135deg,
    var(--secondary-color) 0%,
    var(--primary-color) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.mini-hero-placeholder-content {
  text-align: center;
  z-index: 11;
  padding: 2rem;
}

.mini-hero-placeholder .mini-hero-title {
  font-size: var(--h1-size);
  color: white;
  margin-bottom: 0.5rem;
  position: static;
  transform: none;
}

.mini-hero-date {
  font-size: var(--h3-size);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

/* News detail hero with image - smaller title */
.mini-hero.news-detail-hero .mini-hero-title {
  font-size: 3rem;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

/* News Detail Section */
.news-detail-section {
  padding: 4rem 0;
  background-color: var(--bg-light);
}

.news-detail-content {
  max-width: 1000px;
  margin: 0 auto;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 1000px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.back-button:hover {
  background: var(--primary-color);
  color: white;
}

.back-button svg {
  transition: transform 0.3s ease;
}

.back-button:hover svg {
  transform: translateX(-4px);
}

.news-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.news-detail-title {
  font-size: var(--h1-size);
  font-weight: var(--h1-weight);
  color: var(--text-dark);
  margin: 0;
}

.news-detail-category {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: var(--secondary-color);
  color: white;
  border-radius: 25px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-detail-image {
  width: 100%;
  height: 500px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.news-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-detail-image-placeholder {
  background: linear-gradient(
    135deg,
    var(--secondary-color) 0%,
    var(--primary-color) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.news-detail-placeholder-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.detail-placeholder-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}

.detail-placeholder-date {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
}

.news-detail-info {
  background: white;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.news-detail-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.news-detail-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.news-detail-info-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-detail-info-value {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-dark);
  line-height: 1.5;
}

.news-detail-content {
  font-size: 1rem;
  color: var(--text-medium);
  line-height: 1.6;
}

.news-content {
  padding: 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.3;
}

.news-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.news-detail {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.4;
}

/* Filter Buttons */
.filter-section {
  margin-bottom: 2rem;
  text-align: center;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--primary-color);
  background: transparent;
  color: var(--primary-color);
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Animation for news cards */
.news-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.news-grid-section.animate-in .news-card {
  opacity: 1;
  transform: translateY(0);
}

.news-grid-section.animate-in .news-card:nth-child(1) {
  transition-delay: 0.1s;
}
.news-grid-section.animate-in .news-card:nth-child(2) {
  transition-delay: 0.2s;
}
.news-grid-section.animate-in .news-card:nth-child(3) {
  transition-delay: 0.3s;
}
.news-grid-section.animate-in .news-card:nth-child(4) {
  transition-delay: 0.4s;
}
.news-grid-section.animate-in .news-card:nth-child(5) {
  transition-delay: 0.5s;
}
.news-grid-section.animate-in .news-card:nth-child(6) {
  transition-delay: 0.6s;
}
.news-grid-section.animate-in .news-card:nth-child(7) {
  transition-delay: 0.7s;
}
.news-grid-section.animate-in .news-card:nth-child(8) {
  transition-delay: 0.8s;
}
.news-grid-section.animate-in .news-card:nth-child(9) {
  transition-delay: 0.9s;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .news-grid-section {
    padding: 2rem 0 3rem;
  }

  .news-filter {
    margin-bottom: 2rem;
  }

  .filter-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .news-card {
    padding: 1.5rem;
  }

  .news-header {
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .filter-buttons {
    gap: 0.75rem;
  }

  .filter-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.8rem;
  }

  .news-detail-section {
    padding: 2rem 0;
  }

  .news-detail-title {
    font-size: 1.75rem;
  }

  .news-detail-image {
    height: 300px;
    margin-bottom: 2rem;
  }

  .detail-placeholder-title {
    font-size: 1.75rem;
  }

  .detail-placeholder-date {
    font-size: 1rem;
  }

  .news-detail-info {
    padding: 1.5rem;
  }

  .news-detail-info-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .mini-hero-placeholder .mini-hero-title {
    font-size: 2rem;
  }

  .mini-hero-date {
    font-size: 1.25rem;
  }

  .mini-hero.news-detail-hero .mini-hero-title {
    font-size: 2rem;
  }

  .mini-hero-placeholder {
    height: 25rem;
  }
}

@media screen and (max-width: 480px) {
  .news-grid-section {
    padding: 1.5rem 0 2rem;
  }

  .news-card {
    padding: 1.25rem;
  }

  .news-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .filter-buttons {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .filter-btn {
    width: 200px;
  }

  .news-detail-section {
    padding: 1.5rem 0;
  }

  .news-detail-title {
    font-size: 1.5rem;
  }

  .news-detail-image {
    height: 250px;
  }

  .detail-placeholder-title {
    font-size: 1.5rem;
  }

  .detail-placeholder-date {
    font-size: 0.9rem;
  }

  .news-detail-info {
    padding: 1.25rem;
  }

  .back-button {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }

  .mini-hero-placeholder .mini-hero-title {
    font-size: 1.5rem;
  }

  .mini-hero-date {
    font-size: 1rem;
  }

  .mini-hero.news-detail-hero .mini-hero-title {
    font-size: 1.5rem;
  }

  .mini-hero-placeholder {
    height: 20rem;
  }
}
