/* -----------------------------------------------------------------------------
   Dizajnovy system dealerskeho webu (podla sonic-dealer-core estetiky):
   Inter + JetBrains Mono, "eyebrow" mono nadpisky, pill tlacidla, glass karty,
   scroll-reveal animacie. Brand farba je CMS-driven cez --brand.
----------------------------------------------------------------------------- */
:root { --brand: #c0392b; --brand-dark: #1f2937; }

html { scroll-behavior: smooth; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 200;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: #fff;
  color: #0f172a;
  border: 2px solid var(--brand);
  border-radius: 0.5rem;
  font-weight: 600;
}

/* Kontakt ikony (Lucide v kruhu) */
.contact-icon-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  flex-shrink: 0;
}
.contact-icon-svg {
  width: 1.375rem;
  height: 1.375rem;
  display: block;
}

.brand-bg { background-color: var(--brand); }
.brand-text { color: var(--brand); }
.brand-border { border-color: var(--brand); }

/* JetBrains Mono pre "technicke" popisky (Tailwind trieda font-mono) */
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace !important; }

/* Eyebrow: maly mono nadpis nad sekciami */
.eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow--light { color: #cbd5e1; }

/* Podciarknutie pod nadpisom sekcie */
.title-bar { width: 4rem; height: 2px; background: var(--brand); margin-top: 1.25rem; }

/* Scroll-reveal (nahrada framer-motion) */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .65s cubic-bezier(.22,.61,.36,1), transform .65s cubic-bezier(.22,.61,.36,1); }
[data-reveal].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Scroll indikator v hero */
@keyframes scroll-bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(8px); } }
.scroll-indicator { animation: scroll-bounce 2s ease-in-out infinite; }

/* Hero slider: biele prev/next + pagination pod scroll ikonou */
.hero-swiper .hero-nav {
  color: #fff;
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  transition: background 0.2s ease;
}
.hero-swiper .hero-nav::after {
  font-size: 0.95rem;
  font-weight: 700;
}
.hero-swiper .hero-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.hero-swiper .swiper-button-prev { left: 1rem; }
.hero-swiper .swiper-button-next { right: 1rem; }
@media (min-width: 1024px) {
  .hero-swiper .swiper-button-prev { left: 1.75rem; }
  .hero-swiper .swiper-button-next { right: 1.75rem; }
}

.hero-pagination {
  position: relative !important;
  bottom: auto !important;
  left: auto !important;
  width: auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding-top: 0.125rem;
}
.hero-pagination .swiper-pagination-bullet {
  width: 24px !important;
  height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
  background: transparent !important;
  position: relative;
}
.hero-pagination .swiper-pagination-bullet-active {
  background: transparent !important;
}
.hero-pagination .swiper-pagination-bullet::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.45);
  transition: background 0.2s ease;
}
.hero-pagination .swiper-pagination-bullet-active::before {
  width: 8px;
  height: 8px;
  background: #fff;
}

/* Pulzujuca "Geöffnet" bodka */
@keyframes pulse-dot { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.pulse-dot { animation: pulse-dot 2s ease-in-out infinite; }

/* Formatovany obsah z WYSIWYG editora (novinky, texty blokov). */
.prose-cms { line-height: 1.75; }
.prose-cms p { margin-bottom: 1rem; }
.prose-cms h2 { font-size: 1.5rem; font-weight: 800; margin: 1.5rem 0 0.75rem; }
.prose-cms h3 { font-size: 1.25rem; font-weight: 700; margin: 1.25rem 0 0.5rem; }
.prose-cms ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose-cms ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose-cms a { color: var(--brand); text-decoration: underline; }
.prose-cms blockquote { border-left: 3px solid var(--brand); padding-left: 1rem; color: #475569; font-style: italic; margin: 1rem 0; }
.prose-cms strong { font-weight: 700; }

/* Willkommen: vacsi nadpis a text */
.welcome-lead.prose-cms > p:first-child {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
@media (min-width: 1024px) {
  .welcome-lead.prose-cms > p:first-child {
    font-size: 1.375rem;
  }
}
.welcome-lead.prose-cms > p:not(:first-child) {
  color: #64748b;
  font-size: 1.0625rem;
  line-height: 1.75;
}
@media (min-width: 1024px) {
  .welcome-lead.prose-cms > p:not(:first-child) {
    font-size: 1.125rem;
  }
}

/* Miesto pre mobilnu sticky listu (aby ju obsah neprekryval) + iOS safe area */
@media (max-width: 1023px) {
  body {
    padding-bottom: calc(4rem + env(safe-area-inset-bottom, 0px));
    overflow-x: clip;
  }
}

html { overflow-x: clip; }

/* -------------------------------------------------------------------------- */
/* Mobil / tablet – layout, swiper, typografia                                  */
/* -------------------------------------------------------------------------- */
#main-nav .max-w-7xl,
footer .max-w-7xl,
.max-w-6xl,
.max-w-7xl {
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
}

@media (min-width: 640px) {
  #main-nav .max-w-7xl,
  footer .max-w-7xl,
  .max-w-6xl,
  .max-w-7xl {
    padding-left: max(1.5rem, env(safe-area-inset-left, 0px));
    padding-right: max(1.5rem, env(safe-area-inset-right, 0px));
  }
}

#mobile-sticky-bar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

/* Hero – stabilna vyska na mobile (Swiper + obsah) */
.hero-swiper,
.hero-swiper .swiper-wrapper,
.hero-swiper .swiper-slide {
  height: auto;
  min-height: min(72svh, 640px);
}
@media (min-width: 1024px) {
  .hero-swiper,
  .hero-swiper .swiper-wrapper,
  .hero-swiper .swiper-slide {
    min-height: min(88vh, 820px);
  }
}

/* Produktova galeria */
.product-swiper {
  width: 100%;
  position: relative;
  --swiper-pagination-bullet-size: 8px;
  --swiper-pagination-color: var(--brand);
  --swiper-pagination-bullet-inactive-color: #cbd5e1;
  --swiper-pagination-bullet-inactive-opacity: 1;
  --swiper-pagination-bullet-horizontal-gap: 10px;
}
.product-swiper .swiper-wrapper {
  align-items: stretch;
}
.product-swiper .swiper-slide {
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-swiper .product-slide-inner {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  background: #fff;
}
.product-swiper .product-slide-inner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.product-swiper .swiper-pagination {
  position: relative !important;
  bottom: auto !important;
  margin-top: 0.75rem;
  line-height: 0;
}
.product-swiper .swiper-pagination-bullet {
  width: 8px !important;
  height: 8px !important;
  margin: 8px 5px !important;
  opacity: 1 !important;
  background: #cbd5e1 !important;
  transform: none !important;
  transition: background 0.2s ease;
}
.product-swiper .swiper-pagination-bullet-active {
  width: 8px !important;
  height: 8px !important;
  background: var(--brand) !important;
  transform: none !important;
}
.product-swiper .swiper-button-prev,
.product-swiper .swiper-button-next {
  width: 2.5rem;
  height: 2.5rem;
  margin-top: -1.25rem;
  color: #334155;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}
.product-swiper .swiper-button-prev::after,
.product-swiper .swiper-button-next::after {
  font-size: 0.75rem;
  font-weight: 700;
}
.product-swiper .swiper-button-prev { left: 0.75rem; }
.product-swiper .swiper-button-next { right: 0.75rem; }
.product-gallery-static {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #fff;
}
.product-gallery-static img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* News swiper – karty + pagination (44px touch targets) */
.news-swiper {
  --swiper-pagination-bullet-size: 8px;
  --swiper-pagination-color: var(--brand);
  --swiper-pagination-bullet-inactive-color: #cbd5e1;
  --swiper-pagination-bullet-inactive-opacity: 1;
}
.news-swiper .swiper-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}
.news-swiper .swiper-pagination-bullet {
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 1 !important;
  background: transparent !important;
  position: relative;
  transform: none !important;
}
.news-swiper .swiper-pagination-bullet::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #cbd5e1;
  transition: background 0.2s ease;
}
.news-swiper .swiper-pagination-bullet-active::before {
  background: var(--brand);
}
.news-swiper .swiper-slide {
  height: auto;
  display: flex;
}

/* Breadcrumb – dlhy nazov produktu */
.breadcrumb-trail {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.35rem;
  word-break: break-word;
}
.breadcrumb-trail .crumb-current {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

/* CMS obsah – nepreteká na mobile */
.prose-cms {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.prose-cms img,
.prose-cms iframe,
.prose-cms video {
  max-width: 100%;
  height: auto;
}

/* Kontakt – riadky na uzkom displeji */
@media (max-width: 639px) {
  .contact-info-row {
    flex-direction: column;
    gap: 0.25rem;
  }
  .contact-info-row .contact-label {
    width: auto;
  }
}

/* CTA tlacidla – plna sirka na mobile */
@media (max-width: 639px) {
  .mobile-full-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* Skryt hover-only obsah na touch zariadeniach */
@media (hover: none) {
  .group-hover\:max-h-24 {
    max-height: 6rem !important;
  }
  .group-hover\:opacity-100,
  .group-hover\:translate-y-0 {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Mapa – nizsi aspect ratio na mobile */
@media (max-width: 767px) {
  .map-embed {
    aspect-ratio: 4 / 3 !important;
  }
}
