/*
    Judiciary of Kenya — Survey Platform
    Survey List Styles — Modern Premium Design
*/

/* ---- Google Fonts import ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --jk-green: #0f2b1d;
  --jk-green-mid: #1a4a32;
  --jk-green-light: #22604a;
  --jk-green-vivid: #2d8a63;
  --jk-gold: #c9a227;
  --jk-gold-light: #e4c84a;
  --jk-gold-dark: #8b7019;
  --jk-bg: #f0f2f5;
  --jk-white: #ffffff;
  --jk-text: #1a1d21;
  --jk-text-secondary: #5a6070;
  --jk-text-light: #8891a0;
  --jk-border: rgba(0, 0, 0, 0.06);
  --jk-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --jk-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  --jk-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  --jk-shadow-glow: 0 0 30px rgba(45, 138, 99, 0.15);
  --jk-radius: 16px;
  --jk-radius-sm: 10px;
  --jk-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Base ---- */
* {
  box-sizing: border-box;
}

body {
  background: var(--jk-bg) !important;
  background-color: var(--jk-bg) !important;
  color: var(--jk-text) !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0;
}

/* ---- Navbar Override ---- */
#survey-nav.navbar {
  background: rgba(15, 43, 29, 0.97) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 20px rgba(0, 0, 0, 0.15);
  border-bottom: none;
  padding: 0.5rem 1rem;
  z-index: 1000;
}

#survey-nav .navbar-brand .logo {
  max-height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  padding: 3px;
}

/* ---- Hero Section ---- */
.jk-hero {
  position: relative;
  min-height: 340px;
  padding-top: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.jk-hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, #0a1f14 0%, #1a4a32 40%, #22604a 70%, #1a4a32 100%);
  z-index: 0;
}

.jk-hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 80%, rgba(201, 162, 39, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(45, 138, 99, 0.15) 0%, transparent 70%);
  z-index: 1;
}

.jk-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0L60 30L30 60L0 30Z' fill='none' stroke='rgba(255,255,255,0.03)' stroke-width='1'/%3E%3C/svg%3E")
    repeat;
  z-index: 2;
}

.jk-hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 3.5rem 2rem 3rem;
  animation: fadeInUp 0.8s ease-out;
}

.jk-hero-logo-wrap {
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
  background: rgba(255, 255, 255, 0.95);
  border: 3px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 0 6px rgba(255, 255, 255, 0.08);
}

.jk-hero-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.jk-hero-title {
  font-size: 2.4rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.5rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.jk-hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  font-weight: 400;
  letter-spacing: 0.01em;
}

.jk-hero-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--jk-gold), var(--jk-gold-light));
  border-radius: 2px;
  margin: 1.5rem auto 0;
}

/* ---- Main Content ---- */
.jk-main {
  position: relative;
  z-index: 10;
  margin-top: -2rem;
  padding-bottom: 2rem;
}

.jk-content-wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---- Language Row ---- */
.jk-lang-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

/* ---- Section Header ---- */
.jk-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.jk-section-heading {
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: var(--jk-green) !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  letter-spacing: -0.01em;
  display: block !important;
}

.jk-survey-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--jk-text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.jk-surveys {
  margin-bottom: 1.5rem;
}

/* ---- Survey Cards Grid ---- */
.jk-survey-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.jk-survey-card {
  position: relative;
  background: var(--jk-white);
  border-radius: var(--jk-radius);
  overflow: hidden;
  box-shadow: var(--jk-shadow-sm);
  transition: transform var(--jk-transition), box-shadow var(--jk-transition);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--jk-border);
}

.jk-survey-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--jk-shadow-lg), var(--jk-shadow-glow);
}

.jk-card-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--jk-green-mid), var(--jk-green-vivid), var(--jk-gold));
  flex-shrink: 0;
}

.jk-card-body {
  padding: 1.5rem 1.5rem 1rem;
  flex: 1;
}

.jk-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(26, 74, 50, 0.08), rgba(45, 138, 99, 0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--jk-green-vivid);
}

.jk-card-title {
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--jk-text);
  margin: 0 0 0.6rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jk-card-lang {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  color: var(--jk-text-light);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 500;
}

.jk-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.85rem 1.5rem;
  margin: 0;
  background: linear-gradient(135deg, var(--jk-green-mid), var(--jk-green-light));
  color: #fff !important;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none !important;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
  transition: background var(--jk-transition), gap var(--jk-transition);
  letter-spacing: 0.01em;
}

.jk-card-btn:hover {
  background: linear-gradient(135deg, var(--jk-green), var(--jk-green-mid));
  color: #fff !important;
  text-decoration: none !important;
  gap: 12px;
}

.jk-card-btn:active {
  background: var(--jk-green);
}

.jk-card-btn svg {
  transition: transform var(--jk-transition);
  flex-shrink: 0;
}

.jk-card-btn:hover svg {
  transform: translateX(3px);
}

/* ---- Empty State ---- */
.jk-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--jk-white);
  border: 1px solid var(--jk-border);
  border-radius: var(--jk-radius);
  box-shadow: var(--jk-shadow-sm);
}

.jk-empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(26, 74, 50, 0.06), rgba(45, 138, 99, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--jk-text-light);
}

.jk-empty-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--jk-text);
  margin: 0 0 0.35rem;
}

.jk-empty-sub {
  color: var(--jk-text-secondary);
  font-size: 0.9rem;
  margin: 0;
}

/* ---- Contact Card ---- */
.jk-contact-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: var(--jk-white);
  border: 1px solid var(--jk-border);
  border-radius: var(--jk-radius-sm);
  box-shadow: var(--jk-shadow-sm);
  margin-bottom: 2rem;
}

.jk-contact-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.08), rgba(201, 162, 39, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--jk-gold-dark);
}

.jk-contact-text {
  font-size: 0.88rem;
  color: var(--jk-text-secondary);
  line-height: 1.6;
}

/* ---- Footer ---- */
.jk-footer {
  background: var(--jk-green) !important;
  padding: 2rem 0 !important;
  margin-top: 0 !important;
}

.jk-footer-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.jk-footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.jk-footer-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  padding: 4px;
}

.jk-footer-name {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
}

.jk-footer-copy {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  text-align: right;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.jk-survey-card {
  animation: fadeInCard 0.5s ease-out both;
}

.jk-survey-card:nth-child(1) { animation-delay: 0.05s; }
.jk-survey-card:nth-child(2) { animation-delay: 0.1s; }
.jk-survey-card:nth-child(3) { animation-delay: 0.15s; }
.jk-survey-card:nth-child(4) { animation-delay: 0.2s; }
.jk-survey-card:nth-child(5) { animation-delay: 0.25s; }
.jk-survey-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .jk-hero {
    min-height: 280px;
    padding-top: 56px;
  }
  .jk-hero-content {
    padding: 2.5rem 1.5rem 2.5rem;
  }
  .jk-hero-logo-wrap {
    width: 100px;
    height: 100px;
  }
  .jk-hero-logo {
    width: 64px;
    height: 64px;
  }
  .jk-hero-title {
    font-size: 1.75rem;
  }
  .jk-hero-subtitle {
    font-size: 0.95rem;
  }
  .jk-survey-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .jk-content-wrapper {
    padding: 0 1rem;
  }
  .jk-footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .jk-footer-copy {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .jk-hero {
    min-height: 240px;
    padding-top: 50px;
  }
  .jk-hero-title {
    font-size: 1.5rem;
  }
  .jk-section-header {
    flex-direction: column;
    gap: 0.25rem;
  }
}

/* ---- Accessibility: Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  .jk-hero-content,
  .jk-survey-card {
    animation: none !important;
  }
  .jk-survey-card:hover {
    transform: none;
  }
  .jk-card-btn:hover svg {
    transform: none;
  }
}

