@import url("https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

/* news-page */

.hero-news-page {
  background-color: var(--dark-green);
  padding-top: 8rem !important;
}

.header-news-hero {
  color: white;
  font-weight: 700;
  font-size: 40px;
}

.desc-news-hero {
  color: #fff;
  font-size: 600;
  font-size: 22px;
  width: 100%;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  cursor: pointer;
}

.tabs div {
  padding: 10px 20px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.tabs .active {
  border-bottom: 2px solid black;
  font-weight: bold;
}

/* Konten */
.content {
  display: none;
  opacity: 0;
  transform: translateY(15px) scale(0.98);
  transition: opacity 0.6s ease-in-out, transform 0.6s ease-in-out;
}

.content.show {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.content.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* berita highligthed */
.news-section {
  display: grid;
  grid-template-columns: 2fr 1.5fr;
  gap: 20px;
  height: 74vh;
}

.news-main {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

.news-main img {
  width: 100%;
  height: 525px;
  object-fit: cover;
  display: block;
}

.news-main-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  color: white;
}

.news-tag {
  display: inline-block;
  background: var(--dark-green);
  color: white;
  font-size: 14px;
  font-weight: bold;
  padding: 4px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.news-main-overlay h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.3;
}

.news-meta {
  font-size: 14px;
  display: flex;
  gap: 15px;
  align-items: center;
  opacity: 0.9;
}

.news-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 16px;
  font-weight: 500;
}

.news-side {
  display: flex;
  flex-direction: column;
  gap: 15px;
  overflow-y: auto;
  padding-right: 5px;
}

.news-item {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}

.news-item img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
}

.news-info h3 {
  margin: 0 0 5px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.news-info .news-meta {
  font-size: 13px;
  color: #555;
}

/* Card berita */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.cards {
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cards img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.cards p {
  margin: 10px 0px 0px 0px;
  font-weight: 700;
  padding: 0;
  font-size: 16px;
}

.card-footer {
  margin-top: 5px;
}

.card-footer .tag {
  cursor: pointer;
  background-color: var(--dark-green);
  color: white;
  border-radius: 20px;
  padding: 4px 18px 4px 18px;
  font-size: 0.8rem;
  font-weight: 700;
}

#footer-terkini .views-text {
  font-size: 13px;
  font-weight: 600;
  margin-left: 10px;
}

#footer-terkini .info {
  padding: 4px 15px 4px 15px;
  font-size: 13px;
  font-weight: 600;
  margin-left: 10px;
}

.card-footer .views-text {
  font-size: 13px;
  font-weight: 600;
}

.card-footer .info {
  padding: 4px 15px 4px 15px;
  font-size: 13px;
  font-weight: 600;
}

.card-terkini {
  background: url("../resources/image/Berita-Terkini-Hightlight/Rectangle\ 286.png") no-repeat;
  width: 100%;
  padding: 40px;
  border-radius: 10px;
}

.header-terkini {
  width: 50%;
  color: #fff;
}

.card-footer-terkini {
  margin-top: 20px;
  margin-left: 5px;
}
.card-footer-terkini svg {
  fill: #fff;
  width: 16px;
  height: 24px;
  margin-right: 20px;
}

.views-terkini {
  color: #fff;
}

.info-terkini {
  color: #fff;
  margin-left: 20px;
}

/* responsive */

@media (max-width: 576px) {
  body {
    margin: 0;
    padding: 0;
  }

  .icon-berita svg {
    width: 250px !important;
  }

  .hero-news-page {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .news-main img {
    height: 250px;
  }

  .news-item img {
    width: 70%;
  }

  .news-item .news-info h3 {
    font-size: 14px;
  }

  .header-news-hero {
    font-size: 28px;
    width: 100%;
    text-align: center;
  }

  .desc-news-hero {
    font-size: 12px;
    width: 100%;
    text-align: center;
    margin-top: 5px;
  }

  .card-terkini {
    width: 100%;
    height: 250px;
  }

  .card-footer-terkini {
    margin-top: 40px;
    font-size: 14px;
  }

  .header-terkini {
    width: 200px;
    margin-top: 30px;
    font-size: 16px;
    color: #fff;
  }

  .tabs .tab {
    font-size: 14px;
    padding: 10px 10px;
  }

  .cards p {
    font-size: 14px;
  }

  .cards .card-footer {
    justify-content: flex-start !important;
  }

  .card-footer .tag,
  .card-footer i,
  .card-footer .views-text,
  .card-footer .time {
    font-size: 12px;
  }
  .card-footer i,
  .card-footer .views-text,
  .card-footer .time {
    margin-left: 10px;
  }

  .news-main {
    width: 100%;
    height: 350px;
    object-fit: none;
  }

  .news-main img {
    width: 100%;
    height: 350px;
  }

  .news-main-overlay .news-tag {
    font-size: 12px;
  }

  .news-side {
    height: 200px;
  }

  #berita-terkini {
    padding-top: 0px;
  }

  .news-main-overlay h2 {
    font-size: 16px;
  }

  .news-meta i,
  .news-meta span {
    font-size: 12px;
  }

  .cards img {
    height: 160px;
  }
}

@media (max-width: 768px) {
  .header-news-hero {
    text-align: center;
  }

  .desc-news-hero {
    text-align: center;
  }

  .news-section {
    grid-template-columns: 1fr;
  }

  .news-side {
    max-height: none;
    overflow-y: auto;
  }

  .news-item img {
    width: 80px;
    height: 60px;
  }

  .news-main img {
    height: 500px;
  }
  .news-main {
    height: 400px;
  }
  .news-side {
    height: 300px;
  }
  #berita-terkini {
    margin-top: 300px;
  }
  .cards .card-footer {
    justify-content: flex-start !important;
  }
  .card-footer i,
  .card-footer .views-text,
  .card-footer .time {
    margin-left: 10px;
  }
  #footer-terkini i {
    margin-left: 0px;
  }
}
