:root {
    --green-dark: #0B4F2E;
    --green-med: #0D6B3D;
    --green-light: #0F874C;
    --gold: #C8963E;
    --gold-light: #E8C560;
    --cream: #F5F0E8;
    --white: #FFFFFF;
    --text: #333333;
    --text-light: #666666;
    --gray-bg: #F0F2F5;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; background: var(--gray-bg); color: var(--text); line-height: 1.6; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
.header { background: linear-gradient(135deg, #062A15, var(--green-dark), #0D5A30); color: white; }
.header-top { padding: 20px 0; }
.header-top .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.header-brand { display: flex; align-items: center; gap: 15px; }
.logo-ma { width: 60px; height: auto; object-fit: contain; }
.header-text h1 { font-size: 1.4rem; font-weight: 700; }
.header-text .tagline { font-size: 0.9rem; opacity: 0.85; margin-top: 2px; }
.header-contact { display: flex; gap: 20px; flex-wrap: wrap; }
.contact-item { color: var(--gold-light); text-decoration: none; font-size: 0.9rem; transition: color 0.2s; }
.contact-item:hover { color: white; }

.header-sticky { position: sticky; top: 0; z-index: 1000; }
/* Navbar */
.navbar { background: rgba(6,42,21,0.95); border-top: 1px solid rgba(255,255,255,0.1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav-menu { display: flex; list-style: none; flex-wrap: wrap; }
.nav-menu > li { position: relative; }
.nav-menu > li > a { display: block; padding: 14px 18px; color: white; text-decoration: none; font-size: 0.95rem; font-weight: 500; transition: background 0.2s; white-space: nowrap; }
.nav-menu > li > a:hover, .nav-menu > li > a.active { background: rgba(255,255,255,0.15); border-radius: 4px; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: white; min-width: 220px; box-shadow: var(--shadow); border-radius: 0 0 var(--radius) var(--radius); overflow: hidden; z-index: 100; list-style: none; }
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu li a { display: block; padding: 12px 18px; color: var(--text); text-decoration: none; transition: all 0.2s; }
.dropdown-menu li a:hover { background: var(--green-dark); color: white; }

/* Hero */
.hero { background: linear-gradient(rgba(6,42,21,0.65), rgba(11,79,46,0.70)), url('../img/header-bg.png') center/100% 500px no-repeat; min-height: 500px; display: flex; align-items: center; justify-content: center; text-align: center; color: white; padding: 40px 20px; overflow: hidden; position: relative; }
.hero-content h1 { font-size: 2rem; margin: 10px 0; }
.hero-content h2 { font-size: 1.2rem; font-weight: 400; opacity: 0.9; }

/* Hero Animation - Fade Up */
.fade-up { opacity: 0; transform: translateY(30px); animation: fadeUp 0.8s ease forwards; }
.hero-sub.delay-1 { animation-delay: 0.2s; }
.hero-main.delay-2 { animation-delay: 0.5s; }
.hero-sub-2.delay-3 { animation-delay: 0.8s; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Subtle underline reveal after fade */
.hero-main::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: var(--gold);
    margin: 12px auto 0;
    animation: lineReveal 0.6s ease forwards;
    animation-delay: 1.2s;
}
@keyframes lineReveal {
    from { width: 0; }
    to { width: 100px; }
}
/* Subtle shimmer on hero bg */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,215,0,0.06) 0%, transparent 60%);
    animation: heroShimmer 8s linear infinite;
}
@keyframes heroShimmer {
    0% { transform: translate(0,0) rotate(0deg); }
    50% { transform: translate(10px,10px) rotate(1deg); }
    100% { transform: translate(0,0) rotate(0deg); }
}

/* Section */
.section { background: white; margin: 25px 0; padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); }
.section-title { font-size: 1.2rem; color: var(--green-dark); border-bottom: 3px solid var(--gold); padding-bottom: 10px; margin-bottom: 20px; }
.page-header { background: linear-gradient(135deg, var(--green-dark), var(--green-med)); color: white; padding: 30px; border-radius: var(--radius); margin: 25px 0; text-align: center; }
.page-header h1 { font-size: 1.6rem; }

/* Info Cards */
.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin: 25px 0; }
.card { background: white; border-radius: var(--radius); padding: 25px; text-align: center; box-shadow: var(--shadow); transition: transform 0.2s; border-top: 4px solid var(--gold); }
.card:hover { transform: translateY(-4px); }
.card-icon { font-size: 2.5rem; margin-bottom: 10px; }
.card h3 { color: var(--green-dark); margin-bottom: 8px; }
.card p { color: var(--text-light); font-size: 0.9rem; }
.btn-link { display: inline-block; margin-top: 12px; color: var(--green-light); font-weight: 600; text-decoration: none; }
.btn-link:hover { color: var(--gold); }

/* SK Card */
.sk-card { background: var(--cream); border-radius: 8px; padding: 15px; }
.sk-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.sk-icon { font-size: 1.5rem; }

/* Buttons */
.btn-primary, .btn-download { display: inline-block; background: var(--green-dark); color: white; padding: 10px 22px; border-radius: 6px; text-decoration: none; font-weight: 600; transition: all 0.2s; }
.btn-primary:hover, .btn-download:hover { background: var(--gold); color: var(--green-dark); }
.btn-lhkpn { display: inline-block; background: var(--gold); color: var(--green-dark); padding: 6px 16px; border-radius: 4px; text-decoration: none; font-size: 0.85rem; font-weight: 600; margin-top: 5px; }

/* Pejabat Card */
.pejabat-card { display: flex; gap: 20px; align-items: center; background: var(--gray-bg); padding: 20px; border-radius: var(--radius); margin-bottom: 15px; border-left: 4px solid var(--gold); }
.pejabat-foto { flex-shrink: 0; }
.foto-placeholder { width: 80px; height: 80px; background: linear-gradient(135deg, var(--green-dark), var(--green-light)); color: var(--gold-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; }
.pejabat-info h3 { font-size: 0.8rem; text-transform: uppercase; color: var(--gold); letter-spacing: 1px; }
.pejabat-info h2 { font-size: 1.2rem; color: var(--green-dark); margin: 4px 0; }
.pejabat-info p { color: var(--text-light); font-size: 0.85rem; }

/* Table */
.table-wrapper { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { background: var(--green-dark); color: white; padding: 12px; text-align: left; }
.data-table td { padding: 10px 12px; border-bottom: 1px solid #e0e0e0; }
.data-table tr:hover { background: var(--cream); }

/* Visi Misi */
.visi-misi { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.vm-item { background: var(--gray-bg); padding: 20px; border-radius: var(--radius); }
.vm-item h3 { color: var(--green-dark); margin-bottom: 10px; }
.vm-item ol { padding-left: 20px; }
.vm-item ol li { margin-bottom: 6px; font-size: 0.9rem; }

/* Pegawai Grid */
.pegawai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.pegawai-card { background: white; border-radius: var(--radius); padding: 20px 15px; text-align: center; box-shadow: var(--shadow); transition: transform 0.2s; border-top: 3px solid var(--gold); }
.pegawai-card:hover { transform: translateY(-3px); }
.pegawai-foto { margin-bottom: 10px; }
.foto-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); }
.pegawai-card h4 { font-size: 0.9rem; color: var(--green-dark); margin-bottom: 4px; }
.pegawai-card .jabatan { font-size: 0.8rem; font-weight: 600; color: var(--gold); margin-bottom: 2px; }
.pegawai-card .pangkat { font-size: 0.75rem; color: var(--text-light); }

/* Struktur */
.struktur-placeholder { background: var(--cream); text-align: center; padding: 60px 20px; border-radius: var(--radius); border: 2px dashed var(--gold); color: var(--text-light); font-size: 1.1rem; }

/* PPID Struktur */
.ppid-struktur { text-align: center; }
.ppid-box { display: inline-block; background: var(--gray-bg); padding: 20px 40px; border-radius: var(--radius); border: 2px solid var(--gold); margin: 10px; }
.ppid-box h3 { color: var(--green-dark); font-size: 0.9rem; }
.ppid-nama { font-size: 1.2rem; font-weight: 700; color: var(--text); margin: 5px 0; }
.ppid-role { font-size: 0.85rem; color: var(--text-light); }
.ppid-arrow { font-size: 1.5rem; margin: 5px 0; }

/* Tupoksi */
.tupoksi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 15px; }
.tupoksi-card { background: var(--gray-bg); padding: 20px; border-radius: var(--radius); text-align: center; }
.tupoksi-icon { font-size: 2rem; }
.tupoksi-card h4 { color: var(--green-dark); margin: 8px 0; }
.tupoksi-card p { font-size: 0.85rem; color: var(--text-light); }

/* Regulasi */
.regulasi-list {}
.regulasi-item { display: flex; gap: 15px; padding: 12px 0; border-bottom: 1px solid #e8e8e8; align-items: flex-start; }
.regulasi-item:last-child { border-bottom: none; }
.reg-icon { font-size: 1.5rem; flex-shrink: 0; }
.regulasi-item strong { display: block; color: var(--green-dark); }
.regulasi-item p { color: var(--text-light); font-size: 0.85rem; }

/* Info List */
.info-list {}
.info-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid #e8e8e8; align-items: center; }
.info-item:last-child { border-bottom: none; }
.info-item span { color: var(--text); }
.info-note { margin-top: 15px; padding: 12px; background: var(--cream); border-radius: 6px; font-size: 0.9rem; color: var(--text-light); }

/* DIP */
.dip-card { display: flex; align-items: center; gap: 15px; background: var(--cream); padding: 20px; border-radius: var(--radius); }
.dip-icon { font-size: 2rem; }

/* Layanan */
.layanan-flow { text-align: center; }
.flow-step { display: inline-block; background: var(--gray-bg); padding: 20px 30px; border-radius: var(--radius); border: 2px solid var(--gold); margin: 10px; max-width: 250px; vertical-align: top; }
.flow-num { width: 36px; height: 36px; background: var(--green-dark); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 10px; }
.flow-step p { font-size: 0.85rem; }
.flow-arrow { font-size: 1.5rem; }

/* Pelayanan */
.pelayanan-links { display: flex; gap: 15px; flex-wrap: wrap; }
.pelayanan-item { display: flex; align-items: center; gap: 12px; background: var(--green-dark); color: white; padding: 15px 25px; border-radius: var(--radius); text-decoration: none; font-weight: 600; transition: all 0.2s; }
.pelayanan-item:hover { background: var(--gold); color: var(--green-dark); }
.pelayanan-icon { font-size: 1.5rem; }

/* Kontak */
.kontak-ppid { background: var(--cream); padding: 20px; border-radius: var(--radius); }
.kontak-ppid p { margin-bottom: 8px; }
.kontak-ppid a { color: var(--green-dark); text-decoration: underline; }

/* Footer */
.footer { background: linear-gradient(135deg, #062A15, var(--green-dark)); color: white; padding: 40px 0 20px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 30px; margin-bottom: 30px; }
.footer-col h4 { color: var(--gold-light); margin-bottom: 12px; font-size: 1rem; }
.footer-col p, .footer-col li { font-size: 0.85rem; line-height: 1.8; color: rgba(255,255,255,0.8); }
.footer-col ul { list-style: none; }
.footer-col a { color: rgba(255,255,255,0.8); text-decoration: none; }
.footer-col a:hover { color: var(--gold-light); }
.jam-table td { padding: 2px 6px; font-size: 0.85rem; }
.social-links a { display: block; margin-bottom: 6px; }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.15); font-size: 0.85rem; }
.footer-bottom a { color: var(--gold-light); text-decoration: none; }

/* Responsive */
@media (max-width: 768px) {
    .header-top .container { flex-direction: column; text-align: center; gap: 10px; }
    .header-brand { flex-direction: column; }
    .header-contact { justify-content: center; }
    .nav-menu { flex-direction: column; }
    .nav-menu > li > a { padding: 12px; }
    .dropdown-menu { position: static; box-shadow: none; background: rgba(0,0,0,0.1); border-radius: 0; }
    .dropdown-menu li a { color: white; }
    .hero { min-height: 250px; }
    .hero-content h1 { font-size: 1.4rem; }
    .pejabat-card { flex-direction: column; text-align: center; }
    .visi-misi { grid-template-columns: 1fr; }
    .info-cards { grid-template-columns: 1fr; }
    .section { padding: 20px; }
}

/* WhatsApp Floating Widget */
.wa-widget { position: fixed; bottom: 25px; right: 25px; z-index: 9999; font-family: 'Segoe UI', Arial, sans-serif; }
.wa-toggle-check { display: none; }
.wa-button { display: flex; align-items: center; justify-content: center; width: 65px; height: 65px; background: #25D366; border-radius: 50%; cursor: pointer; box-shadow: 0 4px 20px rgba(37,211,102,0.4); transition: all 0.3s; position: relative; }
.wa-button:hover { transform: scale(1.08); box-shadow: 0 6px 25px rgba(37,211,102,0.5); }
.wa-button::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid #25D366; animation: waPulse 2s infinite; }
@keyframes waPulse { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.wa-svg { width: 38px; height: 38px; display: block; }
.wa-icon-close { font-size: 28px; color: white; display: none; position: absolute; font-weight: bold; }
.wa-toggle-check:checked ~ .wa-button { background: #e74c3c; box-shadow: 0 4px 20px rgba(231,76,60,0.4); }
.wa-toggle-check:checked ~ .wa-button::before { display: none; }
.wa-toggle-check:checked ~ .wa-button .wa-svg { display: none; }
.wa-toggle-check:checked ~ .wa-button .wa-icon-close { display: block; }
.wa-popup { position: absolute; bottom: 85px; right: 0; width: 320px; background: white; border-radius: 12px; box-shadow: 0 8px 40px rgba(0,0,0,0.15); opacity: 0; visibility: hidden; transform: translateY(20px); transition: all 0.3s ease; overflow: hidden; }
.wa-toggle-check:checked ~ .wa-popup { opacity: 1; visibility: visible; transform: translateY(0); }
.wa-popup-header { background: #075E54; color: white; padding: 15px; display: flex; align-items: center; gap: 12px; }
.wa-popup-header h4 { font-size: 15px; margin: 0 0 2px; }
.wa-popup-header p { font-size: 12px; margin: 0; opacity: 0.8; }
.wa-logo { width: 42px; height: 42px; border-radius: 50%; background: white; object-fit: contain; padding: 4px; }
.wa-popup-body { padding: 20px 15px; background: #efeae2; background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4cfc4' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.wa-popup-body p { background: white; padding: 12px 15px; border-radius: 8px 8px 8px 0; font-size: 14px; color: #333; display: inline-block; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.wa-chat-btn { display: block; background: #25D366; color: white; text-align: center; padding: 14px; text-decoration: none; font-weight: 600; font-size: 15px; transition: background 0.2s; }
.wa-chat-btn:hover { background: #1eb958; }

/* PDF Popup */
.pdf-popup-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 9999; align-items: center; justify-content: center; }
.pdf-popup-overlay.active { display: flex; }
.pdf-popup-container { background: white; border-radius: 12px; width: 95%; max-width: 900px; height: 90vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden; }
.pdf-popup-header { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; background: var(--green-dark); color: white; }
.pdf-popup-header h3 { font-size: 1rem; margin: 0; }
.pdf-popup-close { background: none; border: none; color: white; font-size: 1.3rem; cursor: pointer; padding: 5px 10px; border-radius: 6px; transition: background 0.2s; }
.pdf-popup-close:hover { background: rgba(255,255,255,0.15); }
.pdf-popup-body { flex: 1; overflow: hidden; }
.pdf-popup-footer { padding: 12px 20px; text-align: center; border-top: 1px solid #eee; background: #f9f9f9; }
.btn-download { display: inline-block; background: var(--green-dark); color: white; padding: 10px 24px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: background 0.2s; }
.btn-download:hover { background: var(--green-med); }
