/* ============================================================
   KSP Cross Sectoral Solutions — List & Detail Styles
   ============================================================ */

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

/* ---- Page Header ---- */
.cs-page-header {
  background: linear-gradient(135deg, #0f2744 0%, #1a4080 50%, #0d5c8f 100%);
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.cs-page-header::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.cs-page-header::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: 10%;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.cs-page-header h1 {
  font-family: 'Inter', sans-serif;
  font-size: 2.2rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 0.6rem;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

.cs-page-header .cs-subtitle {
  font-family: 'Inter', sans-serif;
  color: rgba(255,255,255,0.72);
  font-size: 1.05rem;
  font-weight: 400;
  margin: 0;
  position: relative;
  z-index: 1;
}

.cs-stats-badge {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-block;
  margin-top: 1rem;
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 1;
}

/* ---- Filters / Search Bar ---- */
.cs-filter-bar {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 14px;
  padding: 1.2rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.cs-filter-bar .cs-search-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.cs-filter-bar .cs-search-wrap::before {
  content: '🔍';
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.9rem;
  pointer-events: none;
}

.cs-filter-bar input[type="text"] {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  border: 1.5px solid #dde3ea;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  color: #2d3748;
  background: #f8fafc;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.cs-filter-bar input[type="text"]:focus {
  outline: none;
  border-color: #1a4080;
  box-shadow: 0 0 0 3px rgba(26,64,128,0.12);
  background: #fff;
}

.cs-filter-bar select {
  padding: 0.65rem 2rem 0.65rem 1rem;
  border: 1.5px solid #dde3ea;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  color: #2d3748;
  background: #f8fafc url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") no-repeat right 0.7rem center / 12px;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.cs-filter-bar select:focus {
  outline: none;
  border-color: #1a4080;
  box-shadow: 0 0 0 3px rgba(26,64,128,0.12);
}

.cs-filter-btn {
  background: linear-gradient(135deg, #1a4080, #0d5c8f);
  color: #fff;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  white-space: nowrap;
}

.cs-filter-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* ---- Solution Cards Grid ---- */
.cs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.cs-card {
  background: #fff;
  border: 1px solid #e8edf2;
  border-radius: 16px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}

.cs-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1a4080, #0d8fc4);
  border-radius: 16px 16px 0 0;
}

.cs-card:hover {
  box-shadow: 0 8px 32px rgba(26,64,128,0.12);
  transform: translateY(-3px);
  border-color: #c5d5e8;
}

.cs-card-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #1a4080;
  background: #eef3fb;
  border-radius: 50px;
  padding: 0.25rem 0.75rem;
  display: inline-block;
  margin-bottom: 0.75rem;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cs-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1a2744;
  margin: 0 0 0.4rem;
  line-height: 1.4;
}

.cs-card-company {
  font-size: 0.88rem;
  color: #0d5c8f;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.cs-card-company::before {
  content: '🏢';
  font-size: 0.85rem;
}

.cs-card-desc {
  font-size: 0.88rem;
  color: #4a5568;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1rem;
}

.cs-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.cs-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #64748b;
}

.cs-scope-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cs-scope-badge.national {
  background: #e8f5e9;
  color: #2e7d32;
}

.cs-scope-badge.international {
  background: #e3f2fd;
  color: #1565c0;
}

.cs-scope-badge.both {
  background: #f3e5f5;
  color: #7b1fa2;
}

.cs-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cs-btn-viewmore {
  background: linear-gradient(135deg, #1a4080, #0d5c8f);
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.cs-btn-viewmore:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff !important;
}

.cs-btn-website {
  color: #0d5c8f;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
  word-break: break-all;
}

.cs-btn-website:hover {
  color: #1a4080;
  text-decoration: underline;
}

/* ---- No results ---- */
.cs-no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: #718096;
  font-size: 1.1rem;
}

.cs-no-results .emoji {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
}

/* ---- Pager ---- */
.cs-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.cs-pager a,
.cs-pager span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  text-decoration: none;
  transition: all 0.15s;
}

.cs-pager a {
  color: #1a4080;
  border: 1.5px solid #c5d5e8;
  background: #fff;
}

.cs-pager a:hover {
  background: #1a4080;
  color: #fff;
  border-color: #1a4080;
}

.cs-pager .current {
  background: linear-gradient(135deg, #1a4080, #0d5c8f);
  color: #fff;
  border: none;
}

.cs-pager-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #94a3b8;
  font-size: 1rem;
  letter-spacing: 1px;
}

/* ---- Detail Page ---- */
.cs-detail-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

.cs-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #1a4080;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: gap 0.2s;
}

.cs-detail-back:hover {
  gap: 0.75rem;
  text-decoration: none;
  color: #0d5c8f;
}

.cs-detail-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
}

.cs-detail-hero {
  background: linear-gradient(135deg, #0f2744 0%, #1a4080 50%, #0d5c8f 100%);
  padding: 2.5rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.cs-detail-hero::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -40px;
  width: 200px;
  height: 200px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.cs-detail-hero .category-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.6rem;
}

.cs-detail-hero h1 {
  font-family: 'Inter', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  line-height: 1.35;
  position: relative;
  z-index: 1;
}

.cs-detail-hero .company-label {
  font-size: 1rem;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.cs-detail-body {
  padding: 2.5rem;
}

.cs-detail-section {
  margin-bottom: 2rem;
}

.cs-detail-section h3 {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #94a3b8;
  margin: 0 0 0.8rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #f1f5f9;
}

.cs-detail-desc {
  font-size: 0.97rem;
  color: #374151;
  line-height: 1.75;
}

.cs-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.cs-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid #e8edf2;
}

.cs-contact-item .icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}

.cs-contact-item .info {
  font-size: 0.87rem;
  color: #2d3748;
}

.cs-contact-item .info .label {
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  display: block;
  margin-bottom: 0.15rem;
}

.cs-contact-item .info a {
  color: #0d5c8f;
  word-break: break-all;
  text-decoration: none;
  font-weight: 500;
}

.cs-contact-item .info a:hover {
  text-decoration: underline;
}

/* ---- Scope badges ---- */
.cs-detail-scope {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .cs-grid {
    grid-template-columns: 1fr;
  }

  .cs-page-header h1 {
    font-size: 1.6rem;
  }

  .cs-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .cs-filter-bar .cs-search-wrap {
    min-width: unset;
  }

  .cs-detail-hero h1 {
    font-size: 1.4rem;
  }

  .cs-detail-body {
    padding: 1.5rem;
  }

  .cs-contact-grid {
    grid-template-columns: 1fr;
  }
}
