/* =========================================================
   BERANDA MODERN
   Direktorat Jenderal Kesehatan Lanjutan
   ========================================================= */

/* =========================================================
   01. GLOBAL / UTILITY
========================================================= */

#sectionBanner,
#sectionInformation,
#sectionRskemkes,
#sectionFlyer,
#sectionBerita,
#sectionArtikel,
#sectionFoto,
#sectionUpt {
	position: relative;
}

#sectionBanner img,
#sectionInformation img,
#sectionRskemkes img,
#sectionFlyer img,
#sectionBerita img,
#sectionArtikel img,
#sectionFoto img,
#sectionUpt img {
	max-width: 100%;
}

.no-gutters {
	margin-right: 0 !important;
	margin-left: 0 !important;
	padding-left: 0 !important;
}

/* =========================================================
   02. GENERAL HOVER
========================================================= */

.transform-on-hover {
	transition:
		transform 0.4s ease,
		box-shadow 0.4s ease;
}

.transform-on-hover:hover {
	transform: translateY(-10px) scale(1.02);

	box-shadow: 0 10px 10px rgba(0, 0, 0, 0.15) !important;
}

.transform-on-hover-upt {
	transition:
		transform 0.4s ease,
		box-shadow 0.4s ease;
}

.transform-on-hover-upt:hover {
	transform: translateY(-5px) scale(1.02);
}

/* =========================================================
   03. HERO / BANNER INFORMASI
   ---------------------------------------------------------
   Hero berisi banner yang di-upload admin:
   - HUT / Hari Nasional
   - Ucapan
   - Pengumuman
   - Informasi/kampanye yang bersifat segera

   JavaScript carousel tetap menggunakan:
   .slider-single
   .active
   .preactive
   .proactive
   .preactivede
   .proactivede

   CSS tidak lagi menggunakan efek carousel 3D lama.
========================================================= */

#sectionBanner {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: #f5fbfa;
}

/* =========================================================
   HERO SLIDER
========================================================= */

#sectionBanner .hero-slider {
	position: relative;
	width: 100%;
	height: clamp(320px, 38vw, 560px);
	overflow: hidden;
}

/*
   Fallback jika view masih menggunakan .slider-container.
   Hanya mempertahankan ukuran, bukan styling carousel lama.
*/
#sectionBanner .slider-container {
	position: relative;
	width: 100%;
	height: clamp(320px, 38vw, 560px);
	overflow: hidden;
}

/* =========================================================
   SLIDE
========================================================= */

#sectionBanner .slider-single {
	position: absolute;
	inset: 0;

	width: 100%;
	height: 100%;

	display: flex;
	align-items: center;
	justify-content: center;

	visibility: hidden;
	opacity: 0;

	z-index: 0;

	overflow: hidden;

	transition:
		opacity 0.6s ease,
		visibility 0s linear 0.6s;
}

#sectionBanner .slider-single.active {
	visibility: visible;
	opacity: 1;
	z-index: 2;

	transition:
		opacity 0.6s ease,
		visibility 0s linear 0s;
}

/*
   Fallback penting:
   slide pertama tetap tampil walaupun JavaScript carousel
   belum selesai dijalankan atau gagal dijalankan.
   Begitu JavaScript memberi class preactive/proactive/
   preactivede/proactivede, aturan di bawah otomatis tidak
   berlaku lagi karena status tersebut dibuat hidden.
*/
#sectionBanner
	.slider-single:first-child:not(.preactive):not(.proactive):not(
		.preactivede
	):not(.proactivede) {
	visibility: visible;
	opacity: 1;
	z-index: 2;
}

/*
   Class status berikut tetap dipertahankan agar
   JavaScript carousel lama tidak terganggu.
   Tidak lagi menghasilkan efek 3D.
*/
#sectionBanner .slider-single.preactive,
#sectionBanner .slider-single.proactive,
#sectionBanner .slider-single.preactivede,
#sectionBanner .slider-single.proactivede {
	visibility: hidden;
	opacity: 0;
	z-index: 0;
}

/* =========================================================
   BANNER IMAGE
========================================================= */

#sectionBanner .hero-banner-image {
	display: block;

	width: 100%;
	height: 100%;

	object-fit: cover;
	object-position: center center;

	/*
	   Banner standar direkomendasikan 1920 x 800 (rasio 2.4:1).
	   Container tetap responsif; object-fit menjaga banner memenuhi
	   area Hero tanpa membuat layout pecah.
	*/

	transform: scale(1);
	transform-origin: center center;

	transition: transform 7.5s ease;

	will-change: transform;
}

/*
   Sedikit zoom selama banner aktif.
   Sangat halus agar tetap terlihat seperti banner publikasi,
   bukan efek carousel 3D.
*/
#sectionBanner .slider-single.active .hero-banner-image {
	transform: scale(1.025);
}

/*
   Jika view lama masih memiliki <img class="slider-single-image">,
   tampilkan sebagai banner biasa tanpa efek 3D.
*/
#sectionBanner .slider-single-image {
	display: block;

	width: 100%;
	height: 100%;

	max-width: none;

	object-fit: cover;
	object-position: center center;

	margin: 0;

	opacity: 1;

	transform: scale(1);

	box-shadow: none;

	transition: transform 7.5s ease;
}

#sectionBanner .slider-single.active .slider-single-image {
	opacity: 1;
	transform: scale(1.025);
}

/* =========================================================
   NAVIGATION
========================================================= */

#sectionBanner .slider-left,
#sectionBanner .slider-right {
	position: absolute;

	top: 50%;
	z-index: 10;

	width: 42px;
	height: 42px;

	display: flex;
	align-items: center;
	justify-content: center;

	padding: 0;

	margin: 0;

	border: none;
	border-radius: 50%;

	transform: translateY(-50%);

	color: #fff;
	background: rgba(0, 80, 80, 0.5);

	font-size: 15px;
	line-height: 1;

	text-decoration: none;

	cursor: pointer;

	transition:
		background-color 0.25s ease,
		transform 0.25s ease,
		opacity 0.25s ease;
}

#sectionBanner .slider-left {
	left: 25px;
}

#sectionBanner .slider-right {
	right: 25px;
}

#sectionBanner .slider-left:hover,
#sectionBanner .slider-right:hover {
	color: #fff;
	background: #078f87;

	transform: translateY(-50%) scale(1.08);
}

/* =========================================================
   HERO INDICATOR
   ---------------------------------------------------------
   Disiapkan untuk indikator slide yang akan kita hubungkan
   ke JavaScript pada tahap berikutnya.
========================================================= */

#sectionBanner .hero-indicators {
	position: absolute;

	left: 50%;
	bottom: 18px;

	z-index: 10;

	display: flex;
	align-items: center;
	gap: 7px;

	transform: translateX(-50%);
}

/* =========================================================
   PARALLAX READY
   ---------------------------------------------------------
   Belum diaktifkan. Nantinya JavaScript dapat mengubah
   --hero-parallax-y tanpa mengubah struktur carousel.
========================================================= */

#sectionBanner .hero-banner-image {
	--hero-parallax-y: 0px;

	translate: 0 var(--hero-parallax-y);
}

/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
	#sectionBanner .hero-banner-image,
	#sectionBanner .slider-single-image {
		transition: none;
		transform: none;
		translate: none;
	}

	#sectionBanner .slider-single {
		transition: opacity 0.01ms linear;
	}
}

/* =========================================================
   RESPONSIVE HERO
========================================================= */

/* Desktop besar */
@media (min-width: 1400px) {
	#sectionBanner .hero-slider,
	#sectionBanner .slider-container {
		height: min(42vw, 650px);
	}
}

/* Tablet landscape */
@media (max-width: 1199px) {
	#sectionBanner .hero-slider,
	#sectionBanner .slider-container {
		height: clamp(300px, 43vw, 500px);
	}

	#sectionBanner .slider-left,
	#sectionBanner .slider-right {
		width: 40px;
		height: 40px;
	}
}

/* Tablet */
@media (max-width: 991px) {
	#sectionBanner .hero-slider,
	#sectionBanner .slider-container {
		height: clamp(260px, 48vw, 440px);
	}

	#sectionBanner .slider-left,
	#sectionBanner .slider-right {
		width: 38px;
		height: 38px;
		font-size: 13px;
	}

	#sectionBanner .slider-left {
		left: 16px;
	}

	#sectionBanner .slider-right {
		right: 16px;
	}
}

/* Mobile */
@media (max-width: 767px) {
	#sectionBanner .hero-slider,
	#sectionBanner .slider-container {
		/*
		   Tinggi mengikuti rasio banner desktop.
		   Banner tidak dibuat 500px agar tidak muncul
		   ruang kosong besar di bawah gambar.
		*/
		height: clamp(190px, 56vw, 390px);
	}

	#sectionBanner .hero-banner-image,
	#sectionBanner .slider-single-image {
		object-fit: cover;
		object-position: center center;
	}

	#sectionBanner .slider-left,
	#sectionBanner .slider-right {
		width: 34px;
		height: 34px;
		font-size: 12px;

		background: rgba(0, 80, 80, 0.58);
	}

	#sectionBanner .slider-left {
		left: 10px;
	}

	#sectionBanner .slider-right {
		right: 10px;
	}

	#sectionBanner .hero-indicators {
		bottom: 10px;
	}
}

/* Mobile kecil */
@media (max-width: 480px) {
	#sectionBanner .hero-slider,
	#sectionBanner .slider-container {
		height: clamp(165px, 58vw, 300px);
	}

	#sectionBanner .slider-left,
	#sectionBanner .slider-right {
		width: 30px;
		height: 30px;
		font-size: 10px;
	}

	#sectionBanner .slider-left {
		left: 8px;
	}

	#sectionBanner .slider-right {
		right: 8px;
	}
}

/* =========================================================
   CATATAN FORMAT BANNER
   ---------------------------------------------------------
   Rekomendasi desain file banner admin:

   - Rasio: 16:7 atau sekitar 2.4:1
   - Ukuran kerja: 1920 x 800 px
   - Format: JPG/PNG/WebP
   - Konten utama jangan terlalu dekat tepi
   - Hindari teks penting di 5% area paling kiri/kanan
   - Gunakan satu desain yang tetap terbaca ketika diperkecil
   - Mobile tetap menggunakan banner yang sama; jangan membuat
     CSS memotong teks penting secara agresif.

   Untuk desain contoh saat ini, 1920 x 800 px adalah ukuran
   yang direkomendasikan.
========================================================= */

/* =========================================================
   05. INFORMASI TERPILIH
========================================================= */

#sectionInformation {
	position: relative;
}

#sectionInformation .card-app {
	display: block;

	position: relative;

	min-width: 0;
	min-height: 118px;
	max-height: 118px;

	word-wrap: break-word;

	background-color: #fff;
	background-clip: border-box;

	border: 1px solid #fff;
	border-radius: 8px;

	box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.1);

	transition:
		transform 0.3s ease,
		box-shadow 0.3s ease;
}

#sectionInformation .card-app:hover {
	border-radius: 8px;

	box-shadow: 0 0 10px 10px rgba(0, 0, 0, 0.1) !important;

	transform: translateY(-3px);
}

#sectionInformation .card-app a {
	color: #666;
}

#sectionInformation .card-app a:hover,
#sectionInformation .card-app a:focus {
	color: #2cbfa4;
}

#sectionInformation .artikel-small {
	display: flex;
}

#sectionInformation .artikel-small-img {
	flex: 0 0 118px;

	max-width: 118px;
}

#sectionInformation .image-box {
	position: relative;

	height: 0;

	overflow: hidden;

	padding-bottom: 100%;
}

#sectionInformation .image-box img {
	position: absolute;

	left: 0;
	top: 0;

	width: 100%;
	height: 100%;

	object-fit: cover;
}

#sectionInformation .artikel-small-content {
	width: 100%;

	padding: 15px;
}

#sectionInformation .text-17 {
	font-size: 16px;
}

#sectionInformation .text-12 {
	font-size: 12px;

	line-height: 1.5;
}

#sectionInformation .more {
	flex: 0 0 35px;

	max-width: 35px;

	align-self: center;
}

/* =========================================================
   06. LINK BERITA & ARTIKEL
========================================================= */

.news-link {
	text-decoration: none;

	color: #2cbfa4;

	transition: color 0.3s ease;
}

.latest-link {
	text-decoration: none;

	color: #d1d342;

	transition: color 0.3s ease;
}

.news-link:hover {
	color: #1a8f7d;
}

.latest-link:hover {
	color: #b3b324;
}

/* =========================================================
   07. BUTTON BERITA
========================================================= */

.buttonBerita {
	color: #2cbfa4;

	text-decoration: none;

	transition: color 0.3s ease;
}

.buttonBerita:hover {
	color: #1a8f7d;
}

.buttonBeritaLainnya,
.buttonArtikelLainnya {
	display: inline-block;

	border: 2px solid #2cbfa4;

	border-radius: 5px;

	padding: 5px 10px;

	background: #2cbfa4;

	color: #fff;

	text-decoration: none;

	transition:
		transform 0.25s ease,
		background-color 0.25s ease;
}

.buttonBeritaLainnya:hover,
.buttonArtikelLainnya:hover {
	color: #fff;

	background: #1a8f7d;

	transform: translateY(-2px);
}

.buttonArtikel {
	color: #2cbfa4;

	text-decoration: none;

	transition: color 0.3s ease;
}

.buttonArtikel:hover {
	color: #1a8f7d;
}

/* =========================================================
   08. SECTION BERITA
========================================================= */

#sectionBerita {
	position: relative;

	background-color: #f2fffb;
	background-repeat: repeat;
	background-size: 100%;
	background-position: center center;
}

#sectionBerita img {
	width: 100%;

	border-radius: 8px;

	object-fit: cover;
}

/* =========================================================
   09. SECTION ARTIKEL
========================================================= */

#sectionArtikel {
	position: relative;

	background-color: #f2fffb;
	background-repeat: repeat;
	background-size: 100%;
	background-position: center center;
}

#sectionArtikel .divArticleImageEven,
#sectionArtikel .divArticleImageOdd {
	transition: all 1s ease;
}

#sectionArtikel .divArticleImageEven {
	transform: rotate(-5deg);
}

#sectionArtikel .divArticleImageOdd {
	transform: rotate(5deg);
}

#sectionArtikel .divArticleImageEven:hover,
#sectionArtikel .divArticleImageOdd:hover {
	transform: rotate(0deg);

	transition: all 0.6s ease-in-out;
}

#sectionArtikel img {
	max-width: 100%;
}

/* =========================================================
   10. VIDEO PROMOSI
========================================================= */

.videoPromosi {
	object-fit: initial;

	width: 100%;
	height: 550px;
}

/* =========================================================
   11. SECTION RS KEMENKES
========================================================= */

#sectionRskemkes {
	background-color: #fdfef1;

	padding: 40px 0;
}

/* ---------------------------------------------------------
   Video
--------------------------------------------------------- */

#sectionRskemkes .video-wrapper {
	background-color: #fff;

	border-radius: 12px;

	overflow: hidden;

	border: 1px solid #e6e6e6;
}

#sectionRskemkes .video-wrapper video {
	display: block;

	width: 100%;
	height: auto;
}

/* ---------------------------------------------------------
   Card utama
--------------------------------------------------------- */

#sectionRskemkes .section-inner {
	background-color: #fff;

	border-radius: 28px;

	padding: 40px;

	margin-bottom: 20px;

	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ---------------------------------------------------------
   Image
--------------------------------------------------------- */

#sectionRskemkes .image-wrapper {
	border-radius: 20px;

	overflow: hidden;

	border: 1px solid #e6e6e6;
}

#sectionRskemkes .image-wrapper img {
	display: block;

	width: 100%;
	height: auto;
}

/* ---------------------------------------------------------
   Button
--------------------------------------------------------- */

#sectionRskemkes .buttonBeritaLainnya {
	display: inline-block;

	margin-top: 5px;
}

/* =========================================================
   12. MODAL
========================================================= */

.modal-custom {
	max-width: 900px;
}

.modal-transparent {
	position: relative;

	background: transparent;

	border: none;

	box-shadow: none;
}

.modal-transparent img {
	display: block;

	width: 100%;

	border-radius: 8px;
}

.btn-close-custom {
	position: absolute;

	top: -7px;
	right: -7px;

	z-index: 999;

	width: 35px;
	height: 35px;

	border: none;

	border-radius: 50%;

	background: rgba(0, 0, 0, 0.7);

	color: #000;

	font-size: 28px;
	font-weight: bold;

	line-height: 1;

	opacity: 1;
}

.btn-close-custom:hover {
	background: rgba(49, 219, 111, 0.9);

	color: #fff;
}

/* =========================================================
   13. FLYER
========================================================= */

#sectionFlyer {
	width: 100%;

	overflow: hidden;
}

#sectionFlyer .flyer-slider {
	position: relative;

	width: 100%;

	overflow: hidden;
}

#sectionFlyer .flyer-track {
	display: flex;

	width: 100%;

	transition: transform 0.5s ease;
}

#sectionFlyer .flyer-item {
	flex: 0 0 25%;

	padding: 0 8px;

	box-sizing: border-box;
}

#sectionFlyer .flyer-image {
	display: block;

	width: 100%;

	height: auto;

	aspect-ratio: 4 / 5;

	object-fit: cover;

	border-radius: 10px;

	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);

	transition:
		transform 0.3s ease,
		box-shadow 0.3s ease;
}

/* ---------------------------------------------------------
   Flyer desktop
--------------------------------------------------------- */

@media (min-width: 992px) {
	#sectionFlyer .flyer-track.two-flyers {
		justify-content: center;
	}

	#sectionFlyer .flyer-item:hover .flyer-image {
		transform: translateY(-4px);

		box-shadow: 0 7px 20px rgba(0, 0, 0, 0.18);
	}

	#sectionFlyer .flyer-prev,
	#sectionFlyer .flyer-next,
	#sectionFlyer .flyer-dots {
		display: none;
	}
}

/* ---------------------------------------------------------
   Flyer tablet
--------------------------------------------------------- */

@media (min-width: 576px) and (max-width: 991px) {
	#sectionFlyer .flyer-item {
		flex: 0 0 50%;
	}

	#sectionFlyer .flyer-prev,
	#sectionFlyer .flyer-next {
		display: flex;
	}
}

/* ---------------------------------------------------------
   Flyer mobile
--------------------------------------------------------- */

@media (max-width: 575px) {
	#sectionFlyer {
		margin-top: 20px !important;
	}

	#sectionFlyer .container {
		padding-left: 10px;
		padding-right: 10px;
	}

	#sectionFlyer .flyer-item {
		flex: 0 0 100%;

		padding: 0 5px;
	}

	#sectionFlyer .flyer-image {
		width: 100%;

		aspect-ratio: 4 / 5;

		object-fit: cover;

		border-radius: 8px;
	}

	/* -----------------------------------------------------
       Navigation
    ----------------------------------------------------- */

	#sectionFlyer .flyer-prev,
	#sectionFlyer .flyer-next {
		position: absolute;

		top: 50%;

		transform: translateY(-50%);

		width: 34px;
		height: 34px;

		border: none;

		border-radius: 50%;

		background: rgba(0, 0, 0, 0.45);

		color: #fff;

		display: flex;

		align-items: center;
		justify-content: center;

		z-index: 10;

		cursor: pointer;
	}

	#sectionFlyer .flyer-prev {
		left: 12px;
	}

	#sectionFlyer .flyer-next {
		right: 12px;
	}

	#sectionFlyer .flyer-prev:active,
	#sectionFlyer .flyer-next:active {
		transform: translateY(-50%) scale(0.92);
	}

	/* -----------------------------------------------------
       Indicator
    ----------------------------------------------------- */

	#sectionFlyer .flyer-dots {
		display: flex;

		justify-content: center;
		align-items: center;

		gap: 6px;

		margin-top: 10px;
	}

	#sectionFlyer .flyer-dot {
		width: 7px;
		height: 7px;

		border-radius: 50%;

		background: #d0d0d0;

		transition: all 0.3s ease;
	}

	#sectionFlyer .flyer-dot.active {
		width: 20px;

		border-radius: 10px;

		background: #2cbfa4;
	}
}

/* =========================================================
   14. FOTO
========================================================= */

#sectionFoto {
	position: relative;
}

#sectionFoto .buttonFoto {
	color: #2cbfa4;

	text-decoration: none;

	transition: color 0.3s ease;
}

#sectionFoto .buttonFoto:hover {
	color: #b3b324;
}

#sectionFoto .foto-title-link {
	color: #2cbfa4;

	font-size: 1.25rem;

	font-weight: bold;

	text-decoration: none;
}

#sectionFoto .foto-title-link:hover {
	color: #1a8f7d;
}

/* ---------------------------------------------------------
   Foto / Video preview
--------------------------------------------------------- */

#sectionFoto .media-preview {
	width: 100%;

	height: 270px;

	object-fit: cover;

	border-radius: 8px;
}

#sectionFoto .media-card {
	display: flex;

	flex-direction: column;
}

/* =========================================================
   15. GALERI CTA
========================================================= */

#sectionFoto .gallery-cta {
	background-color: #2cbfa4;

	border: none;

	border-radius: 8px;

	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#sectionFoto .gallery-cta p {
	max-width: 900px;

	margin: 0 auto;

	font-size: 1.05rem;

	line-height: 1.6;

	font-weight: 400;

	color: #fff;
}

#sectionFoto .gallery-cta .btn-light {
	color: #2cbfa4;

	font-weight: bold;

	border-radius: 6px;

	border: none;

	font-size: 1rem;
}

#sectionFoto .gallery-cta .btn-light:hover {
	color: #1a8f7d;
}

/* =========================================================
   16. UPT
========================================================= */

#sectionUpt {
	margin-top: 3rem;

	background-color: #fff;
}

#sectionUpt .owl-carousel {
	position: relative;
}

#sectionUpt .owl-prev {
	width: 20px;
	height: 60px;

	position: absolute;

	top: 40%;

	margin-left: -25px;

	display: block !important;

	border: 0;

	background-color: #fff;

	color: #000;
}

#sectionUpt .owl-next {
	width: 20px;
	height: 60px;

	position: absolute;

	top: 40%;

	right: -30px;

	display: block !important;

	border: 0;

	background-color: #fff;

	color: #000;
}

#sectionUpt .owl-prev i,
#sectionUpt .owl-next i {
	transform: scale(2);

	color: #8c8c8c;
}

/* =========================================================
   17. SLICK / VERTICAL CAROUSEL
========================================================= */

.slick-carousel {
	width: 100%;
}

/* =========================================================
   18. HEARTBEAT
========================================================= */

@keyframes heartbeat {
	0% {
		transform: scale(0);
	}

	25% {
		transform: scale(1.2);
	}

	50% {
		transform: scale(1);
	}

	75% {
		transform: scale(1.2);
	}

	100% {
		transform: scale(1);
	}
}

/* =========================================================
   20. MOBILE GENERAL
========================================================= */

@media only screen and (max-width: 768px) {
	.section-serta-merta {
		margin-top: 20px;
	}
}

/* =========================================================
   20. REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {
	#sectionBanner *,
	#sectionInformation *,
	#sectionRskemkes *,
	#sectionFlyer *,
	#sectionBerita *,
	#sectionArtikel *,
	#sectionFoto *,
	#sectionUpt * {
		animation-duration: 0.01ms !important;

		animation-iteration-count: 1 !important;

		transition-duration: 0.01ms !important;

		scroll-behavior: auto !important;
	}
}
