:root {
    --primary: #2563eb;
    --primary-soft: #eff6ff;
    --accent: #10b981;
    --dark: #0f172a;
    --muted: #6b7280;
    --bg: #f3f4f6;
    --radius-lg: 18px;
    --radius-md: 12px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: #111827;
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.brand-logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-right: 0.5rem;
}

.brand-text strong {
    font-size: 1.1rem;
}

.brand-text p {
    margin: 0;
    font-size: 0.8rem;
    color: #e5e7eb;
}

.site-nav {
    display: flex;
}

.nav-list {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 0.4rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    color: #cbd5f5;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover, .nav-link.active {
    background: var(--primary);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
    transform: translateY(-1px);
}

.nav-item.has-children > .nav-link::after {
    content: '▼';
    font-size: 0.55rem;
    margin-left: 0.3rem;
}

.nav-sub {
    list-style: none;
    position: absolute;
    top: 100%;
    margin-top: 15px;
    left: 0;
    background: #0f172a;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    display: none;
    min-width: 180px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.4);
}

.nav-sub::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

.nav-item.has-children:hover > .nav-sub,
.nav-item.has-children.show-sub > .nav-sub {
    display: block;
}

.nav-sub .nav-link {
    display: block;
    border-radius: 10px;
}

/* MOBILE NAV */

.nav-toggle {
    display: none;
    background: transparent;
    border: none;
    padding: 0.4rem;
    cursor: pointer;
    z-index: 60;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #e5e7eb;
    margin: 5px 0;
    border-radius: 999px;
    transition: all 0.3s ease-in-out;
}

.nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* MAIN */

.main-wrapper {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1rem 3rem;
}

/* HERO */

.hero-section {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    margin-top: 1rem;
    background: #0f172a;
    color: #e5e7eb;
    min-height: 260px;
}

/* 3 LAYER ANIMATED BACKGROUND */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

/* LAYER 1 – Blob besar */
.hero-bg::before {
    content: "";
    position: absolute;
    width: 180%;
    height: 180%;
    top: -40%;
    left: -40%;
    background: radial-gradient(circle, rgba(56,189,248,0.35), transparent 60%);
    animation: blobMorph 10s ease-in-out infinite, blobMove 18s linear infinite;
    filter: blur(60px);
}

/* LAYER 2 – Blob hijau */
.hero-bg::after {
    content: "";
    position: absolute;
    width: 150%;
    height: 150%;
    bottom: -30%;
    right: -30%;
    background: radial-gradient(circle, rgba(16,185,129,0.4), transparent 65%);
    animation: blobMorph2 12s ease-in-out infinite, blobMove2 22s linear infinite;
    filter: blur(70px);
}

/* LAYER 3 — Particle shimmer */
@keyframes shimmerMove {
    0% { transform: translate(-10px, 0) scale(1); opacity: 0.2; }
    50% { transform: translate(15px, -8px) scale(1.3); opacity: 0.45; }
    100% { transform: translate(-10px, 0) scale(1); opacity: 0.2; }
}

.hero-bg .shimmer {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.25), transparent 70%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.15), transparent 70%);
    animation: shimmerMove 6s ease-in-out infinite;
    mix-blend-mode: overlay;
}


/* ----------- KEYFRAMES ----------- */

/* Morphing */
@keyframes blobMorph {
    0% { border-radius: 40% 60% 65% 35% / 55% 35% 65% 45%; }
    50% { border-radius: 60% 40% 30% 70% / 40% 60% 35% 65%; }
    100% { border-radius: 40% 60% 65% 35% / 55% 35% 65% 45%; }
}

@keyframes blobMorph2 {
    0% { border-radius: 60% 40% 45% 55% / 50% 65% 45% 60%; }
    50% { border-radius: 35% 65% 55% 45% / 65% 40% 60% 35%; }
    100% { border-radius: 60% 40% 45% 55% / 50% 65% 45% 60%; }
}

/* Movement */
@keyframes blobMove {
    0% { transform: translate(0,0) scale(1); }
    50% { transform: translate(-60px, 40px) scale(1.15); }
    100% { transform: translate(50px, -30px) scale(1); }
}

@keyframes blobMove2 {
    0% { transform: translate(0,0) scale(1); }
    50% { transform: translate(40px, -50px) scale(1.2); }
    100% { transform: translate(-40px, 30px) scale(1); }
}


.hero-inner {
    position: relative;
    padding: 2.5rem 2.2rem;
}

.hero-text h1 {
    margin: 0 0 0.8rem;
    font-size: 1.9rem;
    line-height: 1.3;
}

.hero-text p {
    margin: 0 0 1.4rem;
    max-width: 540px;
    color: #cbd5f5;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.btn-ghost {
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    padding: 0.45rem 1.1rem;
    background: rgba(15, 23, 42, 0.45);
    text-decoration: none;
    color: #eff6ff;
    font-size: 0.9rem;
}

.btn-ghost:hover {
    background: rgba(15, 23, 42, 0.8);
}

/* BANNER IMAGE */

.banner-image {
    margin-top: 1.2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #020617;
}

.banner-image img {
    display: block;
    width: 100%;
    max-width: 1280px;
    height: auto;
}

/* SECTIONS */

.section {
    margin-top: 2rem;
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 1.8rem 1.6rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.section-header h2 {
    margin: 0;
    font-size: 1.4rem;
}

.section-header p {
    margin: 0.2rem 0 1.2rem;
    color: var(--muted);
    font-size: 0.9rem;
}

/* PROFIL */

.section-profil .profil-content {
    font-size: 0.95rem;
    line-height: 1.6;
}

.profil-more {
    margin-top: 1rem;
}

.btn-link {
    text-decoration: none;
    color: var(--primary);
    font-weight: 500;
}

.btn-link:hover {
    text-decoration: underline;
}

/* PERMOHONAN */

.section-permohonan .permohonan-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 0.5rem 0.6rem;
    font-size: 0.9rem;
}

.form-row {
    display: flex;
    gap: 0.8rem;
}

.form-row .form-group {
    flex: 1;
}

.btn-primary {
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.4rem;
    background: var(--primary);
    color: #fff;
    font-size: 0.95rem;
    cursor: pointer;
    align-self: flex-start;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    border-radius: 999px;
    padding: 0.45rem 1.2rem;
    border: none;
    background: var(--accent);
    color: #064e3b;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-secondary:hover {
    background: #059669;
}

/* INFORMASI PUBLIK */

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.info-card {
    padding: 1.2rem 1.3rem;
    border-radius: var(--radius-md);
    background: var(--primary-soft);
    border: 1px solid #dbeafe;
}

.info-card h3 {
    margin: 0 0 0.3rem;
}

.info-card p {
    margin: 0 0 0.8rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.info-note {
    font-size: 0.85rem;
    color: var(--muted);
}

/* PAGE DETAIL */

.section-page {
    margin-top: 2rem;
}

.page-content {
    margin-top: 1rem;
    font-size: 0.98rem;
    line-height: 1.7;
}

/* Responsify CKEditor Tables */
.page-content table {
    width: 100% !important;
    max-width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}

.page-content table td,
.page-content table th {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
}

/* FOOTER */

.site-footer {
    margin-top: 2rem;
    background: #0f172a;
    color: #e5e7eb;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.6rem 1rem;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.footer-col h4 {
    margin: 0 0 0.5rem;
    font-size: 0.95rem;
}

.footer-col p,
.footer-col ul {
    margin: 0;
    font-size: 0.85rem;
    color: #cbd5f5;
}

.footer-col a {
    color: #bfdbfe;
    text-decoration: none;
}

.footer-col a:hover {
    text-decoration: underline;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li + li {
    margin-top: 0.25rem;
}

.footer-bottom {
    border-top: 1px solid #1f2937;
    text-align: center;
    padding: 0.7rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* TO TOP BUTTON */

.btn-to-top {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: none;
    background: rgba(15, 23, 42, 0.92);
    color: #e5e7eb;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 25px rgba(15, 23, 42, 0.45);
}

/* MODAL */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.modal-box {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 1.6rem 1.4rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.4);
}

.modal-box h3 {
    margin-top: 0;
}

/* FADE IN (1.8s) */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1.8s ease, transform 1.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        padding: 2rem 1.4rem;
    }

    .hero-text h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding-inline: 0.8rem;
    }

    .site-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    }

    .site-nav.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-list {
        flex-direction: column;
        padding: 1rem;
        gap: 0.3rem;
    }

    .nav-link {
        display: block;
        width: 100%;
        padding: 0.8rem 1.2rem;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.02);
    }
    
    .nav-link:hover, .nav-link.active {
        transform: translateY(0);
    }

    .nav-sub {
        position: static;
        box-shadow: none;
        background: rgba(0, 0, 0, 0.15);
        padding: 0.5rem;
        margin-top: 0.5rem;
        border-radius: 12px;
    }
    
    .nav-sub::before {
        display: none;
    }

    .nav-item.has-children > .nav-link::after {
        float: right;
        margin-top: 0.4rem;
    }

    .nav-toggle {
        display: inline-block;
    }

    .form-row {
        flex-direction: column;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}
