/* ==========================================================================
   MARS — Dizajnové vylepšenia | css/enhancements.css
   Hero split, logo grid, jemné animácie
   ========================================================================== */

/* ---------- Hero split layout ---------- */
.hero {
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-secondary) 100%);
  position: relative;
}

.hero__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap-2xl);
  align-items: center;
}

.hero__visual {
  position: relative;
}

.hero__image {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero__stat-overlay {
  position: absolute;
  bottom: -20px;
  left: 20px;
  right: 20px;
  display: flex;
  gap: 2px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero__stat {
  flex: 1;
  background: var(--color-white);
  padding: 16px 12px;
  text-align: center;
}

.hero__stat-number {
  display: block;
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  line-height: 1.1;
}

.hero__stat-label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

@media (max-width: 768px) {
  .hero__split {
    grid-template-columns: 1fr;
    gap: var(--gap-xl);
  }

  .hero__image {
    height: 280px;
  }

  .hero__stat-overlay {
    position: relative;
    bottom: auto;
    left: auto;
    right: auto;
    margin-top: var(--gap-md);
  }
}

/* ---------- Hero title gradient ---------- */
.hero__title {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Fade-in (hero only) ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__tag { animation: fadeInUp 0.5s ease 0.1s both; }
.hero__title { animation: fadeInUp 0.5s ease 0.2s both; }
.hero__perex { animation: fadeInUp 0.5s ease 0.3s both; }
.hero__badges { animation: fadeInUp 0.5s ease 0.4s both; }
.hero__actions { animation: fadeInUp 0.5s ease 0.5s both; }
.hero__visual { animation: fadeInUp 0.6s ease 0.3s both; }

/* ---------- Scroll reveal (jemný) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Cards ---------- */
.card {
  display: flex;
  flex-direction: column;
  position: relative;
  transition: box-shadow var(--transition-normal);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card__text {
  flex: 1;
}

.card .btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ---------- Logo grid (referencie) ---------- */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: var(--gap-lg);
  align-items: center;
}

.logo-grid__item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-height: 80px;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.logo-grid__item img {
  max-height: 40px;
  max-width: 140px;
  width: auto;
  filter: grayscale(100%) opacity(0.5);
  transition: filter var(--transition-normal);
}

.logo-grid__item:hover {
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow-sm);
}

.logo-grid__item:hover img {
  filter: grayscale(0%) opacity(1);
}

@media (max-width: 768px) {
  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-sm);
  }

  .logo-grid__item {
    padding: 12px 8px;
    min-height: 60px;
  }

  .logo-grid__item img {
    max-height: 28px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .logo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ---------- Buttons ---------- */
.btn--primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-hover) 100%);
  box-shadow: 0 2px 8px rgba(24, 95, 165, 0.25);
}

.btn--primary:hover {
  box-shadow: 0 4px 12px rgba(24, 95, 165, 0.35);
}

/* ---------- Steps connector ---------- */
.step__number {
  box-shadow: 0 4px 12px rgba(24, 95, 165, 0.2);
}

@media (min-width: 769px) {
  .step {
    position: relative;
  }

  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 24px;
    right: -12px;
    width: calc(100% - 48px);
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-border) 100%);
    transform: translateX(50%);
    z-index: 0;
  }

  .step__number {
    position: relative;
    z-index: 1;
  }
}

/* ---------- Section divider ---------- */
.section__header h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 12px;
}

.section__header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
  border-radius: 2px;
}

/* ---------- Nav ---------- */
.nav__logo img {
  height: 36px;
  width: auto;
}

.nav {
  transition: box-shadow var(--transition-normal), background-color var(--transition-normal);
}

.nav--scrolled {
  background-color: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---------- Machine table ---------- */
.machine-table tbody tr {
  transition: background-color var(--transition-fast);
}

.machine-table tbody tr:hover {
  background-color: var(--color-primary-light);
}

/* ---------- Value cards ---------- */
.value-card {
  transition: box-shadow var(--transition-normal);
}

.value-card:hover {
  box-shadow: var(--shadow-md);
}

/* ---------- Blog cards ---------- */
.blog-card {
  overflow: hidden;
}

.blog-card__image {
  transition: transform var(--transition-slow);
}

.blog-card:hover .blog-card__image {
  transform: scale(1.03);
}

/* ---------- Contact form focus ---------- */
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.12);
}

/* ---------- Contact map ---------- */
.contact-map {
  box-shadow: var(--shadow-md);
}

/* ---------- Mobile optimizations ---------- */
@media (max-width: 768px) {
  /* Larger touch targets */
  .btn {
    padding: 14px 24px;
    min-height: 48px;
  }

  .btn--sm {
    padding: 12px 20px;
    min-height: 44px;
  }

  .nav__lang-btn {
    padding: 8px 12px;
    min-height: 36px;
  }

  /* Hero CTA more prominent on mobile */
  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  /* Value cards 1 col on small mobile */
  .value-cards {
    grid-template-columns: 1fr;
  }

  /* Footer single column */
  .footer__grid {
    grid-template-columns: 1fr;
  }

  /* Contact form full width */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Steps vertical */
  .steps {
    grid-template-columns: 1fr;
    gap: var(--gap-lg);
  }

  /* Disable animations on mobile (reduce motion) */
  .hero__tag,
  .hero__title,
  .hero__perex,
  .hero__badges,
  .hero__actions,
  .hero__visual {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ---------- Prefer reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Color contrast fix ---------- */
/* Upgrade muted text from #5A6A7E (4.08:1) to #4A5A6E (4.74:1) for WCAG AA */
