/* ============================================================
   IPDA - Ikatan Pemuda Pemudi RT 010/08
   Style utama (responsive)
   ============================================================ */

:root {
    --primary: #16a34a;
    --primary-dark: #15803d;
    --primary-light: #dcfce7;
    --accent: #f59e0b;
    --dark: #0f172a;
    --gray: #64748b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(15, 23, 42, .08);
    --shadow-lg: 0 20px 50px rgba(15, 23, 42, .14);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--dark);
    background: #fff;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-tint { background: var(--light); }

/* ---------- Flash message ---------- */
.flash {
    position: fixed; top: 16px; right: 16px; z-index: 1000;
    padding: 14px 20px; border-radius: 10px; font-size: 14px; font-weight: 600;
    box-shadow: var(--shadow-lg); animation: slideIn .35s ease;
    max-width: 340px;
}
.flash.success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.flash.error   { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flash.info    { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.flash-close { position: absolute; top: 8px; right: 12px; background: none; border: none; font-size: 18px; line-height: 1; color: inherit; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 200;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 19px; font-weight: 800; letter-spacing: .5px; color: var(--primary-dark); }
.brand-text small { font-size: 12px; color: var(--gray); font-weight: 600; }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a { font-size: 14.5px; font-weight: 600; color: var(--dark); padding: 6px 0; position: relative; transition: color .2s; }
.main-nav a:hover { color: var(--primary); }
.main-nav a.active { color: var(--primary); }
.main-nav a.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 3px;
    border-radius: 3px; background: var(--primary);
}
.nav-cta {
    background: var(--primary); color: #fff !important; padding: 10px 20px !important;
    border-radius: 999px; transition: background .2s !important;
}
.nav-cta:hover { background: var(--primary-dark); color: #fff !important; }

.nav-toggle { display: none; background: none; border: none; width: 42px; height: 42px; flex-direction: column; justify-content: center; gap: 5px; align-items: center; }
.nav-toggle span { width: 24px; height: 2.5px; background: var(--dark); border-radius: 2px; transition: all .3s; }
.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; overflow: hidden;
    background: linear-gradient(135deg, #052e16 0%, #14532d 45%, #166534 100%);
    color: #fff; padding: 110px 0;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(245, 158, 11, .22), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(34, 197, 94, .28), transparent 45%);
    pointer-events: none;
}
.hero::after {
    content: ''; position: absolute; right: -120px; bottom: -140px; width: 380px; height: 380px;
    background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 14px, transparent 14px 28px);
    border-radius: 50%;
}
.hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.25); padding: 8px 16px; border-radius: 999px;
    font-size: 13px; font-weight: 600; letter-spacing: .3px; margin-bottom: 22px;
}
.hero h1 { font-size: clamp(30px, 4.2vw, 48px); font-weight: 800; line-height: 1.15; margin-bottom: 18px; }
.hero h1 span { color: #fbbf24; }
.hero p { font-size: 17px; opacity: .92; max-width: 520px; margin-bottom: 30px; }
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
    display: inline-flex; align-items: center; gap: 9px; padding: 13px 26px; border-radius: 999px;
    font-weight: 700; font-size: 14.5px; transition: all .25s; border: none;
}
.btn-primary { background: var(--accent); color: var(--dark); }
.btn-primary:hover { background: #d97706; transform: translateY(-2px); box-shadow: 0 12px 24px rgba(245,158,11,.35); }
.btn-ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.5); }
.btn-ghost:hover { background: rgba(255,255,255,.12); transform: translateY(-2px); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: #1e293b; transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.hero-art { display: flex; justify-content: center; }
.hero-logo {
    width: 240px; height: 240px; border-radius: 32px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.25);
    backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center;
    box-shadow: 0 30px 60px rgba(0,0,0,.35); padding: 30px; animation: floaty 5s ease-in-out infinite;
}
.hero-logo img { width: 100%; height: 100%; object-fit: contain; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }

/* ---------- Stats bar ---------- */
.stats-bar { background: #fff; margin-top: -34px; position: relative; z-index: 5; }
.stats-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border);
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.stat { background: #fff; padding: 24px 16px; text-align: center; }
.stat b { display: block; font-size: 30px; font-weight: 800; color: var(--primary-dark); }
.stat span { font-size: 13px; color: var(--gray); font-weight: 600; }

/* ---------- Section headings ---------- */
.sec-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.sec-tag { display: inline-block; background: var(--primary-light); color: var(--primary-dark); font-size: 12.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; padding: 7px 16px; border-radius: 999px; margin-bottom: 14px; }
.sec-head h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; line-height: 1.2; }
.sec-head p { color: var(--gray); margin-top: 12px; font-size: 15.5px; }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; transition: transform .3s, box-shadow .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-img { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-img img { transform: scale(1.07); }
.card-tag { position: absolute; top: 14px; left: 14px; background: rgba(15,23,42,.75); color: #fff; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; backdrop-filter: blur(4px); }
.card-body { padding: 20px 20px 22px; }
.card-body h3 { font-size: 17.5px; font-weight: 700; line-height: 1.35; margin-bottom: 8px; }
.card-body h3 a:hover { color: var(--primary); }
.card-body p { font-size: 14px; color: var(--gray); }
.card-meta { display: flex; align-items: center; gap: 14px; margin-top: 14px; font-size: 12.5px; color: var(--gray); flex-wrap: wrap; }
.card-meta i { margin-right: 4px; color: var(--primary); }
.card-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-size: 13.5px; font-weight: 700; color: var(--primary); }
.card-link i { transition: transform .2s; }
.card-link:hover i { transform: translateX(4px); }

/* ---------- Kegiatan / agenda ---------- */
.kegiatan-card { display: flex; gap: 0; }
.kegiatan-date {
    flex: 0 0 90px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark)); color: #fff; padding: 18px 8px; text-align: center;
}
.kegiatan-date b { font-size: 30px; font-weight: 800; line-height: 1; }
.kegiatan-date span { font-size: 12px; text-transform: uppercase; font-weight: 700; letter-spacing: 1px; margin-top: 4px; }
.kegiatan-info { flex: 1; padding: 18px 20px; }
.kegiatan-info h3 { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.kegiatan-info h3 a:hover { color: var(--primary); }
.kegiatan-info .meta { font-size: 13px; color: var(--gray); display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.kegiatan-info .meta i { color: var(--primary); margin-right: 4px; }

.countdown-tag {
    display: inline-block; margin-top: 10px; background: var(--primary-light); color: var(--primary-dark);
    font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px;
}
.countdown-tag.done { background: #fee2e2; color: #991b1b; }

/* ---------- Pengurus ---------- */
.team-card { text-align: center; padding: 30px 20px; }
.team-avatar {
    width: 92px; height: 92px; border-radius: 50%; margin: 0 auto 16px;
    background: var(--primary-light); overflow: hidden; border: 3px solid var(--primary-light);
}
.team-avatar img { width: 100%; height: 100%; object-fit: cover; }
.team-avatar .no-photo { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--primary); }
.team-card h3 { font-size: 16px; font-weight: 700; }
.team-card span { display: block; font-size: 13px; color: var(--primary-dark); font-weight: 600; margin-top: 4px; }

/* ---------- Galeri ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gallery-item { position: relative; border-radius: 12px; overflow: hidden; cursor: pointer; aspect-ratio: 1/1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .overlay {
    position: absolute; inset: 0; background: linear-gradient(transparent 50%, rgba(0,0,0,.7));
    opacity: 0; transition: opacity .3s; display: flex; align-items: flex-end; padding: 16px;
}
.gallery-item:hover .overlay { opacity: 1; }
.gallery-item .overlay span { color: #fff; font-size: 14px; font-weight: 700; }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0; background: rgba(2,6,23,.94); z-index: 500;
    display: none; align-items: center; justify-content: center; padding: 30px; flex-direction: column;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 80vh; border-radius: 12px; object-fit: contain; }
.lightbox p { color: #fff; margin-top: 16px; font-size: 15px; font-weight: 600; }
.lightbox-close { position: absolute; top: 20px; right: 28px; background: none; border: none; color: #fff; font-size: 40px; line-height: 1; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); color: #fff; border: none; width: 52px; height: 52px; border-radius: 50%; font-size: 20px; transition: background .2s; }
.lightbox-nav:hover { background: var(--primary); }
.lightbox-prev { left: 20px; } .lightbox-next { right: 20px; }

/* ---------- Page hero (halaman dalam) ---------- */
.page-hero {
    background: linear-gradient(135deg, #052e16, #166534); color: #fff; padding: 76px 0 64px; text-align: center;
    position: relative; overflow: hidden;
}
.page-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 80% 0%, rgba(245,158,11,.25), transparent 45%); }
.page-hero .container { position: relative; }
.page-hero h1 { font-size: clamp(28px, 4vw, 42px); font-weight: 800; }
.page-hero p { opacity: .9; margin-top: 10px; font-size: 16px; }
.crumbs { display: inline-flex; gap: 10px; font-size: 13px; font-weight: 600; margin-top: 18px; background: rgba(255,255,255,.12); padding: 8px 18px; border-radius: 999px; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Detail ---------- */
.detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.article { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; }
.article-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 24px; aspect-ratio: 16/7; }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article h1 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 800; line-height: 1.25; margin-bottom: 16px; }
.article .content { font-size: 16px; color: #334155; }
.article .content p { margin-bottom: 18px; }
.article .content img { border-radius: 12px; margin: 20px 0; }
.article-meta { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13.5px; color: var(--gray); padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--border); }
.article-meta i { color: var(--primary); margin-right: 5px; }

.sidebar-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.sidebar-box h4 { font-size: 15px; font-weight: 800; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 2px solid var(--primary-light); }
.sidebar-list li { padding: 12px 0; border-bottom: 1px solid var(--border); }
.sidebar-list li:last-child { border-bottom: none; }
.sidebar-list a { display: block; font-size: 14px; font-weight: 600; }
.sidebar-list a:hover { color: var(--primary); }
.sidebar-list small { color: var(--gray); font-size: 12px; }

/* ---------- Kontak ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.contact-info-list li { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.contact-icon {
    flex: 0 0 48px; height: 48px; border-radius: 12px; background: var(--primary-light);
    color: var(--primary-dark); display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.contact-info-list b { display: block; font-size: 15px; }
.contact-info-list span { font-size: 14px; color: var(--gray); }

.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; color: #334155; }
.form-control {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px;
    font-size: 14px; font-family: inherit; transition: border-color .2s, box-shadow .2s; background: #fff;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22,163,74,.15); }
textarea.form-control { resize: vertical; min-height: 130px; }
.form-full { grid-column: 1 / -1; }

/* ---------- Maps ---------- */
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); line-height: 0; }
.map-wrap iframe { width: 100%; height: 420px; border: 0; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 44px; flex-wrap: wrap; }
.pagination a, .pagination span {
    min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 10px; font-weight: 700; font-size: 14px; border: 1px solid var(--border); background: #fff; color: var(--dark);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Visi Misi ---------- */
.vm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.vm-box { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.vm-box .icon-big { width: 60px; height: 60px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 18px; background: var(--primary-light); color: var(--primary-dark); }
.vm-box h3 { font-size: 20px; font-weight: 800; margin-bottom: 14px; }
.vm-box ul li { position: relative; padding-left: 24px; margin-bottom: 10px; font-size: 14.5px; color: #334155; }
.vm-box ul li::before { content: '✓'; position: absolute; left: 0; color: var(--primary); font-weight: 800; }

/* ---------- CTA band ---------- */
.cta-band {
    background: linear-gradient(135deg, var(--primary-dark), #065f46); border-radius: 22px; padding: 52px 40px;
    display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; color: #fff;
    position: relative; overflow: hidden;
}
.cta-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 90% 30%, rgba(245,158,11,.3), transparent 40%); }
.cta-band .container-cta { position: relative; }
.cta-band h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; margin-bottom: 8px; }
.cta-band p { opacity: .9; }

/* ---------- Footer ---------- */
.site-footer { background: #0f172a; color: #cbd5e1; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; padding: 64px 0 44px; }
.footer-about p { font-size: 14px; margin: 18px 0; opacity: .85; max-width: 380px; }
.brand-footer .brand-text strong { color: #fff; }
.brand-footer .brand-text small { color: #94a3b8; }
.social-links { display: flex; gap: 10px; }
.social-links a {
    width: 40px; height: 40px; border-radius: 10px; background: rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: center; font-size: 15px; color: #fff; transition: all .25s;
}
.social-links a:hover { background: var(--primary); transform: translateY(-3px); }
.footer-col h4 { color: #fff; font-size: 15px; font-weight: 800; margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 11px; font-size: 14px; }
.footer-col ul a:hover { color: var(--primary); }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact i { color: var(--primary); margin-top: 3px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 20px 0; }
.footer-bottom p { font-size: 13px; opacity: .7; text-align: center; }

/* ---------- Back to top ---------- */
.back-top {
    position: fixed; right: 24px; bottom: 24px; width: 48px; height: 48px; border-radius: 50%;
    background: var(--primary); color: #fff; border: none; font-size: 17px; display: none;
    align-items: center; justify-content: center; box-shadow: var(--shadow-lg); z-index: 100;
    transition: all .3s;
}
.back-top.show { display: flex; }
.back-top:hover { background: var(--primary-dark); transform: translateY(-4px); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; }
    .hero p { margin-left: auto; margin-right: auto; }
    .hero-btns { justify-content: center; }
    .hero-logo { width: 180px; height: 180px; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .detail-layout { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .main-nav {
        position: fixed; top: 72px; left: 0; right: 0; background: #fff;
        flex-direction: column; align-items: flex-start; gap: 0; padding: 12px 24px 20px;
        box-shadow: 0 20px 40px rgba(15,23,42,.12); border-bottom: 1px solid var(--border);
        transform: translateY(-120%); transition: transform .3s ease; z-index: 150;
    }
    .main-nav.open { transform: translateY(0); }
    .main-nav a { display: block; width: 100%; padding: 13px 0 !important; border-bottom: 1px solid var(--border); }
    .main-nav a.active::after { display: none; }
    .main-nav a.active { color: var(--primary); }
    .nav-cta { text-align: center; background: var(--primary); color: #fff !important; border-radius: 10px !important; margin-top: 10px; }
    .section { padding: 52px 0; }
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .vm-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .form-grid { grid-template-columns: 1fr; }
    .kegiatan-date { flex: 0 0 70px; }
    .kegiatan-date b { font-size: 22px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .page-hero { padding: 56px 0 48px; }
    .hero { padding: 80px 0; }
    .cta-band { padding: 36px 24px; }
}
