* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    min-height: 100vh;
}

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

/* ═══════════════════════════════════════
   HEADER
═══════════════════════════════════════ */
header {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 4px 12px rgba(0,0,0,.14);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    /* KUNCI: flex-wrap agar nav bisa turun ke baris kedua di mobile */
    flex-wrap: wrap;
}

.logo-section { flex: 1 1 auto; }

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

.kemenag-logo {
    height: 54px;
    width: auto;
    object-fit: contain;
}

.text-section h1 {
    font-size: 1.55em;
    color: #2E7D32;
    font-weight: 800;
    line-height: 1.15;
}

.text-section p {
    font-size: 0.8em;
    color: #666;
    margin-top: 1px;
}

/* ═══════════════════════════════════════
   NAV HEADER — scope ke #nav-menu saja
   Tidak pakai tag "nav" generik agar breadcrumb
   dan nav lain tidak ikut terpengaruh.
═══════════════════════════════════════ */
#nav-menu {
    display: flex;
    gap: 26px;
    align-items: center;
    flex-shrink: 0;
}

#nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 0.93em;
    white-space: nowrap;
    transition: color 0.22s;
}

#nav-menu a:hover { color: #4CAF50; }

/* ═══════════════════════════════════════
   HAMBURGER
═══════════════════════════════════════ */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.45em;
    cursor: pointer;
    color: #2E7D32;
    padding: 5px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: background 0.2s;
    flex-shrink: 0;
}
.menu-toggle:hover { background: #e8f5e9; }

/* ═══════════════════════════════════════
   HERO SECTION
═══════════════════════════════════════ */
.hero {
    background: rgba(255,255,255,.95);
    padding: 52px 0;
    text-align: center;
    margin-top: 20px;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0,0,0,.1);
}
.hero h2 { font-size: 2.4em; color: #2E7D32; margin-bottom: 14px; font-weight: 800; }
.hero p  { font-size: 1.1em; color: #666; margin-bottom: 26px; }

/* ═══════════════════════════════════════
   SERVICES HUB
═══════════════════════════════════════ */
.services-hub { padding: 52px 0; }

.section-title {
    text-align: center;
    font-size: 2em;
    color: white;
    margin-bottom: 40px;
    text-shadow: 2px 2px 4px rgba(0,0,0,.2);
    font-weight: 800;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
    margin-bottom: 40px;
}

.service-card {
    background: white;
    border-radius: 14px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    transition: transform .28s ease, box-shadow .28s ease;
}
.service-card:hover { transform: translateY(-8px); box-shadow: 0 12px 32px rgba(0,0,0,.18); }
.service-icon { font-size: 2.8em; color: #4CAF50; margin-bottom: 14px; }
.service-card h3 { font-size: 1.2em; color: #2E7D32; margin-bottom: 12px; font-weight: 700; }
.service-card p  { color: #666; margin-bottom: 16px; font-size: 0.9em; line-height: 1.55; }

.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn {
    display: inline-block;
    padding: 11px 26px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all .25s;
    border: none;
    cursor: pointer;
    font-size: 0.93em;
    font-family: inherit;
}
.btn:hover          { background: linear-gradient(135deg, #45a049, #3d8b40); transform: scale(1.04); }
.btn-secondary      { background: linear-gradient(135deg, #2196F3, #1976D2); }
.btn-secondary:hover{ background: linear-gradient(135deg, #1976D2, #1565C0); }

/* ═══════════════════════════════════════
   INFO SECTION
═══════════════════════════════════════ */
.info-section {
    background: rgba(255,255,255,.95);
    padding: 34px;
    border-radius: 14px;
    margin-bottom: 34px;
}
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px,1fr));
    gap: 22px;
    margin-top: 22px;
}
.info-card { padding: 16px; background: #f0f7f0; border-left: 5px solid #4CAF50; border-radius: 8px; }
.info-card h4 { color: #2E7D32; margin-bottom: 6px; font-size: 1em; }
.info-card p  { color: #555; font-size: 0.9em; }

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
    gap: 16px;
    margin-top: 16px;
}
.contact-item { padding: 13px; background: white; border-radius: 8px; border-top: 3px solid #4CAF50; font-size: 0.9em; }
.contact-item strong { color: #2E7D32; }

/* ═══════════════════════════════════════
   SOCIAL LINKS
═══════════════════════════════════════ */
.social-hub {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 26px;
}
.social-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    background: white;
    border: 2px solid #4CAF50;
    border-radius: 25px;
    text-decoration: none;
    color: #4CAF50;
    font-weight: 600;
    font-size: 0.88em;
    transition: all .22s;
}
.social-btn:hover { background: #4CAF50; color: white; }

/* ═══════════════════════════════════════
   FOOTER
═══════════════════════════════════════ */
footer {
    background: rgba(0,0,0,.88);
    color: white;
    text-align: center;
    padding: 26px 0;
    margin-top: 52px;
    font-size: 0.88em;
}
footer p { margin: 4px 0; }

/* ═══════════════════════════════════════
   POST BODY — override font dari Firebase
═══════════════════════════════════════ */
.post-body,
.post-body * {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    max-width: 100%;
}
.post-body p              { margin-bottom: 13px; line-height: 1.78; }
.post-body h2             { font-size: 1.2em; color: #2E7D32; margin: 22px 0 8px; padding-bottom: 5px; border-bottom: 2px solid #e8f5e9; }
.post-body h3             { font-size: 1.03em; color: #111; margin: 16px 0 6px; font-weight: 700; }
.post-body ul,
.post-body ol             { padding-left: 20px; margin-bottom: 13px; }
.post-body li             { margin-bottom: 4px; }
.post-body blockquote     { background: #f0f7f0; border-left: 5px solid #4CAF50; border-radius: 0 8px 8px 0; margin: 16px 0; padding: 12px 16px; color: #444; font-style: italic; }
.post-body strong         { color: #2E7D32; }
.post-body a              { color: #4CAF50; text-decoration: underline; word-break: break-all; }
.post-body img            { max-width: 100%; height: auto; border-radius: 10px; margin: 10px 0; display: block; }
.post-body table          { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: .88em; display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.post-body table td,
.post-body table th       { border: 1.5px solid #c8e6c9; padding: 7px 10px; vertical-align: top; white-space: nowrap; min-width: 70px; }
.post-body table th       { background: #e8f5e9; color: #2E7D32; font-weight: 700; text-align: left; }
.post-body table tr:nth-child(even) td { background: #f9fffe; }

/* ═══════════════════════════════════════
   RESPONSIVE — MOBILE (≤768px)
═══════════════════════════════════════ */
@media (max-width: 768px) {

    /* Hamburger tampil */
    .menu-toggle { display: block; }

    /* Logo di kiri, toggle di kanan — satu baris */
    .logo-section  { flex: 1 1 auto; padding-bottom: 0; }
    .menu-toggle   { order: 2; align-self: center; }

    /* NAV: baris penuh di bawah logo (flex-wrap), default tersembunyi */
    #nav-menu {
        display: none;
        order: 3;
        flex-basis: 100%;
        width: 100%;
        flex-direction: column;
        gap: 2px;
        background: #f8fdf8;
        border-top: 2px solid #c8e6c9;
        padding: 8px 0 12px;
        /* Negatif padding container agar full-bleed */
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
    }

    #nav-menu.active {
        display: flex;
    }

    #nav-menu a {
        display: block;
        padding: 11px 12px;
        border-radius: 8px;
        font-size: 0.93em;
        font-weight: 600;
        color: #333;
        white-space: normal;
    }
    #nav-menu a:hover,
    #nav-menu a:active { background: #e8f5e9; color: #2E7D32; }

    /* BREADCRUMB — sembunyikan di mobile, tidak perlu di layar kecil */
    .breadcrumb { display: none !important; }

    /* Ukuran umum */
    .header-content { padding: 12px 0; }
    .logo-group      { gap: 10px; }
    .kemenag-logo    { height: 44px; }
    .text-section h1 { font-size: 1.2em; }
    .text-section p  { font-size: 0.74em; }

    .hero            { padding: 34px 0; margin-top: 14px; }
    .hero h2         { font-size: 1.55em; }
    .hero p          { font-size: 0.93em; }

    .section-title   { font-size: 1.45em; margin-bottom: 24px; }
    .services-grid   { grid-template-columns: 1fr; gap: 14px; }
    .service-card    { padding: 20px; }
    .button-group    { flex-direction: column; gap: 8px; }
    .btn             { width: 100%; text-align: center; }
    .info-grid       { grid-template-columns: 1fr; gap: 12px; }
    .contact-info    { grid-template-columns: 1fr; gap: 12px; }
    .social-hub      { gap: 8px; }
    .social-btn      { padding: 8px 13px; font-size: 0.83em; }
    .info-section    { padding: 18px; }
    .post-body       { font-size: 0.93em; }
    .post-body table { font-size: 0.8em; }
}

@media (max-width: 480px) {
    .container       { padding: 0 10px; }
    .kemenag-logo    { height: 38px; }
    .text-section h1 { font-size: 1.05em; }
    .text-section p  { display: none; }
    .hero            { padding: 28px 0; margin-top: 10px; }
    .hero h2         { font-size: 1.3em; }
    .hero p          { font-size: 0.86em; }
    .section-title   { font-size: 1.25em; }
    .service-icon    { font-size: 2.2em; }
    .service-card h3 { font-size: 1.02em; }
    .info-section    { padding: 14px; }
    .btn             { padding: 9px 18px; font-size: 0.86em; }
}

/* ─── Tablet ─── */
@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid   { grid-template-columns: repeat(2, 1fr); }
    .hero h2         { font-size: 2em; }
    .section-title   { font-size: 1.75em; }
    .kemenag-logo    { height: 50px; }
    .text-section h1 { font-size: 1.45em; }
}