/* ========== DUKCAPIL Template — formal government style ==========
   Distinct from PDAM/SAMSAT/KDP:
   - Top notification banner (Indonesian govt style)
   - Top bar with full info + social
   - Hero with split layout (text left, image right)
   - Statistik dengan big-card layout
   - Sambutan Kepala Dinas section dengan portrait + signature feel
   - Card service dengan numbered indicator + zoom hover
   - Footer 4-column dengan map placeholder
*/
:root {
    --primary: #b45309;        /* amber-700 — gold formal */
    --primary-dark: #78350f;   /* amber-900 — deep brown */
    --primary-light: #fef3c7;  /* amber-100 */
    --accent: #1e40af;         /* blue-800 — navy formal accent */
    --accent-light: #dbeafe;   /* blue-100 */
    --notif: #fbbf24;          /* amber-400 untuk notification banner */
    --text: #1f2937;
    --text-soft: #4b5563;
    --border: #e5e7eb;
    --bg: #ffffff;
    --bg-soft: #f9fafb;
    --bg-section: #fffbeb;     /* amber-50 — soft govt feel */
    --max-w: 1200px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    line-height: 1.65;
    background: var(--bg);
    font-size: 15.5px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-dark); }
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

/* ========== Notification banner (paling atas, Indonesia govt-style) ========== */
.notif-banner {
    background: linear-gradient(90deg, var(--notif) 0%, #f59e0b 50%, var(--notif) 100%);
    color: var(--primary-dark);
    text-align: center;
    font-size: .85rem;
    font-weight: 600;
    padding: .55rem 1rem;
    border-bottom: 1px solid rgba(0,0,0,.08);
}
.notif-banner svg { width: 14px; height: 14px; vertical-align: middle; margin-right: .35rem; }

/* ========== Top bar (info + social) ========== */
.top-bar {
    background: var(--primary-dark);
    color: rgba(255,255,255,.92);
    font-size: .82rem;
    border-bottom: 3px solid var(--accent);
}
.top-bar .container { display: flex; align-items: center; justify-content: space-between; padding: .55rem 1.25rem; flex-wrap: wrap; gap: .75rem; }
.top-bar-info { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.top-bar-info span { display: inline-flex; align-items: center; gap: .4rem; }
.top-bar-info svg { width: 14px; height: 14px; opacity: .85; }
.top-bar-social { display: flex; gap: .35rem; }
.top-bar-social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: rgba(255,255,255,.12); color: #fff;
    transition: background .15s, transform .15s;
}
.top-bar-social a:hover { background: var(--accent); transform: translateY(-2px); }
.top-bar-social svg { width: 13px; height: 13px; }
@media (max-width: 640px) { .top-bar-info { gap: .85rem; } }

/* ========== Header (logo + nav, formal govt style) ========== */
.site-header {
    background: #fff;
    border-bottom: 4px solid var(--primary);
    box-shadow: 0 1px 8px rgba(0,0,0,.06);
    position: sticky; top: 0; z-index: 100;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; }
.brand { display: flex; align-items: center; gap: .9rem; color: var(--primary-dark); font-weight: 700; }
.brand-logo {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 10px rgba(180,83,9,.3);
}
.brand-logo svg { width: 32px; height: 32px; color: #fff; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1.05rem; color: var(--primary-dark); letter-spacing: .01em; }
.brand-text small { font-size: .73rem; color: var(--text-soft); font-weight: 500; }

nav.main-nav ul { display: flex; gap: .15rem; list-style: none; align-items: center; }
nav.main-nav a {
    color: var(--text); padding: .65rem 1rem; border-radius: 6px;
    font-weight: 600; font-size: .88rem;
    transition: background .15s, color .15s;
    border-bottom: 3px solid transparent;
}
nav.main-nav a:hover { color: var(--primary); background: var(--bg-section); }
nav.main-nav a.active { color: var(--primary); border-bottom-color: var(--primary); border-radius: 4px 4px 0 0; background: var(--bg-section); }

.mobile-toggle { display: none; background: none; border: none; color: var(--primary-dark); padding: .5rem; cursor: pointer; }
.mobile-toggle svg { width: 28px; height: 28px; }
@media (max-width: 920px) {
    nav.main-nav ul { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: #fff; padding: .5rem; gap: 0; box-shadow: 0 10px 20px rgba(0,0,0,.08); border-top: 2px solid var(--primary); }
    nav.main-nav.open ul { display: flex; }
    nav.main-nav a { display: block; border-radius: 0; padding: .85rem 1rem; border-bottom: 1px solid var(--border); }
    .mobile-toggle { display: block; }
}

/* ========== Hero (split layout — text left, image right) ========== */
.hero {
    background: linear-gradient(135deg, var(--bg-section) 0%, #fff 60%);
    padding: 4rem 0;
    position: relative;
    border-bottom: 1px solid var(--border);
}
.hero .container { display: grid; grid-template-columns: 1.15fr 1fr; gap: 3rem; align-items: center; }
.hero .breadcrumb { font-size: .85rem; color: var(--text-soft); margin-bottom: 1rem; }
.hero .breadcrumb a { color: var(--primary); }
.hero h1 { font-size: 2.4rem; font-weight: 800; line-height: 1.18; color: var(--primary-dark); margin-bottom: 1.1rem; }
.hero h1 .highlight { color: var(--primary); }
.hero p.lead { font-size: 1.1rem; color: var(--text-soft); max-width: 540px; }
.hero .hero-image {
    border-radius: 18px; overflow: hidden;
    box-shadow: 0 25px 50px rgba(180,83,9,.18);
    aspect-ratio: 4/3;
    background: var(--primary-dark) center/cover;
    border: 4px solid #fff;
    position: relative;
}
.hero .hero-image::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(180,83,9,.18));
}
@media (max-width: 880px) {
    .hero .container { grid-template-columns: 1fr; gap: 2rem; }
    .hero h1 { font-size: 1.85rem; }
}

/* ========== Sections ========== */
section { padding: 4rem 0; }
section.alt { background: var(--bg-section); }
section.dark { background: var(--primary-dark); color: #fff; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header .eyebrow { color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; margin-bottom: .6rem; display: inline-block; padding-bottom: .25rem; border-bottom: 2px solid var(--primary); }
.section-header h2 { font-size: 2rem; font-weight: 800; color: var(--primary-dark); margin-bottom: .75rem; }
.section-header p { color: var(--text-soft); max-width: 720px; margin: 0 auto; }
section.dark .section-header h2 { color: #fff; }
section.dark .section-header p { color: rgba(255,255,255,.85); }
section.dark .section-header .eyebrow { color: var(--notif); border-bottom-color: var(--notif); }
@media (max-width: 640px) { section { padding: 2.75rem 0; } .section-header h2 { font-size: 1.55rem; } }

/* ========== Statistik (big-card distinctive) ========== */
.statistik-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: -3rem; position: relative; z-index: 5; }
.statistik-card {
    background: #fff; padding: 1.75rem 1.5rem; border-radius: 14px;
    border-top: 4px solid var(--primary);
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    text-align: center;
    transition: transform .2s, box-shadow .2s;
}
.statistik-card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(180,83,9,.18); }
.statistik-card .stat-icon { width: 48px; height: 48px; margin: 0 auto .8rem; background: var(--primary-light); color: var(--primary); border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.statistik-card .stat-icon svg { width: 26px; height: 26px; }
.statistik-card .num { font-size: 2.2rem; font-weight: 800; color: var(--primary-dark); line-height: 1; margin-bottom: .25rem; }
.statistik-card .label { color: var(--text-soft); font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 880px) { .statistik-row { grid-template-columns: repeat(2, 1fr); margin-top: 1rem; } }

/* ========== Sambutan Kepala Dinas section ========== */
.sambutan { display: grid; grid-template-columns: 280px 1fr; gap: 3rem; align-items: center; }
.sambutan .portrait {
    border-radius: 18px; overflow: hidden;
    aspect-ratio: 3/4;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) center/cover;
    border: 5px solid #fff;
    box-shadow: 0 18px 40px rgba(180,83,9,.22);
}
.sambutan .signature-block {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px dashed var(--primary-light);
}
.sambutan .signature-block .sig-name { font-weight: 700; color: var(--primary-dark); }
.sambutan .signature-block .sig-role { font-size: .85rem; color: var(--text-soft); }
.sambutan h2 { font-size: 1.85rem; color: var(--primary-dark); margin-bottom: 1rem; }
.sambutan p { color: var(--text); margin-bottom: 1rem; line-height: 1.75; }
.sambutan .salam { font-style: italic; color: var(--primary); font-weight: 600; }
@media (max-width: 880px) { .sambutan { grid-template-columns: 1fr; gap: 1.5rem; text-align: center; } .sambutan .portrait { max-width: 240px; margin: 0 auto; } }

/* ========== Layanan (numbered cards distinctive) ========== */
.layanan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.layanan-card {
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    padding: 1.75rem 1.5rem;
    position: relative;
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.layanan-card:hover { transform: translateY(-4px); border-color: var(--primary); box-shadow: 0 14px 30px rgba(180,83,9,.12); }
.layanan-card .layanan-num {
    position: absolute; top: 1rem; right: 1rem;
    font-size: 2.5rem; font-weight: 800; line-height: 1;
    color: var(--primary-light); opacity: .7;
}
.layanan-card .layanan-icon { width: 52px; height: 52px; border-radius: 13px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.layanan-card .layanan-icon svg { width: 26px; height: 26px; }
.layanan-card h3 { font-size: 1.08rem; color: var(--primary-dark); margin-bottom: .5rem; }
.layanan-card p { color: var(--text-soft); font-size: .9rem; }
.layanan-card .layanan-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--primary); font-weight: 600; font-size: .85rem; margin-top: .85rem; }
@media (max-width: 880px) { .layanan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .layanan-grid { grid-template-columns: 1fr; } }

/* ========== Maklumat Pelayanan (formal commitment box) ========== */
.maklumat {
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary-dark) 100%);
    color: #fff; border-radius: 18px; padding: 3rem 2.5rem;
    position: relative; overflow: hidden;
}
.maklumat::before {
    content: '“'; position: absolute; top: -2rem; left: 1.5rem;
    font-size: 12rem; opacity: .12; line-height: 1; font-family: Georgia, serif;
}
.maklumat .eyebrow { color: var(--notif); font-weight: 700; text-transform: uppercase; letter-spacing: .15em; font-size: .8rem; margin-bottom: .75rem; }
.maklumat h3 { font-size: 1.6rem; margin-bottom: 1rem; }
.maklumat p { opacity: .92; line-height: 1.8; max-width: 800px; }
.maklumat ul { margin-top: 1.25rem; padding-left: 1.5rem; }
.maklumat li { margin-bottom: .5rem; opacity: .92; }

/* ========== Berita / news ========== */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.news-item {
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    overflow: hidden; transition: transform .2s, box-shadow .2s;
    display: flex; flex-direction: column;
}
.news-item:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(0,0,0,.08); }
.news-item .news-thumb { aspect-ratio: 16/10; background: var(--primary-dark) center/cover; overflow: hidden; }
.news-item .news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.news-item:hover .news-thumb img { transform: scale(1.06); }
.news-item .news-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.news-item .news-meta { font-size: .76rem; color: var(--primary); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .5rem; }
.news-item h3 { font-size: 1.08rem; color: var(--primary-dark); margin-bottom: .65rem; line-height: 1.35; }
.news-item .news-excerpt { color: var(--text-soft); font-size: .9rem; flex: 1; }
.news-item .news-link { margin-top: 1rem; color: var(--primary); font-weight: 600; font-size: .85rem; }
@media (max-width: 880px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 580px) { .news-grid { grid-template-columns: 1fr; } }

/* ========== Quick links section (sebelum footer) ========== */
.quick-links {
    background: linear-gradient(135deg, var(--bg-section) 0%, #fff 100%);
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}
.quick-links-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.quick-link-item {
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    padding: 1.25rem; text-align: center;
    transition: all .2s;
}
.quick-link-item:hover { border-color: var(--primary); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(180,83,9,.12); }
.quick-link-item .ql-icon { width: 44px; height: 44px; margin: 0 auto .65rem; background: var(--primary-light); color: var(--primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.quick-link-item .ql-icon svg { width: 22px; height: 22px; }
.quick-link-item .ql-label { font-weight: 600; font-size: .88rem; color: var(--primary-dark); }
@media (max-width: 880px) { .quick-links-grid { grid-template-columns: repeat(2, 1fr); } }

/* ========== Buttons ========== */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.75rem; border-radius: 8px; font-weight: 600; font-size: .92rem; transition: all .2s; border: none; cursor: pointer; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 16px rgba(180,83,9,.3); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(180,83,9,.4); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(30,64,175,.3); }
.btn-accent:hover { background: #1e3a8a; color: #fff; transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-group { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

/* ========== Prose / text content (untuk inner pages) ========== */
.prose { max-width: 820px; }
.prose h2 { font-size: 1.6rem; font-weight: 700; color: var(--primary-dark); margin: 2rem 0 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--primary-light); }
.prose h3 { font-size: 1.18rem; font-weight: 700; color: var(--primary); margin: 1.5rem 0 .65rem; }
.prose p { margin-bottom: 1rem; color: var(--text); line-height: 1.8; }
.prose ul, .prose ol { margin: 1rem 0 1rem 1.5rem; }
.prose li { margin-bottom: .5rem; line-height: 1.7; }
.prose strong { color: var(--primary-dark); }
.info-box { background: var(--primary-light); border-left: 4px solid var(--primary); padding: 1.25rem 1.5rem; border-radius: 8px; margin: 1.5rem 0; }
.info-box.accent { background: var(--accent-light); border-left-color: var(--accent); }

/* ========== Forms ========== */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .9rem; color: var(--primary-dark); }
.form-control { width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--border); border-radius: 8px; font-size: .95rem; font-family: inherit; transition: all .15s; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(180,83,9,.12); }
textarea.form-control { resize: vertical; min-height: 130px; }

/* ========== Footer ========== */
.site-footer {
    background: linear-gradient(180deg, var(--primary-dark) 0%, #451a03 100%);
    color: rgba(255,255,255,.85);
    padding: 4rem 0 1.5rem;
}
.site-footer .footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1.1rem; font-weight: 700; padding-bottom: .65rem; border-bottom: 2px solid var(--notif); display: inline-block; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: .55rem; }
.site-footer a { color: rgba(255,255,255,.85); font-size: .9rem; transition: color .15s; }
.site-footer a:hover { color: var(--notif); }
.site-footer .footer-brand { font-size: 1.15rem; color: #fff; font-weight: 700; margin-bottom: .75rem; }
.site-footer .footer-desc { font-size: .9rem; line-height: 1.7; }
.site-footer .footer-contact li { display: flex; gap: .65rem; align-items: flex-start; font-size: .87rem; }
.site-footer .footer-contact svg { flex-shrink: 0; width: 16px; height: 16px; margin-top: .2rem; opacity: .8; color: var(--notif); }
.site-footer .footer-social { display: flex; gap: .5rem; margin-top: 1rem; }
.site-footer .footer-social a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; }
.site-footer .footer-social a:hover { background: var(--notif); color: var(--primary-dark); }
.site-footer .footer-social svg { width: 16px; height: 16px; }
.copyright { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.5rem; text-align: center; font-size: .85rem; opacity: .75; }
@media (max-width: 880px) { .site-footer .footer-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; } }
@media (max-width: 580px) { .site-footer .footer-grid { grid-template-columns: 1fr; } }
