/* ---- Reset & Global Styling ---- */
:root {
    --primary-color: #005A9C; /* Biru Profesional */
    --secondary-color: #018E9A; /* Hijau Tosca Sehat */
    --accent-color: #f39c12; /* Oranye untuk aksen */
    --background-light: #F4F7F6; /* Abu-abu muda lembut */
    --card-background: #FFFFFF;
    --text-dark: #333333;
    --text-light: #f8f9fa;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---- Header & Navigation Styling (Sama untuk semua halaman) ---- */
header {
    background-color: var(--card-background);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}
.logo { height: 50px; margin-right: 15px; transform: scale(1.6); margin-right: 35px;}
.header-text h1 { font-size: 1.5rem; font-weight: 700; color: var(--primary-color); line-height: 1.2; }
.header-text p { font-size: 0.9rem; color: #555; }
.nav-links { display: flex; list-style: none; align-items: center; }
.nav-links li { margin-left: 25px; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 600; padding: 5px 10px; border-radius: 5px; transition: color 0.3s ease, background-color 0.3s ease; position: relative; }
.nav-links a:hover { color: var(--secondary-color); }
.nav-links a.active { color: var(--secondary-color); font-weight: 700; }
.nav-links a.active::after { content: ''; position: absolute; bottom: -5px; left: 10px; right: 10px; height: 3px; background-color: var(--secondary-color); border-radius: 2px; }
.menu-toggle { display: none; font-size: 1.5rem; background: none; border: none; cursor: pointer; color: var(--primary-color); }

/* ---- Hero Section (Halaman Utama) ---- */
.hero-section {
    position: relative;
    height: 50vh;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background: url('/img/banner.jpg') no-repeat center center/cover;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 90, 156, 0.7), rgba(1, 142, 154, 0.5));
}
.hero-content { position: relative; z-index: 2; max-width: 800px; padding: 20px; }
.hero-content h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 15px; text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }
.cta-button { background-color: var(--secondary-color); color: white; padding: 12px 30px; border-radius: 50px; text-decoration: none; font-size: 1rem; font-weight: 600; transition: background-color 0.3s ease, transform 0.3s ease; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
.cta-button:hover { background-color: #02a9b8; transform: translateY(-3px); }

/* ---- Konten Halaman Utama (Program, Prosedur, Data) ---- */
main section { padding: 60px 0; border-bottom: 1px solid #e0e0e0; }
main section:last-child { border-bottom: none; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2.2rem; font-weight: 700; color: var(--primary-color); margin-bottom: 10px; }
.section-title p { font-size: 1.1rem; color: #666; max-width: 700px; margin: 0 auto; }
.featured-programs { background-color: var(--card-background); }
.programs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.program-item { display: flex; align-items: flex-start; gap: 20px; }
.program-icon { font-size: 2.5rem; color: var(--secondary-color); flex-shrink: 0; margin-top: 5px; }
.program-text h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 8px; color: var(--primary-color); }
.service-procedure { background-color: var(--background-light); }
.procedure-timeline { /* ... kode prosedur dari jawaban sebelumnya ... */ }
.stats-section { background-color: var(--primary-color); color: white; }
.section-title-light h2 { color: white; text-align: center; font-size: 2.2rem; font-weight: 700; margin-bottom: 40px; }
.stats-container { display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; gap: 20px; }
.stat-item { text-align: center; min-width: 200px; }
.stat-number { display: block; font-size: 3.5rem; font-weight: 700; }
.stat-label { display: block; font-size: 1.1rem; opacity: 0.9; }

/* ================================================= */
/* =====     STYLE KHUSUS HALAMAN PROFIL     ======= */
/* ================================================= */

/* Hero Section untuk Halaman Internal */
.page-hero {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    color: white;
    padding: 50px 0;
    text-align: center;
}
.page-hero h2 { font-size: 2.5rem; font-weight: 700; }
.page-hero p { font-size: 1.1rem; opacity: 0.9; }

/* Pengaturan Umum Seksi di Halaman Profil */
.profile-section { padding: 60px 0; }
.profile-section.colored-bg { background-color: var(--background-light); }
.note { font-size: 0.9rem; text-align: center; color: #777; margin-top: 30px; }

/* Seksi Sambutan */
.welcome-grid { display: grid; grid-template-columns: 350px 1fr; gap: 50px; align-items: center; }
.welcome-image img { width: 100%; height: auto; border-radius: 8px; box-shadow: var(--shadow); }
.welcome-text h3 { font-size: 1.8rem; font-weight: 600; color: var(--primary-color); margin-bottom: 20px; }
.welcome-text .quote { font-size: 1.1rem; font-style: italic; color: #555; border-left: 4px solid var(--secondary-color); padding-left: 20px; margin-bottom: 20px; }
.welcome-text .signature { font-size: 1rem; color: var(--text-dark); }

/* Seksi Visi & Misi */
.vm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
.vision-block, .mission-block { background-color: var(--card-background); padding: 30px; border-radius: 8px; box-shadow: var(--shadow); border-left: 5px solid var(--accent-color); }
.mission-block { border-left-color: var(--secondary-color); }
.vm-icon { font-size: 2.5rem; margin-bottom: 15px; color: var(--accent-color); }
.mission-block .vm-icon { color: var(--secondary-color); }
.vision-block h3, .mission-block h3 { font-size: 1.5rem; color: var(--primary-color); margin-bottom: 15px; }
.mission-block ul { list-style: none; padding: 0; }
.mission-block li { position: relative; padding-left: 25px; margin-bottom: 10px; }
.mission-block li::before { content: '\f058'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--secondary-color); position: absolute; left: 0; }

/* Seksi Struktur Organisasi (Desain Baru) */
.org-chart { text-align: center; }
.org-node { background-color: var(--card-background); padding: 20px; border-radius: 8px; box-shadow: var(--shadow); margin-bottom: 20px; font-weight: 600; }
.org-node.level-1 { background-color: var(--primary-color); color: white; max-width: 400px; margin-left: auto; margin-right: auto; }
.org-node.level-2 { background-color: var(--secondary-color); color: white; max-width: 400px; margin-left: auto; margin-right: auto; }
.department-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 30px; }
.org-node.level-3 { background-color: #e9f5f6; border: 1px solid #bde0e3; }

/* Seksi Sejarah (Timeline Baru) */
.history-timeline { position: relative; padding-left: 30px; border-left: 3px solid #dbeafc; }
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-item:last-child { margin-bottom: 0; }
.timeline-dot { position: absolute; left: -40px; top: 5px; width: 15px; height: 15px; border-radius: 50%; background-color: var(--secondary-color); border: 3px solid white; box-shadow: 0 0 0 3px var(--secondary-color); }
.timeline-content { background-color: var(--card-background); padding: 20px; border-radius: 8px; box-shadow: var(--shadow); }
.timeline-content h3 { font-size: 1.3rem; color: var(--primary-color); margin-bottom: 5px; }
.timeline-content p { font-size: 0.95rem; line-height: 1.7; }

/* ---- Footer (Sama untuk semua halaman) ---- */
footer { background-color: #2c3e50; color: var(--text-light); text-align: center; padding: 30px 0; margin-top: 0; }
.social-media { margin-top: 15px; }
.social-media a { color: white; font-size: 1.3rem; margin: 0 10px; transition: color 0.3s ease, transform 0.3s ease; }
.social-media a:hover { color: var(--secondary-color); transform: scale(1.1); }

/* ---- Media Queries untuk Responsivitas ---- */
@media (max-width: 992px) {
    /* Menu Navigasi Mobile */
    .nav-links { display: none; flex-direction: column; width: 100%; position: absolute; top: 81px; left: 0; background-color: white; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
    .nav-links.active { display: flex; }
    .nav-links li { margin: 0; width: 100%; text-align: center; }
    .nav-links a { display: block; padding: 15px; border-bottom: 1px solid #eee; }
    .nav-links a.active::after { display: none; }
    .menu-toggle { display: block; }

    /* Penyesuaian Halaman Profil */
    .welcome-grid { grid-template-columns: 1fr; }
    .welcome-image { max-width: 300px; margin: 0 auto 30px auto; }
}

@media (max-width: 768px) {
    .hero-content h2, .page-hero h2 { font-size: 2rem; }
    .section-title h2 { font-size: 1.8rem; }
    .stat-number { font-size: 2.5rem; }
}

/* ================================================= */
/* =====     STYLE KHUSUS HALAMAN LAYANAN    ======= */
/* ================================================= */

.services-overview {
    padding: 60px 0;
    background-color: var(--card-background);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow);
    border-color: var(--secondary-color);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
}

/* Seksi Spotlight */
.spotlight-section {
    padding: 60px 0;
}

.spotlight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.spotlight-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.spotlight-content p {
    margin-bottom: 20px;
}

.checklist {
    list-style: none;
    padding: 0;
    margin-bottom: 30px;
}

.checklist li {
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    font-size: 1.05rem;
}

.checklist li::before {
    content: '\f00c'; /* Checkmark icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    top: 2px;
}

.spotlight-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.cta-button-small {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}
.cta-button-small:hover {
    background-color: var(--secondary-color);
}

/* Seksi Emergency CTA */
.emergency-cta {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 60px 20px;
}

.emergency-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.emergency-cta h2 {
    font-size: 2.2rem;
}

.emergency-cta p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

.emergency-number {
    font-size: 4rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 25px;
    color: var(--accent-color);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* Seksi FAQ */
.faq-section {
    background-color: var(--card-background);
    padding: 60px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 15px;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.faq-answer p {
    padding: 0 0 20px 0;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 200px; /* Adjust if answer is longer */
    padding: 5px 0 20px 0;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Penyesuaian Responsif untuk Halaman Layanan */
@media (max-width: 992px) {
    .spotlight-grid {
        grid-template-columns: 1fr;
    }
    .spotlight-image {
        order: -1; /* Pindahkan gambar ke atas di mobile */
        margin-bottom: 30px;
    }
}

/* ================================================= */
/* =====     STYLE KHUSUS HALAMAN PROGRAM    ======= */
/* ================================================= */

.program-features {
    padding: 60px 0;
    background-color: var(--card-background);
}

.feature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-bottom: 80px;
}
.feature-block:last-child {
    margin-bottom: 0;
}

/* Layout terbalik untuk blok genap */
.feature-block.reverse {
    grid-template-areas: "content image";
}
.feature-block.reverse .feature-image {
    grid-area: image;
}
.feature-block.reverse .feature-content {
    grid-area: content;
}

.feature-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.feature-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.feature-content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Seksi Pencapaian (Progress Bar) */
.achievements-section {
    padding: 60px 0;
}

.progress-container {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    gap: 30px;
}

.progress-item {
    padding-bottom: 10px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    border-radius: 10px;
    position: relative;
    text-align: right;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 20px;
    padding-right: 8px;
}
.progress-fill::after {
    content: attr(data-progress);
}

/* Seksi Jadwal Kegiatan (Tabel) */
.schedule-section {
    padding: 60px 0;
    background-color: var(--card-background);
}

.table-responsive-wrapper {
    overflow-x: auto; /* Memastikan bisa di-scroll horizontal jika perlu */
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}
thead {
    background-color: var(--primary-color);
    color: white;
}
tbody tr:nth-child(even) {
    background-color: var(--background-light);
}
tbody tr:hover {
    background-color: #e9f5f6;
}

/* Penyesuaian Responsif untuk Halaman Program */
@media (max-width: 992px) {
    .feature-block, .feature-block.reverse {
        grid-template-columns: 1fr;
        grid-template-areas: unset !important; /* Hapus area grid */
        margin-bottom: 60px;
    }
    .feature-block .feature-image, .feature-block.reverse .feature-image {
        margin-bottom: 30px;
        grid-area: unset !important;
    }
    .feature-content h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    /* Membuat tabel lebih responsif */
    table thead {
        display: none; /* Sembunyikan header tabel */
    }
    table, table tbody, table tr, table td {
        display: block;
        width: 100%;
    }
    table tr {
        margin-bottom: 15px;
        border: 1px solid #dee2e6;
        border-radius: 5px;
    }
    table td {
        text-align: right;
        padding-left: 50%; /* Sisakan ruang untuk label */
        position: relative;
        border-bottom: 1px solid #eee;
    }
    table td:last-child {
        border-bottom: 0;
    }
    table td::before {
        content: attr(data-label); /* Ambil label dari atribut data-label */
        position: absolute;
        left: 15px;
        width: calc(50% - 30px);
        text-align: left;
        font-weight: 600;
        color: var(--primary-color);
    }
}

/* ================================================= */
/* =====      STYLE KHUSUS HALAMAN KONTAK    ======= */
/* ================================================= */

.contact-main-section {
    padding: 60px 0;
    background-color: var(--card-background);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    background-color: var(--card-background);
}

.contact-info h3, .contact-form-wrapper h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-info p {
    margin-bottom: 30px;
    color: #555;
}

.info-block {
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 5px;
    flex-shrink: 0;
    width: 25px;
    text-align: center;
}

.info-item div {
    display: flex;
    flex-direction: column;
}

.info-item strong {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.info-item span {
    color: #555;
}

/* Formulir Kontak */
.contact-form-wrapper {
    background-color: var(--background-light);
    padding: 40px;
    border-radius: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 90, 156, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Seksi Peta (Jika diaktifkan) */
.map-section {
    padding: 60px 0;
    background-color: var(--background-light);
}
.map-embed {
    position: relative;
    padding-bottom: 56.25%; /* Aspect ratio 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.map-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Penyesuaian Responsif untuk Halaman Kontak */
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

/* ---- Styling Seksi Alur Layanan & Prosedur ---- */
.service-procedure {
    background-color: var(--background-light);
}

.procedure-timeline {
    position: relative;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

/* Garis Timeline di Belakang Ikon (Desktop) */
.procedure-timeline::before {
    content: '';
    position: absolute;
    top: 45px; /* Sesuaikan dengan posisi vertikal ikon */
    left: 5%;
    right: 5%;
    height: 4px;
    background-color: #dbeafc; /* Warna biru sangat muda */
    z-index: 1;
}

.step {
    position: relative;
    z-index: 2; /* Agar step berada di atas garis */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-basis: 23%;
}

.step-icon-wrapper {
    background-color: var(--background-light); /* Agar menutupi garis */
    padding: 0 10px;
}

.step-icon {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: var(--card-background);
    border: 4px solid var(--secondary-color);
    color: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.step:hover .step-icon {
    background-color: var(--secondary-color);
    color: white;
}

.step-content {
    margin-top: 20px;
}

.step-number {
    font-size: 0.9rem;
    font-weight: 600;
    color: #777;
    margin-bottom: 8px;
    display: block;
}

.step-content h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.step-content p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}


/* ---- Responsivitas untuk Alur Layanan ---- */
@media (max-width: 992px) {
    .procedure-timeline {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    /* Sembunyikan garis horizontal di mobile */
    .procedure-timeline::before {
        display: none;
    }

    /* Buat garis vertikal di mobile */
    .procedure-timeline::after {
        content: '';
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        top: 45px;
        bottom: 45px;
        width: 4px;
        background-color: #dbeafc;
        z-index: 1;
    }

    .step {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        width: 100%;
        max-width: 450px;
        gap: 20px;
    }
    
    .step:nth-child(even) {
        flex-direction: row-reverse;
        text-align: right;
    }

    .step-icon-wrapper {
        padding: 0;
        background-color: var(--background-light);
    }
    
    .step-content {
        margin-top: 0;
        flex-basis: 75%;
    }
}

@media (max-width: 576px) {
    /* Buat layout lurus ke bawah di layar sangat kecil */
     .procedure-timeline::after {
        left: 45px; /* Posisikan garis di sebelah kiri ikon */
        transform: none;
    }
    .step, .step:nth-child(even) {
        flex-direction: row;
        text-align: left;
        max-width: none;
    }
    .step-icon-wrapper {
        flex-shrink: 0;
    }
}