/* =======================================================
   STYLE.CSS – WEBGIS PSU KABUPATEN TUBAN
======================================================= */


/* Import Google Font */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

/* Reset umum */

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
}


/* ===========================
   NAVBAR
=========================== */

.navbar {
    background-color: #00ACEE !important;
    padding: 6px 20px;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-wrap: nowrap !important;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.navbar-brand img {
    height: 36px;
    width: auto;
    margin-right: 8px;
}

.navbar-nav {
    align-items: center;
    margin-left: auto;
    flex-wrap: nowrap;
}

.navbar-nav .nav-link {
    color: #f8f9fa !important;
    font-size: 0.9rem;
    font-weight: 500;
    margin-left: 10px;
    padding: 6px 10px;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    transition: color 0.3s ease, background-color 0.3s ease;
    white-space: nowrap;
}

.navbar-nav .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.15);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after {
    width: 70%;
}

.dropdown-menu {
    background-color: #00ACEE !important;
    border: none;
}

.dropdown-item {
    color: #fff !important;
    font-size: 0.9rem;
    padding: 8px 20px;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.navbar-toggler {
    border: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255,0.9)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

@media (max-width: 991px) {
    .navbar {
        padding: 10px 20px;
    }
    .navbar-nav {
        background-color: #00ACEE !important;
        padding: 10px;
        border-radius: 8px;
    }
    .navbar-nav .nav-link {
        display: block;
        margin-left: 0;
        margin-top: 5px;
        padding: 10px;
    }
    .navbar-nav .nav-link::after {
        display: none;
    }
}

@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
    }
}


/* ===========================
   HERO CAROUSEL
=========================== */

#hero {
    position: relative;
    width: 100%;
    height: auto;
    overflow: hidden;
}

#hero .carousel-item {
    height: 100vh;
    max-height: 800px;
    background-size: cover;
    background-position: center center;
    position: relative;
}

#hero .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#hero .carousel-caption {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 5%;
    padding-right: 5%;
}

.hero-text {
    animation: fadeInUp 1.2s ease forwards;
}

.hero-text.right {
    text-align: right;
    margin-left: auto;
}

.hero-text.center {
    background: rgba(255, 241, 1, 0.7);
    color: #fff;
    padding: 40px 60px;
    border-radius: 16px;
    backdrop-filter: blur(6px);
    animation: fadeUp 1.5s ease forwards;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin: 0 auto;
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #ED1B24;
    opacity: 0;
    transform: translateY(-30px);
    animation: slideDown 1s ease forwards;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    color: #333;
    opacity: 0;
    transform: translateX(30px);
    animation: slideRight 1s ease forwards;
    animation-delay: 0.8s;
}

.hero-text.right .hero-title {
    transform: translateY(-30px);
}

.hero-text.right .hero-subtitle {
    transform: translateX(-30px);
    animation: slideLeft 1s ease forwards;
    animation-delay: 0.8s;
}

.hero-text.center .hero-title,
.hero-text.center .hero-subtitle {
    color: #fff;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUpText 1.5s ease forwards;
}

.hero-text.center .hero-subtitle {
    animation-delay: 0.8s;
}

.hero-title span,
.hero-subtitle span {
    opacity: 0;
    display: inline-block;
    transform: translateY(-20px);
    animation: wordFadeIn 0.6s forwards;
    white-space: pre-wrap;
}


/* Animations Keyframes */

@keyframes wordFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideDown {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUpText {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Responsive */

@media (max-width: 992px) {
    .carousel-item {
        max-height: 600px;
    }
    .hero-text {
        padding: 20px;
        max-width: 90%;
    }
    .hero-title {
        font-size: 1.8rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    #hero .carousel-caption {
        text-align: center !important;
        justify-content: center !important;
    }
}


/* =======================================================
   SECTION PROFIL
======================================================= */

#profil {
    background-color: #f8f9fa;
    /* abu muda untuk kontras dengan hero */
    padding-top: 60px;
    padding-bottom: 60px;
}

#profil .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #FFF101;
    /* hijau Tuban */
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}

#profil .section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: #00bfa5;
    margin-top: 8px;
    border-radius: 2px;
}

#profil .subsection-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #00ACEE;
    margin-top: 30px;
    margin-bottom: 10px;
}

#profil p {
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
}

#profil img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}


/* Responsive */

@media (max-width: 768px) {
    #profil .section-title {
        font-size: 2rem;
        text-align: center;
    }
    #profil .subsection-title {
        font-size: 1.2rem;
        text-align: center;
    }
    #profil p {
        text-align: justify;
    }
    #profil .row {
        flex-direction: column-reverse;
        text-align: center;
    }
    #profil img {
        margin-bottom: 20px;
    }
}


/* BERKAS */

#berkasTable {
    border: none !important;
}

#berkasTable th,
#berkasTable td {
    border: none !important;
}

.scroll-offset {
    scroll-margin-top: 80px;
    /* sesuaikan dengan tinggi navbar */
}


/* GALERI */


/* Tombol "Lihat Selengkapnya" di pojok kanan bawah */

.galeri-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 10;
}


/* Responsif: mobile dan tablet */

@media (max-width: 767px) {
    .galeri-btn {
        position: static;
        display: block;
        margin: 20px auto 0 auto;
    }
}


/* KONTAK */


/* Map responsif */

.map-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    /* 16:9 ratio */
    height: 0;
}

.map-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}


/* Form kontak */

.contact-form .form-control {
    border-radius: 8px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form .form-control:focus {
    border-color: #006B3F;
    box-shadow: 0 0 8px rgba(0, 107, 63, 0.2);
    outline: none;
}

.contact-form button {
    border-radius: 50px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.contact-form button:hover {
    background-color: #00bfa5;
    color: #fff;
    transform: translateY(-2px);
}


/* Sosial media */

.social-icons a {
    font-size: 1.2rem;
    transition: all 0.3s;
}

.social-icons a:hover {
    color: #00bfa5;
    transform: translateY(-2px);
}

.captcha-container {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #dee2e6;
}

#captcha-image img {
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px;
    background-color: white;
}

#refresh-captcha {
    height: 50px;
}

#loading-spinner {
    font-size: 14px;
}


/* ===========================
   HERO PENGAJUAN
=========================== */

#hero-pengajuan {
    padding: 80px 0 60px 0;
    /* beri jarak atas dan bawah */
    background-color: #e9f5ef;
}

#hero-pengajuan h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #006B3F;
}

#hero-pengajuan p {
    font-size: 1.1rem;
    color: #333;
}


/* ===========================
   FORM PENGAJUAN
=========================== */

form#formPengajuan {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

form#formPengajuan .form-group label {
    font-weight: 500;
    color: #006B3F;
}

form#formPengajuan .form-control,
form#formPengajuan .form-control-file,
form#formPengajuan select,
form#formPengajuan textarea {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 8px 12px;
}

form#formPengajuan .form-control:focus {
    border-color: #006B3F;
    box-shadow: 0 0 5px rgba(0, 107, 63, 0.3);
}

form#formPengajuan .invalid-feedback {
    font-size: 0.85rem;
}

#hero-pengajuan .form-control-file {
    display: block;
    margin-bottom: 4px;
}

#hero-pengajuan small.text-warning {
    font-size: 0.85rem;
}

#hero-pengajuan form {
    max-width: 700px;
    margin: 0 auto;
}

#hero-pengajuan .form-group {
    margin-bottom: 1.2rem;
}

#hero-pengajuan .form-control-file {
    display: block;
    margin-bottom: 4px;
}

#hero-pengajuan small.text-warning {
    font-size: 0.85rem;
}

#hero-pengajuan button.btn-success {
    background-color: #006B3F;
    border-color: #006B3F;
    transition: all 0.3s ease;
}

#hero-pengajuan button.btn-success:hover {
    background-color: #008B50;
}


/* Tombol kirim */

form#formPengajuan button[type="submit"] {
    background-color: #006B3F;
    color: #fff;
    font-weight: 600;
    border-radius: 50px;
    padding: 10px 25px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

form#formPengajuan button[type="submit"]:hover {
    background-color: #00bfa5;
    color: #fff;
    transform: translateY(-2px);
}


/* ===========================
   RESPONSIVE FORM
=========================== */

@media (max-width: 768px) {
    form#formPengajuan {
        padding: 20px;
    }
    #hero-pengajuan h2 {
        font-size: 2rem;
    }
    #hero-pengajuan p {
        font-size: 1rem;
    }
}


/* ===========================
   HALAMAN GALERI
=========================== */

#hero-galeri {
    background: linear-gradient(rgba(0, 107, 63, 0.85), rgba(0, 107, 63, 0.85)), url("../img/hero3.jpg") center/cover no-repeat;
    color: #fff;
}

.galeri-card {
    transition: all 0.3s ease;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.galeri-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.galeri-card img {
    height: 200px;
    object-fit: cover;
}

.galeri-card .btn-success {
    background-color: #006B3F;
    border-color: #006B3F;
    transition: all 0.3s ease;
}

.galeri-card .btn-success:hover {
    background-color: #00bfa5;
    border-color: #00bfa5;
}

.pagination .page-link {
    color: #006B3F;
    border: none;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background-color: #006B3F;
    color: #fff;
    border-radius: 6px;
}

.galeri-img {
    width: 100%;
    height: 200px;
    /* Atur tinggi sesuai kebutuhan */
    object-fit: cover;
    /* Potong gambar agar pas, tanpa stretch */
    object-position: center;
    /* Fokus ke tengah gambar */
    border-radius: 0.375rem;
    /* Sesuaikan dengan class 'rounded' Bootstrap */
}


/* ===========================
   HALAMAN DETAIL GALERI
=========================== */

#hero-detail {
    background: linear-gradient(rgba(0, 107, 63, 0.85), rgba(0, 107, 63, 0.85)), url("../img/hero2.jpg") center/cover no-repeat;
    color: #fff;
}

#galeri-detail img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#galeri-detail img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.breadcrumb a {
    color: #006B3F;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: #333;
}


/* PETA */


/* === SIDEBAR STYLE (GeoServer Look) === */

#sidebar {
    width: 320px;
    background: #f9fafb;
    border-right: 1px solid #ddd;
    padding: 20px 18px;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

#sidebar h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #006B3F;
    text-transform: uppercase;
    border-bottom: 2px solid #006B3F;
    padding-bottom: 6px;
    margin-bottom: 10px;
}

#sidebar .form-check {
    margin-bottom: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

#sidebar .form-check:hover {
    background: rgba(0, 107, 63, 0.05);
}

#sidebar .form-check-label {
    font-size: 0.92rem;
    color: #333;
    margin-left: 5px;
}

#sidebar hr {
    border-top: 1px solid #ccc;
    margin: 15px 0;
}

.legend {
    margin-top: 10px;
}

.legend p {
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: #444;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 12px;
    margin-right: 6px;
    border-radius: 3px;
    border: 1px solid rgba(0, 0, 0, 0.2);
}


/* ===========================
   PETA SECTION FIX
=========================== */

#peta-section {
    position: relative;
    width: 100%;
    height: calc(100vh - 70px);
    /* kurangi tinggi navbar agar pas */
    margin-top: 70px;
    /* offset dari navbar */
    overflow: hidden;
    background: #eaeaea;
    /* bantu debug area map */
}

.map-container {
    display: flex;
    width: 100%;
    height: 100%;
}

#mapid {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    min-height: 400px;
    /* jaga agar tidak collapse */
    z-index: 0;
}

.leaflet-container {
    width: 100% !important;
    height: 100% !important;
}


/* tambahkan sedikit border radius kalau mau lebih halus */

.leaflet-control-layers {
    border-radius: 6px !important;
}


/* tombol fullscreen */

.leaflet-control-fullscreen a {
    background-color: #006B3F !important;
    color: white !important;
}


/* === SEARCH BOX === */

.search-box {
    position: relative;
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 25px;
    padding: 8px 35px 8px 15px;
    font-size: 0.9rem;
    background-color: #fff;
    transition: all 0.2s;
}

.search-box input:focus {
    border-color: #006B3F;
    box-shadow: 0 0 0 2px rgba(0, 107, 63, 0.1);
    outline: none;
}

.search-box i {
    position: absolute;
    right: 12px;
    top: 9px;
    color: #666;
}


/* === TOGGLE BUTTON (Mobile) === */

#toggleSidebar {
    display: none;
}

@media (max-width: 992px) {
    #sidebar {
        position: absolute;
        left: -320px;
        height: 100%;
        z-index: 1000;
    }
    #sidebar.active {
        left: 0;
    }
    #toggleSidebar {
        display: block;
        position: absolute;
        top: 15px;
        left: 15px;
        z-index: 1100;
        background-color: #006B3F;
        color: #fff;
        border: none;
        padding: 8px 10px;
        border-radius: 6px;
        cursor: pointer;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    }
    #toggleSidebar i {
        margin: 0;
    }
}


/* === Label Kecamatan (Tooltip Permanen) === */

.leaflet-tooltip.label-kecamatan {
    background: transparent;
    color: #ffffff;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 0.3px;
    border: none;
    box-shadow: none;
    text-shadow: 1px 1px 1px #000000, 1px 1px 2px #000000, 1px 1px 3px #000000, 1px 1px 3px #000000;
}


/* ===========================
   FOOTER
=========================== */

.footer {
    background-color: #00ACEE;
    color: #fff;
    padding: 30px 0 20px 0;
    position: relative;
    font-family: 'Poppins', sans-serif;
}

.footer .footer-logo {
    height: 50px;
    width: auto;
    margin-right: 10px;
}

.footer .social-icons a {
    font-size: 1.2rem;
    color: #fff;
    margin-right: 10px;
    transition: color 0.3s;
}

.footer .social-icons a:hover {
    color: #00bfa5;
}

.visitor-stats h5 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.visitor-stats .small-text {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}


/* Footer hr */

.footer hr {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}


/* Back to Top Button */

#backToTop {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    background-color: #006B3F;
    color: #fff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    text-align: center;
    line-height: 45px;
    transition: background-color 0.3s, transform 0.3s;
}

#backToTop:hover {
    background-color: #00bfa5;
    transform: translateY(-3px);
}


/* === STYLE UNTUK HASIL PENCARIAN === */

.search-result-marker {
    background: transparent !important;
    border: none !important;
}


/* Style untuk popup hasil pencarian */

.leaflet-popup-content-wrapper {
    border-radius: 10px;
    border: 2px solid #ff0000;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.2);
}

.leaflet-popup-content {
    margin: 12px 15px;
    line-height: 1.4;
}

.leaflet-popup-content b {
    color: #006B3F;
}


/* Style untuk circle highlight */

.search-highlight-circle {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.3;
    }
}


/* ===========================
   HALAMAN DATA PSU
=========================== */

#hero-data-psu {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url("../img/hero1.jpg") center/cover no-repeat;
    padding: 100px 0 60px 0;
}


/* Style untuk DataTables */

#tabelPSU_wrapper {
    margin-top: 20px;
}

#tabelPSU {
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

#tabelPSU thead th {
    background-color: #006B3F;
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px 15px;
}

#tabelPSU tbody td {
    padding: 10px 15px;
    vertical-align: middle;
}

#tabelPSU tbody tr:hover {
    background-color: rgba(0, 107, 63, 0.05);
}


/* Tombol Export */

.dt-buttons .btn {
    margin-right: 5px;
    margin-bottom: 10px;
}


/* Pagination custom */

.dataTables_paginate .paginate_button {
    border-radius: 4px !important;
    margin: 0 2px;
}

.dataTables_paginate .paginate_button.current {
    background: #006B3F !important;
    border-color: #006B3F !important;
    color: white !important;
}

.dataTables_paginate .paginate_button:hover {
    background: #00bfa5 !important;
    border-color: #00bfa5 !important;
    color: white !important;
}


/* Search box */

.dataTables_filter input {
    border: 1px solid #ced4da;
    border-radius: 4px;
    padding: 5px 10px;
    margin-left: 10px;
}

.dataTables_filter input:focus {
    border-color: #006B3F;
    box-shadow: 0 0 0 2px rgba(0, 107, 63, 0.1);
    outline: none;
}


/* Responsive */

@media (max-width: 768px) {
    #hero-data-psu h2 {
        font-size: 1.8rem;
    }
    .dt-buttons {
        text-align: center;
    }
    .dt-buttons .btn {
        margin-bottom: 5px;
        font-size: 0.8rem;
    }
}


/* ===========================
   HALAMAN DETAIL PSU
=========================== */

#hero-detail-psu {
    min-height: 300px;
    position: relative;
    z-index: 1;
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url("../img/hero4.jpg") center/cover no-repeat;
}