:root {
  --bg-gradient: radial-gradient(circle at top left, #22c55e, #0f172a);
  --card-bg: rgba(15, 23, 42, 0.95);
  --card-border: rgba(148, 163, 184, 0.45);
  --accent: #22c55e;
  --accent-soft: rgba(34, 197, 94, 0.12);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --danger: #f97316;
}

/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* BODY & LAYOUT */
body.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-gradient);
  color: var(--text-main);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.header,
.main,
.footer {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding-inline: 1.5rem;
}

/* ===== HEADER BLOKS – SĀKUMLAPA ===== */

.header {
  width: 100%;
  max-width: 960px;
  margin: 0.8rem auto 0.8rem auto;  /* bija ~1.8rem */
  padding: 0 1.2rem;
  text-align: center;
}

/* Mazais virsrindas teksts */
.tagline {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #e5e7eb;
  opacity: 0.9;
  margin-bottom: 0.25rem;           /* mazāka atstarpe */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

/* Lielais virsraksts */
.page-title {
  font-family: "Poppins", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);  /* nedaudz mazāks */
  line-height: 1.1;                          /* ciešāks */
  color: #ffffff;
  text-align: center;
  margin: 0 auto 0.25rem auto;              /* mazāka apakšējā mala */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Paskaidrojuma rinda */
.sub {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;                        /* ciešāks teksts */
  color: #f9fafb;
  max-width: 640px;
  margin: 0.25rem auto 0.1rem auto;         /* mazākas malas */
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Mazs pielāgojums mazākiem ekrāniem */
@media (max-width: 640px) {
    .header {
    margin-top: 0.6rem;
    margin-bottom: 0.6rem;
    padding: 0 0.9rem;
  }

  .page-title {
    font-size: clamp(1.5rem, 5.2vw, 2rem);
  }

  .sub {
    font-size: 0.9rem;
  }

  .sub.diag-link {
    font-size: 0.86rem;
  }
}

/* ===== SUBTEKSTS + DIAGNOSTIKAS LINKS ===== */

.sub.diag-link {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.92rem;
  color: #f1f5f9;                    /* ļoti labs kontrasts */
  text-align: center;
  margin: 0.3rem auto 0.4rem auto;
  width: 100%;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* saites iekš .sub.diag-link */
.sub.diag-link {
  font-size: 0.88rem;
  margin: 0.25rem auto 0.1rem auto;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08); /* plānāka, maigāka līnija */
}

.sub.diag-link a {
  color: #bbf7d0 !important;
  text-decoration: none !important;
  font-weight: 600;
  border-bottom: 2px solid rgba(187, 247, 208, 0.9);
  padding-bottom: 1px;
  text-shadow: none !important;
  transition: 0.18s ease;
}

.sub.diag-link a:hover {
  color: #ffffff !important;
  border-color: #ffffff;
}

/* MAIN GRID */
.main {
  flex: 1;
  padding-bottom: 1.5rem;
}

.cards-grid {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

/* Kartītes */
.card {
  background: var(--card-bg);
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  padding: 1.2rem 1rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: inherit;
  min-height: 140px;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.7);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(34, 197, 94, 0.2), transparent 60%);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.9);
  border-color: rgba(34, 197, 94, 0.7);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.97), rgba(15, 23, 42, 0.85));
}

.card:hover::before {
  opacity: 1;
}

.card-title {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.card-tag {
  margin-top: 0.7rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  align-self: flex-start;
}

/* FOOTER */
.footer {
  padding: 0.8rem 1.5rem 1.75rem;
}

.random-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.2rem;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  background: linear-gradient(135deg, #22c55e, #a3e635);
  color: #052e16;
  box-shadow: 0 18px 40px rgba(21, 128, 61, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    filter 0.15s ease;
}

.random-btn .icon {
  font-size: 1.1rem;
}

.random-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 55px rgba(22, 163, 74, 0.9);
  filter: brightness(1.05);
}

.footer-note {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-note strong {
  color: var(--danger);
}

/* Detalizēto lapu stils */
.detail-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
}

.top-bar {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.4);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.home-link-icon {
  font-size: 1.05rem;
}

.home-link:hover {
  background: rgba(15, 23, 42, 1);
  color: #e5e7eb;
  transform: translateY(-1px);
}

.detail-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  padding: 1.4rem 1.3rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
}

.detail-title {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.detail-tagline {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.detail-card p {
  font-size: 0.96rem;
  line-height: 1.6;
  color: #e5e7eb;
  margin-bottom: 0.7rem;
}

.detail-card ul {
  margin-left: 1.1rem;
  margin-bottom: 0.7rem;
}

.detail-card li {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

.detail-footer {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* RESPONSIVE */
@media (max-width: 900px) {
  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .header,
  .main,
  .footer {
    padding-inline: 1rem;
  }

  .cards-grid {
    grid-template-columns: 1fr; /* viena kolonna mobilajā */
  }

  .card {
    min-height: 120px;
  }

  .detail-wrapper {
    padding-inline: 1rem;
  }

  .secret-links {
  margin-top: 1.2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.4;
  transition: opacity 0.25s ease;
}

.secret-links:hover {
  opacity: 0.9;
}

.secret-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0 0.25rem;
  transition: color 0.2s ease;
}

.secret-links a:hover {
  color: var(--accent);
}

.secret-links .dot {
  padding: 0 0.3rem;
  opacity: 0.5;
}

/* Papildu stilistika diagnostikas linkam */
.diag-link {
  margin-top: 0.4rem;
  font-size: 0.9rem;
}

.diag-link a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(34, 197, 94, 0.6);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.diag-link a:hover {
  color: #bbf7d0;
  border-color: #bbf7d0;
}

/* Diagnostikas lapas stili */
.diag-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  padding: 1.4rem 1.3rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
}

.diag-title {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.diag-tagline {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.diag-intro {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e5e7eb;
  margin-bottom: 0.9rem;
}

.diag-question {
  margin-bottom: 1.1rem;
}

.diag-question-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.diag-options {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.diag-option label {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.4rem;
  cursor: pointer;
}

.diag-option input {
  margin-top: 2px;
}

.diag-actions {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.diag-submit-btn {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background: linear-gradient(135deg, #22c55e, #a3e635);
  color: #052e16;
  box-shadow: 0 10px 25px rgba(21, 128, 61, 0.8);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.diag-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(22, 163, 74, 0.9);
  filter: brightness(1.05);
}

.diag-reset-btn {
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.diag-reset-btn:hover {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.8);
}

.diag-result {
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.5);
  font-size: 0.95rem;
  color: #e5e7eb;
}

.diag-result h2 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.diag-result a.topic-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(34, 197, 94, 0.7);
  padding-bottom: 1px;
}

.diag-result a.topic-link:hover {
  color: #bbf7d0;
  border-color: #bbf7d0;
}

.diag-note {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}
}


 .secret-links {
  margin-top: 1.2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.4;
  transition: opacity 0.25s ease;
}

.secret-links:hover {
  opacity: 0.9;
}

.secret-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0 0.25rem;
  transition: color 0.2s ease;
}

.secret-links a:hover {
  color: var(--accent);
}

.secret-links .dot {
  padding: 0 0.3rem;
  opacity: 0.5;
}

/* Papildu stilistika diagnostikas linkam */
.diag-link {
  margin-top: 0.4rem;
  font-size: 0.9rem;
}

.diag-link a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed rgba(34, 197, 94, 0.6);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.diag-link a:hover {
  color: #bbf7d0;
  border-color: #bbf7d0;
}

/* Diagnostikas lapas stili */
.diag-card {
  background: rgba(15, 23, 42, 0.96);
  border-radius: 1rem;
  border: 1px solid var(--card-border);
  padding: 1.4rem 1.3rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.85);
}

.diag-title {
  font-family: "Poppins", system-ui, sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.diag-tagline {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.diag-intro {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #e5e7eb;
  margin-bottom: 0.9rem;
}

.diag-question {
  margin-bottom: 1.1rem;
}

.diag-question-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.diag-options {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.diag-option label {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  gap: 0.4rem;
  cursor: pointer;
}

.diag-option input {
  margin-top: 2px;
}

.diag-actions {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.diag-submit-btn {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  background: linear-gradient(135deg, #22c55e, #a3e635);
  color: #052e16;
  box-shadow: 0 10px 25px rgba(21, 128, 61, 0.8);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.diag-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(22, 163, 74, 0.9);
  filter: brightness(1.05);
}

.diag-reset-btn {
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.diag-reset-btn:hover {
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.8);
}

.diag-result {
  margin-top: 1.2rem;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.5);
  font-size: 0.95rem;
  color: #e5e7eb;
}

.diag-result h2 {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.diag-result a.topic-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(34, 197, 94, 0.7);
  padding-bottom: 1px;
}

.diag-result a.topic-link:hover {
  color: #bbf7d0;
  border-color: #bbf7d0;
}

.diag-note {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}