/* ================================================================
   fix.css v2 — compatibility shim for task 570
   Maps flat HTML class names → BEM CSS + fixes contrast & layout
   ================================================================ */

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--c-border-dark);
  padding-block: 0.875rem;
  color: var(--c-fg);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.logo-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo { width: 34px; height: 34px; flex-shrink: 0; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--c-fg);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}
.header-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.header-nav a {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}
.header-nav a:hover { color: var(--c-accent); }

/* --- Buttons --- */
.btn-primary {
  background: var(--c-accent) !important;
  color: #000000 !important;
  border: none;
  cursor: pointer;
}
.btn-primary:hover {
  background: var(--c-accent-dark) !important;
  color: #000000 !important;
}
.btn-secondary {
  background: transparent !important;
  color: var(--c-fg) !important;
  border: 1.5px solid rgba(255,255,255,0.28) !important;
  cursor: pointer;
}
.btn-secondary:hover {
  border-color: var(--c-accent) !important;
  color: var(--c-accent) !important;
}
.btn-full {
  width: 100%;
  display: flex;
  justify-content: center;
  text-align: center;
}

/* --- Sections --- */
.section-light {
  background: var(--c-light-bg) !important;
  color: var(--c-light-fg) !important;
}
.section-dark {
  background: var(--c-bg) !important;
  color: var(--c-fg) !important;
}
/* Section inner wrapper */
.section-inner {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-4);
}
.section-inner-centered {
  max-width: 800px;
  margin-inline: auto;
  padding-inline: var(--space-4);
  text-align: center;
}
/* Section headings */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}
.section-title-left { text-align: left !important; }
.section-light .section-title { color: var(--c-light-fg); }
/* Center section lead in centered sections */
.section-centered .section-title,
.section-centered .section-lead {
  margin-inline: auto;
}
.section-lead {
  max-width: 640px;
}
.section-body {
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  color: var(--c-muted);
  line-height: 1.75;
  max-width: 640px;
}
.section-centered .section-body { margin-inline: auto; }
.section-light .section-body { color: var(--c-light-muted); }
.section-light .section-lead  { color: var(--c-light-muted); }

/* --- Hero --- */
/* hero already has display:flex + align-items:center from style.css */
.hero {
  gap: var(--space-6) !important;
  /* constrain width via calculated padding on large screens */
  padding: var(--space-5) max(var(--space-4), calc(50% - 580px)) !important;
  flex-wrap: wrap;
}
.hero-content {
  flex: 1 1 320px;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  z-index: 1;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.hero-lead {
  font-size: clamp(0.95rem, 1.3vw, 1.05rem);
  color: var(--c-muted);
  line-height: 1.75;
  max-width: 460px;
}
.hero-buttons {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-1);
}
.hero-visual {
  flex: 1 1 300px;
  max-width: 520px;
  position: relative;
  z-index: 1;
}
.hero-image {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0,229,255,0.18);
  display: block;
}

/* --- Features --- */
/* features-grid already in style.css */
.feature-icon {
  width: 44px;
  height: 44px;
  color: var(--c-accent);
  flex-shrink: 0;
}
.feature-heading {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  color: var(--c-fg);
}
.feature-text {
  font-size: 0.875rem;
  color: var(--c-muted);
  line-height: 1.68;
}

/* --- Steps — BIG FIX: step-title/text have light colors, but used on DARK bg --- */
.steps-timeline {
  /* HTML has 4 steps, not 5 */
  grid-template-columns: repeat(4, 1fr) !important;
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  position: relative;
  z-index: 1;
}
.step-number {
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  background: var(--c-accent) !important;
  color: #000000 !important;
  font-family: var(--font-display) !important;
  font-size: 1.5rem !important;
  font-weight: 900 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
  margin-bottom: 0 !important;
}
/* step-title has color: var(--c-light-fg)=#111 in CSS — override for dark bg */
.section-centered .step-title,
.section:not(.section-light) .step-title {
  color: var(--c-fg) !important;
}
.step-text {
  font-size: 0.855rem;
  line-height: 1.65;
}
/* step-body has color: var(--c-light-muted)=#555 — override for dark bg */
.section-centered .step-text,
.section:not(.section-light) .step-text {
  color: var(--c-muted) !important;
}

/* --- Products --- */
.badge {
  display: inline-block;
  background: var(--c-accent);
  color: #000000;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
}
.price-period {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--c-muted);
}

/* --- Showcase split (light bg section) --- */
.showcase-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: center;
}
.showcase-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.showcase-text h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--c-light-fg);
}
.showcase-text p {
  font-size: 0.9rem;
  color: var(--c-light-muted);
  line-height: 1.72;
}
.showcase-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.showcase-list li {
  font-size: 0.875rem;
  color: var(--c-light-muted);
  padding-left: 1.4em;
  position: relative;
  line-height: 1.5;
}
.showcase-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: #007a8a;
}
.showcase-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(0, 122, 138, 0.2);
}

/* --- Benefits — FIX: column layout (HTML has icon+title+text as siblings) --- */
/* benefit-item from style.css is flex row (icon left, content right)
   but HTML has no wrapper div, so override to column */
.benefit-item {
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 10px !important;
}
.benefit-icon {
  font-size: 2rem;
  line-height: 1;
  color: var(--c-accent);
}
.benefit-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--c-light-fg);
  margin-bottom: 2px;
}
.benefit-text {
  font-size: 0.855rem;
  color: var(--c-light-muted);
  line-height: 1.65;
}
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

/* --- Metrics — FIX: section-light bg, metric-number was almost-white → invisible --- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
}
.metric {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.metric-number {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 1;
  /* light section → dark text */
  color: var(--c-light-fg);
}
/* metric-label in style.css is color: rgba(0,0,0,0.7) — works on light bg */
.section-light .metric-label { color: var(--c-light-muted); }

/* --- Testimonials — FIX: dark cards in light section --- */
.section-light .testimonial-card {
  background: #ffffff !important;
  border-color: rgba(0, 122, 138, 0.15) !important;
}
.section-light .testimonial-quote {
  color: var(--c-light-fg) !important;
}
.section-light .testimonial-author {
  border-top-color: rgba(0, 0, 0, 0.08) !important;
  color: var(--c-light-muted);
}

/* --- FAQ --- */
/* .faq-question already in style.css line 1814 */
.faq-answer {
  font-size: 0.9rem;
  color: var(--c-muted);
  line-height: 1.7;
}

/* --- Contact — FIX: column layout (label above value) --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
}
/* contact-item is flex row in CSS — make column */
.contact-item {
  flex-direction: column !important;
  gap: 4px !important;
  align-items: flex-start !important;
}
.contact-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.contact-value {
  font-size: 1rem;
  color: var(--c-fg);
  font-weight: 500;
  line-height: 1.5;
}
.contact-value a { color: var(--c-fg); text-decoration: none; transition: color 0.2s; }
.contact-value a:hover { color: var(--c-accent); }

/* --- CTA --- */
.cta-buttons {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
  margin-top: var(--space-3);
}

/* --- Footer --- */
.footer {
  background: var(--c-bg);
  color: var(--c-fg);
  border-top: 1px solid var(--c-border-dark);
  padding-block: var(--space-5);
}
.footer-inner {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-4);
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-5);
}
/* Override footer-section padding (style.css sets 80px) */
.footer .footer-section { padding: 0 !important; }
.footer-logo {
  font-family: var(--font-display) !important;
  font-size: 1.3rem !important;
  font-weight: 900 !important;
  color: var(--c-fg) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  display: block !important;
  text-decoration: none !important;
  margin-bottom: var(--space-2);
}
.footer-desc {
  font-size: 0.875rem;
  color: var(--c-muted);
  line-height: 1.65;
}
.footer-heading {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-fg);
  margin-bottom: var(--space-3);
}
/* footer-links already styled in style.css */

/* --- Responsive --- */
@media (max-width: 960px) {
  .header-nav { display: none; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-visual { display: none; }
  .showcase-split { grid-template-columns: 1fr; }
  .benefits-grid { grid-template-columns: repeat(2, 1fr); }
  .metrics-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: var(--space-4); }
}
@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr !important; }
  .steps-timeline { grid-template-columns: 1fr 1fr !important; }
  .steps-timeline::before { display: none; }
  .testimonials-grid { grid-template-columns: 1fr !important; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .faq-grid { grid-template-columns: 1fr !important; }
  .benefits-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

/* ================================================================
   PATCH v2.1 — product cards + overrides for style.css auto-fixes
   ================================================================ */

/* --- Products grid: 3 cols (CSS default is 2, but there are 3 cards) --- */
.products-grid {
  grid-template-columns: repeat(3, 1fr) !important;
  align-items: stretch;
}

/* Add padding to product cards (CSS has none) */
.product-card {
  padding: var(--space-4) !important;
  gap: var(--space-2) !important;
}

/* Push CTA button to bottom */
.product-card .btn-full {
  margin-top: auto;
}

/* Featured card highlight */
.product-card-featured {
  background: var(--c-surface) !important;
  border-color: var(--c-accent) !important;
  box-shadow: 0 0 0 1px var(--c-accent), var(--shadow-card-hover) !important;
}

/* Restore font sizes crushed by auto-diagnostic in style.css (line ~1815) */
.product-title {
  font-size: 1.5rem !important;
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.01em;
}
.feature-heading {
  font-size: 1.35rem !important;
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

/* Restore step-number circle (auto-diag set display:block) */
.step-number {
  display: flex !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 50% !important;
  background: var(--c-accent) !important;
  color: #000 !important;
  font-family: var(--font-display) !important;
  font-size: 1.5rem !important;
  font-weight: 900 !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0;
  margin-bottom: 0 !important;
}

/* Restore metric-number (auto-diag set display:block) */
.metric-number {
  display: block !important;
  font-family: var(--font-display) !important;
  font-size: clamp(2rem, 4vw, 3.2rem) !important;
  font-weight: 900 !important;
  color: var(--c-light-fg) !important;
  line-height: 1 !important;
  margin-bottom: 0 !important;
}

/* Restore logo-brand (auto-diag set width:48px — squishes text) */
.logo-brand {
  width: auto !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
.logo {
  width: 34px !important;
  height: 34px !important;
  flex-shrink: 0 !important;
}

/* Products responsive */
@media (max-width: 860px) {
  .products-grid { grid-template-columns: 1fr !important; }
}

/* --- "Чому Вибирають" — center benefit items text --- */
.section-centered .benefit-item {
  align-items: center !important;
  text-align: center !important;
}
