:root {
    --primary-color: #006400;
    --secondary-color: #FFD700;
    --accent-color: #28a745;
    --light-green: #d4edda;
    --dark-green: #004d00;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9;
    color: var(--text-color);
}

.top-bar {
    background: linear-gradient(90deg, var(--dark-green), var(--primary-color));
    color: white;
    font-size: 1rem;
    padding: 8px 0;
    border-bottom: 3px solid var(--secondary-color);
}

.top-bar i {
    color: var(--secondary-color);
}

.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
    padding: 15px 0;
}

.navbar-scrolled {
    padding: 8px 0;
    box-shadow: 0 5px 20px rgba(0, 100, 0, 0.15);
}

.navbar-brand img {
    height: 60px;
    margin-right: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.navbar-brand h1 {
    font-size: 2rem;
    font-weight: 1000;
    background: linear-gradient(90deg, var(--primary-color), var(--dark-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-brand span {
    font-size: 1,5rem;
    color: #666;
}

.nav-link {
    color: #444 !important;
    font-weight: 600;
    padding: 10px 15px !important;
    border-radius: 5px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
    background: rgba(0, 100, 0, 0.05);
}

.carousel {
    position: relative;
    overflow: hidden;
}

.carousel-item {
    height: 500px;
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 100, 0, 0.7), rgba(0, 0, 0, 0.4));
    z-index: 1;
}

.carousel-item img {
    height: 100%;
    object-fit: cover;
    filter: brightness(0.8);
    animation: zoomIn 15s linear infinite alternate;
}

@keyframes zoomIn {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

.carousel-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    z-index: 2;
    text-align: left;
    padding: 40px;
    background: rgba(0, 0, 0, 0.6); /* background hitam */
    border-radius: 20px;
    backdrop-filter: blur(5px);
    max-width: 900px;
    width: calc(70% - 40px);

    /* MATIKAN SEMUA ANIMASI */
    animation: none;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.carousel-caption h3 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-top: -18px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);

    background: linear-gradient(90deg, #fff, var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* MATIKAN TYPEWRITER */
    animation: none;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

.carousel-caption p {
    font-size: 1.1rem;
    margin-top: -15px;
    color: #eee;
    line-height: 1.6;
}

.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 20px;
    transition: var(--transition);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev { left: 20px; }
.carousel-control-next { right: 20px; }

.section-title {
    border-left: 5px solid var(--primary-color);
    padding-left: 15px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #333;
}

#sekilas {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

#sekilas p {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Container organigram */
.org-chart {
    padding: 10px 0;
}

.tree-row {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 50px;
    position: relative;
}

.children {
    flex-wrap: wrap;
}

.org-box {
    background: #ffff;
    border-radius: 10px;
    padding: 12px;
    width: 100px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,.1);
    z-index: 2;
}

.org-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FFD700;
    margin-bottom: 8px;
}

.main {
    background: #ffffff;
    color: #000000;
    border: 5px solid #2f855a;
}

.secretary {
    background: #f8f9fa;
    border: 5px solid #2f855a;
}

.offset-sekretaris {
    transform: translateX(350px);
}


.kasi {
    background: #f8f9fa;
    border: 5px solid #2f855a;
}

.kaur {
    background: #f8f9fa;
    border: 5px solid #FFD700;
}

.staff {
    background: #f8f9fa;
    border: 5px solid #FFD700;
}

.org-box[data-role="staff"] {
    background: #f1f5f9;
    border: 2px dashed #6c757d;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.org-box[data-role="petugas"] {
    background: #f1f5f9;
    border: 2px dashed #6c757d;
    box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.org-wrapper {
    width: 100%;
    overflow: hidden;
    display: flex;
    justify-content: center;
}

.org-scale {
    transform-origin: top center;
}

/* Geser Kasi Kesejahteraan ke kiri */
.tree-row.children .org-box:nth-child(3) {
    margin-right: 70px;
}

/* Geser mulai Kaur TU & Umum ke kanan */
.tree-row.children .org-box:nth-child(4),
.tree-row.children .org-box:nth-child(5),
.tree-row.children .org-box:nth-child(6) {
    margin-left: 20px;
}

/* SVG */
#tree-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

footer {
    background: linear-gradient(135deg, #222, #000);
    color: #ddd;
    padding: 60px 0 0;
}

footer a {
    color: #ffc107 !important;  /* kuning Bootstrap */
}

footer a:hover {
    color: #ffca2c !important;
}

.copyright {
    background: #111;
    padding: 20px 0;
    text-align: center;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-green));
    color: white;
    border-radius: 50%;
    opacity: 0;
}

.back-to-top.show {
    opacity: 1;
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */
@media (max-width: 500px) {
    .carousel-item {
        height: 400px;
    }
    
    .carousel-item {
    height: 50vh;
    }

    .carousel-caption {
        bottom: 15%;
        padding: 20px;
    }
    
    .carousel-caption h3 {
        font-size: 1.8rem;
    }
    
    .navbar-brand h1 {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        height: 350px;
    }
    
    .carousel-caption h3 {
        font-size: 1.5rem;
    }
    
    .carousel-caption p {
        font-size: 1rem;
    }
    
    .top-bar div {
        font-size: 0.75rem;
    }
    
    .navbar-brand img {
        height: 50px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    footer {
        padding: 40px 0 0;
    }
    
    .floating-element {
        display: none;
    }
}

@media (max-width: 576px) {
    .carousel-item {
        height: 300px;
    }
    
    .carousel-caption {
        display: none !important;
    }
    
    .navbar {
        padding: 10px 0;
    }
    
    .navbar-scrolled {
        padding: 5px 0;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    #sekilas p {
        font-size: 1rem;
    }
    
    .copyright small {
        font-size: 0.8rem;
    }
}

.footer-map {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 12px;
}

/* Tablet */
@media (max-width: 768px) {
    .footer-map {
        height: 220px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    .footer-map {
        height: 200px;
    }
}

/* ============================================
   ANIMATION CLASSES
============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    transform: translateX(-100px);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.slide-in-right {
    transform: translateX(100px);
    opacity: 0;
    transition: transform 0.8s ease, opacity 0.8s ease;
}

.slide-in-right.active {
    transform: translateX(0);
    opacity: 1;
}

/* style.css */
.card-img-top {
    width: 100%;
    height: 200px;
    object-fit: cover; 
}

.visi-card h3,
.misi-card h3 {
  font-weight: 600;
  font-size: 1.8rem;
  margin-bottom: 1rem;

  padding-bottom: 0.5rem;
  border-bottom: 4px solid #FFD700;
}

.judul-gradasi {
  background: linear-gradient(90deg, #2f855a, #d69e2e); /* hijau ke kuning */
  color: white;
  display: inline-block; /* supaya background pas dengan teks */
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  font-weight: 700;
}

.judul-gradasi h2 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.2;
}

/* Jika ingin paragraf juga diberi warna putih */
.judul-gradasi p {
  color: white;
  margin-top: 0.5rem;
  font-weight: 500;
}

body {
    background-image: url("Foto/foto1.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    /* Efek transparan */
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    background: rgba(255, 255, 255, 0.85); /* putih transparan */
    z-index: -1;
}

.misi-list {
    text-align: justify;
    padding-left: 1.2rem; /* jarak bullet */
}

.misi-list li {
    text-align: justify;
}

.full-width {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
}

.sejarah-bg {
  background: url("Foto/legenda-pauah.jpg") center/cover no-repeat;
  padding: 120px 0;
}

.sejarah-bg .overlay {
  background: rgba(0,0,0,0.6);
  padding: 40px;
  border-radius: 15px;
}

/* ORGANISASI MODEL PEMDA */
.org-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px 16px;
  border-radius: 6px;
  color: white;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

.org-card img {
  width: 65px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  background: #fff;
}

.org-card h6 {
  margin: 0;
  font-weight: 700;
  font-size: 0.9rem;
}

.org-card p {
  margin: 2px 0 0;
  font-size: 0.85rem;
}

.org-chart {
    position: relative;
}

#tree-lines {
    pointer-events: none;
}

/* =========================
   FIX BAGAN (TIDAK MERUSAK FOOTER)
========================= */
.bamus-chart {
    width: 100%;
    padding-bottom: 10px;
}

.bamus-chart .tree-row {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.bamus-chart .org-box {
    width: 200px;
}

.bamus-chart svg#tree-lines {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.org-box {
  background: #fff;
  border-radius: 10px;
  padding: 12px;
  width: 150px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .1);
  z-index: 2;

  /* Tambahkan border */
  border: 5px solid #006400
}

/* Background hitam */
.img-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,0.9);
}

/* Gambar besar */
.img-modal-content {
    display: block;
    margin: auto;
    max-width: 90%;
    max-height: 90vh;
    margin-top: 5vh;
}

/* Tombol close */
.img-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    color: white;
    cursor: pointer;
}

/* Cursor tangan */
.zoomable {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.zoomable:hover {
    transform: scale(1.05);
}

/* HERO TITLE */
#hero h2 {
    font-family: 'Poppins', sans-serif;  /* Ganti font */
    font-size: 42px;                     /* Ukuran lebih besar */
    font-weight: 700;                    /* Tebal */
    color: #14532d;                      /* Warna hijau tua */
    letter-spacing: 1px;                 /* Jarak huruf */
}

/* SUBTITLE */
#hero p {
    font-family: 'Open Sans', sans-serif;
    font-size: 18px;
    color: #333;
}

.img-legenda {
    float: left;
    width: 420px;          /* atur besar gambar */
    margin: 0 25px 20px 0; /* jarak ke teks */
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

/* supaya setelah section tidak rusak */
.legenda-wrapper::after {
    content: "";
    display: block;
    clear: both;
}

/* responsive */
@media (max-width: 768px) {
    .img-legenda {
        float: none;
        width: 100%;
        margin: 0 0 20px 0;
    }
}
.tabel-custom {
    width: auto;
    border-collapse: collapse;
}

.tabel-custom th, 
.tabel-custom td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: center;
}

.tabel-custom th {
    background-color: #14532d;
    color: white;
}