/* ================= Variables ================= */
:root {
	--kemenkes: #009688;
	--kemenkes-dark: #004d40;
	--muted: #6c757d;
	--light-bg: #f8f9fa;
	--shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
	--shadow-hover: 0 12px 25px rgba(0, 0, 0, 0.15);
	--transition: all 0.3s ease;
	--border-radius: 12px;
}

/* ================= Reset & Layout ================= */
html,
body {
	height: 100%;
	margin: 0;
	padding: 0;
	scroll-behavior: smooth;
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto,
		"Helvetica Neue", Arial;
	background: #fff;
	color: #222;
	line-height: 1.6;
	display: flex;
	flex-direction: column;
}

main,
.wrapper,
.dokumen-page {
	flex: 1;
	margin-bottom: 2.5rem;
}

/* ================= Navbar ================= */
.navbar.bg-kemenkes {
	background: linear-gradient(90deg, var(--kemenkes), var(--kemenkes-dark));
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	transition: var(--transition);
}
.navbar .logo {
	width: 72px;
	height: 72px;
	object-fit: contain;
	border-radius: var(--border-radius);
}

/* ==== Navbar Logo Group ==== */
.logo-group {
	gap: 8px;
}
.multi-logo {
	height: 62px;
	width: auto;
	object-fit: contain;
	border-radius: 8px;
	transition: transform 0.3s ease;
	filter: brightness(0.95);
}
.multi-logo:hover {
	transform: scale(1.08);
	filter: brightness(1);
}

/* ================= Hero ================= */
.hero {
	position: relative;
	overflow: hidden;
	padding: 4rem 0;
	color: #fff;
	text-align: center;
	background: linear-gradient(
		90deg,
		rgba(0, 150, 136, 0.95),
		rgba(0, 77, 64, 0.95)
	);
}
.hero::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.2);
	z-index: 1;
}
.hero .hero-card {
	transform: translateY(-20px);
	border-radius: var(--border-radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	background: #fff;
	transition: transform 0.4s ease, box-shadow 0.4s ease;
	position: relative;
	z-index: 2;
}
.hero .hero-card:hover {
	transform: translateY(-10px) scale(1.02);
	box-shadow: var(--shadow-hover);
}
.hero .display-6 {
	color: #fff;
	font-weight: 600;
	position: relative;
	z-index: 2;
}
.hero p,
.hero .btn-kemenkes {
	position: relative;
	z-index: 2;
}

/* === Video Background Hero === */
.hero-video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	z-index: 0;
	min-height: 100%;
}
.hero .overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		90deg,
		rgba(0, 150, 136, 0.45),
		rgba(0, 77, 64, 0.45)
	);
	z-index: 1;
}

/* Tombol Audio */
.video-sound-toggle {
	position: absolute;
	bottom: 20px;
	right: 20px;
	z-index: 3;
	background: var(--kemenkes);
	color: #fff;
	border: none;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	transition: var(--transition);
}
.video-sound-toggle:hover {
	background: var(--kemenkes-dark);
	transform: scale(1.1);
}
.video-sound-toggle i {
	font-size: 1.5rem;
}

/* ================= Buttons ================= */
.btn-kemenkes {
	background: var(--kemenkes);
	color: #fff;
	border: none;
	border-radius: var(--border-radius);
	transition: var(--transition);
}
.btn-kemenkes:hover,
.btn-kemenkes:focus {
	background: var(--kemenkes-dark);
	transform: translateY(-2px);
}
.btn-outline-kemenkes {
	color: var(--kemenkes);
	border: 1px solid var(--kemenkes);
	border-radius: var(--border-radius);
	transition: var(--transition);
}
.btn-outline-kemenkes:hover,
.btn-outline-kemenkes:focus {
	background: var(--kemenkes);
	color: #fff;
}

/* ================= Card Styles ================= */
.feature-card,
.team-card,
.doc-card,
.berita-card {
	border: none;
	border-radius: var(--border-radius);
	background: #fff;
	box-shadow: var(--shadow);
	transition: transform 0.4s ease, box-shadow 0.4s ease;
	overflow: hidden;
	position: relative;
}
.feature-card:hover,
.team-card:hover,
.doc-card:hover,
.berita-card:hover {
	transform: translateY(-12px) scale(1.04) rotateZ(-0.5deg);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* ================= Icon Wrap ================= */
.icon-wrap {
	font-size: 32px;
	color: #fff;
	width: 70px;
	height: 70px;
	background: linear-gradient(45deg, var(--kemenkes), var(--kemenkes-dark));
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	margin: 0 auto 0.5rem;
	transition: transform 0.3s ease;
}
.feature-card:hover .icon-wrap {
	transform: scale(1.1);
}

/* ================= Berita Overlay ================= */
.img-wrap {
	position: relative;
	overflow: hidden;
	border-radius: var(--border-radius);
}
.img-wrap img {
	transition: transform 0.5s ease;
}
.img-wrap:hover img {
	transform: scale(1.1);
}
.img-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 150, 136, 0.6);
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}
.img-wrap:hover .img-overlay {
	opacity: 1;
	transform: translateY(0);
}
.img-overlay a {
	font-weight: 600;
	border-radius: var(--border-radius);
	padding: 0.6rem 1.2rem;
	transition: background 0.3s ease;
}
.img-overlay a:hover {
	background: var(--kemenkes-dark);
	color: #fff;
}

/* ================= Table Modern ================= */
.table-modern {
	border-radius: var(--border-radius);
	overflow: hidden;
	background: #fff;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
	border: 1px solid #e9ecef;
	margin-bottom: 3.5rem;
}
.table-modern thead {
	background: linear-gradient(90deg, var(--kemenkes), var(--kemenkes-dark));
	color: #fff;
}
.table-modern th {
	font-weight: 600;
	border: none;
}
.table-modern td {
	vertical-align: middle;
}
.table-modern tbody tr:hover {
	background-color: rgba(0, 150, 136, 0.05);
}

/* ================= Text & Badges ================= */
.text-kemenkes {
	color: var(--kemenkes) !important;
}
.text-kemenkes-50 {
	color: rgba(0, 150, 136, 0.7) !important;
}
.text-gradient {
	background: linear-gradient(90deg, var(--kemenkes), var(--kemenkes-dark));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	font-weight: 600;
}
.badge.bg-kemenkes {
	background-color: rgba(0, 150, 136, 0.85);
	color: #fff;
	font-weight: 500;
	padding: 0.3rem 0.8rem;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
	border-radius: var(--border-radius);
}

/* ================= Team Card Enhancement ================= */
.team-card {
	text-align: center;
	border: none;
	border-radius: var(--border-radius);
	background: #fff;
	box-shadow: var(--shadow);
	transition: transform 0.4s ease, box-shadow 0.4s ease;
	overflow: hidden;
}
.team-card:hover {
	transform: translateY(-8px);
	box-shadow: var(--shadow-hover);
}
.team-card img {
	width: 100%;
	height: 230px;
	object-fit: cover;
	border-radius: var(--border-radius);
	box-shadow: var(--shadow);
	transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.team-card:hover img {
	transform: scale(1.05);
	box-shadow: var(--shadow-hover);
}

/* ================= Carousel Custom ================= */
.carousel-container {
	position: relative;
	overflow: hidden;
	width: 100%;
}
.carousel-track {
	display: flex;
	transition: transform 0.6s ease-in-out;
}
.carousel-item-custom {
	flex: 0 0 calc(25% - 16px);
	margin-right: 16px;
}
@media (max-width: 992px) {
	.carousel-item-custom {
		flex: 0 0 calc(33.33% - 16px);
	}
}
@media (max-width: 768px) {
	.carousel-item-custom {
		flex: 0 0 calc(50% - 16px);
	}
}
@media (max-width: 576px) {
	.carousel-item-custom {
		flex: 0 0 calc(100% - 16px);
	}
}

/* Tombol Carousel bergaya Kemenkes */
.carousel-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: linear-gradient(135deg, var(--kemenkes), var(--kemenkes-dark));
	border: none;
	color: #fff;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	z-index: 10;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: var(--transition);
}
.carousel-btn:hover {
	background: linear-gradient(135deg, var(--kemenkes-dark), var(--kemenkes));
	transform: translateY(-50%) scale(1.1);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.carousel-btn.prev {
	left: 10px;
}
.carousel-btn.next {
	right: 10px;
}

/* ================= Utility & Animation ================= */
.fade-in {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.show {
	opacity: 1;
	transform: translateY(0);
}

/* ================= Footer ================= */
.footer {
	font-size: 0.95rem;
	width: 100%;
	min-height: 120px;
	background-color: var(--light-bg);
	border-top: 1px solid #dee2e6;
	text-align: center;
	padding: 1.5rem 1rem;
	color: var(--muted);
	margin-top: auto;
	position: relative;
	box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.05);
	animation: fadeIn 0.6s ease;
}

/* ================= Modal ================= */
.modal-content {
	border-radius: var(--border-radius) !important;
	box-shadow: var(--shadow);
}
.modal-header.bg-kemenkes {
	background: linear-gradient(90deg, var(--kemenkes), var(--kemenkes-dark));
	color: #fff;
}

/* ================= Responsiveness ================= */
@media (max-width: 767px) {
	.hero {
		padding: 3rem 0;
		text-align: center;
	}
	.hero .display-6 {
		font-size: 1.6rem;
	}
	.hero-video {
		object-position: center center;
		min-height: 100vh;
	}
}
@media (max-width: 576px) {
	.video-sound-toggle {
		width: 44px;
		height: 44px;
		bottom: 12px;
		right: 12px;
	}
	.video-sound-toggle i {
		font-size: 1.25rem;
	}
	.multi-logo {
		height: 34px;
	}
	.navbar-brand .lh-sm {
		font-size: 0.85rem;
	}
	.table-modern th,
	.table-modern td {
		font-size: 0.875rem;
	}
	.modal-body {
		min-height: 300px !important;
	}
}

/* ================= Dark Mode ================= */
@media (prefers-color-scheme: dark) {
	:root {
		--light-bg: #1e1e1e;
		--muted: #b0b0b0;
		--shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
	}
	body {
		background: #121212;
		color: #e0e0e0;
	}
	.navbar.bg-kemenkes {
		background: linear-gradient(90deg, #00796b, #003d33);
		box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
	}
	.hero {
		background: linear-gradient(90deg, #004d40, #00251a);
		color: #fff;
	}
	.hero .hero-card {
		background: #1c1c1c;
		color: #eee;
	}
	.feature-card,
	.team-card,
	.doc-card,
	.table-modern,
	.berita-card {
		background: #1e1e1e;
		color: #e0e0e0;
		border: 1px solid #333;
	}
	.table-modern thead {
		background: linear-gradient(90deg, #00796b, #004d40);
		color: #fff;
	}
	.footer {
		background: #1c1c1c;
		border-top: 1px solid #333;
		color: #aaa;
	}
	.btn-kemenkes {
		background: #00796b;
	}
	.btn-kemenkes:hover {
		background: #004d40;
	}
	.btn-outline-kemenkes {
		color: #80cbc4;
		border-color: #00796b;
	}
	.btn-outline-kemenkes:hover {
		background: #00796b;
		color: #fff;
	}
	.btn-icon {
		color: #aaa;
	}
	.btn-icon:hover {
		color: #80cbc4;
	}
	.modal-content {
		background: #1e1e1e;
		color: #e0e0e0;
	}
}
