/* =========================================================
   Projects / Docs UI
   Reusable styles for project pages
   ========================================================= */

/* ---------- Base wrappers ---------- */

.project-hero {
  margin: 2rem 0 3rem;
}

.project-hero--center {
  text-align: center;
}

.project-hero__logo {
  max-width: 100%;
  height: auto;
  width: 260px;
}

.project-section {
  margin: 2rem 0 2.5rem;
}

.project-panel {
  margin: 2rem 0 2.5rem;
  padding: 1.3rem 1.4rem;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #d9e2ec;
}

.project-panel--accent {
  background: #f8fafc;
  border: 1px solid #d9e2ec;
}

.project-panel__footer {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  color: #475569;
  line-height: 1.7;
}

/* ---------- Typography ---------- */

.project-lead {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #0f172a;
}

.project-muted {
  color: #64748b;
  line-height: 1.65;
}

.project-caption {
  margin: 0;
  color: #666;
  font-size: 1.1rem;
}

.project-quote {
  color: #334155;
}

/* ---------- Layout ---------- */

.project-grid {
  display: grid;
  gap: 16px;
  margin-top: 1rem;
}

.project-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-grid--auto {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* ---------- Cards ---------- */

.project-card {
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.project-card__title {
  margin: 0 0 0.65rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
}

.project-card__text {
  margin: 0;
  color: #475569;
  line-height: 1.6;
  font-size: 0.95rem;
}

.project-card__actions {
  margin-top: 1rem;
}

.project-card__media {
  margin-bottom: 0.8rem;
}

.project-card__media img {
  display: block;
  max-width: 72px;
  height: auto;
}

/* ---------- Badges ---------- */

.project-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.project-badge--done {
  background: #dcfce7;
  color: #166534;
}

.project-badge--progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.project-badge--planned {
  background: #fef3c7;
  color: #92400e;
}

.project-badge--note {
  background: #e2e8f0;
  color: #334155;
}

/* ---------- Buttons ---------- */

.project-btn {
  display: inline-block;
  padding: 0.68rem 0.95rem;
  border-radius: 11px;
  text-decoration: none;
  font-weight: 700;
  transition: 0.18s ease;
}

.project-btn--primary {
  background: #e8f0fe;
  color: #1d4ed8;
  border: 1px solid #c7d7fe;
}

.project-btn--primary:hover {
  background: #dbeafe;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.project-btn--secondary {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #dbe4ee;
}

.project-btn--secondary:hover {
  background: #f8fafc;
}

.project-btn--done {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  cursor: default;
  pointer-events: none;
}

/* ---------- Notes / callouts ---------- */

.project-note {
  margin: 0 0 1.4rem;
  padding: 1.15rem 1.3rem;
  border-radius: 16px;
  border: 1px solid #d9e2ec;
  color: #334155;
}

.project-note--info {
  border-left: 4px solid #2563eb;
  background: #f3f7ff;
}

.project-note--success {
  border-left: 4px solid #16a34a;
  background: #f0fdf4;
}

.project-note--warning {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

/* ---------- Progress ---------- */

.project-progress {
  margin: 1.4rem 0 1rem;
}

.project-progress__title {
  font-size: 1.08rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: #0f172a;
}

.project-progress__subtitle {
  color: #475569;
  line-height: 1.6;
}

.project-progress__bar {
  width: 100%;
  height: 18px;
  background: #dbe7f3;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.9rem;
  border: 1px solid #c8d7e8;
}

.project-progress__fill {
  height: 100%;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  border-radius: 999px;
}

.project-progress__meta {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #475569;
  font-weight: 600;
}

/* ---------- Summary ---------- */

.project-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 1rem;
}

.project-summary__item {
  padding: 0.95rem 1rem;
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
}

.project-summary__label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
  color: #0f172a;
}

.project-summary__text {
  color: #475569;
  line-height: 1.55;
}

/* ---------- Support / contact ---------- */

.project-support-box {
  margin: 1.4rem 0 0;
  padding: 1.15rem 1.3rem;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #d9e2ec;
  color: #334155;
}

.project-support-box a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.project-support-box a:hover {
  text-decoration: underline;
}

/* ---------- Figures ---------- */

.project-figure {
  margin: 2rem 0;
  text-align: center;
}

.project-figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  margin: 0 auto;
}

.project-figure__caption {
  margin-top: 0.6rem;
  color: #64748b;
  font-size: 0.9rem;
}

/* ---------- Architecture ---------- */

.project-flow {
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid #dbe4ee;
}

.project-flow__title {
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.8rem;
}

.project-flow__line {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  line-height: 1.7;
}

.project-node {
  display: inline-block;
  padding: 0.5rem 0.8rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.93rem;
}

.project-node--hardware {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

.project-node--software {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #0f766e;
}

.project-node--data {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.project-arrow {
  color: #64748b;
  font-weight: 700;
}

.project-arch-note {
  margin-top: 1rem;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ---------- Utilities ---------- */

.u-center {
  text-align: center;
}

.u-mt-0 {
  margin-top: 0;
}

.u-mt-1 {
  margin-top: 0.5rem;
}

.u-mt-2 {
  margin-top: 1rem;
}

.u-mb-0 {
  margin-bottom: 0;
}

.u-mb-1 {
  margin-bottom: 0.5rem;
}

.u-mb-2 {
  margin-bottom: 1rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 768px) {
  .project-grid--2,
  .project-grid--3 {
    grid-template-columns: 1fr;
  }

  .project-hero__logo {
    width: 260px;
  }

  .project-panel,
  .project-note,
  .project-support-box {
    padding: 1rem;
  }

  .project-card {
    padding: 14px;
  }
}

/* ---------- Map KTRO ---------- */
.project-map {
  margin-top: 1rem;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

/* ---------- Hero KTRO ---------- */
.project-hero--split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  margin: 1.5rem 0 2rem;
}

.project-hero__text {
  min-width: 0;
}

.project-hero__image {
  text-align: center;
}

.project-hero__image img {
  width: 100%;
  max-width: 360px;
  max-height: 520px;
  object-fit: contain;
}

@media (max-width: 768px) {
  .project-hero--split {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .project-hero__image img {
    max-width: 300px;
  }
}


