/* IMPORT FONTS */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;900&display=swap');

:root {
  --bg-dark: #020617;
  --bg-surface: #0f172a;
  --accent: #fbbf24;
  --accent-glow: rgba(251, 191, 36, 0.3);
  --accent-green: #10b981;
  --accent-green-glow: rgba(16, 185, 129, 0.15);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  --transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 1. GLOBÁLNÍ RESET A ZÁKLAD */
html {
  scroll-behavior: smooth;
}

* { 
  box-sizing: border-box; 
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'Montserrat', sans-serif;
  margin: 0;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* 2. TYPOGRAFIE */
h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-wrap: balance;
  margin-top: 0;
}

h1 {
  font-size: clamp(2.2rem, 7vw, 3.8rem);
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff 0%, #64748b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 2rem;
  text-align: center;
}

h2 {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  position: relative;
  padding-bottom: 20px;
  margin-bottom: 3rem;
  text-align: center;
}

h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title {
  font-size: 2rem;
  text-align: center;
  margin-top: 5rem !important;
  margin-bottom: 1rem !important;
  color: #ffffff;
}

/* Textové utility */
.subtitle,
.text-lead { 
  font-size: 1.3rem; 
  line-height: 1.7; 
  font-weight: 400; 
  color: #e2e8f0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.text-lead em { font-style: normal; }

.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }
.text-left { text-align: left; }
.font-bold { font-weight: bold; }

/* 3. LAYOUT KOMPONENTY A UTILITY */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding { padding: 6rem 0; }
.max-w-800 { max-width: 800px; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Flexbox a Grid Utility */
.flex-wrap-center { 
  display: flex; 
  flex-wrap: wrap; 
  justify-content: center; 
  align-items: center; 
}
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

/* Odsazení (Margin utility) */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mt-4 { margin-top: 3rem; }
.mt-5 { margin-top: 4rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 2rem; }
.mb-4 { margin-bottom: 3rem; }
.mb-5 { margin-bottom: 4rem; }

.my-4 { margin-top: 3rem; margin-bottom: 3rem; }
.my-5 { margin-top: 4rem; margin-bottom: 4rem; }
.m-0 { margin: 0 !important; }

.main-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 2rem;
}

/* 4. KARTY */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  border-color: var(--accent);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card h2 {
  font-size: 1.4rem;
  margin-bottom: 0;
  padding-bottom: 0;
  text-align: center;
}

.card h2::after {
  display: none; 
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.card p:last-child {
  margin-bottom: 0;
}

.icon-wrapper {
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.icon-wrapper svg { width: 28px; height: 28px; stroke-width: 2px; }

/* 5. TLAČÍTKA A ODKAZY */
.cta-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #000 !important;
  padding: 1.2rem 2.8rem;
  border-radius: 50px;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: var(--transition);
  text-decoration: none;
  box-shadow: 0 10px 20px var(--accent-glow);
}

.btn-cta:hover {
  transform: scale(1.05);
  background: #fff;
  box-shadow: 0 15px 30px rgba(255, 255, 255, 0.2);
}

/* 6. PROCESNÍ KROKY, ŠTÍTKY A SEZNAMY */
.steps-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 3rem 0;
}

.step-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  text-align: center;
  transition: var(--transition);
}

.step-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.step-num { 
  color: var(--accent); 
  font-weight: 900; 
  display: block; 
  margin-bottom: 5px; 
  font-size: 1.2rem;
}

.pill-list, .badge-group { 
  display: flex; 
  flex-wrap: wrap; 
  justify-content: center; 
  gap: 10px; 
  list-style: none;
  padding: 0;
  margin: 0;
}

.pill, .badge, .badge-sub {
  background: rgba(251, 191, 36, 0.1);
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: var(--transition);
  display: inline-block;
}

.pill:hover, .badge:hover {
  background: var(--accent);
  color: #000;
}

/* 7. OBRÁZKY A INFORMAČNÍ BOXY */
.img-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  background: var(--bg-surface);
}

.img-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.img-wrapper:hover img {
  transform: scale(1.02);
}

.alert-box {
  background: rgba(251, 191, 36, 0.05);
  border: 1px dashed var(--accent);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  text-align: left;
}

/* 8. SEZNAM VLASTNOSTÍ (FEATURE LIST) */
.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  text-align: left;
}

.feature-item svg { 
  color: var(--accent); 
  flex-shrink: 0; 
  margin-top: 5px; 
  width: 24px; 
  height: 24px;
}

/* 9. HORIZONTÁLNÍ TIMELINE */
.timeline-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr));
  gap: 1.5rem;
  margin: 4rem 0;
}

.timeline-item {
  background: transparent;
  border: none;
  padding: 1rem 0.5rem;
  text-align: center;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.75rem;
  display: block;
  opacity: 0.8;
  transition: var(--transition);
}

.timeline-item:hover .timeline-num {
  opacity: 1;
  transform: scale(1.1);
}

.timeline-text {
  font-size: 0.95rem;
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.4;
}

@media (min-width: 769px) {
  .timeline-item:not(:last-child)::after {
    content: "→";
    position: absolute;
    top: 1.8rem;
    right: -0.75rem;
    color: var(--text-secondary);
    opacity: 0.3;
    font-size: 1.2rem;
  }
}

/* 10. SEKCE NA CELOU ŠÍŘKU OBRAZOVKY */
.full-width-section {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background-color: var(--bg-surface);
}

/* 11. PŘÍPADOVÉ STUDIE / REFERENCE (PŘEHLEDNÝ GRID + DOSAŽENÉ ÚSPORY) */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
  gap: 2rem;
  margin-top: 3rem;
  text-align: left;
}

.case-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: var(--transition);
}

.case-card:hover {
  transform: translateY(-8px);
  border-color: rgba(251, 191, 36, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.case-card-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid var(--border-color);
}

.case-type {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: block;
  margin-bottom: 0.25rem;
}

.case-card-header h3 {
  font-size: 1.25rem;
  margin: 0;
  color: #ffffff;
}

/* Tělo karty: struktura pro <dl> nebo .case-item */
.case-card-body {
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex-grow: 1;
}

.case-card dl {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.case-card dt,
.case-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.2rem;
}

.case-card dd,
.case-item p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.5;
}

/* Zvýraznění bloku "Problém" */
.case-problem .case-label,
.case-card dt:first-of-type {
  color: #f97316; /* Jemný oranžový varovný akcent */
}

/* Výsledkový zelený blok (Zvýraznění úspory) */
.case-card-footer {
  background: var(--accent-green-glow);
  border-top: 1px solid rgba(16, 185, 129, 0.25);
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
}

.result-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--accent-green);
  letter-spacing: 0.05em;
}

.result-value,
.case-card dd:last-of-type strong {
  font-size: 1.5rem;
  font-weight: 900;
  color: #34d399;
  line-height: 1.2;
  margin: 0.3rem 0 0.1rem;
  display: block;
}

.result-note {
  font-size: 0.825rem;
  color: var(--text-secondary);
}

/* 12. RESPONZIVITA */
@media (max-width: 768px) {
  .section-padding { padding: 4rem 0; }
  .main-grid, .case-grid { gap: 1.5rem; }
  .card, .case-card-header, .case-card-body, .case-card-footer { padding: 1.5rem; }
  h1 { margin-bottom: 1.5rem; }
  h2 { margin-bottom: 2rem; }
}