/* ===== BASE ===== */
*{margin:0;padding:0;box-sizing:border-box;}
html,body{width:100%;overflow-x:hidden;}
body{font-family:'Georgia',serif;background:#f8f8f8;color:#121212;line-height:1.6;}
img{max-width:100%;display:block;}
.container{max-width:1200px;margin:auto;padding:20px;}

/* ===== SLIDER ===== */
.slider{position:relative;overflow:hidden;border-radius:6px;margin-bottom:40px;}
.slide{display:none;position:relative;cursor:pointer;}
.slide img{width:100%;height:420px;object-fit:cover;}
.slide.active{display:block;}

.slide-overlay{
  position:absolute;bottom:0;left:0;width:100%;height:50%;
  background:linear-gradient(to top,rgba(0,0,0,.6),transparent);
}

.slide-text{
  position:absolute;bottom:20px;left:20px;max-width:65%;
  color:#fff;z-index:2;padding:10px 12px;
}
.slide-text::before{
  content:"";position:absolute;top:0;left:0;right:0;height:100%;
  background:rgba(0,0,0,0.25);backdrop-filter:blur(5px);
  border-radius:6px;z-index:-1;
}

.slider-btn{
  position:absolute;top:50%;transform:translateY(-50%);
  background:rgba(0,0,0,0.4);border:none;color:#fff;
  padding:10px 15px;cursor:pointer;font-size:1.2rem;
  border-radius:4px;z-index:5;
}
.prev{left:10px;}
.next{right:10px;}

/* ===== TRENDING ===== */
.trending{margin:40px 0;padding-bottom:20px;border-bottom:1px solid #ccc;}
.trending h3{
  font-size:1.6rem;font-weight:700;margin-bottom:15px;
  border-bottom:1px solid #ddd;padding-bottom:8px;
}

/* IMPORTANT: default SELALU 1 kolom */
.trending-list{
  display:grid;
  grid-template-columns:1fr !important; /* paksa 1 card */
  gap:10px;
}

.trending-item{
  border-bottom:1px solid #eee;
  padding:10px 0;
}

/* link layout (gambar kiri, judul kanan) */
.trending-item a{
  display:grid;
  grid-template-columns:90px 1fr;
  gap:12px;
  align-items:center;
  text-decoration:none;
  color:#121212;
  min-width:0;
}

.trending-item img{
  width:90px;height:60px;object-fit:cover;border-radius:4px;
}

/* judul: clamp 2 baris biar ga “memanjang ke bawah” */
.trending-item a{
  font-size:0.95rem;
  font-weight:700;
  line-height:1.3;
}
.trending-item a{
  overflow:hidden;
  display:grid;
}
.trending-item a{
  -webkit-line-clamp:2;
  line-clamp:2;
  -webkit-box-orient:vertical;
}

.trending-item a:hover{color:#0077cc;text-decoration:underline;}

/* Baru jadi 2 kolom di layar BESAR (laptop/desktop) */
@media(min-width:1100px){
  .trending-list{
    grid-template-columns:repeat(2,1fr) !important;
  }
}

/* ===== CATEGORY ===== */
.category-section{margin-bottom:50px;padding-bottom:30px;border-bottom:1px solid #ccc;}
.category-title{font-size:1.8rem;font-weight:700;margin-bottom:10px;}
.category-short-desc{
  font-size:1rem;color:#555;background:#eee;padding:10px 15px;
  border-radius:4px;margin-bottom:20px;line-height:1.4;
}

.category-articles{display:flex;flex-wrap:wrap;gap:20px;}
.category-article{
  flex:1;min-width:220px;position:relative;border-radius:6px;
  overflow:hidden;box-shadow:0 2px 6px rgba(0,0,0,.1);
  display:flex;flex-direction:column;
}

.category-article img{width:100%;height:200px;object-fit:cover;}
.category-article.highlight img{height:350px;}

.article-text-overlay{
  position:absolute;bottom:15px;left:15px;right:15px;
  z-index:2;padding:8px 10px;
}

.article-text-overlay h3{
  margin:0;font-size:1.4rem;font-weight:700;color:#fff;
  text-shadow:0 2px 4px rgba(0,0,0,0.5);
}

.article-text-overlay::before{
  content:"";position:absolute;top:0;left:0;right:0;height:100%;
  background:rgba(0,0,0,0.2);backdrop-filter:blur(4px);
  border-radius:6px;z-index:-1;
}

.category-quote{
  font-style:italic;font-size:.9rem;color:#333;margin:8px 0 10px;
  padding:0 15px;
}

.category-readmore{
  font-size:.9rem;color:#0077cc;margin:5px 0 15px 15px;
  text-decoration:none;display:inline-block;
}
.category-readmore:hover{text-decoration:underline;}

/* ===== RESPONSIVE ===== */
@media(max-width:768px){
  .container{padding:14px;}
  .slide img{height:320px;}
  .slide-text{left:12px;right:12px;max-width:none;bottom:50px;}
  .slide-text h2{font-size:1.2rem;}
  .slide-text p{font-size:0.85rem;}
  .category-article.highlight img{height:250px;}

  /* HP: trending lebih compact */
  .trending-item a{grid-template-columns:74px 1fr;gap:10px;}
  .trending-item img{width:74px;height:52px;}
  .trending-item a{font-size:0.9rem;}
}

/* HP kecil */
@media(max-width:480px){
  .category-articles{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;}
  .category-article.highlight{grid-column:1 / -1;}
  .category-article.medium .article-text-overlay h3,
  .category-article.small .article-text-overlay h3{font-size:0.75rem;}
  .category-article.medium .category-quote,
  .category-article.small .category-quote{font-size:0.7rem;padding:0 6px;}
  .category-article.medium .category-readmore,
  .category-article.small .category-readmore{font-size:0.7rem;margin:3px 0 8px 8px;}
}