/* =========================================================
   Zástava vozidel – Custom Styles
   ========================================================= */

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

/* ---- Balanced headings ---- */
h1, h2, h3, h4 {
  text-wrap: balance;
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---- Grain overlay ---- */
.grain-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}

/* ---- Typography ---- */
.gradient-text {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Cards ---- */
.card-glow {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card-glow:hover {
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.25),
    0 4px 6px -1px rgba(0,0,0,0.3),
    0 20px 60px rgba(245, 158, 11, 0.1);
  transform: translateY(-2px);
}

/* ---- Hero dot pattern ---- */
.hero-dots {
  background-image: radial-gradient(circle, rgba(245, 158, 11, 0.15) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ---- Section transitions ---- */
.section-fade-top::before,
.section-fade-bottom::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  z-index: 1;
}
.section-fade-top::before {
  top: 0;
  background: linear-gradient(to bottom, var(--fade-from, #0b0d0f), transparent);
}
.section-fade-bottom::after {
  bottom: 0;
  background: linear-gradient(to top, var(--fade-to, #0b0d0f), transparent);
}

/* ---- Navbar ---- */
.nav-blur {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

/* ---- Shimmer CTA ---- */
.btn-shimmer {
  position: relative;
  overflow: hidden;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-shimmer::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.18) 50%, transparent 60%);
  transform: translateX(-100%);
}
.btn-shimmer:hover::after {
  transform: translateX(100%);
  transition: transform 0.55s ease;
}
.btn-shimmer:hover { opacity: 0.95; transform: translateY(-1px); }
.btn-shimmer:active { transform: translateY(0); }

/* ---- Scroll reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- intl-tel-input v23: dark theme overrides ---- */
.iti {
  width: 100%;
  background: rgba(31, 41, 55, 0.8) !important;
  border-radius: 10px !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.iti:focus-within {
  border-color: #f59e0b !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
}

/* The tel input itself — DO NOT override padding, iti sets padding-left dynamically */
#phone,
.iti input[type=tel],
.iti .iti__tel-input {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  color: #f3f4f6 !important;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
  padding-right: 16px !important;
  font-size: 0.95rem !important;
}
#phone::placeholder,
.iti input[type=tel]::placeholder {
  color: #6b7280 !important;
}

/* Country selector button (v23 uses .iti__selected-country) */
.iti__selected-country,
.iti__country-container button {
  background: rgba(37, 45, 56, 0.9) !important;
  border-radius: 10px 0 0 10px !important;
  border: none !important;
  border-right: 1px solid rgba(255,255,255,0.08) !important;
  padding: 0 10px 0 12px !important;
}
.iti__selected-country:hover {
  background: rgba(55, 65, 81, 0.9) !important;
}

/* Dial code text */
.iti__selected-dial-code { color: #d1d5db !important; }

/* Arrow */
.iti__arrow { border-top-color: #6b7280 !important; }

/* Dropdown */
.iti__dropdown-content,
.iti__country-list {
  background-color: #1f2937 !important;
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  color: #d1d5db !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5) !important;
}
.iti__country:hover,
.iti__country.iti__highlight {
  background-color: rgba(245, 158, 11, 0.15) !important;
}
.iti__search-input {
  background: #111418 !important;
  color: #f3f4f6 !important;
  border-color: rgba(255,255,255,0.1) !important;
}
.iti__divider { border-color: rgba(255,255,255,0.08) !important; }
.iti__country-name { color: #d1d5db !important; }
.iti__dial-code { color: #9ca3af !important; }

/* ---- Multi-step form ---- */
.form-step {
  display: none;
}
.form-step.active {
  display: block;
}

/* ---- Progress bar ---- */
.progress-step {
  transition: color 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}
.progress-step.done .step-circle {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  border-color: transparent;
  color: #ffffff;
}
.progress-step.active .step-circle {
  border-color: #f59e0b;
  color: #f59e0b;
}
.progress-step.done .step-label,
.progress-step.active .step-label {
  color: #f59e0b;
}
.progress-line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.1);
  transition: background 0.4s ease;
}
.progress-line.done {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

/* ---- Input fields ---- */
.form-input {
  width: 100%;
  background: rgba(31, 41, 55, 0.8);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 16px;
  color: #f3f4f6;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.form-input:focus-visible {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.form-input::placeholder { color: #6b7280; }
.form-input option { background: #1f2937; color: #f3f4f6; }

/* ---- CTA Button ---- */
.btn-cta {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  font-weight: 700;
  border-radius: 12px;
  padding: 14px 32px;
  font-size: 1rem;
  transition: opacity 0.2s, transform 0.1s;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
}
.btn-cta:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-cta:active { transform: translateY(0); }
.btn-cta.hidden { display: none; }
.btn-cta:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ---- Trust badges ---- */
.trust-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #9ca3af;
}
.trust-badge svg { flex-shrink: 0; color: #10b981; }

/* ---- Spinner ---- */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ---- Step animation ---- */
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
.form-step.active { animation: slideIn 0.3s ease forwards; }

/* ---- Phone CTA bar ---- */
.phone-bar {
  background: linear-gradient(135deg, rgba(245,158,11,0.15), rgba(239,68,68,0.1));
  border: 1px solid rgba(245,158,11,0.25);
}
