/* ============================================================
   SKN Government Projects Tracker – Frontend Styles
   Government of St. Kitts & Nevis
   ============================================================ */

/* --- Custom Properties ------------------------------------ */
:root {
  --skn-green:       #009E60;
  --skn-green-dark:  #006B41;
  --skn-green-light: #e8f5ee;
  --skn-gold:        #FFD700;
  --skn-black:       #1a1a1a;
  --skn-red:         #C8102E;
  --skn-white:       #ffffff;

  --skn-status-active:    #2e7d32;
  --skn-status-completed: #1565c0;
  --skn-status-planned:   #546e7a;
  --skn-status-hold:      #e65100;
  --skn-status-delayed:   #b71c1c;
  --skn-status-cancelled: #37474f;

  --skn-radius:      10px;
  --skn-radius-sm:   6px;
  --skn-shadow:      0 2px 12px rgba(0,0,0,.09);
  --skn-shadow-hover:0 8px 28px rgba(0,0,0,.15);
  --skn-transition:  all .22s ease;
  --skn-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* --- Reset / Base ----------------------------------------- */
.skn-tracker * { box-sizing: border-box; }
.skn-tracker {
  font-family: var(--skn-font);
  color: var(--skn-black);
  line-height: 1.55;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px 60px;
}

/* ============================================================
   HERO
   ============================================================ */
.skn-hero {
  background: linear-gradient(135deg, #004d2e 0%, #006B41 45%, #009E60 100%);
  border-radius: var(--skn-radius);
  padding: 48px 40px;
  margin: 20px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.skn-hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 260px; height: 260px;
  background: rgba(255,215,0,.07);
  border-radius: 50%;
}
.skn-hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: 30%;
  width: 320px; height: 320px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}
.skn-hero-content { flex: 1; position: relative; z-index: 1; }
.skn-hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  margin-bottom: 12px;
  backdrop-filter: blur(4px);
}
.skn-hero-title {
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
  color: #fff;
  margin: 0 0 8px;
  letter-spacing: -.5px;
}
.skn-hero-subtitle {
  font-size: 15px;
  color: rgba(255,255,255,.80);
  margin: 0 0 20px;
  font-weight: 400;
}
.skn-hero-quote {
  background: rgba(255,255,255,.10);
  border-left: 3px solid var(--skn-gold);
  border-radius: 0 var(--skn-radius-sm) var(--skn-radius-sm) 0;
  padding: 14px 18px;
  margin: 0;
  font-style: italic;
  color: rgba(255,255,255,.90);
  font-size: 14px;
  line-height: 1.6;
  backdrop-filter: blur(4px);
}
.skn-hero-quote cite {
  display: block;
  font-style: normal;
  font-weight: 700;
  color: var(--skn-gold);
  margin-top: 8px;
  font-size: 12px;
  letter-spacing: .3px;
}
.skn-hero-coa {
  flex-shrink: 0;
  position: relative; z-index: 1;
}
.skn-hero-coa img {
  width: 110px;
  opacity: .90;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.3));
}

/* ============================================================
   STATS BAR
   ============================================================ */
.skn-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.skn-stat-card {
  background: var(--skn-white);
  border: 1px solid #e8eaed;
  border-radius: var(--skn-radius);
  padding: 18px 16px;
  text-align: center;
  box-shadow: var(--skn-shadow);
  transition: var(--skn-transition);
  position: relative;
  overflow: hidden;
}
.skn-stat-card:hover { transform: translateY(-2px); box-shadow: var(--skn-shadow-hover); }
.skn-stat-number {
  display: block;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
  color: var(--skn-black);
}
.skn-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #6b7280;
}
.skn-stat-active .skn-stat-number   { color: var(--skn-status-active); }
.skn-stat-complete .skn-stat-number { color: var(--skn-status-completed); }
.skn-stat-hold .skn-stat-number     { color: var(--skn-status-hold); }
.skn-stat-planned .skn-stat-number  { color: var(--skn-status-planned); }
.skn-stat-avg .skn-stat-number      { color: var(--skn-green); }

.skn-mini-ring {
  width: 40px; height: 40px;
  margin: 8px auto 0;
}
.skn-mini-ring svg { transform: rotate(-90deg); width: 40px; height: 40px; }

/* ============================================================
   TOOLBAR
   ============================================================ */
.skn-toolbar {
  background: var(--skn-white);
  border: 1px solid #e8eaed;
  border-radius: var(--skn-radius);
  padding: 16px 18px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  box-shadow: var(--skn-shadow);
}
.skn-search-wrap {
  position: relative;
  flex: 1 1 220px;
}
.skn-search-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  pointer-events: none;
}
.skn-search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1.5px solid #d1d5db;
  border-radius: var(--skn-radius-sm);
  font-size: 14px;
  transition: var(--skn-transition);
  background: #fafafa;
  font-family: var(--skn-font);
}
.skn-search-input:focus {
  outline: none;
  border-color: var(--skn-green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,158,96,.12);
}
.skn-filter-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.skn-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .4px;
  white-space: nowrap;
}
.skn-select {
  padding: 8px 10px;
  border: 1.5px solid #d1d5db;
  border-radius: var(--skn-radius-sm);
  font-size: 13px;
  background: #fafafa;
  cursor: pointer;
  font-family: var(--skn-font);
  transition: var(--skn-transition);
}
.skn-select:focus {
  outline: none;
  border-color: var(--skn-green);
  box-shadow: 0 0 0 3px rgba(0,158,96,.12);
}

/* Status pills */
.skn-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 13px;
  border: 1.5px solid #e5e7eb;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: #374151;
  transition: var(--skn-transition);
  font-family: var(--skn-font);
  white-space: nowrap;
}
.skn-pill:hover {
  border-color: var(--skn-green);
  color: var(--skn-green);
}
.skn-pill-active {
  background: var(--skn-green);
  color: #fff;
  border-color: var(--skn-green);
}
.skn-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--dot-color, #9e9e9e);
  flex-shrink: 0;
}

/* View toggle */
.skn-view-toggle {
  display: flex;
  border: 1.5px solid #d1d5db;
  border-radius: var(--skn-radius-sm);
  overflow: hidden;
}
.skn-view-btn {
  padding: 7px 12px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  transition: var(--skn-transition);
  font-family: var(--skn-font);
}
.skn-view-btn:hover { background: #f3f4f6; }
.skn-view-btn.skn-view-active { background: var(--skn-green); color: #fff; }

/* ============================================================
   PILLAR TABS
   ============================================================ */
.skn-pillar-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--skn-green) #f0f0f0;
}
.skn-pillar-tabs::-webkit-scrollbar { height: 4px; }
.skn-pillar-tabs::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 2px; }
.skn-pillar-tabs::-webkit-scrollbar-thumb { background: var(--skn-green); border-radius: 2px; }
.skn-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1.5px solid #e5e7eb;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: #374151;
  transition: var(--skn-transition);
  white-space: nowrap;
  font-family: var(--skn-font);
  flex-shrink: 0;
}
.skn-tab:hover { border-color: var(--skn-green); color: var(--skn-green); }
.skn-tab-active {
  background: var(--skn-green);
  border-color: var(--skn-green);
  color: #fff;
}
.skn-tab-count {
  background: rgba(0,0,0,.1);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
}
.skn-tab-active .skn-tab-count { background: rgba(255,255,255,.25); }
.skn-tab-text { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============================================================
   RESULTS META
   ============================================================ */
.skn-results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 18px;
  padding: 0 2px;
}
.skn-last-updated { font-style: italic; }

/* ============================================================
   PROJECT GRID
   ============================================================ */
.skn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
  transition: var(--skn-transition);
}

/* List view */
.skn-grid.skn-list-view {
  grid-template-columns: 1fr;
}
.skn-grid.skn-list-view .skn-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}
.skn-grid.skn-list-view .skn-card-header {
  width: 280px;
  flex-shrink: 0;
  border-radius: var(--skn-radius) 0 0 var(--skn-radius);
}
.skn-grid.skn-list-view .skn-card-body {
  flex: 1;
  border-radius: 0 var(--skn-radius) var(--skn-radius) 0;
}

/* ============================================================
   PROJECT CARD
   ============================================================ */
.skn-card {
  background: var(--skn-white);
  border-radius: var(--skn-radius);
  box-shadow: var(--skn-shadow);
  border: 1px solid #e8eaed;
  overflow: hidden;
  transition: var(--skn-transition);
  display: flex;
  flex-direction: column;
  position: relative;
}
.skn-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--skn-shadow-hover);
  border-color: rgba(0,158,96,.3);
}
.skn-card-featured {
  border: 2px solid var(--skn-gold);
  box-shadow: 0 4px 20px rgba(255,215,0,.2);
}
.skn-card-featured:hover { box-shadow: 0 8px 30px rgba(255,215,0,.25); }

.skn-featured-ribbon {
  position: absolute;
  top: 12px; right: -26px;
  background: var(--skn-gold);
  color: #333;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 32px;
  transform: rotate(35deg);
  letter-spacing: .5px;
  z-index: 3;
}

/* Card Header */
.skn-card-header {
  padding: 16px 16px 14px;
  position: relative;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}
.skn-card-thumb {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .12;
  border-radius: 0;
}
.skn-card-header-text { position: relative; z-index: 1; }
.skn-card-pillar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.skn-card-pillar span {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #555;
  background: rgba(255,255,255,.65);
  padding: 2px 8px;
  border-radius: 10px;
  backdrop-filter: blur(2px);
}
.skn-card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0;
  line-height: 1.35;
  color: #1a1a1a;
  position: relative; z-index: 1;
}

/* Status badge */
.skn-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  align-self: flex-start;
  position: relative; z-index: 1;
}
.skn-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Card Body */
.skn-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.skn-card-excerpt {
  font-size: 13px;
  color: #555;
  margin: 0;
  line-height: 1.5;
}

/* Progress Bars */
.skn-progress-section { display: flex; flex-direction: column; gap: 8px; }
.skn-progress-row {}
.skn-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.skn-progress-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.skn-progress-pct {
  font-size: 14px;
  font-weight: 800;
  color: var(--skn-green);
}
.skn-pct-warn { color: #e65100 !important; }
.skn-progress-track {
  background: #f0f2f5;
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
}
.skn-progress-fill {
  height: 100%;
  border-radius: 6px;
  background: var(--skn-green);
  transition: width 1.2s cubic-bezier(.25,.46,.45,.94);
  min-width: 2px;
}
.skn-timing-fill {
  background: #9e9e9e !important;
}

/* Meta items */
.skn-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.skn-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  background: #f8f9fa;
  border-radius: var(--skn-radius-sm);
  padding: 8px 10px;
  font-size: 12px;
}
.skn-meta-full { grid-column: 1 / -1; }
.skn-meta-done { background: #e8f5e9; }
.skn-meta-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.skn-meta-key {
  display: block;
  font-weight: 700;
  color: #6b7280;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .4px;
  line-height: 1.2;
  margin-bottom: 1px;
}
.skn-meta-val {
  display: block;
  color: #1a1a1a;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.3;
}

/* Milestones */
.skn-milestones {
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f5ee 100%);
  border-radius: var(--skn-radius-sm);
  padding: 12px 14px;
  border: 1px solid rgba(0,158,96,.12);
}
.skn-milestones-title {
  font-size: 12px;
  font-weight: 700;
  color: #1565c0;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.skn-milestone-list {
  margin: 0;
  padding-left: 16px;
  list-style: none;
}
.skn-milestone-item {
  font-size: 12px;
  color: #374151;
  padding: 3px 0;
  position: relative;
  line-height: 1.4;
}
.skn-milestone-item::before {
  content: '✓';
  position: absolute;
  left: -16px;
  color: var(--skn-green);
  font-weight: 700;
  font-size: 11px;
}

/* Card Footer */
.skn-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid #f0f2f5;
  margin-top: auto;
}
.skn-island-tag {
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
  background: #f0f2f5;
  padding: 3px 9px;
  border-radius: 10px;
}
.skn-source-link, .skn-details-link {
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--skn-radius-sm);
  transition: var(--skn-transition);
}
.skn-source-link {
  color: #1565c0;
  background: #e3f2fd;
  margin-left: auto;
}
.skn-source-link:hover { background: #1565c0; color: #fff; }
.skn-details-link {
  color: var(--skn-green-dark);
  background: var(--skn-green-light);
}
.skn-details-link:hover { background: var(--skn-green); color: #fff; }

/* ============================================================
   HIDDEN / FILTERED CARD
   ============================================================ */
.skn-card-hidden { display: none !important; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.skn-empty {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}
.skn-empty-icon { font-size: 56px; display: block; margin-bottom: 16px; }
.skn-empty h3 { font-size: 22px; margin: 0 0 8px; color: #374151; }
.skn-empty p { font-size: 15px; margin: 0 0 20px; }
.skn-reset-btn {
  background: var(--skn-green);
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: var(--skn-radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--skn-transition);
  font-family: var(--skn-font);
}
.skn-reset-btn:hover { background: var(--skn-green-dark); }

/* ============================================================
   LEGEND
   ============================================================ */
.skn-legend {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: var(--skn-radius);
  padding: 24px 28px;
  margin-bottom: 32px;
  box-shadow: var(--skn-shadow);
}
.skn-legend-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  color: #1a1a1a;
}
.skn-legend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.skn-legend-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.skn-legend-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.skn-legend-item strong { font-size: 13px; display: block; margin-bottom: 2px; }
.skn-legend-item p { font-size: 12px; color: #6b7280; margin: 0; }

/* ============================================================
   SEVEN PILLARS OVERVIEW
   ============================================================ */
.skn-pillars-overview {
  margin-bottom: 36px;
}
.skn-section-title {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 6px;
  letter-spacing: -.3px;
}
.skn-section-sub {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 20px;
}
.skn-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.skn-pillar-card {
  background: #fff;
  border: 1px solid #e8eaed;
  border-radius: var(--skn-radius);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--skn-shadow);
  cursor: pointer;
  transition: var(--skn-transition);
}
.skn-pillar-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--skn-shadow-hover);
  border-color: var(--skn-green);
}
.skn-pillar-icon { font-size: 32px; margin-bottom: 10px; }
.skn-pillar-name {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 10px;
  color: #1a1a1a;
  line-height: 1.3;
}
.skn-pillar-stats {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 8px;
  font-weight: 600;
}
.skn-pillar-pct { font-weight: 800; }
.skn-pillar-mini-stats {
  display: flex;
  justify-content: center;
  gap: 10px;
  font-size: 11px;
  color: #6b7280;
  margin-top: 8px;
  font-weight: 600;
}

/* ============================================================
   FOOTER NOTE
   ============================================================ */
.skn-footer-note {
  background: #f8f9fa;
  border: 1px solid #e8eaed;
  border-radius: var(--skn-radius);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: #6b7280;
}
.skn-footer-coa { width: 48px; opacity: .75; flex-shrink: 0; }
.skn-footer-note p { margin: 0; }
.skn-footer-note a { color: var(--skn-green); font-weight: 600; text-decoration: none; }
.skn-footer-note a:hover { text-decoration: underline; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes sknFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.skn-card { animation: sknFadeIn .35s ease both; }
.skn-card:nth-child(2)  { animation-delay: .04s; }
.skn-card:nth-child(3)  { animation-delay: .08s; }
.skn-card:nth-child(4)  { animation-delay: .12s; }
.skn-card:nth-child(5)  { animation-delay: .16s; }
.skn-card:nth-child(6)  { animation-delay: .20s; }
.skn-card:nth-child(n+7){ animation-delay: .24s; }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
  .skn-toolbar, .skn-pillar-tabs, .skn-view-toggle { display: none; }
  .skn-hero { color: #000; background: none !important; border: 2px solid #000; }
  .skn-hero-title, .skn-hero-subtitle, .skn-hero-badge, .skn-hero-quote { color: #000 !important; }
  .skn-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .skn-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .skn-hero { flex-direction: column; text-align: center; padding: 32px 24px; }
  .skn-hero-coa { display: none; }
  .skn-grid { grid-template-columns: 1fr; }
  .skn-grid.skn-list-view .skn-card { flex-direction: column; }
  .skn-grid.skn-list-view .skn-card-header { width: 100%; border-radius: var(--skn-radius) var(--skn-radius) 0 0; }
}

@media (max-width: 600px) {
  .skn-toolbar { gap: 8px; }
  .skn-stats-bar { grid-template-columns: repeat(3, 1fr); }
  .skn-card-meta { grid-template-columns: 1fr; }
  .skn-legend-grid { grid-template-columns: 1fr 1fr; }
  .skn-pillars-grid { grid-template-columns: repeat(2, 1fr); }
  .skn-hero-title { font-size: 24px; }
  .skn-filter-pillars { display: none; }
}
