/* ==== Root Variables === */
:root {
    --bg-color: #f0f0f0;
    --text-color: rgb(0, 0, 0);
    --text-color-nav: rgb(255, 255, 255);
    --card-bg: #f8f9fa;
    --navbar-color: rgb(217, 184, 51);
    --overlay-color: rgba(0, 0, 0, 0.6);
    --footer-bg: rgb(217, 184, 51);
    --btn-glass: rgb(217, 184, 51);
    --btn-glow: #fffb07;
}

body.dark-mode {
    --bg-color: #121212;
    --text-color: #ffffff;
    --card-bg: #1e1e1e;
    --navbar-color: rgba(18, 18, 18, 0.8);
    --overlay-color: rgba(0, 0, 0, 0.7);
    --footer-bg: #1a1a1a;
    --btn-glass: rgb(32, 81, 90);
    --btn-glow: #5eead4;
}

/* ==== Global Styles === */
body {
    /* font-family: 'Poppins', sans-serif; */
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.4s, color 0.4s;
}

.navbar {
    transition: background-color 0.4s ease, box-shadow 0.3s ease;
    background-color: var(--navbar-color) !important;
}

.navbar .nav-link,
.navbar .navbar-brand {
    color: var(--text-color-nav) !important;
    transition: color 0.3s;
}

.navbar .nav-link:hover,
.navbar .navbar-brand:hover {
    text-decoration: underline;
}

.navbar-transparent {
    background-color: transparent !important;
}

.navbar-scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Toggle hijau saat aktif */
.toggle-green:checked {
    background-color: #198754; /* Bootstrap's 'success' green */
    border-color: #198754;
}

/* Untuk handle posisi toggle (lingkarannya) */
.toggle-green:checked::before {
    background-color: #fff; /* Warna lingkarannya tetap putih */
}

/* Header */
.header-image-wrapper,
.header-dark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.header-image-wrapper img {
    /* background: linear-gradient(to right, rgb(39, 70, 133) 0%, rgb(61, 179, 197) 100%); */
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* color: #fff; */
}

section.position-relative {
    height: 100vh;
    overflow: hidden;
}

.container.z-3 {
    position: relative;
    z-index: 3;
    color: var(--text-color);
}

.glow-input {
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 1.25rem;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(6px);
}

.glow-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.glow-input:focus {
    outline: none;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
    background-color: rgba(255, 255, 255, 0.3);
}

/* .shortcut-icon header */
.shortcut-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.623);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin: 0 auto;
    transition: 0.3s;
}

.shortcut-icon:hover {
    background-color: rgba(255, 255, 255, 0.89);
    transform: scale(1.05);
    /* box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.1); */
    box-shadow: 0 0 15px var(--btn-glow), 0 0 30px var(--btn-glow);
    cursor: pointer;
}
.shortcut-icon img {
    max-width: 60%;
    max-height: 60%;
    object-fit: contain;
}

.shortcut-icon i {
    font-size: 28px; /* Ukuran ikon */
    color: white; /* Warna ikon */
    display: inline-block;
    line-height: 1;
}
.shortcut-text {
    color: white;
    text-align: center;
    font-size: 14px;
    margin-top: 4px;
    white-space: wrap;
    /* display: -webkit-box; */
    -webkit-line-clamp: 2; /* Batasi maksimum 2 baris */
    line-clamp: 2; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.2em;
    height: 2.4em; /* 2 baris x line-height */
}

/* Buton Search Header */
.btn-glass {
    background-color: var(--btn-glass);
    color: #fff;
    padding: 10px 25px;
    border: none;
    border-radius: 25px;
    /* box-shadow: 0 0 10px var(--btn-glow), 0 0 20px var(--btn-glow); */
    transition: box-shadow 0.3s ease;
}

.btn-glass:hover {
    box-shadow: 0 0 5px var(--btn-glow), 0 0 10px var(--btn-glow);
}

/* style untuk indikator eksternal (tetap di bawah kategori grid) */
.header-carousel-indicators {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
    /* pastikan indikator tampil di atas overlay */
    z-index: 4;
    position: relative; /* relative karena berada di dalam container z-3 */
    pointer-events: auto;
}

.btn-next {
    background-color: var(--footer-bg);
}
.btn-next:hover {
    background-color: var(--btn-glow);
}

/* tombol indikator (custom) */
.header-carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.35);
    transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s;
    opacity: 0.9;
    cursor: pointer;
}
.header-carousel-indicators button:hover {
    transform: scale(1.15);
    opacity: 1;
}

/* indikator aktif */
.header-carousel-indicators button.active {
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
    opacity: 1;
}
/* End Header */

/* Card Artikel*/
.text-small {
    font-size: 0.75rem;
    opacity: 0.7;
}

.card-title,
.card-text {
    font-size: 14px;
}

.card-img-main {
    height: 288px;
    object-fit: cover;
}

.card-img-small {
    height: 130px;
    object-fit: cover;
}

.overlay-text {
    position: absolute;
    bottom: 15px;
    left: 15px;
    color: white;
    z-index: 2;
    text-shadow: 1px 1px 4px #000;
}

.card-main,
.card-main-small {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    /* border-color: var(--navbar-color); */
    background-color: var(--card-bg);
}

.card-main-small {
    height: 290px;
}

.btn-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    font-size: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 3;
}

.icon-bottom {
    position: absolute;
    bottom: 10px;
}

.carousel-indicators [data-bs-target] {
    background-color: white;
}

/* Galeri */
.gallery-images img {
    width: 100%;
    height: 200px;
    border-radius: 6px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    padding: 0.1em;
    border: 1px solid #eee;
    /* border-color: var(--navbar-color); */
}

.gallery-images img:hover {
    transform: scale(1.05);
}

.gallery-ads .ad {
    /* background: #ddd; */
    background-image: url("https://images.unsplash.com/photo-1552046123-be0ccc2f6e4f?w=400");
    text-align: center;
    padding: 0.1em;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.2em;
    height: 300px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox img {
    max-width: 90%;
    max-height: 80%;
    border-radius: 6px;
}

.lightbox .close,
.lightbox .prev,
.lightbox .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    font-size: 2em;
    padding: 0.2em 0.5em;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.3s;
}

.lightbox .close {
    top: 20px;
    right: 20px;
    transform: none;
}

.lightbox .prev {
    left: 20px;
}

.lightbox .next {
    right: 20px;
}

.lightbox .close:hover,
.lightbox .prev:hover,
.lightbox .next:hover {
    background: #000;
    color: #fff;
}

/* barita kanan */
/* Membatasi panjang teks judul agar tidak overflow */
.judul-berita {
    font-weight: 600;
    font-size: 0.75rem;
    /* white-space: nowrap; */
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 17px;
}
.icon-calendar {
    width: 1em;
    height: 1em;
    margin-right: 0.3em;
}
/* Mengatur gambar thumbnail agar proporsional dan rounded */
.thumbnail-berita {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.3rem;
}
/* Agar setiap item berita memiliki padding dan border bawah */
.item-berita {
    /* padding: 0.75rem; */
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dee2e6;
}
/* Khusus item terakhir hilangkan border bawah */
.item-berita:last-child {
    border-bottom: none;
}

/* Sidebar Profile */
.nav-pills .nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #636363ff; /* Warna teks */
    border-radius: 0.25rem;
}
.nav-pills .nav-link .icon {
    font-size: 1rem;
    color: #3d7157ff; /* Warna ikon sama dengan teks */
}
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
    color: #fff;
    background-color: var(--navbar-color);
}
.divider {
    height: 1px;
    background-color: #b81616ff;
    margin: 1rem 0;
}
.card-logo {
    height: 30px;
    width: 30px;
    margin-right: 10px;
}
/* Minimal kustom warna tombol download */
.btn-download {
    background-color: #5f8a89;
    color: white;
}
.btn-download:hover {
    background-color: #4b6d6c;
    color: white;
}
/* End sidebar Profile */

/* Footer */
.footer-section {
    background-color: var(--footer-bg) !important;
    color: var(--text-color);
    position: relative;
    overflow: hidden;
}

.footer-image {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    opacity: 0.15;
    z-index: 0;
}

.glow-icon {
    transition: all 0.3s ease;
}

.glow-icon:hover {
    color: #0dcaf0;
    text-shadow: 0 0 8px #0dcaf0, 0 0 15px #0dcaf0;
}

footer a:hover {
    text-decoration: underline;
}
/* End Footer */

/* Efek transisi halus */
#welcome-text {
    transition: opacity 1s ease-in-out;
}
.fade-out {
    opacity: 0;
}

/* Agenda dan Pengumuman */
/* Container umum */
.tab-container {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 16px;
    font-family: Arial, sans-serif;
    border-color: rgb(217, 184, 51);
}

/* Wrap button container */
.tab-buttons {
    display: flex;
    margin-bottom: 16px;
}

/* Style tombol tab */
.tab-button {
    flex: 1;
    padding: 8px 0;
    border: 1px solid #d4b857;
    border-radius: 6px 6px 0 0;
    background-color: white;
    color: #968362;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
    margin-right: 4px;
}

/* Hilangkan margin tombol terakhir (agar tidak tumpang tindih) */
.tab-button:last-child {
    margin-right: 0;
}

/* Tab aktif */
.tab-button.active {
    background-color: var(--navbar-color);
    color: white;
}

/* Konten tab */
.tab-content {
    padding: 8px 4px;
}

.tab-content > div {
    display: none;
}

.tab-content > div.active {
    display: block;
}

/* Styling isi konten */
.title {
    font-weight: 700;
    margin-bottom: 8px;
}

.time {
    color: #888;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.time svg {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    fill: #888;
}
/* ENd Agenda dan Pengumuman */

/* 1. Ketinggian Kartu yang Konsisten */
/* Tentukan tinggi yang sama untuk semua kartu yang ingin disamakan */
.custom-card-height {
    /* Sesuaikan tinggi ini sesuai desain Anda.
               Contoh: 450px, atau Anda bisa gunakan min-height: 400px; */
    height: 300px;
}

/* Opsional: Ketinggian Gambar yang Konsisten */
.custom-img-height {
    /* Pastikan gambar memiliki tinggi tetap, misalnya 180px */
    height: 150px;
    object-fit: cover;
    /* Penting untuk memastikan gambar mengisi area tanpa terdistorsi */
}

/* 2. Layout Flexbox untuk Konten Card-Body */
/* flex-grow-1 pada h6 akan memastikan judul memenuhi ruang kosong
           sehingga elemen di bawahnya (tanggal/tombol) didorong ke bawah */
.custom-card-height .card-body {
    height: calc(100% - 180px);
    /* Ketinggian card-body = Total height - Image height */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Mendorong elemen terakhir ke bawah */
}

/* 3. Judul menggunakan flex-grow */
/* Ini penting: Memastikan judul (atau konten di tengah) memenuhi semua ruang yang tersisa */
.custom-card-height .card-body .card-title {
     /* flex-grow: 1; /* Memungkinkan judul menggunakan semua ruang yang tersedia */
    /* Opsional: Batasi baris judul jika terlalu panjang, meskipun sudah ada height */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Penyesuaian lain */
.icon-calendar {
    /* Memperbaiki ukuran ikon SVG bawaan Anda */
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background-color: var(--btn-glass);
    color: #ffffff;
}
