/* ============================================
   NPCK Calendar of Events — Public Styles
   National Potato Council of Kenya
============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@400;500;600&display=swap');

:root {
    --npck-green:       #1a6b2a;
    --npck-green-light: #2d8a40;
    --npck-green-pale:  #e8f5eb;
    --npck-green-mid:   #4caf63;
    --npck-border:      #c8e6cd;
    --npck-text:        #1a2e1d;
    --npck-muted:       #5a7a60;
    --npck-past:        #8a9e8d;
    --npck-accent:      #f4a025;
    --npck-accent-pale: #fff8ee;
    --npck-white:       #ffffff;
    --npck-off:         #f7faf8;
    --npck-radius:      10px;
    --npck-font:        'DM Sans', 'Segoe UI', sans-serif;
    --npck-serif:       'Playfair Display', Georgia, serif;
}

/* WRAPPER */
.npck-cal-wrap {
    font-family: var(--npck-font);
    color: var(--npck-text);
    max-width: 860px;
    margin: 0 auto;
    background: var(--npck-off);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--npck-border);
    box-sizing: border-box;
}
.npck-cal-wrap *, .npck-cal-wrap *::before, .npck-cal-wrap *::after { box-sizing: border-box; }

/* ── HEADER ── */
.npck-cal-header {
    background: var(--npck-green);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.npck-cal-brand { display: flex; align-items: center; gap: 12px; }
.npck-cal-logo { flex-shrink: 0; }
.npck-cal-title {
    font-family: var(--npck-serif);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
}
.npck-cal-subtitle { font-size: 11px; color: rgba(255,255,255,0.7); margin-top: 3px; letter-spacing: 0.4px; text-transform: uppercase; }
.npck-cal-header-stats { display: flex; gap: 12px; }
.npck-hstat {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    padding: 8px 14px;
    text-align: center;
    color: #fff;
    min-width: 70px;
}
.npck-hstat span { display: block; font-size: 22px; font-weight: 700; line-height: 1; }
.npck-hstat { font-size: 10px; opacity: 0.8; text-transform: uppercase; letter-spacing: 0.4px; }

/* ── NEXT UP BANNER ── */
.npck-next-up {
    background: var(--npck-accent-pale);
    border-bottom: 1px solid #f4c07a;
    padding: 12px 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.npck-next-badge {
    background: var(--npck-accent);
    color: #fff;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.npck-next-info { font-size: 14px; color: var(--npck-text); }
.npck-next-info strong { font-weight: 600; }
.npck-next-date { color: var(--npck-muted); font-size: 12px; margin-left: 8px; }

/* ── FILTER BAR ── */
.npck-filter-bar {
    background: #fff;
    border-bottom: 1px solid var(--npck-border);
    padding: 10px 22px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.npck-filter-label { font-size: 11px; color: var(--npck-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; margin-right: 4px; }
.npck-filter {
    padding: 5px 14px;
    border-radius: 18px;
    border: 1px solid var(--npck-border);
    background: transparent;
    color: var(--npck-muted);
    font-size: 12px;
    font-family: var(--npck-font);
    cursor: pointer;
    transition: all 0.15s;
    font-weight: 500;
}
.npck-filter.active { background: var(--npck-green); color: #fff; border-color: var(--npck-green); }
.npck-filter:hover:not(.active) { background: var(--npck-green-pale); border-color: var(--npck-green-mid); }

/* ── EVENTS ── */
.npck-events-wrap { padding: 16px 22px 22px; }
.npck-section-head {
    font-size: 11px;
    font-weight: 600;
    color: var(--npck-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.npck-section-head::after { content: ''; flex: 1; height: 1px; background: var(--npck-border); }
.npck-count {
    background: var(--npck-green-pale);
    color: var(--npck-green);
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 11px;
}

/* EVENT CARD */
.npck-event-card {
    background: #fff;
    border: 1px solid var(--npck-border);
    border-radius: var(--npck-radius);
    padding: 14px 16px;
    margin-bottom: 10px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: box-shadow 0.2s, border-color 0.2s;
}
.npck-event-card:hover { border-color: var(--npck-green-mid); box-shadow: 0 2px 12px rgba(26,107,42,0.1); }
.npck-card-next { border-left: 4px solid var(--npck-accent) !important; }
.npck-card-past { opacity: 0.6; border-color: #dde8de; }
.npck-card-past:hover { opacity: 0.85; }

/* DATE BLOCK */
.npck-event-date {
    background: var(--npck-green-pale);
    border: 1px solid var(--npck-border);
    border-radius: 8px;
    text-align: center;
    padding: 8px 10px;
    min-width: 52px;
    flex-shrink: 0;
}
.npck-day { display: block; font-size: 22px; font-weight: 700; color: var(--npck-green); line-height: 1; }
.npck-month { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--npck-muted); font-weight: 600; margin-top: 2px; }
.npck-date-next { background: var(--npck-accent-pale); border-color: #f4c07a; }
.npck-date-next .npck-day { color: #c07800; }
.npck-date-past { background: #f0f0f0; border-color: #d8d8d8; }
.npck-date-past .npck-day { color: var(--npck-past); }

/* EVENT BODY */
.npck-event-body { flex: 1; min-width: 0; }
.npck-event-name { font-size: 14px; font-weight: 600; color: var(--npck-text); margin-bottom: 5px; }
.npck-event-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--npck-muted); margin-bottom: 4px; }
.npck-meta-item { display: flex; align-items: center; gap: 3px; }
.npck-meta-icon { font-size: 13px; }
.npck-event-details { font-size: 12px; color: var(--npck-muted); font-style: italic; margin-top: 4px; }

/* BADGES */
.npck-event-badge { align-self: flex-start; padding: 3px 10px; border-radius: 12px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; flex-shrink: 0; }
.npck-badge-upcoming { background: var(--npck-green-pale); color: var(--npck-green); }
.npck-badge-next { background: var(--npck-accent); color: #fff; }
.npck-badge-past { background: #eee; color: #888; }

/* EMPTY STATE */
.npck-empty { text-align: center; padding: 3rem 1rem; color: var(--npck-muted); }
.npck-empty-icon { font-size: 40px; margin-bottom: 10px; }
.npck-empty p { font-size: 14px; }

.npck-more-past { font-size: 12px; color: var(--npck-muted); text-align: center; padding: 6px 0; }
.npck-more-past a { color: var(--npck-green); text-decoration: none; }
.npck-more-past a:hover { text-decoration: underline; }

/* ── PAST PAGE ── */
.npck-past-header {
    background: var(--npck-green);
    padding: 20px 22px;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff;
}
.npck-past-icon { font-size: 30px; }
.npck-past-title { font-family: var(--npck-serif); font-size: 20px; font-weight: 700; color: #fff; margin: 0; }
.npck-past-sub { font-size: 13px; color: rgba(255,255,255,0.75); margin: 4px 0 0; }

/* TIMELINE */
.npck-timeline { padding: 20px 22px 22px; }
.npck-timeline-item { display: flex; gap: 14px; margin-bottom: 0; }
.npck-timeline-left { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; }
.npck-timeline-dot {
    width: 13px; height: 13px; border-radius: 50%;
    background: var(--npck-past);
    border: 2px solid var(--npck-off);
    box-shadow: 0 0 0 1.5px var(--npck-past);
    flex-shrink: 0; margin-top: 5px;
}
.npck-timeline-line { flex: 1; width: 2px; background: var(--npck-border); margin: 5px 0; }
.npck-timeline-card { flex: 1; padding-bottom: 14px; }
.npck-timeline-last .npck-timeline-card { padding-bottom: 0; }
.npck-timeline-card-inner {
    background: #fff;
    border: 1px solid var(--npck-border);
    border-radius: 9px;
    padding: 13px 16px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.npck-tc-name { font-size: 13px; font-weight: 600; color: var(--npck-text); margin-bottom: 4px; }
.npck-tc-meta { font-size: 11px; color: var(--npck-muted); }
.npck-tc-details { font-size: 11px; color: var(--npck-muted); margin-top: 5px; font-style: italic; }
.npck-tc-right { text-align: right; flex-shrink: 0; }
.npck-tc-date { font-size: 14px; font-weight: 700; color: var(--npck-past); margin-bottom: 5px; }

/* FOOTER */
.npck-cal-footer {
    background: var(--npck-green);
    padding: 10px 22px;
    text-align: center;
}
.npck-cal-footer p { color: rgba(255,255,255,0.7); font-size: 12px; margin: 0; }
.npck-cal-footer a { color: rgba(255,255,255,0.9); text-decoration: none; }
.npck-cal-footer a:hover { text-decoration: underline; }

/* ── RESPONSIVE ── */
@media ( max-width: 580px ) {
    .npck-cal-header { flex-direction: column; align-items: flex-start; }
    .npck-cal-header-stats { width: 100%; justify-content: flex-start; }
    .npck-filter-bar { padding: 8px 14px; }
    .npck-events-wrap { padding: 12px 14px 16px; }
    .npck-timeline { padding: 14px 14px 16px; }
    .npck-event-card { flex-wrap: wrap; gap: 10px; }
    .npck-event-badge { align-self: auto; }
}
