/* =========================================================
   SIWAS POLRES PURBALINGGA - MAIN STYLESHEET
   Palet Warna:
   - Coklat Polisi (Utama)  : #4A3226
   - Coklat Tua             : #2E1F17
   - Emas / Gold (Aksen)    : #C9A227
   - Abu-abu Gelap          : #333333
   - Abu-abu Terang         : #F2F2F0
   - Putih                  : #FFFFFF
========================================================= */

:root {
    --brown-dark: #2E1F17;
    --brown-main: #4A3226;
    --brown-light: #6B4B37;
    --gold: #C9A227;
    --gold-light: #E5C158;
    --gray-dark: #333333;
    --gray-medium: #6E6E6E;
    --gray-light: #F2F2F0;
    --gray-soft: #F7F7F5;
    --white: #FFFFFF;

    --font-main: 'Poppins', sans-serif;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.18);

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;

    --transition: all 0.3s ease;
}

/* =========================================================
   RESET & BASE
========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--gray-dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    background: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--brown-dark);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =========================================================
   SECTION HELPERS
========================================================= */
.section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.section-tag {
    display: inline-block;
    background: rgba(201, 162, 39, 0.12);
    color: var(--brown-main);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 999px;
    margin-bottom: 14px;
    border: 1px solid rgba(201, 162, 39, 0.35);
}

.section-title {
    font-size: 2.1rem;
    margin-bottom: 12px;
}

.section-title span {
    color: var(--gold);
}

.section-desc {
    color: var(--gray-medium);
    font-size: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--brown-dark);
    box-shadow: var(--shadow-sm);
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-3px);
}

/* =========================================================
   TOP BAR
========================================================= */
.top-bar {
    background: var(--brown-dark);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 24px;
}

.top-bar-left span {
    margin-right: 24px;
}

.top-bar-left i {
    color: var(--gold);
    margin-right: 6px;
}

.top-bar-right a {
    color: rgba(255, 255, 255, 0.85);
    margin-left: 14px;
    transition: var(--transition);
}

.top-bar-right a:hover {
    color: var(--gold);
}

/* =========================================================
   NAVBAR (STICKY)
========================================================= */
.main-header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 999;
    transition: var(--transition);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.brand-title {
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--brown-dark);
    letter-spacing: 0.4px;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--gray-medium);
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
}

.main-nav > ul > li {
    position: relative;
}

.main-nav > ul > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    font-weight: 500;
    font-size: 0.94rem;
    color: var(--gray-dark);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li > a.active {
    color: var(--brown-main);
    background: rgba(201, 162, 39, 0.1);
}

.main-nav > ul > li > a i {
    font-size: 0.7rem;
    transition: var(--transition);
}

.has-dropdown:hover > a i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 260px;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    border-top: 3px solid var(--gold);
}

.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--gray-dark);
    transition: var(--transition);
}

.dropdown-menu li a:hover,
.dropdown-menu li a.active {
    background: var(--gray-light);
    color: var(--brown-main);
    padding-left: 18px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 26px;
    height: 3px;
    background: var(--brown-dark);
    border-radius: 3px;
    transition: var(--transition);
}

/* =========================================================
   HERO SECTION
========================================================= */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown-main) 55%, var(--brown-light) 100%);
    color: var(--white);
    padding: 110px 0;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 20% 20%, rgba(201, 162, 39, 0.18), transparent 45%),
                       radial-gradient(circle at 85% 75%, rgba(201, 162, 39, 0.14), transparent 40%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 48px;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(201, 162, 39, 0.16);
    border: 1px solid rgba(201, 162, 39, 0.4);
    color: var(--gold-light);
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 22px;
}

.hero-title {
    color: var(--white);
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-title span {
    color: var(--gold);
}

.hero-desc {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    max-width: 520px;
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-visual img {
    max-width: 320px;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.35));
}

.hero-stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 56px;
}

.hero-stat {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    backdrop-filter: blur(4px);
}

.hero-stat strong {
    display: block;
    font-size: 1.8rem;
    color: var(--gold-light);
    margin-bottom: 4px;
}

.hero-stat span {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.75);
}

/* =========================================================
   CARDS (LAYANAN / BERITA / DLL)
========================================================= */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 32px 26px;
    text-align: left;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(201, 162, 39, 0.3);
}

.card-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gold), var(--gold-light));
    color: var(--brown-dark);
    border-radius: var(--radius-md);
    font-size: 1.4rem;
    margin-bottom: 20px;
    transition: var(--transition);
}

.card:hover .card-icon {
    transform: rotate(-6deg) scale(1.05);
}

.card-title {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

.card-desc {
    color: var(--gray-medium);
    font-size: 0.92rem;
    margin-bottom: 16px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--brown-main);
    transition: var(--transition);
}

.card:hover .card-link {
    gap: 10px;
    color: var(--gold);
}

/* Card berita / gambar */
.card-media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--white);
    transition: var(--transition);
}

.card-media:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-media img {
    width: 100%;
    height: 190px;
    object-fit: cover;
}

.card-media-body {
    padding: 20px;
}

.card-media-date {
    font-size: 0.78rem;
    color: var(--gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Bagian alternatif dengan latar abu-abu */
.section-alt {
    background: var(--gray-soft);
}

/* =========================================================
   PAGE HEADER (BANNER HALAMAN DALAM) & BREADCRUMB
========================================================= */
.page-header {
    background: linear-gradient(135deg, var(--brown-dark), var(--brown-main));
    color: var(--white);
    padding: 56px 0 46px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 90% 20%, rgba(201, 162, 39, 0.18), transparent 45%);
    pointer-events: none;
}

.page-header h1 {
    position: relative;
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 10px;
}

.breadcrumb {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.86rem;
    color: rgba(255, 255, 255, 0.75);
}

.breadcrumb a {
    color: var(--gold-light);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--gold);
}

.breadcrumb span.current {
    color: rgba(255, 255, 255, 0.9);
}

/* =========================================================
   TWO-COLUMN CONTENT LAYOUT (HALAMAN LAYANAN, PROFIL, DLL)
========================================================= */
.content-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 44px;
    align-items: flex-start;
}

.content-body h2 {
    font-size: 1.7rem;
    margin-bottom: 16px;
}

.content-body p {
    color: var(--gray-medium);
    margin-bottom: 18px;
}

.content-body h3 {
    font-size: 1.05rem;
    margin-bottom: 12px;
}

.content-body h3 i {
    color: var(--gold);
    margin-right: 8px;
}

.content-list {
    color: var(--gray-medium);
    padding-left: 20px;
    line-height: 2;
    margin-bottom: 20px;
}

.content-list li {
    list-style: disc;
}

/* =========================================================
   ALERT NOTIFIKASI (STATUS FORM)
========================================================= */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.alert i {
    margin-top: 2px;
}

.alert-success {
    background: rgba(46, 160, 67, 0.1);
    color: #1e7e34;
    border: 1px solid rgba(46, 160, 67, 0.3);
}

.alert-error {
    background: rgba(220, 53, 69, 0.1);
    color: #c0293a;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

/* =========================================================
   FORM (CONTOH: FORM PENGADUAN)
========================================================= */
.form-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 36px;
    max-width: 720px;
    margin: 0 auto;
    border-top: 4px solid var(--gold);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--brown-dark);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--gray-light);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--gray-dark);
    background: var(--gray-soft);
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.12);
}

textarea.form-control {
    resize: vertical;
    min-height: 130px;
}

/* =========================================================
   FOOTER
========================================================= */
.main-footer {
    background: var(--brown-dark);
    color: rgba(255, 255, 255, 0.75);
    padding: 64px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 36px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.footer-brand img {
    width: 46px;
    height: 46px;
}

.footer-brand strong {
    color: var(--white);
    font-size: 1rem;
    display: block;
}

.footer-title {
    color: var(--gold-light);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col p,
.footer-col a {
    font-size: 0.88rem;
    display: block;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--gold);
    padding-left: 4px;
}

.footer-socials {
    display: flex;
    gap: 10px;
    margin-top: 18px;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--gold);
    color: var(--brown-dark);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 22px 0;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

/* =========================================================
   RESPONSIVE - MOBILE
========================================================= */
@media (max-width: 991px) {
    .hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .top-bar-left span:last-child {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 78%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        padding: 90px 24px 24px;
        transition: right 0.35s ease;
        overflow-y: auto;
        z-index: 1000;
    }

    .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
    }

    .main-nav > ul > li > a {
        padding: 14px 10px;
        border-bottom: 1px solid var(--gray-light);
        border-radius: 0;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-top: none;
        display: none;
        padding-left: 12px;
    }

    .has-dropdown.open .dropdown-menu {
        display: block;
    }

    .has-dropdown.open > a i {
        transform: rotate(180deg);
    }

    .hero {
        padding: 70px 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 56px 0;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 12px 16px;
    }

    .brand-subtitle {
        display: none;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
