/********** Template CSS **********/

/* Anda mungkin perlu menambahkan ini di file CSS utama Anda (style.css) */
.galeri-item {
    position: relative; /* Pastikan parent position-relative */
}

.galeri-item img {
    z-index: 1; /* Pastikan gambar berada di lapisan bawah */
}

.galeri-item .overlay {
    z-index: 2; /* Pastikan overlay berada di lapisan atas */
    transition: opacity 0.3s ease; /* Untuk efek hover */
}

/* --- Aturan untuk Tautan "Baca Selengkapnya" (Read More) --- */

/* Pengaturan dasar untuk ikon panah (Pastikan ikon memiliki transisi) */
.readmore i {
    margin-left: 5px; /* Jarak default dari teks */
    transition: margin-left 0.3s ease-in-out; /* Transisi untuk efek geser */
}

/* Efek Hover: Terjadi saat mouse diarahkan ke seluruh post-box (karena stretched-link) 
   atau langsung ke tautan .readmore */
.post-box:hover .readmore i,
.readmore:hover i {
    /* Mendorong panah sedikit ke kanan (Efek visual "maju") */
    margin-left: 10px; 
}

/* Opsional: Membuat teks 'Baca Selengkapnya' lebih menarik saat hover */
.post-box:hover .readmore span,
.readmore:hover span {
    /* Mengubah warna teks menjadi warna utama/primary (ganti dengan variabel warna Anda) */
    color: var(--bs-primary, #007bff); 
    font-weight: 600; /* Sedikit lebih tebal */
    transition: color 0.3s ease-in-out;
}

/* Mengatur gambar di halaman detail berita */
.blog-detail-img {
    /* Lebar Maksimum: Misalnya, batas maksimal gambar adalah 800px. */
    max-width: 800px; 
    /* Memastikan gambar tetap berada di tengah jika lebar konten lebih besar */
    margin-left: auto;
    margin-right: auto;
    /* Memastikan gambar tetap responsif di bawah max-width */
    width: 100%; 
    height: auto;
    /* Mengubah display menjadi block agar margin: auto berfungsi */
    display: block; 
}

/* --- Aturan untuk Deskripsi Singkat Berita --- */

.post-excerpt-wrapper {
    /* PENTING: Kunci tinggi area teks. Sesuaikan 75px jika Anda membutuhkan lebih banyak/sedikit baris. */
    height: 75px; 
    overflow: hidden; /* Menyembunyikan teks yang berlebih */
    margin-bottom: 10px; /* Jarak yang konsisten ke tombol Read More */
}

/* Pastikan paragraf di dalamnya tidak memiliki margin yang merusak height yang dikunci */
.post-excerpt-wrapper p {
    margin-bottom: 0 !important; 
    /* Gunakan !important jika margin bawaan dari <p> terlalu kuat */
}

/* --- (Sisipkan di bawah aturan CSS yang sudah ada, misalnya di bawah post-img) --- */
/* Contohnya: */

/* Wrapper untuk gambar harus memiliki tinggi tetap */
.post-box .post-img {
    height: 0;
    padding-bottom: 75%; 
    position: relative;
    overflow: hidden;
    margin-bottom: 15px; 
    border-radius: 8px;
}

/* --- Styling untuk Postingan Berita --- */

/* Wrapper untuk gambar harus memiliki tinggi tetap */
.post-box .post-img {
    /* PENTING: Atur TINGGI TETAP menggunakan padding-bottom 
       untuk rasio 4:3 (Tinggi = 75% dari Lebar kolom) */
    height: 0;
    padding-bottom: 75%; 
    position: relative;
    overflow: hidden;
    margin-bottom: 15px; /* Jarak antara gambar dan meta */
    border-radius: 8px;
}

/* Gambar di dalam wrapper dipaksa mengisi area tersebut */
.post-box .post-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    
    /* KUNCI UTAMA: object-fit: cover memastikan gambar mengisi penuh 
       wrapper tanpa distorsi, memotong bagian yang berlebih agar ukuran seragam. */
    object-fit: cover; 
    
    /* Tambahan: Tambahkan transisi agar hover lebih halus */
    transition: all 0.3s ease-in-out;
}

/* Efek Hover (opsional, agar gambar sedikit membesar) */
.post-box:hover .post-img img {
    transform: scale(1.05);
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}


/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}


/*** Button ***/
.btn {
    font-weight: 600;
    transition: .5s;
    border-radius: 50px;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: inherit;
}

.btn-primary {
    color: var(--bs-white);
}


/*** Navbar ***/
.navbar {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 9;
    transition: .5s;
}

.navbar .navbar-nav .nav-link {
    margin-right: 25px;
    padding: 40px 0;
    color: var(--bs-white);
    font-size: 17px;
    text-transform: uppercase;
    outline: none;
    transition: .5s;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: var(--bs-primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link,
    .navbar.bg-dark .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar .navbar-nav {
        margin-top: 8px;
        border-top: 1px solid var(--bs-light);
    }
}

@media (min-width: 992px) {
    .navbar.bg-dark .navbar-nav .nav-link {
        padding: 20px 0;
    }

    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 150%;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}


/*** Header ***/
.carousel-caption {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding-top: 100px;
    background: rgba(0, 0, 0, .7);
    z-index: 1;
}

.carousel-control-prev,
.carousel-control-next {
    width: 10%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
}

@media (max-width: 768px) {
    #header-carousel .carousel-item {
        position: relative;
        min-height: 550px;
    }
    
    #header-carousel .carousel-item img {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

.page-header {
    padding-top: 200px;
    background: linear-gradient(rgba(0, 0, 0, .7), rgba(0, 0, 0, .7)), url(../img/slider/carousel-smp.jpg) top center no-repeat;
    background-size: cover;
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: var(--bs-white);
}


/*** Title ***/
.title {
    margin-bottom: 2rem;
}

.title .title-left,
.title .title-center,
.title .title-right {
    display: inline-block;
    text-transform: uppercase;
    overflow: hidden;
}

.title .title-center {
    text-align: center;
}

.title .title-right {
    text-align: right;
}

.title .title-left h5,
.title .title-center h5,
.title .title-right h5 {
    position: relative;
    display: inline-block;
    font-size: 18px;
    font-weight: 300;
}

.title .title-left h5::after,
.title .title-center h5::before,
.title .title-center h5::after,
.title .title-right h5::before {
    position: absolute;
    content: "";
    width: 500%;
    height: 0;
    top: 9px;
    border-bottom: 1px solid var(--bs-white);
}

.title .title-left h5::after,
.title .title-center h5::after {
    left: calc(100% + 15px);
}

.title .title-right h5::before,
.title .title-center h5::before {
    right: calc(100% + 15px);
}

.title .title-left h1,
.title .title-center h1,
.title .title-right h1 {
    border-bottom: 1px solid var(--bs-white);
}


/*** Service ***/
.service-item {
    position: relative;
    margin-top: 2.5rem;
    overflow: hidden;
}

.service-item .service-img {
    position: relative;
    display: inline-block;
}

.service-item .service-img::before {
    position: absolute;
    content: "";
    width: calc(100% - 12rem);
    height: calc(100% - 12rem);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3rem solid rgba(0, 0, 0, .5);
    border-radius: 300px;
    z-index: 1;
}

.service-item.service-item-left {
    border-radius: 500px 0 0 500px;
    background: linear-gradient(to right, var(--bs-secondary), var(--bs-dark));
}

.service-item.service-item-right {
    border-radius: 0 500px 500px 0;
    background: linear-gradient(to left, var(--bs-secondary), var(--bs-dark));
}

@media (max-width: 767.98px) {
    .service-item.service-item-left,
    .service-item.service-item-right {
        border-radius: 500px 500px 0 0;
        background: linear-gradient(to bottom, var(--bs-secondary), var(--bs-dark));
        text-align: center;
    }
}


/*** Team ***/
.team-item {
    position: relative;
    /* Pastikan item karusel di atas elemen lain di sekitarnya */
    z-index: 10; 
}

.team-item .team-name {
    position: absolute;
    width: 100%;
    height: 60px;
    left: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .7);
    z-index: 15; /* Di atas overlay info */
}

.team-item .team-body {
    position: relative;
    overflow: hidden;
}

/* --- FIX TINGGI GAMBAR SERAGAM --- */
.team-img-container {
    position: relative;
    width: 100%;

    height: 400px; 
    overflow: hidden;
}

.team-img-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
}
/* --- END FIX TINGGI GAMBAR --- */


/* KODE GABUNGAN: Aturan Umum untuk Team Before & Team After */
.team-item .team-body .team-before,
.team-item .team-body .team-after {
    position: absolute;
    width: 0; /* Lebar awal nol (tersembunyi) */
    height: calc(100% - 60px);
    top: 0;
    background: rgba(0, 0, 0, .7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: .5s;
    z-index: 5; /* Di atas gambar, di bawah team-name */
}

/* KODE BARU: Penempatan Khusus untuk TEAM BEFORE (KIRI) */
.team-item .team-body .team-before {
    left: 0; /* Melekat di kiri */
    right: auto; /* Penting untuk mencegah konflik */
    text-align: right;
    padding-right: 15px;
}

/* KODE BARU: Penempatan Khusus untuk TEAM AFTER (KANAN) */
.team-item .team-body .team-after {
    left: auto; /* Penting untuk mencegah konflik */
    right: 0; /* Melekat di kanan */
    text-align: left;
    padding-left: 15px;
}

/* KODE HOVER: Membuka kotak info */
.team-item:hover .team-body .team-before,
.team-item:hover .team-body .team-after {
    width: 50%;
}

/* KODE TEKS: Styling teks */
.team-item .team-body .team-before span,
.team-item .team-body .team-after span {
    margin: 5px 0;
    color: #FFFFFF !important; /* Paksa warna putih agar pasti terlihat */
    opacity: 0; 
    font-size: 0.8rem;
    transition: .5s;
}

/* KODE HOVER TEKS: Menampilkan teks */
.team-item:hover .team-body .team-before span,
.team-item:hover .team-body .team-after span {
    opacity: 1;
    transition-delay: .2s;
}



/*** Testimonial ***/
.testimonial-carousel {
    max-width: 700px;
    margin: 0 auto;
}

.testimonial-carousel .owl-dots {
    margin-top: 35px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.testimonial-carousel .owl-dots .owl-dot {
    width: 60px;
    height: 60px;
    margin: 0 5px;
    padding: 10px;
    background: var(--bs-dark);
    border-radius: 100px;
    transition: .5s;
}

.testimonial-carousel .owl-dots .owl-dot.active {
    width: 100px;
    height: 100px;
}

.testimonial-carousel .owl-dots .owl-dot img {
    opacity: .1;
    transition: .5s;
    border-radius: 100px;
}

.testimonial-carousel .owl-dots .owl-dot.active img {
    opacity: 1;
}


/*** Footer ***/
@keyframes footerAnimatedBg {
	0% {
        background-position: 0 0;
    }

	100% {
        background-position: -1000px 0;
    }
}

.footer {
	background-image: url(../img/footer-bg.png);
	background-position: 0px 0px;
    background-repeat: repeat-x;
	animation: footerAnimatedBg 50s linear infinite;
}