/* ===================================
   ARTICLE CARD - FINAL VERSION
   Desktop: 3 Cards | Mobile: 1 Card
   No interference with banner/carousel
   ================================== */

/* ========================================
   BASE CARD STYLES
   ======================================== */
.articles .article-card {
  width: 100%;
  max-width: 360px;
  height: auto; 
  border-radius: 16px;
  padding: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative; 
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

.articles .article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

/* Image Container */
.articles .article-card .image {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.articles .article-card .image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, 
    rgba(25,60,118,0.1) 0%, 
    rgba(25,60,118,0.3) 100%
  );
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.articles .article-card:hover .image::before {
  opacity: 1;
}

.articles .article-card .image img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.articles .article-card:hover .image img {
  transform: scale(1.08);
}

/* Stats Badges */
.articles .article-card .stats {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  z-index: 6;
  margin: 0;
}

.articles .article-card .stats span {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  line-height: 1;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.articles .article-card .stats span.category {
  background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
  color: #fff;
  flex: 0 1 auto;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.articles .article-card .stats span.date {
  background: linear-gradient(135deg, #193c76 0%, #102842 100%);
  color: #fff;
  flex: 0 0 auto;
}

.articles .article-card .stats span:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

/* Title Card */
.articles .article-card .titles {
  position: relative;
  margin-top: -32px;
  padding: 0 12px;
  box-sizing: border-box;
  z-index: 3;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.articles .article-card .titles p {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  width: 100%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  padding: 18px 16px;
  border-radius: 12px;
  margin: 0 0 12px 0;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.5;
  word-break: break-word;
  color: #2c3e50;
  border: 1px solid rgba(25,60,118,0.08);
  border-left: 4px solid #1abc9c;
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  min-height: 75px;
}

.articles .article-card .titles p::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, rgba(26,188,156,0.1) 0%, transparent 50%);
  border-radius: 0 12px 0 100%;
  transition: all 0.3s ease;
}

.articles .article-card .titles p::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(26,188,156,0.3) 50%, 
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.articles .article-card:hover .titles p {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  border-left-color: #193c76;
  padding-left: 20px;
}

.articles .article-card:hover .titles p::before {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, rgba(25,60,118,0.12) 0%, transparent 50%);
}

.articles .article-card:hover .titles p::after {
  opacity: 1;
}

/* ========================================
   HIGHLIGHT CENTER (Card Tengah)
   ======================================== */
.articles .swiper-slide.highlight-center .article-card {
  transform: scale(1.06) translateY(0);
}

.articles .swiper-slide.highlight-center .article-card .titles p {
  background: linear-gradient(135deg, #edd25f 0%, #e6c84f 100%);
  color: #193c76;
  box-shadow: 0 12px 36px rgba(237,210,95,0.4);
  transform: translateY(-4px);
  border-left-color: #193c76;
  border-color: rgba(237,210,95,0.3);
}

.articles .swiper-slide.highlight-center .article-card .titles p::before {
  background: linear-gradient(135deg, rgba(25,60,118,0.15) 0%, transparent 50%);
  width: 60px;
  height: 60px;
}

.articles .swiper-slide.highlight-center .article-card .titles p::after {
  opacity: 0.6;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(25,60,118,0.4) 50%, 
    transparent 100%
  );
}

.articles .swiper-slide.highlight-center .article-card .image {
  box-shadow: 0 8px 32px rgba(25,60,118,0.25);
}

.articles .swiper-slide.highlight-center .article-card .image img {
  transform: scale(1.05);
}

.articles .swiper-slide.highlight-center .article-card .stats span.category {
  background: linear-gradient(135deg, #ffdca3 0%, #ffcd7d 100%);
  color: #193c76;
  box-shadow: 0 10px 28px rgba(255,220,163,0.45);
}

.articles .swiper-slide.highlight-center .article-card .stats span.date {
  background: linear-gradient(135deg, #102842 0%, #0a1829 100%);
  color: #ffffff;
  box-shadow: 0 10px 28px rgba(16,40,66,0.45);
}

.articles .swiper-slide.highlight-center .article-card:hover {
  transform: scale(1.08) translateY(-10px);
  box-shadow: 0 18px 50px rgba(237,210,95,0.38);
}

/* ========================================
   SWIPER CONTAINER - SCOPED TO .articles
   ======================================== */
.articles .swiper.Articles {
  width: 100%;
  padding: 20px 0 60px 0;
  overflow: visible;
  position: relative;
}

.articles .swiper-wrapper {
  display: flex;
  align-items: flex-start;
  padding-bottom: 20px;
}

.articles .swiper-slide {
  height: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
}

/* Pagination - SCOPED */
.articles .swiper-pagination {
  bottom: 20px !important;
}

.articles .swiper-pagination-bullet {
  background: #193c76;
  opacity: 0.3;
  transition: all 0.3s ease;
}

.articles .swiper-pagination-bullet-active {
  background: #1abc9c;
  opacity: 1;
  transform: scale(1.2);
}

/* ========================================
   RESPONSIVE - DESKTOP
   ======================================== */
@media (min-width: 1200px) {
  .articles .swiper.Articles {
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .articles .swiper-slide {
    width: 360px;
  }
  
  .articles .article-card {
    width: 360px;
    max-width: 360px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .articles .swiper.Articles {
    max-width: 1100px;
    margin: 0 auto;
  }
  
  .articles .swiper-slide {
    width: 360px;
  }
  
  .articles .article-card {
    width: 360px;
    max-width: 360px;
  }
}

/* ========================================
   RESPONSIVE - TABLET
   ======================================== */
@media (min-width: 768px) and (max-width: 991px) {
  .articles .swiper.Articles {
    max-width: 1040px;
    margin: 0 auto;
  }
  
  .articles .swiper-slide {
    width: 340px;
  }
  
  .articles .article-card {
    width: 340px;
    max-width: 340px;
  }
  
  .articles .article-card .titles p {
    font-size: 0.9rem;
    padding: 15px 13px;
    min-height: 68px;
  }
  
  .articles .article-card .stats span {
    padding: 7px 10px;
    font-size: 0.76rem;
  }
  
  .articles .swiper-slide.highlight-center .article-card {
    transform: scale(1.05);
  }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 767px) {
  .articles .swiper.Articles {
    width: 100%;
    max-width: 100%;
    padding: 20px 20px 60px 20px;
  }
  
  .articles .swiper-slide {
    width: 100%;
    max-width: 100%;
  }
  
  .articles .article-card {
    width: 100%;
    max-width: 100%;
  }
  
  .articles .article-card .stats {
    top: 14px;
    left: 14px;
    right: 14px;
  }
  
  .articles .article-card .stats span {
    padding: 7px 11px;
    font-size: 0.78rem;
  }
  
  .articles .article-card .titles {
    margin-top: -32px;
    padding: 0 12px;
  }
  
  .articles .article-card .titles p {
    font-size: 0.92rem;
    padding: 16px 14px;
    min-height: 70px;
  }
  
  /* Mobile: minimal scale */
  .articles .swiper-slide.highlight-center .article-card {
    transform: scale(1.0);
  }
}

@media (max-width: 575px) {
  .articles .swiper.Articles {
    padding: 20px 16px 60px 16px;
  }
  
  .articles .article-card .stats span {
    padding: 7px 10px;
    font-size: 0.76rem;
  }
  
  .articles .article-card .titles p {
    font-size: 0.9rem;
    padding: 14px 12px;
    min-height: 68px;
  }
}

@media (max-width: 399px) {
  .articles .swiper.Articles {
    padding: 20px 12px 60px 12px;
  }
  
  .articles .article-card .stats span {
    padding: 6px 9px;
    font-size: 0.72rem;
  }
  
  .articles .article-card .titles p {
    font-size: 0.86rem;
    padding: 12px 10px;
    min-height: 64px;
  }
}