/* Regular 400 */
@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-light.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
}

@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

/* Medium 500 */
@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
}

/* Semibold 600 */
@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-Semibold.otf') format('opentype');
  font-weight: 600;
  font-style: normal;
}

/* Bold 700 */
@font-face {
  font-family: 'SF Pro Rounded';
  src: url('../fonts/SF-Pro-Rounded-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}

/* Fix semua elemen biar padding gak nambahin ukuran */
* {
  box-sizing: border-box;
}

/* Body dan wrapper utama */
body {
  margin: 0;
  padding: 0;
  background: #fff;
  max-width: 100%;
  overflow-x: hidden;
}

/* Container tengah konten */
.container-headline {
  display: flex;
  flex-wrap: wrap;
  gap: 70px;
  margin: 0 auto 50px;
  max-width: 1300px;
}

/* Kolom kiri (headline) dan kanan (terpopuler) */
.left {
  flex: 2;
  min-width: 400px;
}

.right {
  flex: 1;
  min-width: 100px;
  margin-bottom: -30px;
}


/* === WRAPPER UTAMA SWIPER === */
.headline-swiper {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  position: relative;
}

/* Wrapper wajib flex (default Swiper) */
.swiper-wrapper {
  display: flex;
  width: 100% !important;
  max-width: 100%;
}

.swiper-slide {
  flex-shrink: 0;
  width: 100% !important;
  position: relative;
  overflow: hidden;
}

.swiper-slide::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;       /* nempel di bawah */
  height: 50%;     /* cuma setengah tinggi slide */
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.75) 0%,   /* gelap banget di bawah */
    rgba(0, 0, 0, 0.4) 70%, 
    rgba(0, 0, 0, 0) 100%     /* hilang mulus ke atas */
  );
  z-index: 1;       /* di atas gambar */
  pointer-events: none;
}

/* === GAMBAR SLIDE === */
.swiper-slide img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 0;
}

/* === KOTAK KETERANGAN / CAPTION === */
.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 30px 40px;
  color: white;
  z-index: 2; /* supaya teks selalu kelihatan */
  box-sizing: border-box;
}

/* === LABEL (misalnya "UNPAD", "POLITIK") === */
.carousel-caption .labelh {
  background: #f38d35;
  color: white;
  padding: 4px 12px;
  font-size: 13px;
  border-radius: 3px;
  display: inline-block;
  margin-bottom: 10px;
}

.carousel-caption .Akategori-pendidikan { background: #EEA83B; }
.carousel-caption .Akategori-event { background: #622357; }
.carousel-caption .Akategori-lifestyle { background: #045759; }
.carousel-caption .Akategori-budaya { background: #DE7746; }


/* === JUDUL HEADLINE === */
.carousel-caption h2 {
  font-family: 'Literata', serif;
  font-weight: 500;
  font-size: 20px;
  margin: 0;
  line-height: 1.4em;
  word-wrap: break-word;
}

/* === METADATA (like, komentar, jam) === */
.carousel-caption .meta {
  font-family: 'Literata', serif;
  font-weight: 400;
  font-size: 13px;
  margin-top: 12px;
  display: flex;
  gap: 15px;
  align-items: center;
  color: #ddd;
}

.carousel-caption .meta span {
  display: flex;
  align-items: center;
  gap: 6px; /* jarak icon ke teks */
}

.carousel-caption .meta img.icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  display: block;
}

/* === NAVIGASI TOMBOL SWIPER === */
.swiper-button-prev,
.swiper-button-next {
  top: 29px;
  background: rgba(0, 0, 0, 0.6);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 14px;
  color: #fff;
  z-index: 10;
}

.swiper-button-next {
  right: 20px;
}

.swiper-button-prev {
  right: 60px;
  left: auto;
}

.swiper-button-next::after,
.swiper-button-prev::after {
  font-size: 14px;
}

/* === PAGINATION BULLET === */
.swiper-pagination {
  position: absolute !important;
  top: 15px !important;
  left: 25px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 10;
  display: flex;
  gap: 5px;
}

.swiper-pagination-bullet {
  width: 8px;
  height: 8px; 
  background: white;
  opacity: 0.5;
  margin: 0 !important;
  border-radius: 50%;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: #fff;
}



/* --- Laptop & Tablet landscape --- */
@media (max-width: 1200px) {
  .container-headline {
    gap: 40px;
    max-width: 830px;
  }

  .carousel-caption {
    padding: 15px 20px 30px;
  }

  .carousel-caption h2 {
    font-size: 18px;
  }

  .swiper-slide img {
    max-height: 420px;
  }
}

/* --- Tablet portrait (tetep sampingan, ikut desktop container) --- */
@media (max-width: 992px) {
  .container-headline {
    flex-direction: row;   /* jangan column, tetap sampingan */
    gap: 40px;
    max-width: 800px;     /* tetep ngikut desktop */
    padding: 0 15px;
  }

  .left {
    flex: 2;
    min-width: 60%;
  }

  .right {
    flex: 1;
    min-width: 35%;
  }

  .swiper-slide img {
    max-height: 380px;
  }

  .carousel-caption h2 {
    font-size: 17px;
    line-height: 1.3em;
  }

  .carousel-caption .meta {
    font-size: 12px;
    gap: 10px;
  }
}

/* --- Smartphone besar --- */
@media (max-width: 768px) {
  .container-headline {
    flex-direction: column; /* di HP jadi ke bawah */
    gap: 30px;
    padding: 0 15px;
    max-width: 100%;       /* full layar di HP */
  }

  .left,
  .right {
    flex: 1 1 100%;
    min-width: 100%;
  }

  .swiper-slide img {
    max-height: 300px;
  }

  .carousel-caption {
    padding: 12px 16px 22px;
  }

  .carousel-caption h2 {
    font-size: 15px;
  }

  /* Tombol prev/next ilang di HP */
  .swiper-button-prev,
  .swiper-button-next {
    display: none !important;
  }
}

/* --- Smartphone kecil --- */
@media (max-width: 480px) {
  .swiper-slide img {
    max-height: 220px;
  }

  .carousel-caption {
    padding: 10px 12px 18px;
  }

  .carousel-caption h2 {
    font-size: 14px;
  }

  .carousel-caption .labelh {
    font-size: 11px;
    padding: 3px 8px;
  }

  .carousel-caption .meta {
    font-size: 11px;
    gap: 8px;
  }

  .swiper-pagination {
    top: 10px !important;
    left: 15px !important;
  }
}
