/* =========================================================================
   EnergoBazar.cz — doplňkové styly
   (Tailwind CSS přes CDN dělá 95 % práce; zde jen brand detaily,
   které se v utility třídách dělají hůř — placeholdery fotek, scrollbar,
   animace, stepper, tooltip apod.)
   ========================================================================= */

:root {
  --eb-brand-dark: #082526;
  --eb-brand: #0d3b3e;
  --eb-brand-light: #145c56;
  --eb-sun: #f7a600;
  --eb-sun-light: #ffc94d;
  --eb-sun-dark: #c97e00;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #1b2b2b;
}

/* ---------- Skrytí scrollbaru u horizontálních karuselů ---------- */
.eb-scroll-x {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding-bottom: 0.5rem;
}
.eb-scroll-x::-webkit-scrollbar { display: none; }
.eb-scroll-x > * { scroll-snap-align: start; flex-shrink: 0; }

/* ---------- Placeholder "fotka" produktu (žádné externí obrázky) ---------- */
.eb-photo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--eb-brand) 0%, var(--eb-brand-light) 100%);
  color: #fff;
}
.eb-photo svg { width: 42%; height: 42%; opacity: 0.9; }
.eb-photo.tone-sun { background: linear-gradient(135deg, var(--eb-sun-dark) 0%, var(--eb-sun) 100%); }
.eb-photo.tone-teal { background: linear-gradient(135deg, #0b4a4d 0%, #1c8077 100%); }
.eb-photo.tone-leaf { background: linear-gradient(135deg, #1e5631 0%, #3f8f5b 100%); }
.eb-photo.tone-flame { background: linear-gradient(135deg, #7a2e12 0%, #d9601f 100%); }
.eb-photo.tone-sky { background: linear-gradient(135deg, #0d3d5c 0%, #2b8fb8 100%); }
.eb-photo-count {
  position: absolute;
  bottom: 0.4rem;
  right: 0.5rem;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.65rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* ---------- Karty ---------- */
.eb-card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e7ecec;
  box-shadow: 0 1px 2px rgba(8, 37, 38, 0.04);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.eb-card:hover {
  box-shadow: 0 12px 28px -8px rgba(8, 37, 38, 0.22);
  transform: translateY(-3px);
  border-color: #d5e2e1;
}

/* ---------- Badge ---------- */
.eb-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  line-height: 1.4;
  white-space: nowrap;
}
.eb-badge-verified { background: #e4f6ec; color: #157347; }
.eb-badge-firm { background: #e8edff; color: #3546b4; }
.eb-badge-private { background: #f1f2f4; color: #4b5563; }
.eb-badge-top { background: linear-gradient(90deg, var(--eb-sun) 0%, var(--eb-sun-dark) 100%); color: #fff; }
.eb-badge-new { background: #0d3b3e; color: #fff; }
.eb-badge-condition-new { background: #e4f6ec; color: #157347; }
.eb-badge-condition-used-good { background: #e7f0ff; color: #1d4ed8; }
.eb-badge-condition-used { background: #fff3e0; color: #b45309; }
.eb-badge-condition-parts { background: #fde8e8; color: #b42318; }
.eb-badge-wholesale { background: var(--eb-brand-dark); color: #fff; }

/* ---------- Tlačítka ---------- */
.eb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-weight: 600;
  border-radius: 0.7rem;
  padding: 0.65rem 1.25rem;
  transition: all .15s ease;
  white-space: nowrap;
  cursor: pointer;
}
.eb-btn-primary { background: var(--eb-sun); color: #1a1300; }
.eb-btn-primary:hover { background: var(--eb-sun-dark); }
.eb-btn-outline { background: transparent; border: 1.5px solid var(--eb-brand); color: var(--eb-brand); }
.eb-btn-outline:hover { background: var(--eb-brand); color: #fff; }
.eb-btn-dark { background: var(--eb-brand); color: #fff; }
.eb-btn-dark:hover { background: var(--eb-brand-dark); }
.eb-btn-ghost { background: #f1f4f3; color: var(--eb-brand-dark); }
.eb-btn-ghost:hover { background: #e2e8e7; }

/* ---------- Stepper (vložení inzerátu) ---------- */
.eb-stepper { display: flex; align-items: center; width: 100%; }
.eb-step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.eb-step-circle {
  width: 2.1rem; height: 2.1rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
  background: #e5e9e8; color: #6b7573; border: 2px solid #e5e9e8;
  transition: all .2s ease;
}
.eb-step.active .eb-step-circle { background: var(--eb-sun); border-color: var(--eb-sun); color: #1a1300; }
.eb-step.done .eb-step-circle { background: var(--eb-brand); border-color: var(--eb-brand); color: #fff; }
.eb-step-label { font-size: 0.72rem; margin-top: 0.4rem; color: #6b7573; text-align: center; }
.eb-step.active .eb-step-label, .eb-step.done .eb-step-label { color: var(--eb-brand-dark); font-weight: 600; }
.eb-step-line { position: absolute; top: 1.05rem; left: -50%; width: 100%; height: 2px; background: #e5e9e8; z-index: -1; }
.eb-step:first-child .eb-step-line { display: none; }
.eb-step.done .eb-step-line, .eb-step.active .eb-step-line { background: var(--eb-brand); }

/* ---------- Range slider vzhled ---------- */
input[type="range"] { accent-color: var(--eb-brand); }

/* ---------- Tooltip ---------- */
.eb-tooltip { position: relative; }
.eb-tooltip .eb-tooltip-bubble {
  position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%);
  background: #082526; color: #fff; font-size: 0.72rem; padding: 0.5rem 0.7rem;
  border-radius: 0.5rem; width: 15rem; opacity: 0; pointer-events: none;
  transition: opacity .15s ease; z-index: 40; box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.eb-tooltip:hover .eb-tooltip-bubble, .eb-tooltip:focus-within .eb-tooltip-bubble { opacity: 1; }
.eb-tooltip .eb-tooltip-bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: #082526;
}

/* ---------- Drag & drop zóna ---------- */
.eb-dropzone {
  border: 2px dashed #c7d2d1;
  border-radius: 1rem;
  transition: border-color .15s ease, background .15s ease;
}
.eb-dropzone.dragover { border-color: var(--eb-sun); background: #fff8ec; }

/* ---------- Checkbox / radio úprava ---------- */
.eb-check {
  width: 1.05rem; height: 1.05rem; accent-color: var(--eb-brand); cursor: pointer;
}

/* ---------- Skeleton / empty ---------- */
.eb-empty-illustration {
  width: 5.5rem; height: 5.5rem; margin: 0 auto;
  border-radius: 50%;
  background: #eef4f3;
  display: flex; align-items: center; justify-content: center;
  color: var(--eb-brand);
}

/* ---------- Modal ---------- */
.eb-modal-backdrop {
  position: fixed; inset: 0; background: rgba(8,37,38,0.55);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; z-index: 100;
}
.eb-modal-panel {
  background: #fff; border-radius: 1.1rem; max-width: 34rem; width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

/* ---------- Sticky mobilní spodní lišta ---------- */
.eb-mobile-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: #fff; border-top: 1px solid #e7ecec;
  box-shadow: 0 -6px 20px rgba(0,0,0,0.08);
}

/* =========================================================================
   ROZCESTNÍK PODLE ZÁMĚRU (homepage, hned pod herem)
   Uživatelský test: návštěvník nesmí muset scrollovat celou stránku,
   aby zjistil, kam jít první. Karty jsou proto velké a klikatelné celé.
   ========================================================================= */
.eb-path-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: #fff;
  border: 1px solid #e7ecec;
  border-radius: 1rem;
  padding: 1.25rem 1.25rem 1.1rem;
  box-shadow: 0 10px 24px -14px rgba(8, 37, 38, 0.35);
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.eb-path-card:hover {
  box-shadow: 0 18px 34px -12px rgba(8, 37, 38, 0.28);
  transform: translateY(-3px);
  border-color: var(--eb-sun);
}
.eb-path-icon {
  font-size: 1.75rem;
  line-height: 1;
  margin-bottom: 0.15rem;
}
.eb-path-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--eb-brand-dark);
}
.eb-path-text {
  font-size: 0.8rem;
  color: #5a6a69;
  line-height: 1.45;
}
.eb-path-cta {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--eb-brand);
}
.eb-path-card:hover .eb-path-cta { color: var(--eb-sun-dark); }

/* ---------- Dlaždice nástrojů uvnitř tmavého pásu ---------- */
.eb-tool-tile {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  padding: 1rem;
  transition: background .15s ease, border-color .15s ease;
}
.eb-tool-tile:hover { background: rgba(255, 255, 255, 0.16); border-color: var(--eb-sun); }
.eb-tool-text { font-size: 0.75rem; color: #cbd5d4; line-height: 1.45; }

/* =========================================================================
   REGISTRACE A PŘIHLÁŠENÍ — inline nápověda k heslu
   ========================================================================= */
.eb-pass-wrap { position: relative; }
.eb-pass-toggle {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  transform: translateY(-50%);
  background: none;
  border: 0;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0.2rem;
  color: #7a8887;
}
.eb-pass-toggle:hover { color: var(--eb-brand); }
.eb-pass-meter {
  height: 5px;
  border-radius: 999px;
  background: #e7ecec;
  overflow: hidden;
  margin-top: 0.4rem;
}
.eb-pass-meter > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: #dc2626;
  transition: width .2s ease, background .2s ease;
}
.eb-pass-meter.lvl-1 > span { width: 25%;  background: #dc2626; }
.eb-pass-meter.lvl-2 > span { width: 50%;  background: #f59e0b; }
.eb-pass-meter.lvl-3 > span { width: 75%;  background: #65a30d; }
.eb-pass-meter.lvl-4 > span { width: 100%; background: #157347; }
.eb-hint { font-size: 0.72rem; line-height: 1.4; margin-top: 0.3rem; color: #6b7573; }
.eb-hint.ok  { color: #157347; font-weight: 600; }
.eb-hint.bad { color: #b42318; font-weight: 600; }

/* ---------- Utility ---------- */
.eb-line-clamp-1 {
  display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.eb-line-clamp-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.eb-line-clamp-3 {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- Aktivní nav link ---------- */
.eb-nav-link { position: relative; }
.eb-nav-link.active { color: var(--eb-sun-dark); font-weight: 700; }

/* ---------- Hero gradient ---------- */
.eb-hero {
  background: radial-gradient(circle at 15% 20%, rgba(247,166,0,0.18), transparent 45%),
              radial-gradient(circle at 85% 0%, rgba(20,92,86,0.5), transparent 55%),
              linear-gradient(160deg, var(--eb-brand-dark) 0%, var(--eb-brand) 60%, var(--eb-brand-light) 100%);
}

/* ---------- Schematická SVG mapa krajů ČR (firmy.html) ---------- */
.eb-map-kraj { cursor: pointer; transition: fill .15s ease, stroke .15s ease; }
.eb-map-kraj rect, .eb-map-kraj polygon { fill: #d9e6e4; stroke: #ffffff; stroke-width: 2; transition: fill .15s ease; }
.eb-map-kraj text { font-size: 10px; font-weight: 600; fill: #0d3b3e; pointer-events: none; }
.eb-map-kraj:hover rect, .eb-map-kraj:hover polygon { fill: #ffc94d; }
.eb-map-kraj.active rect, .eb-map-kraj.active polygon { fill: var(--eb-sun); }
.eb-map-kraj.active text { fill: #1a1300; }

/* ---------- Sloupcový graf kalkulaček (CSS bar chart) ---------- */
.eb-bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 9rem; }
.eb-bar { flex: 1; min-width: 4px; border-radius: 3px 3px 0 0; background: #cfe0de; position: relative; transition: height .3s ease, background .2s ease; }
.eb-bar.paid { background: linear-gradient(180deg, var(--eb-sun) 0%, var(--eb-sun-dark) 100%); }
.eb-bar:hover::after {
  content: attr(data-tip);
  position: absolute; bottom: 105%; left: 50%; transform: translateX(-50%);
  background: #082526; color: #fff; font-size: 0.62rem; white-space: nowrap;
  padding: 0.2rem 0.45rem; border-radius: 0.35rem; z-index: 10;
}

/* =========================================================================
   ILUSTRACE (inc/illustrations.php) a dekorativní pozadí sekcí
   Web nepoužívá žádné rastrové fotografie — veškerá grafika je inline SVG.
   ========================================================================= */

/* ---------- Placeholder inzerátu s generovanou ilustrací ----------
   .eb-photo omezuje vložené <svg> na 42 % plochy (to platí pro ikonky);
   u ilustrací chceme naopak vyplnit celý rámeček. */
.eb-photo-illu { background: none; }
.eb-photo-illu > svg {
  width: 100%;
  height: 100%;
  opacity: 1;
  display: block;
  object-fit: cover;
}

/* ---------- Hero ilustrace ---------- */
.eb-hero-art svg { width: 100%; height: auto; display: block; }
.eb-hero-art {
  animation: eb-float 9s ease-in-out infinite;
}
@keyframes eb-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@media (prefers-reduced-motion: reduce) {
  .eb-hero-art { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Banner sekce (dotace, fórum, firmy, kalkulačky, poptávky) ---------- */
.eb-banner { overflow: hidden; line-height: 0; }
.eb-banner > svg { width: 100%; height: 100%; display: block; object-fit: cover; }

/* Banner "na spad" jako dekorace uvnitř barevného pásu (pod obsahem) */
.eb-banner-bleed {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
  line-height: 0;
}
.eb-banner-bleed > svg { width: 100%; height: 100%; display: block; object-fit: cover; }

/* ---------- Jemná dekorativní pozadí sekcí ---------- */

/* Světlý pás s petrolejovo-oranžovým nádechem (hlavičky podstránek) */
.eb-section-band {
  background:
    radial-gradient(circle at 12% 15%, rgba(247, 166, 0, 0.10), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(20, 92, 86, 0.12), transparent 48%),
    linear-gradient(180deg, #f2f8f7 0%, #f8fafa 100%);
  border-bottom: 1px solid #e7ecec;
}

/* Rastr jemných teček (sekce „Jak to funguje“, prázdné stavy) */
.eb-dots-band {
  background-image: radial-gradient(rgba(13, 59, 62, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* Šikmé pruhy — decentní podklad pod výpisy */
.eb-stripes-band {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(13, 59, 62, 0.035) 0px,
    rgba(13, 59, 62, 0.035) 2px,
    transparent 2px,
    transparent 12px
  );
}

/* Poloviční „glow“ nad sekcí — používá se u CTA pruhů */
.eb-glow-band {
  background:
    radial-gradient(ellipse 60% 70% at 50% 0%, rgba(247, 166, 0, 0.12), transparent 70%),
    #ffffff;
}

/* ---------- Rozbalovací sekce formuláře (<details>) ---------- */
.eb-details summary::-webkit-details-marker { display: none; }
.eb-details summary::marker { content: ""; }
.eb-details .eb-details-chevron { transition: transform .18s ease; display: inline-block; }
.eb-details[open] .eb-details-chevron { transform: rotate(180deg); }
.eb-details[open] summary { border-bottom: 1px solid #eef2f2; padding-bottom: 0.75rem; }

/* ---------- Avatar (fórum, recenze) ---------- */
.eb-avatar { border-radius: 9999px; overflow: hidden; flex-shrink: 0; line-height: 0; }
.eb-avatar > svg { display: block; width: 100%; height: 100%; }

/* ---------- Fade-in pro dynamicky vykreslený obsah ---------- */
@keyframes eb-fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.eb-fade-in { animation: eb-fade-in .25s ease both; }
