/* --- RESET & VARIABEL --- */
:root {
    --primary-color: #1c33b7; 
    --secondary-color: #ffffff; 
    --dark-color: #333333;
    --light-color: #f4f4f4;
    --text-color: #555555;
    --nav-blue: #002b5e; 
    --nav-text: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    line-height: 1.6;
    color: var(--text-color);
    /* Padding dinonaktifkan agar gambar Hero bisa menyentuh ujung atas layar */
    padding-top: 0; 
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 0;
}

.bg-light {
    background-color: var(--light-color);
}

/* --- HEADER & NAVBAR --- */
.header-main {
    background-color: transparent; /* Berubah menjadi transparan di awal */
    color: var(--nav-text);
    width: 100%;
    position: fixed; 
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.4s ease; 
}

/* Aktif saat di-scroll (dipicu oleh JS) */
.header-main.scrolled {
    background-color: var(--nav-blue); 
    backdrop-filter: blur(5px); 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-main.scrolled .top-bar {
    display: none;
}

/* Bagian Top Bar */
.top-bar {
    padding: 10px 0 0 0;
    font-size: 13px;
    font-weight: bold;
}

.flex-top {
    display: flex;
    align-items: center;
    padding-left: 90px; 
}

.top-bar .divider {
    margin: 0 10px;
    font-weight: normal;
    color: #ccc;
}

/* Bagian Navbar Utama */
.navbar {
    padding: 10px 0;
}

.flex-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Area Logo */
.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 55px; 
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.bapenda-text {
    font-family: 'Brush Script MT', 'Lucida Handwriting', cursive, sans-serif;
    font-size: 38px;
    line-height: 0.8;
    color: #fff;
}

.prov-text {
    font-size: 11px;
    letter-spacing: 0.5px;
    color: #fff;
    margin-top: 5px;
}

/* Area Menu Link */
nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
}

nav ul li a {
    text-decoration: none;
    color: var(--nav-text);
    font-weight: 700;
    font-size: 13px;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #fbc02d; 
}

/* Area Ikon Media Sosial */
.social-icons {
    display: flex;
    gap: 8px;
}

.social-icons .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background-color: #000; 
    border-radius: 4px;
    transition: transform 0.2s;
}

.social-icons .icon:hover {
    transform: scale(1.1);
    background-color: #333;
}

/* --- DROPDOWN PAD --- */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none; 
    position: absolute;
    background-color: #ffffff;
    min-width: 270px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    top: 100%;
    left: 0;
    border-radius: 4px;
    padding: 0;
    flex-direction: column; 
    gap: 0; 
}

.dropdown-content.show {
    display: flex;
}

.dropdown-content li {
    list-style: none;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-content li:last-child {
    border-bottom: none;
}

.dropdown-content li a {
    color: #333333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    font-weight: 500;
}

.dropdown-content li a:hover {
    background-color: #f4f4f4;
    color: var(--primary-color);
}

/* --- HERO SECTION BARU --- */
.hero-section {
    position: relative;
    /* Ganti bg-masjid.jpg dengan nama file gambar Anda */
    background-image: url('gambar/samsat.png'); 
    background-size: cover;
    background-position: center;
    height: 90vh; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(0, 43, 94, 0.6), rgba(0, 43, 94, 0.8));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
    margin-top: 60px; /* Kompensasi tinggi navbar */
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: bold;
    text-transform: uppercase;
}

.hero-content p {
    font-size: 1.2rem;
    letter-spacing: 1px;
}

/* --- KARTU LAYANAN (OVERLAP HERO) --- */
.layanan-section {
    position: relative;
    z-index: 10;
    /* Ubah dari -120px menjadi 30px agar ada jarak di bawah gambar */
    margin-top: 30px; 
    padding-bottom: 50px;
}

.grid-layanan {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.layanan-section .card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    padding: 30px 20px;
    width: 180px; 
    text-align: center;
    text-decoration: none;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: none;
}

.layanan-section .card:hover {
    transform: translateY(-10px);
}

.layanan-section .card-icon {
    background-color: #e62129; 
    color: #ffffff;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(230, 33, 41, 0.3);
}

.layanan-section .card h3 {
    color: var(--dark-color);
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 600;
    margin-bottom: 0;
}

/* --- SLIDER / HERO LAMA (Tetap disimpan jika dipakai di halaman lain) --- */
.slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.slide[style*="background-image"] {
    background-position: center; 
    background-repeat: no-repeat; 
    background-size: contain; 
    background-color: #f4f4f4; 
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide-content h2 {
    font-size: 3rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 10;
    font-size: 18px;
}

.slider-btn:hover {
    background-color: var(--primary-color);
}

.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

/* --- GRID SYSTEM --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2 {
    color: var(--dark-color);
}

.section-title .line {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
}

/* --- SERVICES CARD LAMA --- */
.card {
    background: #fff;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    border-bottom: 4px solid var(--primary-color);
}

.card:hover {
    transform: translateY(-10px);
}

.card-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.card h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
}

.card p {
    margin-bottom: 20px;
}

.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: #008e40;
}

/* --- NEWS CARD --- */
.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.news-img {
    width: 100%;
    height: 200px;
}

.news-content {
    padding: 20px;
}

.news-date {
    font-size: 12px;
    color: var(--primary-color);
    font-weight: bold;
}

.news-content h3 {
    margin: 10px 0;
    color: var(--dark-color);
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

/* --- FOOTER --- */
footer {
    background-color: var(--dark-color); /* Warna abu-abu gelap seperti di gambar */
    color: #fff;
    padding-top: 50px;
}

/* Membagi footer menjadi 3 kolom: 35% Kiri, 25% Tengah, 40% Kanan (Peta) */
.grid-footer {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.5fr; 
    gap: 40px;
    align-items: start;
}

.footer-section {
    margin-bottom: 40px; /* Jarak antara Samsat Kota Padang dan Jam Operasional */
}

.footer-content h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: bold;
}

.footer-content p {
    margin-bottom: 10px;
    color: #e0e0e0; /* Warna teks agak abu-abu muda agar tidak mencolok */
    font-size: 0.95rem;
    line-height: 1.8;
}

/* Penyesuaian tampilan iframe Map */
.footer-map iframe {
    width: 100%;
    height: 220px;
    border-radius: 6px; /* Memberikan efek lengkung sedikit di sudut peta */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.footer-bottom {
    text-align: center;
    background-color: #2b2b2b; /* Warna latar belakang teks copyright sedikit lebih gelap */
    padding: 20px 0;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #cccccc;
}

/* --- RESPONSIVE FOOTER UNTUK HP & TABLET --- */
@media (max-width: 900px) {
    .grid-footer {
        grid-template-columns: 1fr 1fr; /* Jadi 2 kolom untuk tablet */
    }
    .footer-right {
        grid-column: span 2; /* Peta mengambil lebar penuh di bawahnya */
    }
}

@media (max-width: 600px) {
    .grid-footer {
        grid-template-columns: 1fr; /* Menyusun vertikal untuk layar HP */
        gap: 20px;
        text-align: left; /* Teks tetap rata kiri */
    }
    .footer-right {
        grid-column: span 1;
    }
    .footer-section {
        margin-bottom: 25px;
    }
    .footer-map iframe {
        height: 250px;
    }
}

/* Responsif untuk Tablet dan Layar Lebih Kecil */
@media (max-width: 900px) {
    .grid-footer {
        grid-template-columns: repeat(2, 1fr); /* Berubah jadi 2 kolom */
    }
}

/* Responsif untuk Handphone */
@media (max-width: 600px) {
    .grid-footer {
        grid-template-columns: 1fr; /* Berubah jadi 1 kolom menyusun ke bawah */
        text-align: center;
    }
    
    .footer-col h3::after {
        left: 50%;
        transform: translateX(-50%); /* Posisi garis di tengah untuk mobile */
    }
    
    .footer-map iframe {
        height: 250px;
    }
}

/* --- RESPONSIVE DESIGN --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--nav-text);
    margin: 4px 0;
}

@media (max-width: 900px) {
    .flex-top {
        padding-left: 20px;
    }
    .social-icons {
        display: none; 
    }
    .menu-toggle {
        display: flex;
    }
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--nav-blue);
        z-index: 999;
    }
    nav.active {
        display: block;
    }
    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 0;
    }
    nav ul li {
        padding: 15px 0;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
   .dropdown-content {
        position: relative;
        top: 0; /* Reset posisi agar tidak terdorong ke bawah */
        box-shadow: none;
        background-color: rgba(255, 255, 255, 0.1);
        min-width: 100%;
        margin-top: 10px; /* Opsional: memberi jarak dengan teks tombol utama */
    }
    .dropdown-content li a {
        color: var(--nav-text);
        padding-left: 20px;
        text-align: center;
    }
    .dropdown-content li a:hover {
        background-color: rgba(255,255,255,0.2);
        color: #fbc02d;
    }
    .grid-3 {
        grid-template-columns: 1fr;
    }
    .slide-content h2 {
        font-size: 2rem;
    }
    .dropdown-content li {
        padding: 0;
        border-bottom: none; /* Menghilangkan garis pembatas jika dirasa terlalu ramai */
    }
    
    .dropdown-content li a {
        color: var(--nav-text);
        padding: 10px 20px; /* Menyesuaikan area klik agar nyaman di HP */
        text-align: center;
    }
}




/* --- PENYESUAIAN GRID MOBILE (3 KOLOM) --- */
@media (max-width: 900px) {
    /* Memastikan container grid menggunakan Flexbox yang rapi */
    .grid-layanan {
        display: flex;
        justify-content: center;
        gap: 10px; /* Jarak antar kotak diperkecil agar muat */
        padding: 0 10px;
    }

    /* Mengatur lebar kartu agar pas 3 kolom (kurang lebih 30% per baris) */
    .layanan-section .card {
        width: calc(33.33% - 15px); 
        min-width: 100px; /* Mencegah kotak terlalu gepeng */
        padding: 15px 5px; /* Mengurangi padding dalam agar teks muat */
    }

    /* Mengecilkan ukuran ikon dan teks agar proporsional di layar HP */
    .layanan-section .card-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
        margin-bottom: 8px;
    }

    .layanan-section .card h3 {
        font-size: 0.75rem; /* Ukuran teks lebih kecil agar tidak terpotong */
        line-height: 1.2;
    }

    /* Hero section juga disesuaikan tingginya untuk mobile */
    .hero-section {
        height: 60vh;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
}

/* --- FIX NAVBAR UNTUK HALAMAN SELAIN INDEX --- */
/* Jika body tidak memiliki section .hero-section, maka navbar langsung berwarna biru */
body:not(:has(.hero-section)) .header-main {
    background-color: var(--nav-blue);
    position: relative; /* Agar tidak menutupi konten (opsional) */
}

/* Penyesuaian jarak konten agar tidak tertutup navbar yang fixed */
body:not(:has(.hero-section)) .section-padding {
    padding-top: 120px; 
}

/* Pastikan top-bar tetap muncul di halaman informasi */
body:not(:has(.hero-section)) .top-bar {
    display: block !important;
}


/* --- SAMSAT KELILING & ARTIKEL --- */
.content-section {
    padding: 40px 0;
    line-height: 1.6;
}

.content-box {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.content-box h2 {
    color: #1565c0;
    border-left: 5px solid #1565c0;
    padding-left: 15px;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.info-box {
    margin-bottom: 30px;
}

.teks-border-line-left {
    color: #1565c0;
    border-left: 5px solid #1565c0;
    padding-left: 15px;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

/* --- ACCORDION --- */
.accordion-container {
    margin-bottom: 40px;
}

.accordion-item {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.accordion-header {
    background: #f8f9fa;
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: #e9ecef;
}

.accordion-content {
    padding: 15px 20px;
    display: none; /* Disembunyikan secara default */
    background: #fff;
    border-top: 1px solid #ddd;
}

.accordion-content ol, 
.accordion-content ul {
    padding-left: 20px;
    margin-bottom: 0;
}

.accordion-content li {
    margin-bottom: 5px;
}

/* Class active saat diklik via Javascript */
.active-acc .accordion-content {
    display: block;
}

.active-acc .accordion-header {
    background: #e9ecef;
    color: #1565c0;
}


