/* =====================================================================
   EnergoBazar.cz — sekce Rádce a Slovníček
   (radce.php, radce-detail.php, slovnicek.php)
   Samostatný stylopis, aby se nezasahovalo do sdíleného style.css.
   Navazuje na proměnné --eb-* definované ve style.css.
   ===================================================================== */

/* ---------- Kicker nad nadpisem v hero ---------- */
.eb-rad-kicker {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: var(--eb-sun-light);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* ---------- Štítky clusterů ---------- */
.eb-rad-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
}
.eb-rad-tag-fotovoltaika     { background: #fff3d6; color: #a15c00; }
.eb-rad-tag-tepelna-cerpadla { background: #ffe9e0; color: #a63a12; }
.eb-rad-tag-klimatizace      { background: #e0f4fb; color: #0b6a8a; }
.eb-rad-tag-wallboxy         { background: #e8edff; color: #3546b4; }
.eb-rad-tag-pouzita-technika { background: #e4f6ec; color: #157347; }
.eb-rad-tag-ekonomika        { background: #f3e8ff; color: #6b21a8; }
.eb-rad-tag-legislativa      { background: #f1f2f4; color: #4b5563; }

/* ---------- Úroveň obtížnosti ---------- */
.eb-rad-level {
  display: inline-flex;
  align-items: center;
  font-size: 0.66rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 0.4rem;
  background: #f1f4f3;
  color: var(--eb-brand-dark);
  border: 1px solid #e2e8e7;
  white-space: nowrap;
}
.eb-rad-level-zacatecnik { background: #edf7f1; border-color: #d3e8dc; color: #14372f; }
.eb-rad-level-pokrocily  { background: #f4f1ea; border-color: #e4dccb; color: #6b5320; }

/* ---------- Filtrační pilulky ---------- */
.eb-rad-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: #fff;
  border: 1px solid #e2e8e7;
  color: #4b5563;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.eb-rad-pill:hover { border-color: var(--eb-sun); color: var(--eb-sun-dark); }
.eb-rad-pill.active {
  background: var(--eb-brand);
  border-color: var(--eb-brand);
  color: #fff;
}
.eb-rad-pill .eb-rad-pill-count { font-size: 0.68rem; font-weight: 700; opacity: 0.75; }

/* ---------- Výběr řazení ---------- */
.eb-rad-select {
  font-size: 0.82rem;
  font-weight: 600;
  color: #4b5563;
  background: #fff;
  border: 1px solid #e2e8e7;
  border-radius: 0.65rem;
  padding: 0.42rem 0.7rem;
}
.eb-rad-select:focus { outline: 2px solid var(--eb-sun); outline-offset: 1px; }

/* ---------- Karta článku ---------- */
.eb-rad-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.15rem;
  height: 100%;
}
.eb-rad-card h3 { line-height: 1.3; }
.eb-rad-card-meta {
  margin-top: auto;
  padding-top: 0.6rem;
  border-top: 1px solid #eef2f1;
  font-size: 0.7rem;
  color: #94a3a1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

/* ---------- Blok „Začínáte? Přečtěte si nejdřív tyto tři“ ---------- */
.eb-rad-start {
  background: linear-gradient(160deg, #f7fbfa 0%, #eef5f3 100%);
  border: 1px solid #dcebe6;
  border-radius: 1.1rem;
  padding: 1.35rem;
}
.eb-rad-start-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 1.1rem 1.1rem 1.1rem 1.1rem;
  height: 100%;
  background: #fff;
}
.eb-rad-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--eb-sun);
  color: #1a1300;
  font-size: 0.78rem;
  font-weight: 800;
}
.eb-rad-time {
  margin-top: auto;
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3a1;
}

/* ---------- Prázdný stav (chybí migrace) ---------- */
.eb-rad-empty-icon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.1rem;
  background: #f1f4f3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* ---------- Perex a upozornění na vysvětlivky ---------- */
.eb-rad-perex {
  font-size: 1.02rem;
  color: #4b5563;
  line-height: 1.7;
  border-left: 4px solid var(--eb-sun);
  padding-left: 1rem;
  margin-bottom: 1.25rem;
}
.eb-rad-perex strong { color: var(--eb-brand-dark); }

.eb-rad-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: #f7fbfa;
  border: 1px dashed #cfe0da;
  border-radius: 0.8rem;
  padding: 0.7rem 0.9rem;
  margin-bottom: 1.75rem;
  font-size: 0.8rem;
  line-height: 1.55;
  color: #4b5f5b;
}
.eb-rad-hint a { color: var(--eb-brand); font-weight: 700; text-decoration: underline; }

/* ---------- Typografie těla článku ---------- */
.eb-rad-body { font-size: 0.94rem; line-height: 1.75; color: #3f4a49; }
.eb-rad-body > *:first-child { margin-top: 0; }
.eb-rad-body h2 {
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--eb-brand-dark);
  margin: 2rem 0 0.75rem;
  padding-left: 0.7rem;
  border-left: 4px solid var(--eb-sun);
  line-height: 1.3;
}
.eb-rad-body h3 {
  font-size: 1.03rem;
  font-weight: 700;
  color: var(--eb-brand);
  margin: 1.4rem 0 0.5rem;
  line-height: 1.35;
}
.eb-rad-body p { margin: 0 0 0.95rem; }
.eb-rad-body a { color: var(--eb-brand); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.eb-rad-body a:hover { color: var(--eb-sun-dark); }
.eb-rad-body strong { color: var(--eb-brand-dark); font-weight: 700; }
.eb-rad-body ul, .eb-rad-body ol { margin: 0 0 1.05rem; padding-left: 1.35rem; }
.eb-rad-body ul { list-style: disc; }
.eb-rad-body ol { list-style: decimal; }
.eb-rad-body li { margin-bottom: 0.4rem; }
.eb-rad-body li::marker { color: var(--eb-sun-dark); font-weight: 700; }

.eb-rad-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2rem;
  font-size: 0.86rem;
  background: #fff;
  border: 1px solid #e5e9e8;
  border-radius: 0.6rem;
  overflow: hidden;
}
.eb-rad-body thead th {
  background: #f1f4f3;
  color: var(--eb-brand-dark);
  font-weight: 700;
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid #e5e9e8;
}
.eb-rad-body td {
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid #f0f3f2;
  vertical-align: top;
}
.eb-rad-body tbody tr:last-child td { border-bottom: 0; }
.eb-rad-body tbody tr:nth-child(even) { background: #fafbfb; }

@media (max-width: 640px) {
  .eb-rad-body table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* Redakční bloky uvnitř článku */
.eb-rad-body .eb-rad-note {
  background: #fff8ec;
  border: 1px solid #f6e2bd;
  border-left: 4px solid var(--eb-sun);
  border-radius: 0.6rem;
  padding: 0.85rem 1rem;
  margin: 0 0 1.2rem;
  font-size: 0.86rem;
  color: #6b5320;
}
.eb-rad-body .eb-rad-note strong { color: #6b5320; }

.eb-rad-body .eb-rad-tip {
  background: #f0f7f4;
  border: 1px solid #d5e8de;
  border-left: 4px solid var(--eb-brand-light);
  border-radius: 0.6rem;
  padding: 0.85rem 1rem;
  margin: 0 0 1.2rem;
  font-size: 0.86rem;
  color: #23514a;
}
.eb-rad-body .eb-rad-tip strong { color: #14372f; }

/* Shrnutí v odrážkách na konci článku */
.eb-rad-body .eb-rad-summary {
  background: #f7fbfa;
  border: 1px solid #dcebe6;
  border-radius: 0.9rem;
  padding: 1rem 1.15rem 0.5rem;
  margin: 1.5rem 0 1.2rem;
}
.eb-rad-body .eb-rad-summary p { font-weight: 800; color: var(--eb-brand-dark); margin-bottom: 0.6rem; }
.eb-rad-body .eb-rad-summary ul { margin-bottom: 0.75rem; }

/* ---------- Vysvětlivky pojmů (glossary_annotate) ---------- */
abbr.eb-term {
  text-decoration: none;
  border-bottom: 1px dotted var(--eb-sun-dark);
  cursor: help;
}
abbr.eb-term > a {
  color: inherit;
  font-weight: inherit;
  text-decoration: none;
  border-bottom: 0;
}
abbr.eb-term:hover { background: #fff6e3; }
abbr.eb-term:hover > a { color: var(--eb-sun-dark); }

/* ---------- Obsah článku (kotvy) ---------- */
.eb-rad-toc a {
  display: block;
  font-size: 0.82rem;
  color: #4b5563;
  padding: 0.28rem 0;
  border-left: 2px solid #e5e9e8;
  padding-left: 0.7rem;
}
.eb-rad-toc a:hover { color: var(--eb-brand); border-left-color: var(--eb-sun); }

/* ---------- Interní odkazy „Kam pokračovat“ ---------- */
.eb-rad-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--eb-brand);
  border-bottom: 1px solid #f0f3f2;
}
.eb-rad-links a:last-child { border-bottom: 0; }
.eb-rad-links a:hover { color: var(--eb-sun-dark); }

/* ---------- CTA boxy ---------- */
.eb-rad-cta {
  border-radius: 1rem;
  padding: 1.25rem;
  color: #fff;
  background: linear-gradient(160deg, var(--eb-brand-dark) 0%, var(--eb-brand) 65%, var(--eb-brand-light) 100%);
}
.eb-rad-cta h3 { font-weight: 800; margin-bottom: 0.3rem; }
.eb-rad-cta p { font-size: 0.82rem; color: #cbd5d4; margin-bottom: 0.85rem; line-height: 1.55; }

/* ---------- Seznam nástrojů v bočním panelu ---------- */
.eb-rad-tools a {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f3f2;
}
.eb-rad-tools a:last-child { border-bottom: 0; }
.eb-rad-tool-icon { font-size: 1rem; line-height: 1.4; }
.eb-rad-tool-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--eb-brand-dark);
}
.eb-rad-tools a:hover .eb-rad-tool-name { color: var(--eb-sun-dark); }
.eb-rad-tool-desc { display: block; font-size: 0.72rem; color: #94a3a1; line-height: 1.4; }

/* ---------- CTA pruh do bazaru ---------- */
.eb-rad-bazar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 1.1rem;
  padding: 1.35rem 1.5rem;
  color: #fff;
  background: linear-gradient(120deg, var(--eb-brand-dark) 0%, var(--eb-brand) 60%, var(--eb-brand-light) 100%);
}
.eb-rad-bazar h2 { font-size: 1.1rem; font-weight: 800; margin-bottom: 0.3rem; }
.eb-rad-bazar p { font-size: 0.85rem; color: #cbd5d4; line-height: 1.55; max-width: 34rem; }
.eb-rad-bazar-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- Disclaimer ---------- */
.eb-rad-disclaimer {
  background: #f8fafa;
  border: 1px dashed #cfd9d7;
  border-radius: 0.9rem;
  padding: 1rem 1.15rem;
  font-size: 0.8rem;
  line-height: 1.6;
  color: #64748b;
}
.eb-rad-disclaimer strong { color: var(--eb-brand-dark); }

/* =====================================================================
   Slovníček pojmů
   ===================================================================== */

.eb-rad-alphabet {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.eb-rad-alphabet a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: #fff;
  border: 1px solid #e2e8e7;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--eb-brand);
}
.eb-rad-alphabet a:hover { background: var(--eb-brand); border-color: var(--eb-brand); color: #fff; }

.eb-rad-letter {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--eb-sun-dark);
  border-bottom: 2px solid #eef2f1;
  padding-bottom: 0.3rem;
  margin-bottom: 0.85rem;
}

.eb-rad-term { padding: 1.1rem 1.25rem; }
.eb-rad-term-anchor {
  font-size: 0.8rem;
  color: #cbd5d4;
  font-weight: 700;
  margin-left: 0.25rem;
}
.eb-rad-term:hover .eb-rad-term-anchor { color: var(--eb-sun); }
.eb-rad-term-cat {
  font-size: 0.66rem;
  font-weight: 700;
  color: #94a3a1;
  white-space: nowrap;
}
.eb-rad-term-alias {
  font-size: 0.72rem;
  color: #94a3a1;
  font-style: italic;
  margin-bottom: 0.4rem;
}
.eb-rad-term-def {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #3f4a49;
  margin-bottom: 0.55rem;
}
.eb-rad-term-why {
  font-size: 0.82rem;
  line-height: 1.6;
  color: #6b5320;
  background: #fff8ec;
  border-left: 3px solid var(--eb-sun);
  border-radius: 0.4rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.55rem;
}
.eb-rad-term-why strong { color: #6b5320; }
.eb-rad-term-link {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--eb-brand);
}
.eb-rad-term-link:hover { color: var(--eb-sun-dark); }

/* Zvýraznění pojmu, na který se přišlo z vysvětlivky v článku */
.eb-rad-term:target {
  border-color: var(--eb-sun);
  box-shadow: 0 0 0 3px rgba(247, 166, 0, 0.18);
}
