/* --- Variabel Warna --- */
:root {
	--color-primary-dark: #1e293b;
	--color-accent: #ffb800;
	--color-footer: #0a1324;
	--color-light-bg: #f8fafc;
}

/* --- Pengaturan Dasar --- */
body {
	font-family: "Inter", sans-serif;
	color: #475569;
	overflow-x: hidden; /* Mencegah layar bergeser ke samping */
}

.text-primary-dark {
	color: var(--color-primary-dark) !important;
}

.bg-accent {
	background-color: var(--color-accent) !important;
}

.text-accent {
	color: var(--color-accent) !important;
}

.bg-light-custom {
	background-color: var(--color-light-bg);
}

.tracking-wide {
	letter-spacing: 1px;
}

/* --- Tombol --- */
.btn-accent {
	background-color: var(--color-accent);
	color: var(--color-primary-dark);
	border: none;
	transition: all 0.3s ease;
}

.btn-accent:hover {
	background-color: #e5a600;
	color: var(--color-primary-dark);
	transform: translateY(-2px);
}

.hover-accent:hover {
	color: var(--color-accent) !important;
}

/* --- Navbar --- */
.navbar .nav-link {
	color: #64748b;
	font-weight: 500;
	padding: 0.5rem 1rem;
	transition: color 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
	color: var(--color-primary-dark);
}

@media (min-width: 992px) {
	.navbar .nav-link.active {
		border-bottom: 2px solid var(--color-primary-dark);
	}
}

/* --- Hero Section Responsif --- */
.hero-section {
	position: relative;
	min-height: 75vh;
	padding: 60px 0;
	background:
		linear-gradient(rgba(10, 25, 47, 0.75), rgba(10, 25, 47, 0.75)),
		url("https://smk4pekalongan.sch.id/assets/img/header.png") no-repeat center center/cover;
}

@media (min-width: 992px) {
	.hero-section {
		height: 85vh;
		padding: 0;
	}
}

/* --- Stats Section Responsif --- */
.stats-container {
	margin-top: -30px;
	position: relative;
	z-index: 10;
}

@media (min-width: 768px) {
	.stats-container {
		margin-top: -60px;
	}
}

.stat-item {
	border-right: none;
	border-bottom: 1px solid #e2e8f0;
	padding-bottom: 1rem;
}

@media (min-width: 768px) {
	.stat-item {
		border-right: 1px solid #e2e8f0;
		border-bottom: none;
		padding-bottom: 0;
	}
	.stat-item:last-child {
		border-right: none;
	}
}

.icon-wrapper {
	width: 50px;
	height: 50px;
	background-color: #f1f5f9;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
	color: var(--color-primary-dark);
}

@media (min-width: 768px) {
	.icon-wrapper {
		width: 60px;
		height: 60px;
		font-size: 1.5rem;
	}
}

/* --- Cards (Program & Berita) --- */
.program-card {
	transition:
		transform 0.3s ease,
		box-shadow 0.3s ease;
}

.program-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

/* --- Profil Kepala Sekolah --- */
.kepsek-img {
	height: 300px !important;
}

@media (min-width: 768px) {
	.kepsek-img {
		height: 450px !important;
	}
}

.image-accent-bg {
	position: absolute;
	top: -20px;
	left: -20px;
	width: 60%;
	height: 60%;
	background-color: var(--color-accent);
	border-radius: 20px 0 0 0;
	z-index: 0;
}

.kepsek-profile {
	border-left: 4px solid var(--color-accent);
	padding-left: 1rem;
}

/* --- Footer --- */
.footer-custom {
	background-color: var(--color-footer);
}

.social-icon {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, 0.1);
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: all 0.3s ease;
}

.social-icon:hover {
	background-color: var(--color-accent);
	color: var(--color-primary-dark);
}

.footer-links li {
	margin-bottom: 0.8rem;
}

.footer-links a {
	color: rgba(255, 255, 255, 0.5);
	text-decoration: none;
	transition: color 0.3s ease;
}

.footer-links a:hover {
	color: var(--color-accent);
}

/* --- Efek Hover untuk Dropdown (Hanya Desktop) --- */
@media (min-width: 992px) {
	.navbar .dropdown:hover .dropdown-menu {
		display: block;
		margin-top: 0; /* Menghilangkan jarak agar kursor tidak kehilangan fokus */
	}

	/* Menambahkan animasi halus saat muncul (Opsional) */
	.navbar .dropdown-menu {
		animation: fadeInDown 0.3s ease forwards;
	}

	@keyframes fadeInDown {
		0% {
			opacity: 0;
			transform: translateY(10px);
		}
		100% {
			opacity: 1;
			transform: translateY(0);
		}
	}
}

/* --- Pengaturan Logo & Teks Navbar --- */
.navbar-brand {
	padding-top: 0;
	padding-bottom: 0;
}

.logo-img {
	width: 50px; /* Atur ukuran logo di sini agar pas dengan tinggi teks */
	height: auto;
	object-fit: contain;
}

.logo-text {
	justify-content: center; /* Memastikan teks tepat berada di tengah secara vertikal */
}

.logo-text span {
	line-height: 1.2 !important; /* Merapatkan jarak antara teks "SMK Negeri 4" dan "Pekalongan" */
}

/* Penyesuaian ukuran teks logo untuk HP */
@media (max-width: 767px) {
	.logo-img {
		width: 40px; /* Ukuran logo sedikit lebih kecil di HP */
	}
	.logo-text span {
		font-size: 0.9rem !important; /* Menyesuaikan ukuran font agar tidak terpotong */
	}
}

/* ========================================================
   TAMBAHAN CSS UNTUK HALAMAN PROFIL (screen.jpg)
   ======================================================== */

/* --- Hero Profil --- */
.hero-profile {
	position: relative;
	min-height: 75vh;
	padding: 60px 0;
	background:
		linear-gradient(rgba(10, 25, 47, 0.6), rgba(10, 25, 47, 0.6)),
		url("https://smk4pekalongan.sch.id/assets/img/header.png") no-repeat center center/cover;
	/* Ganti URL gambar di atas dengan foto gedung sekolah */
}

/* --- Garis Bawah Kuning pada Judul (Sejarah, Visi Misi) --- */
.title-underline {
	position: relative;
	padding-bottom: 12px;
}
.title-underline::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 50px;
	height: 4px;
	background-color: var(--color-accent);
	border-radius: 2px;
}

/* Untuk posisi judul di tengah (seperti di Visi Misi) */
.title-underline-center {
	position: relative;
	padding-bottom: 12px;
}
.title-underline-center::after {
	content: "";
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	bottom: 0;
	width: 60px;
	height: 4px;
	background-color: var(--color-accent);
	border-radius: 2px;
}

/* --- Visi & Misi Cards --- */
.bg-soft-blue {
	background-color: #f5f8fc !important; /* Warna latar kartu biru sangat pudar/abu-abu */
}

.border-top-accent {
	border-top: 5px solid var(--color-accent) !important;
}

.border-top-primary {
	border-top: 5px solid var(--color-primary-dark) !important;
}

.icon-wrapper-vm {
	width: 70px;
	height: 70px;
	background-color: #e2e8f0;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ========================================================
   TAMBAHAN CSS UNTUK HALAMAN SAMBUTAN KEPSEK (screen_2.jpg)
   ======================================================== */

/* --- Page Header Biru --- */
.bg-primary-dark {
	background-color: var(--color-primary-dark) !important;
}

.breadcrumb-custom a {
	color: rgba(255, 255, 255, 0.6);
	text-decoration: none;
	transition: color 0.2s ease;
}

.breadcrumb-custom a:hover {
	color: white;
}

.breadcrumb-custom span {
	margin: 0 8px;
	color: rgba(255, 255, 255, 0.4);
}

/* --- Badge Melayang di Foto --- */
.floating-badge {
	position: absolute;
	bottom: 25px;
	left: -20px; /* Dibuat sedikit menonjol ke luar dari gambar */
	z-index: 10;
}

@media (max-width: 991px) {
	.floating-badge {
		left: 15px; /* Menghindari badge terpotong di layar HP/Tablet */
		bottom: 15px;
	}
}

/* --- Kartu Bawah (Navigasi Tambahan) --- */
.card-related {
	border-bottom: 4px solid transparent !important;
	transition:
		transform 0.3s ease,
		box-shadow 0.3s ease;
}

.card-related:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
}

/* Garis warna di bawah kartu */
.border-bottom-blue {
	border-bottom-color: var(--color-primary-dark) !important;
}
.border-bottom-yellow {
	border-bottom-color: var(--color-accent) !important;
}
.border-bottom-green {
	border-bottom-color: #10b981 !important;
} /* Hijau khusus untuk struktur organisasi */

/* Latar belakang pastel untuk ikon di kartu */
.icon-box-soft-blue {
	background-color: #eef2ff;
}
.icon-box-soft-yellow {
	background-color: #fff9e6;
}
.icon-box-soft-green {
	background-color: #d1fae5;
}

/* ========================================================
   TAMBAHAN CSS UNTUK HALAMAN STRUKTUR ORGANISASI (screen_3.jpg)
   ======================================================== */

.bg-light-gray {
	background-color: #fafbfc;
}

.btn-primary-dark {
	background-color: var(--color-primary-dark);
	border: none;
}
.btn-primary-dark:hover {
	background-color: #0f172a;
}

/* --- Header Struktur Organisasi --- */
.hero-struktur {
	position: relative;
	min-height: 75vh;
	padding: 60px 0;
	background:
		linear-gradient(rgba(10, 25, 47, 0.6), rgba(10, 25, 47, 0.6)),
		url("/smk4pekalongan/assets/img/header.png") no-repeat center center/cover;
}

/* --- Bagan Organisasi (Org Chart) --- */
.org-card {
	width: 260px;
	position: relative;
}

.border-warning-thick {
	border: 3px solid var(--color-accent) !important;
}

.org-photo {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
	position: absolute;
	top: -40px;
	left: 50%;
	transform: translateX(-50%);
	border: 4px solid white;
}

.org-photo-kepsek {
	width: 90px;
	height: 90px;
	top: -45px;
	border-color: var(--color-accent);
}

.org-photo-small {
	width: 65px;
	height: 65px;
	border-radius: 50%;
	object-fit: cover;
	position: absolute;
	top: -32.5px;
	left: 50%;
	transform: translateX(-50%);
	border: 3px solid white;
}

/* --- Garis Penghubung Bagan (Hanya Tampil di Layar Besar) --- */
@media (min-width: 992px) {
	/* Garis Vertikal Turun dari Kepala Sekolah */
	#kepsek-card::after {
		content: "";
		position: absolute;
		bottom: -50px;
		left: 50%;
		width: 1px;
		height: 50px;
		background-color: #cbd5e1;
	}

	/* Garis Horizontal di atas Level 2 */
	.org-level-2 {
		position: relative;
	}

	.org-level-2::before {
		content: "";
		position: absolute;
		top: -2px; /* Sesuaikan agar pas menempel */
		left: 10%; /* Titik awal garis horizontal */
		right: 10%; /* Titik akhir garis horizontal */
		height: 1px;
		background-color: #cbd5e1;
		z-index: 0;
	}

	/* Garis Vertikal Naik dari masing-masing node di Level 2 */
	.org-node::before {
		content: "";
		position: absolute;
		top: -33px; /* Jarak dari batas atas elemen ke garis horizontal */
		left: 50%;
		width: 1px;
		height: 33px;
		background-color: #cbd5e1;
		z-index: 0;
	}
}

/* --- Program Keahlian Cards --- */
.bg-light-soft {
	background-color: #f1f5f9;
}

.border-start-red {
	border-left: 4px solid #ef4444 !important;
}
.border-start-green {
	border-left: 4px solid #10b981 !important;
}
.border-start-blue {
	border-left: 4px solid #3b82f6 !important;
}

/* Warna khusus teks warning di Footer */
footer .text-warning {
	color: var(--color-accent) !important;
}

/* ========================================================
   TAMBAHAN CSS UNTUK HALAMAN DAFTAR BERITA (screen_4.jpg)
   ======================================================== */

/* --- Card Berita Interaktif --- */
.news-card {
	transition:
		transform 0.3s ease,
		box-shadow 0.3s ease;
}

.news-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Memotong teks jika terlalu panjang (Ellipsis) */
.line-clamp-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-clamp: 2;
}

.line-clamp-3 {
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-clamp: 3;
}

/* --- Tombol Selengkapnya --- */
.btn-readmore {
	background-color: var(--color-primary-dark);
	border: none;
	transition: all 0.3s ease;
}

.btn-readmore:hover {
	background-color: var(--color-accent);
	color: var(--color-primary-dark) !important;
}

/* --- Kustomisasi Pagination (Penomoran Halaman) --- */
.custom-pagination .page-item .page-link {
	color: var(--color-primary-dark);
	border-radius: 6px;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 500;
}

.custom-pagination .page-item.active .page-link {
	background-color: var(--color-primary-dark);
	border-color: var(--color-primary-dark);
	color: white !important;
}

.custom-pagination .page-item.disabled .page-link {
	color: #94a3b8;
	background-color: #f8fafc;
}

/* ========================================================
   TAMBAHAN CSS UNTUK HALAMAN DAFTAR GURU (screen_5.jpg)
   ======================================================== */

/* --- Header / Hero Daftar Guru --- */
.hero-guru {
	position: relative;
	padding: 80px 0;
	min-height: 250px;
	background:
		linear-gradient(rgba(10, 25, 47, 0.75), rgba(10, 25, 47, 0.75)),
		url("https://via.placeholder.com/1920x400") no-repeat center center/cover;
}

.breadcrumb-guru a {
	color: rgba(255, 255, 255, 0.7);
	text-decoration: none;
	transition: color 0.2s ease;
}

.breadcrumb-guru a:hover {
	color: white;
}

.breadcrumb-guru span {
	color: rgba(255, 255, 255, 0.4);
	margin: 0 10px;
}

.breadcrumb-guru span.active {
	color: var(--color-accent);
	font-weight: 600;
}

/* --- Pengaturan Tabel Kustom --- */
.custom-table {
	border-collapse: separate;
	border-spacing: 0;
	min-width: 800px; /* Mencegah tabel terlalu sempit di layar HP */
}

.custom-table thead th {
	background-color: #f8fafc;
	color: var(--color-primary-dark);
	font-weight: 600;
	font-size: 0.9rem;
	padding: 18px 15px;
	border-bottom: 2px solid #e2e8f0;
	white-space: nowrap;
}

.custom-table tbody td {
	padding: 18px 15px;
	color: #475569;
	font-size: 0.95rem;
	border-bottom: 1px solid #f1f5f9;
	vertical-align: middle;
}

.custom-table tbody tr {
	transition: background-color 0.2s ease;
}

.custom-table tbody tr:hover td {
	background-color: #f8fafc;
}

.teacher-photo {
	width: 45px;
	height: 45px;
	border-radius: 8px;
	object-fit: cover;
	border: 1px solid #e2e8f0;
}

/* --- Badge Pendidikan --- */
.badge-s1 {
	background-color: #e0e7ff; /* Biru pastel */
	color: #4338ca;
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 600;
	display: inline-block;
	white-space: nowrap;
}

.badge-s2 {
	background-color: #f3e8ff; /* Ungu pastel */
	color: #7e22ce;
	padding: 6px 12px;
	border-radius: 12px;
	font-size: 0.8rem;
	font-weight: 700;
	display: inline-block;
}

/* --- Form Controls & Search Input --- */
.table-controls .form-select,
.table-controls .form-control {
	border-color: #e2e8f0;
	font-size: 0.9rem;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
}

.table-controls .form-control:focus,
.table-controls .form-select:focus {
	border-color: var(--color-primary-dark);
	box-shadow: 0 0 0 0.25rem rgba(30, 41, 59, 0.1);
}

.search-icon-wrapper {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
	z-index: 10;
}

.search-input-custom {
	padding-left: 40px !important;
	border-radius: 8px;
	background-color: #f8fafc;
}

/* ========================================================
   TAMBAHAN CSS UNTUK HALAMAN PUSAT UNDUHAN (screen_6.jpg)
   ======================================================== */

/* --- Warna Aksen Kuning Khusus --- */
.text-yellow-custom {
	color: #fbbf24 !important; /* Warna kuning emas */
}

/* --- Header / Hero Unduhan --- */
.hero-unduhan {
	position: relative;
	padding: 80px 0;
	min-height: 280px;
	background:
		linear-gradient(rgba(10, 25, 47, 0.8), rgba(10, 25, 47, 0.8)),
		url("https://via.placeholder.com/1920x400") no-repeat center center/cover;
}

/* --- Badge Tipe File --- */
.badge-file {
	padding: 6px 12px;
	border-radius: 12px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.5px;
	display: inline-block;
}

.badge-file-pdf {
	background-color: #fee2e2;
	color: #ef4444;
}

.badge-file-docx {
	background-color: #e0e7ff;
	color: #3b82f6;
}

/* --- Tombol Unduh Kustom --- */
.btn-download {
	background-color: var(--color-primary-dark);
	color: white;
	padding: 8px 20px;
	border: none;
	transition: all 0.3s ease;
}

.btn-download:hover {
	background-color: var(--color-accent);
	color: var(--color-primary-dark);
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ========================================================
   TAMBAHAN CSS UNTUK HALAMAN DETAIL BERITA (screen_7.jpg)
   ======================================================== */

/* --- Breadcrumb Artikel --- */
.breadcrumb-article a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s ease;
}
.breadcrumb-article a:hover {
    color: var(--color-primary-dark);
}
.breadcrumb-article span {
    margin: 0 8px;
    color: #cbd5e1;
}

/* --- Kustomisasi Konten Artikel --- */
.article-content {
    font-size: 1.05rem;
}
.article-content ul {
    padding-left: 1.2rem;
}
.custom-blockquote {
    background-color: #f8fafc;
    border-left: 4px solid var(--color-accent);
    color: #334155;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* --- Tombol Share --- */
.btn-share {
    width: 35px;
    height: 35px;
    background-color: #f1f5f9;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: all 0.2s ease;
}
.btn-share:hover {
    background-color: var(--color-primary-dark);
    color: white;
}

/* --- Sidebar Widgets --- */
.sidebar-widget {
    background-color: #f8fafc;
    border-radius: 12px;
}
.sidebar-widget .border-bottom {
    border-bottom-color: #e2e8f0 !important;
}

/* Berita Terkait Hover */
.related-news-item .title-hover {
    transition: color 0.2s ease;
}
.related-news-item:hover .title-hover {
    color: var(--color-accent) !important;
}

/* Kategori Tag */
.category-tag {
    background-color: white;
    color: #64748b;
    border: 1px solid #e2e8f0;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s ease;
}
.category-tag:hover {
    background-color: var(--color-primary-dark);
    color: white;
    border-color: var(--color-primary-dark);
}
