/********** Template CSS **********/
:root {
    --primary: #EB1616;
    --secondary: #191C24;
    --light: #6C7293;
    --dark: #000000;
}


.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;
}

/* dashboard */
.dashboard-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.dashboard-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.2rem;
}

.dashboard-card-title {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.dashboard-card-metric {
    font-size: 1.6rem;
    font-weight: 700;
    color: #222;
}

.dashboard-card-footer {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.text-title-black {
    color: #000 !important;
}

/*** Button ***/
.btn {
    transition: .5s;
}

.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: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 50px;
}


/*** Layout ***/
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    height: 100vh;
    overflow-y: auto;
    background: var(--secondary);
    transition: 0.5s;
    z-index: 1050;
}

.content {
    margin-left: 250px;
    background: var(--dark);
    transition: 0.5s;
    overflow-y: auto;
    height: 100vh;
}

@media (min-width: 992px) {
    .sidebar {
        margin-left: 0;
    }

    .sidebar.open {
        margin-left: -250px;
    }

    .content {
        width: calc(100% - 250px);
    }

    .content.open {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 991.98px) {
    .sidebar {
        margin-left: -250px;
        transition: margin-left 0.3s ease;
    }

    .sidebar.open {
        margin-left: 0;
    }

    .content {
        margin-left: 0;
        width: 100%;
        transition: margin-left 0.3s ease;
    }

    .content.open {
        margin-left: 250px;
    }
}



/*** Navbar ***/
.sidebar .navbar .navbar-nav .nav-link {
    padding: 7px 20px;
    color: var(--light);
    font-weight: 500;
    border-left: 3px solid var(--secondary);
    border-radius: 0 30px 30px 0;
    outline: none;
}

.sidebar .navbar .navbar-nav .nav-link:hover,
.sidebar .navbar .navbar-nav .nav-link.active {
    color: var(--primary);
    background: var(--dark);
    border-color: var(--primary);
}

.sidebar .navbar .navbar-nav .nav-link i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    border-radius: 40px;
}

.sidebar .navbar .navbar-nav .nav-link:hover i,
.sidebar .navbar .navbar-nav .nav-link.active i {
    background: var(--secondary);
}

.sidebar .navbar .dropdown-toggle::after {
    position: absolute;
    top: 15px;
    right: 15px;
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    transition: .5s;
}

.sidebar .navbar .dropdown-toggle[aria-expanded=true]::after {
    transform: rotate(-180deg);
}

.sidebar .navbar .dropdown-item {
    padding-left: 25px;
    border-radius: 0 30px 30px 0;
    color: var(--light);
}

.sidebar .navbar .dropdown-item:hover,
.sidebar .navbar .dropdown-item.active {
    background: var(--dark);
}

.content .navbar .navbar-nav .nav-link {
    margin-left: 25px;
    padding: 12px 0;
    color: var(--light);
    outline: none;
}

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

.content .navbar .sidebar-toggler,
.content .navbar .navbar-nav .nav-link i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    border-radius: 40px;
}

.content .navbar .dropdown-item {
    color: var(--light);
}

.content .navbar .dropdown-item:hover,
.content .navbar .dropdown-item.active {
    background: var(--dark);
}

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

.content .navbar .dropdown-toggle[aria-expanded=true]::after {
    transform: rotate(-180deg);
}

@media (max-width: 575.98px) {
    .content .navbar .navbar-nav .nav-link {
        margin-left: 15px;
    }
}


.sidebar .navbar .dropdown-item:hover,
.sidebar .navbar .dropdown-item.active {
    background: var(--dark);
}

/*** Date Picker ***/
.bootstrap-datetimepicker-widget.bottom {
    top: auto !important;
}

.bootstrap-datetimepicker-widget .table * {
    border-bottom-width: 0px;
}

.bootstrap-datetimepicker-widget .table th {
    font-weight: 500;
}

.bootstrap-datetimepicker-widget.dropdown-menu {
    padding: 10px;
    border-radius: 2px;
}

.bootstrap-datetimepicker-widget table td.active,
.bootstrap-datetimepicker-widget table td.active:hover {
    background: var(--primary);
}

.bootstrap-datetimepicker-widget table td.today::before {
    border-bottom-color: var(--primary);
}


/*** Testimonial ***/
.progress .progress-bar {
    width: 0px;
    transition: 2s;
}


/*** Testimonial ***/
.testimonial-carousel .owl-dots {
    margin-top: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    margin: 0 5px;
    width: 15px;
    height: 15px;
    border: 5px solid var(--primary);
    border-radius: 15px;
    transition: .5s;
}

.testimonial-carousel .owl-dot.active {
    background: var(--dark);
    border-color: var(--primary);
}

.left-section {
    background: url("/assetsadmin/img/login-background.webp") no-repeat center center;
    background-size: cover;
    position: relative;
    height: 100vh;
    /* Pastikan tingginya sesuai dengan layar */
}

.overlay {
    background: rgba(142, 22, 22, 0.6);
    position: absolute;
    /* Pastikan overlay menutupi seluruh .left-section */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


.right-section {
    padding: 50px;
}

.login-container {
    max-width: 400px;
    margin: auto;
}

.login-container input {
    border: 1px solid rgba(142, 22, 22, 0.75);
    border-radius: 30px;
    padding: 12px 20px;
}

.btn-login {
    background: #8E1616;
    color: #FFFFFF;
    border-radius: 30px;
    padding: 12px;
}

.produk-hover {
    position: relative;
    overflow: hidden;
    border-radius: .25rem;
}

.produk-hover .card-img-top {
    transition: transform 0.3s ease;
}

.produk-hover .overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.produk-hover:hover .card-img-top {
    transform: scale(1.1);
}

.produk-hover:hover .overlay {
    opacity: 1;
}

.jasa-hover {
    position: relative;
    overflow: hidden;
    border-radius: .25rem;
}

.jasa-hover .card-img-top {
    transition: transform 0.3s ease;
}

.jasa-hover .overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.jasa-hover:hover .card-img-top {
    transform: scale(1.1);
}

.jasa-hover:hover .overlay {
    opacity: 1;
}

/* preview media upload */
#main-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    /* Supaya gambar nge-fill kotak, dan crop bila perlu */
}

.image-preview {
    width: 120px;
    height: 90px;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f8f8f8;
    position: relative;
}

.image-preview img,
.image-preview video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.image-preview .btn-delete {
    position: absolute;
    top: 0;
    right: 0;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    padding: 0 6px;
    font-size: 14px;
    cursor: pointer;
    border-radius: 0 5px 0 5px;
}

.thumb-image.border-primary {
    border: 2px solid red !important;
}

/* preview gambar thumb */

.neon-text {
    color: #111;
    /* Ubah warna teks neon menjadi lebih gelap */
}

.opacity-75 {
    opacity: 0.9;
}

.futuristic-card {
    background-color: #f4f4f4;
    /* Latar belakang kartu menjadi lebih terang */
    color: #333;
    /* Teks di dalam kartu menjadi gelap */
}

.futuristic-card .text-center {
    color: #333;
    /* Warna teks pada bagian dalam kartu */
}

/* tombol dropdown di faq */
.accordion-button {
    transition: background 0.3s ease, color 0.3s ease;
    border-radius: 0 !important;
}

.accordion-button:not(.collapsed) {
    background-color: #f9f9f9;
    color: #212529;
    box-shadow: none;
}

.accordion-button:hover {
    background-color: #f1f1f1;
}

.accordion-body {
    transition: all 0.3s ease;
    font-size: 0.95rem;
    color: #333;
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    border-color: #dc3545;
}

/* tabel admin */
.custom-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.15);
}

/* Header */
.custom-table thead {
    background-color: #191C24;
    color: white;
}

.custom-table thead th {
    font-size: 1.1rem;
    padding: 10px;
    vertical-align: middle;
    border-bottom: 1px solid #eeeeee;
    /* Garis bawah header */
}

/* Isi tabel */
.custom-table tbody {
    background-color: white;
    color: black;
}

.custom-table td {
    padding: 10px;
    vertical-align: middle;
    border-top: 1px solid #f2f2f2;
    /* Garis horizontal antar baris */
    border-left: none;
    border-right: none;
}

/* Hilangkan border vertikal di header juga */
.custom-table th {
    border-left: none;
    border-right: none;
}

/* Radius bawah */
.custom-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px;
}

.custom-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px;
}

.custom-table tbody tr:last-child td {
    border-bottom: none;
}

.justify-text {
    text-align: justify;
    line-height: 1.8;
    /* atau coba 1.6 – 2.0 sesuai selera */
    text-indent: 2em;
}

.justify-no-indent {
    text-align: justify;
    line-height: 1.8;
    /* atau coba 1.6 – 2.0 sesuai selera */
}


/* link katalog */
.nav-link {
    color: inherit;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: red;
}

.nav-link.active {
    color: red !important;
    font-weight: bold;
}

/* footer */

/* footer */
.footer-dark {
    background-color: #111;
    font-size: 0.9rem;
}

.footer-dark a {
    text-decoration: none;
    color: inherit;
}

.footer-dark a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-dark ul li {
    margin-bottom: 0.5rem;
}

/* Mobile improvements footer */
@media (max-width: 576px) {
    .footer-dark .btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    .footer-dark .row>div {
        text-align: left !important;
    }

    .footer-dark ul {
        padding-left: 0;
    }
}

/* --- Tuntuk responsif dan rapih di mobile --- */

@media (max-width: 767.98px) {

    /* Reset margin-left yang ada di Useful Links container di mobile */
    footer .col-md-3>div[style*="margin-left: 100px"] {
        margin-left: 0 !important;
        max-width: 100%;
        /* biar penuh di mobile */
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Padding kiri kanan untuk setiap kolom agar tidak mepet */
    footer .col-md-3 {
        padding-left: 15px;
        padding-right: 15px;
        margin-bottom: 1.5rem;
        /* beri jarak antar kolom di mobile */
    }

    /* Centering Contact Info container */
    footer .col-md-3>div.mx-auto {
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 100%;
        /* biar responsive */
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Text center untuk judul agar rapi di mobile */
    footer .col-md-3 h6 {
        text-align: center;
    }

    /* Center social buttons di mobile */
    footer .col-md-3 .d-flex.gap-2 {
        justify-content: center !important;
    }
}



/* Card produk */
/* card produk random */

.product-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    height: 150px;
}

.product-card img {
    object-fit: cover;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-card-img {
    width: 100%;
    height: 200px;
    /* atau 150px sesuai desain kamu */
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    display: block;
}

.card-hover-lift:hover .product-card-img {
    transform: scale(1.05);
}


/* pagination */
.custom-pagination .page-item .page-link {
    background-color: #191C24;
    color: white;
    border: none;
    border-radius: 0.25rem;
    padding: 0.4rem 0.6rem;
}

.custom-pagination .page-item.disabled .page-link {
    opacity: 0.3;
    pointer-events: none;
}

.custom-pagination .page-item .page-link:hover {
    background-color: #2a2f3a;
    color: #EB1616;
}

.custom-pagination .page-item.active .page-link {
    background-color: #EB1616;
    color: white;
}

.dropdown-menu-dark {
    background-color: #191C24;
}

.dropdown-menu-dark .dropdown-item {
    color: white;
}

.dropdown-menu-dark .dropdown-item:hover {
    background-color: #EB1616;
    color: white;
}

/*
chart dashboard */

#province-map {
    height: 600px;
    width: 100%;
    border-radius: 10px;
}

.info.legend {
    background: white;
    padding: 10px;
    font-size: 12px;
    line-height: 18px;
    color: #333;
    border-radius: 5px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.info.legend i {
    width: 18px;
    height: 18px;
    float: left;
    margin-right: 8px;
    opacity: 0.7;
}
