/* ============================================================
   Portal Informasi PIP - SD Negeri 050661 Kwala Bingai
   Redesign 2026 - Government Modern / Premium
   ============================================================ */

:root {
    --primary: #2491E0;
    --primary-dark: #1877BE;
    --secondary: #38B6F5;
    --accent: #4FB8F0;
    --bg: #F2F9FF;
    --text: #16263F;
    --muted: #5E708A;
    --white: #ffffff;
    --line: #d6e9f8;

    --radius: 20px;
    --shadow-sm: 0 4px 14px rgba(36, 145, 224, 0.1);
    --shadow-md: 0 12px 30px rgba(36, 145, 224, 0.15);
    --shadow-lg: 0 24px 55px rgba(36, 145, 224, 0.22);
    --nav-h: 80px;
    --grad: linear-gradient(135deg, var(--primary), var(--secondary));
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
    font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 22px;
}

img { display: block; max-width: 100%; }

/* ---------- Scroll reveal base ---------- */
[data-reveal] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    will-change: opacity, transform;
}
[data-reveal="fade-up"]    { transform: translateY(40px); }
[data-reveal="zoom-in"]     { transform: scale(0.9); }
[data-reveal="slide-left"]  { transform: translateX(40px); }
[data-reveal="slide-right"] { transform: translateX(-40px); }
[data-reveal].revealed {
    opacity: 1;
    transform: none;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    z-index: 100;
    display: flex;
    align-items: center;
    background: transparent;
    transition: background 0.35s ease, box-shadow 0.35s ease, height 0.35s ease;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logos { display: flex; align-items: center; gap: 8px; }

.nav-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: var(--white);
    border-radius: 10px;
    padding: 3px;
    box-shadow: var(--shadow-sm);
}

.nav-titles { display: flex; flex-direction: column; line-height: 1.15; }

.nav-title {
    font-weight: 800;
    font-size: 0.98rem;
    letter-spacing: 0.3px;
    color: var(--white);
    transition: color 0.35s ease;
}
.nav-subtitle {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    transition: color 0.35s ease;
}

.nav-menu { display: flex; align-items: center; gap: 6px; }

.nav-link {
    position: relative;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 14px;
    border-radius: 10px;
    transition: color 0.25s ease, background 0.25s ease;
}
.nav-link::after {
    content: "";
    position: absolute;
    left: 14px; right: 14px;
    bottom: 4px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--white); }

/* Navbar saat di-scroll -> putih + shadow */
.navbar.scrolled {
    background: var(--white);
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
    height: 72px;
}
.navbar.scrolled .nav-title { color: var(--primary); }
.navbar.scrolled .nav-subtitle { color: var(--secondary); }
.navbar.scrolled .nav-link { color: var(--text); }
.navbar.scrolled .nav-link:hover { background: rgba(36, 145, 224, 0.08); color: var(--primary); }
.navbar.scrolled .nav-link.active { color: var(--primary); }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 10px;
}
.nav-toggle span {
    width: 24px; height: 2.5px;
    background: var(--white);
    border-radius: 3px;
    transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
}
.navbar.scrolled .nav-toggle span { background: var(--primary); }
.nav-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}

.hero-bg {
    position: absolute; inset: 0;
    background-image: url("../img/hero-bg.jpg");
    background-size: cover;
    background-position: center;
    z-index: -2;
    animation: heroZoom 18s ease-in-out infinite alternate;
}
@keyframes heroZoom {
    from { transform: scale(1); }
    to   { transform: scale(1.12); }
}

.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.75));
    z-index: -1;
}

.hero-content {
    padding: 120px 22px 140px;
    max-width: 820px;
    color: var(--white);
}

.hero-badge {
    display: inline-block;
    background: rgba(79, 184, 240, 0.22);
    border: 1px solid rgba(125, 211, 252, 0.6);
    color: #e0f2fe;
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.6px;
    padding: 8px 18px;
    border-radius: 999px;
    margin-bottom: 22px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
}

.hero-desc {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 640px;
    margin-bottom: 34px;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    padding: 14px 28px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.btn-primary {
    background: var(--grad);
    color: var(--white);
    box-shadow: 0 12px 30px rgba(36, 145, 224, 0.35);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(36, 145, 224, 0.45); }

.btn-ghost {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
}
.btn-ghost:hover { background: var(--white); color: var(--primary); transform: translateY(-3px); }

.hero-wave {
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    line-height: 0;
    z-index: 1;
}
.hero-wave svg { width: 100%; height: 110px; }

/* ============================================================
   SECTION HELPERS
   ============================================================ */
.section-tag {
    display: inline-block;
    color: var(--secondary);
    background: rgba(36, 145, 224, 0.1);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 14px;
}
.section-tag.center { display: inline-block; }

.section-head { text-align: center; max-width: 680px; margin: 0 auto 46px; }

.section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.25;
}

.section-lead { color: var(--muted); font-size: 1.02rem; }
.section-lead.align-left { text-align: left; }

/* ============================================================
   STATISTIK
   ============================================================ */
.stats {
    margin-top: -40px;
    position: relative;
    z-index: 2;
    padding-bottom: 40px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px 22px;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stat-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.stat-icon {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    border-radius: 18px;
    background: var(--grad);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.stat-desc { color: var(--muted); font-size: 0.92rem; line-height: 1.55; }

/* ============================================================
   APA ITU PIP
   ============================================================ */
.about { padding: 80px 0; }
.about-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    align-items: center;
    gap: 56px;
}
.about-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}
.about-icon-wrap {
    width: 240px; height: 240px;
    border-radius: 36px;
    background: var(--grad);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transform: rotate(-6deg);
}
.about-float {
    position: absolute;
    width: 64px; height: 64px;
    background: var(--white);
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    box-shadow: var(--shadow-md);
    animation: floaty 4s ease-in-out infinite;
}
.about-float-1 { top: 24px; right: 40px; }
.about-float-2 { bottom: 30px; left: 30px; animation-delay: 1.5s; }
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

.benefit-list { list-style: none; margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.benefit-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.benefit-list li:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.benefit-list .check {
    flex-shrink: 0;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(79, 184, 240, 0.18);
    color: var(--secondary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}

/* ============================================================
   TAHAP PIP
   ============================================================ */
.stages { padding: 70px 0 90px; }

.stages-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.stage-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 20px;
    padding: 30px 26px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.stage-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 6px;
    background: var(--grad);
}
.stage-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.stage-badge {
    position: absolute;
    top: 18px; right: 18px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(79, 184, 240, 0.16);
    color: var(--secondary);
}
.stage-badge.soon { background: #fff4e3; color: #b9760f; }

.stage-icon {
    width: 60px; height: 60px;
    border-radius: 16px;
    background: var(--grad);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.stage-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }

.stage-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    margin-bottom: 22px;
}
.stage-status .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(79, 184, 240, 0.22); }
.stage-status.soon .dot { background: #e0a106; box-shadow: 0 0 0 4px rgba(224, 161, 6, 0.18); }

.stage-link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--white);
    background: var(--primary);
    padding: 11px 18px;
    border-radius: 12px;
    transition: gap 0.2s ease, background 0.2s ease;
}
.stage-card:hover .stage-link { gap: 12px; background: var(--primary-dark); }
.stage-card .stage-link.disabled { background: #cbd5e1; color: #f8fafc; }

/* Loading & empty */
.stage-loading, .stage-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}
.stage-empty {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px dashed rgba(36, 145, 224, 0.3);
}
.stage-empty .empty-icon {
    width: 72px; height: 72px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: rgba(36, 145, 224, 0.08);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
}
.stage-empty h3 { color: var(--text); margin-bottom: 6px; font-size: 1.2rem; }

.spinner {
    width: 44px; height: 44px;
    border: 4px solid rgba(36, 145, 224, 0.15);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: #0E3F66; color: #cbd9e8; padding-top: 60px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
    gap: 36px;
    padding-bottom: 40px;
}
.footer-col h3 {
    color: var(--white);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}
.footer-col h3::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 38px; height: 3px;
    background: var(--accent);
    border-radius: 3px;
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer-brand img { width: 48px; height: 48px; object-fit: contain; background: var(--white); border-radius: 10px; padding: 3px; }
.footer-brand strong { display: block; color: var(--white); font-size: 1rem; }
.footer-brand span { font-size: 0.85rem; color: #94a3b8; }
.footer-desc { font-size: 0.92rem; color: #94a3b8; line-height: 1.7; }

.footer-links, .footer-contact { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.footer-links a, .footer-links li { color: #cbd5e1; text-decoration: none; font-size: 0.92rem; transition: color 0.2s ease, padding-left 0.2s ease; }
.footer-links a:hover { color: var(--accent); padding-left: 5px; }
.footer-contact li { display: flex; gap: 10px; font-size: 0.9rem; line-height: 1.55; color: #94a3b8; }
.footer-contact li span { flex-shrink: 0; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 20px 0;
    text-align: center;
}
.footer-bottom p { font-size: 0.88rem; color: #94a3b8; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; gap: 36px; }
    .about-visual { min-height: 240px; order: -1; }
    .stages-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        position: fixed;
        top: var(--nav-h);
        right: 0;
        width: min(78vw, 320px);
        height: calc(100vh - var(--nav-h));
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 20px;
        box-shadow: -10px 0 40px rgba(15, 23, 42, 0.15);
        transform: translateX(110%);
        transition: transform 0.35s ease;
    }
    .nav-menu.open { transform: translateX(0); }
    .nav-link { color: var(--text); padding: 14px 16px; border-radius: 12px; }
    .nav-link::after { display: none; }
    .nav-link:hover, .nav-link.active { background: rgba(36, 145, 224, 0.09); color: var(--primary); }
    .nav-subtitle { display: none; }
}

@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .stages-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .benefit-list { grid-template-columns: 1fr; }
    .hero-content { padding: 110px 22px 130px; }
    .nav-title { font-size: 0.85rem; }
    .nav-logo { width: 38px; height: 38px; }
}
