/* News Section Styles */
.news-section {
  padding: 5rem 0;
  background-color: #f8f9fa;
}

.news-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.news-header {
  text-align: center;
  margin-bottom: 3rem;
}

.news-title {
  font-size: 2.25rem;
  color: #2d3748;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.news-title::after {
  content: '';
  position: absolute;
  width: 50%;
  height: 3px;
  background: #ed8936;
  bottom: -10px;
  left: 25%;
}

.news-subtitle {
  color: #718096;
  font-size: 1.125rem;
}

/* Swiper Container */
.news-carousel {
  padding: 1rem;
  position: relative;
}

/* News Item */
.news-item {
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.news-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.news-image-container {
  position: relative;
  width: 100%;
  padding-bottom: 125%; /* Rasio 4:5 (5/4 = 1.25) */
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

.instagram-ratio {
  position: absolute;
  aspect-ratio: 4/5; /* Fallback modern */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.news-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-item:hover .news-image {
  transform: scale(1.05);
}

.date-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #ed8936;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.news-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-headline {
  font-size: 1.25rem;
  color: #2d3748;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-excerpt {
  color: #4a5568;
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  flex-grow: 1;
}

.read-more-btn {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: #ed8936;
  color: white;
  border-radius: 0.25rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background 0.3s ease;
  align-self: flex-start;
}

.read-more-btn:hover {
  background: #dd6b20;
}

/* Carousel Controls */
.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.carousel-btn {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: white;
  border: 1px solid #e2e8f0;
  color: #4a5568;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-btn:hover {
  background: #ed8936;
  color: white;
  border-color: #ed8936;
}

/* Pagination */
.swiper-pagination {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  margin-top: 0;
  padding-top: 15px;
}

.swiper-pagination-bullet {
  background: #cbd5e0;
  opacity: 1;
  width: 0.75rem;
  height: 0.75rem;
}

.swiper-pagination-bullet-active {
  background: #ed8936;
}

/* Responsive */
@media (max-width: 768px) {
  .news-image-container {
    padding-bottom: 150%; /* Sedikit lebih tinggi di mobile */
  }
  
  .news-title {
    font-size: 1.75rem;
  }
  
  .news-subtitle {
    font-size: 1rem;
  }
  
  .news-image-container {
    height: 180px;
  }
  
  .carousel-controls {
    margin-top: 1.5rem;
  }
}

@media (max-width: 768px) {
  .swiper-pagination {
    margin-top: 20px;
  }
}

@media (max-width: 480px) {
  .news-container {
    padding: 0 1rem;
  }
  
  .news-title {
    font-size: 1.5rem;
  }
  
  .news-image-container {
    height: 160px;
  }
  
  .news-content {
    padding: 1.25rem;
  }
  
  .news-headline {
    font-size: 1.125rem;
  }
}

.news-carousel {
  width: 100%;
  height: auto;
  margin: 0 auto;
  overflow: hidden;
  padding-bottom: 60px; /* Ruang untuk pagination */
}

.swiper-wrapper {
  display: flex; /* Ini yang membuat horizontal */
  transition-timing-function: linear;
  margin-bottom: 15px;
  padding-bottom: 15px;
}

.swiper-slide {
  flex-shrink: 0;
  width: 100%;
}

/* Untuk memastikan tinggi maksimum di desktop */
@media (min-width: 1024px) {
  .news-image-container {
    max-height: 400px; /* Membatasi tinggi maksimum */
    padding-bottom: 0;
    height: 400px;
  }
  
  .instagram-ratio {
    height: 400px;
  }
}