/* ============================================
   AUTO FINESSE PRAHA — MEGA DETAIL Style
   autofinessepraha.cz
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  /* MEGA DETAIL brand colors */
  --primary: #FF4D00;        /* MEGA oranžová */
  --primary-dark: #E04400;
  --primary-light: #FF6A2B;
  --secondary: #1A1A2E;      /* Tmavě modrá/navy */
  --dark: #0F0F1A;           /* Nejtmavší pozadí */
  --dark-surface: #16162A;   /* Karty, povrchy */
  --dark-elevated: #1E1E38;  /* Zvýšené elementy */
  --text-primary: #FFFFFF;
  --text-secondary: #B8B8D0;
  --text-muted: #6E6E8A;
  --accent-green: #00E676;
  --accent-yellow: #FFD600;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 77, 0, 0.3);

  /* Typography */
  --font-heading: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Inter', 'Segoe UI', system-ui, sans-serif;

  /* Spacing */
  --section-padding: 100px 0;
  --container-width: 1200px;
  --gap: 24px;

  /* Effects */
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 40px rgba(255, 77, 0, 0.15);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--dark);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-light);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------- Container ---------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.25rem; }

.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent-yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-muted {
  color: var(--text-secondary);
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 16px;
  padding: 6px 16px;
  border: 1px solid rgba(255, 77, 0, 0.3);
  border-radius: 100px;
  background: rgba(255, 77, 0, 0.08);
}

/* ---------- Header / Navigation ---------- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.logo .mega {
  color: var(--primary);
  font-weight: 900;
}

.logo img {
  height: 40px;
  width: auto;
}

/* Main Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  position: relative;
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

/* Dropdown */
.nav-item {
  position: relative;
}

.nav-item .dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 240px;
  padding: 12px;
  background: var(--dark-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
}

.dropdown a:hover {
  background: rgba(255, 77, 0, 0.1);
  color: var(--primary);
}

/* CTA button in nav */
.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px !important;
  background: var(--primary) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  transition: all var(--transition) !important;
}

.nav-cta:hover {
  background: var(--primary-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(255, 77, 0, 0.4);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ---------- Hero Section ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(255, 77, 0, 0.12) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 80%, rgba(255, 77, 0, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-content h1 {
  margin-bottom: 24px;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  max-width: 540px;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--dark-surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.badge svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255, 77, 0, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 77, 0, 0.05);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* ---------- Section ---------- */
section {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 16px;
}

/* ---------- Product Category Cards ---------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}

.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--dark-surface);
  border: 1px solid var(--border);
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.category-card-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--dark-elevated);
}

.category-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.category-card:hover .category-card-image img {
  transform: scale(1.05);
}

.category-card-body {
  padding: 24px;
}

.category-card-body h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.category-card-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.category-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--primary);
}

.category-card-link svg {
  width: 16px;
  height: 16px;
  transition: transform var(--transition);
}

.category-card:hover .category-card-link svg {
  transform: translateX(4px);
}

/* ---------- Product Grid ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
}

.product-card {
  background: var(--dark-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.product-card-image {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--dark-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.product-card-image img {
  max-height: 200px;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.08);
}

.product-card-body {
  padding: 20px;
}

.product-card-brand {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  margin-bottom: 6px;
}

.product-card-body h4 {
  font-size: 1rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.product-card-body p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.product-btn {
  padding: 8px 20px;
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.product-btn:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* ---------- Features / Benefits ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap);
}

.feature-card {
  padding: 32px;
  background: var(--dark-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--border-hover);
}

.feature-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 77, 0, 0.1);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  color: var(--primary);
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-card h4 {
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ---------- Blog Cards ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--gap);
}

.blog-card {
  background: var(--dark-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.blog-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--dark-elevated);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
  transform: scale(1.05);
}

.blog-card-body {
  padding: 24px;
}

.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.blog-card-tag {
  padding: 3px 10px;
  background: rgba(255, 77, 0, 0.1);
  color: var(--primary);
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.75rem;
}

.blog-card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  transition: color var(--transition);
}

.blog-card:hover .blog-card-body h3 {
  color: var(--primary);
}

.blog-card-body p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- Blog Article ---------- */
.article {
  max-width: 800px;
  margin: 0 auto;
  padding-top: 120px;
  padding-bottom: 80px;
}

.article-header {
  margin-bottom: 48px;
}

.article-header h1 {
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-content {
  font-size: 1.05rem;
  line-height: 1.9;
}

.article-content h2 {
  margin: 48px 0 20px;
  font-size: 1.75rem;
}

.article-content h3 {
  margin: 36px 0 16px;
  font-size: 1.35rem;
}

.article-content p {
  margin-bottom: 20px;
  color: var(--text-secondary);
}

.article-content strong {
  color: var(--text-primary);
}

.article-content ul, .article-content ol {
  margin: 16px 0 24px 24px;
  color: var(--text-secondary);
}

.article-content li {
  margin-bottom: 8px;
}

.article-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 16px 24px;
  margin: 24px 0;
  background: var(--dark-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Prodejna (Store) ---------- */
.store-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.store-details {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.store-detail-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.store-detail-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 77, 0, 0.1);
  border-radius: var(--radius-sm);
  color: var(--primary);
}

.store-detail-icon svg {
  width: 24px;
  height: 24px;
}

.store-detail-text h4 {
  margin-bottom: 4px;
}

.store-detail-text p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.store-map {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 4/3;
}

.store-map iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  position: relative;
  padding: 80px 0;
  text-align: center;
  background: linear-gradient(135deg, var(--dark-surface) 0%, var(--secondary) 100%);
  border-radius: var(--radius);
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255, 77, 0, 0.15) 0%, transparent 70%);
}

.cta-banner > * {
  position: relative;
  z-index: 2;
}

.cta-banner h2 {
  margin-bottom: 16px;
}

.cta-banner p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Footer ---------- */
.footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--border);
  background: var(--dark);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 16px;
  max-width: 300px;
}

.footer h5 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-social {
  display: flex;
  gap: 16px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.footer-social a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(255, 77, 0, 0.1);
}

.footer-social a svg {
  width: 18px;
  height: 18px;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  padding: 100px 0 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.breadcrumbs span {
  margin: 0 8px;
}

/* ---------- FAQ ---------- */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--dark-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  user-select: none;
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  transition: transform var(--transition);
  color: var(--text-muted);
  min-width: 20px;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .store-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 60px 0;
  }

  .nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 24px;
    gap: 4px;
    overflow-y: auto;
  }

  .nav.active {
    display: flex;
  }

  .nav a {
    padding: 14px 16px;
    font-size: 1rem;
  }

  .nav-item .dropdown {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0 0 0 16px;
    min-width: unset;
  }

  .mobile-toggle {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding: 120px 0 60px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .btn-group {
    flex-direction: column;
  }

  .categories-grid,
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Utility ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.text-center { text-align: center; }
