/* UI/UX Pro Max Overrides */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #F8FAFC;
  --bg-soft: #F1F5F9;
  --bg-dark: #0F172A;
  --fg: #0F172A;
  --fg-muted: #64748B;
  --primary: #FF5A3C;
  --primary-dark: #E0492F;
  --primary-soft: #FFF1EE;
  --primary-gradient: linear-gradient(135deg, #FF6B4A 0%, #FF451C 100%);
  --success: #10B981;
  --success-soft: #D1FAE5;
  --warn: #F59E0B;
  --warn-soft: #FEF3C7;
  --border: #E2E8F0;
  
  --shadow-sm: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 10px 25px -5px rgba(255, 90, 60, 0.4);
  
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--fg);
}

h1, h2, h3, h4, .logo, .btn, .step-num, .price-value {
  font-family: 'Outfit', sans-serif;
}

/* Glassmorphism Header */
.nav {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

.logo {
  font-size: 24px;
  font-weight: 800;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo svg {
  width: 24px;
  height: 24px;
}

.nav-links {
  align-items: center;
}

.nav-cta-btn {
  margin-left: 16px;
}

/* Primary Button */
.btn-primary {
  background: var(--primary-gradient);
  border: none;
  box-shadow: var(--shadow-glow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: white !important;
}
.btn-primary:hover {
  background: var(--primary-gradient);
  color: white !important;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 15px 30px -5px rgba(255, 90, 60, 0.5);
  will-change: transform;
}

/* Hero Section */
.hero {
  background: radial-gradient(circle at top, #FFF1EE 0%, #F8FAFC 100%);
  position: relative;
  overflow: visible;
  padding: 40px 0;
  min-height: calc(100vh - 74px);
  display: flex;
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(255,90,60,0.15) 0%, rgba(255,255,255,0) 70%);
  z-index: 0;
  pointer-events: none;
}
.hero-content {
  position: relative;
  z-index: 1;
}
.hero h1 {
  font-size: clamp(40px, 5vw, 56px);
  line-height: 1.1;
  font-weight: 800;
}

/* App Card */
.app-section {
  position: relative;
  z-index: 2;
  margin-top: -40px;
  padding-bottom: 120px;
}
.app-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 1);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.5) inset;
  padding: 48px;
}

/* Segmented Controls (Tabs & Gender) */
.tabs-wrapper, .gender-selector {
  background: var(--bg-soft);
  padding: 6px;
  border-radius: var(--radius-md);
  display: flex;
  gap: 4px;
  border: none;
}
.tab-btn, .gender-btn {
  border: none !important;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg-muted);
  font-weight: 600;
  transition: all 0.2s ease;
  padding: 12px 20px;
}
.tab-btn.active, .gender-btn.selected {
  background: white !important;
  color: var(--fg) !important;
  box-shadow: var(--shadow-sm);
}

/* Format Cards */
.format-card-static {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.format-card-static:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.format-card-static.selected {
  background: var(--primary-soft);
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

/* Dropzone */
.dropzone {
  background: white;
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
}
.dropzone:hover {
  border-color: var(--primary);
  background: #FAFAFA;
  transform: scale(1.01);
}

/* Steps Pro Max Redesign */
.steps-grid .step-card {
  text-align: left !important;
  padding: 32px 24px !important;
  position: relative !important;
  overflow: hidden !important;
  background: white !important;
  border-radius: 24px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04) !important;
  border: 1px solid rgba(0,0,0,0.03) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
  z-index: 1 !important;
  backdrop-filter: none !important;
}
.steps-grid .step-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.08) !important;
  background: white !important;
}
.step-icon {
  width: 56px !important;
  height: 56px !important;
  margin: 0 0 20px 0 !important;
  border-radius: 16px !important;
  background: var(--primary-soft) !important;
  font-size: 28px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.step-bg-num {
  position: absolute !important;
  top: -15px !important;
  right: -10px !important;
  font-size: 140px !important;
  font-weight: 900 !important;
  color: var(--primary) !important;
  opacity: 0.04 !important;
  line-height: 1 !important;
  z-index: -1 !important;
  user-select: none !important;
  pointer-events: none !important;
}
.steps-grid .step-card h3 {
  font-size: 20px !important;
  font-weight: 700 !important;
  margin-bottom: 12px !important;
  color: var(--fg) !important;
}
.steps-grid .step-card p {
  font-size: 15px !important;
  color: var(--fg-muted) !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* Trust Bar */
.trust-bar {
  background: var(--bg-dark);
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.trust-item b {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Docs Filters (Chips) */
.docs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 24px;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}
.filter-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.filter-chip.active {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

/* FAQ Overrides */
.faq-item summary::after {
  top: 50% !important;
  transform: translateY(-50%) !important;
  right: 22px !important;
}
.faq-item[open] summary::after {
  content: "+" !important;
  transform: translateY(-50%) rotate(45deg) !important;
}

/* Mobile Navigation Fixes */
@media (max-width: 768px) {
  .nav-links {
    height: 100vh;
    width: 100%;
  }
}

/* Fix section padding causing white bands */
.section {
  padding: 48px 0 !important;
}

/* Footer & Sticky CTA Overrides */
html, body {
  overflow-x: hidden; /* Предотвращаем горизонтальный скролл */
  max-width: 100%;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

/* Убираем лишний отступ между CTA-секцией и футером */
.final-cta {
  padding-bottom: 24px !important;
}

.footer {
  padding-bottom: 84px !important; /* Ровно под высоту кнопки + отступ 24px */
  padding-top: 24px !important;
  background: var(--bg-dark) !important;
  margin-bottom: 0 !important;
  border-top: none !important; /* Убираем белую полосу */
}
.sticky-cta {
  bottom: 24px !important;
}
.scroll-top {
  bottom: 24px !important;
}

@media (max-width: 880px) {
  .sticky-cta, .scroll-top {
    bottom: 24px !important;
  }
}

/* Footer Logo Fix */
.footer-brand {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}
.footer-brand svg {
  width: 28px !important;
  height: 28px !important;
  fill: none !important;
  flex-shrink: 0;
}

/* App Form Overrides */
.tabs-wrapper {
  display: flex !important;
  width: 100% !important;
}
.tabs-wrapper .tab-btn {
  flex: 1 !important;
  text-align: center !important;
}

.visa-card {
  position: relative;
  overflow: hidden;
}
.visa-card span {
  position: relative;
  z-index: 2;
}
.visa-flag-bg {
  position: absolute;
  right: -15px;
  bottom: -15px;
  font-size: 80px;
  opacity: 0.15;
  z-index: 0;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}

/* Grid layout restored */
.format-grid, .size-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 24px; }

/* Scanner Animation & Checklist */
.upload-thumb-wrapper {
  position: relative;
  display: inline-block;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.scan-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.1);
  display: none;
}
.scan-overlay.active {
  display: block;
}
.scan-line {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 4px;
  background: var(--success);
  box-shadow: 0 0 10px 2px var(--success);
  animation: scan 2s infinite ease-in-out;
}
@keyframes scan {
  0% { top: 0%; }
  50% { top: 98%; }
  100% { top: 0%; }
}

.analysis-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}
.analysis-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--fg-muted);
}
.analysis-check-item .check-icon {
  width: 18px; height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.analysis-check-item.loading .check-icon::before {
  content: "⏳";
  animation: pulse 1s infinite;
}
.analysis-check-item.done .check-icon::before {
  content: "✅";
}
.analysis-check-item.done .check-text {
  color: var(--fg);
  font-weight: 500;
}
@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}
