/* ==========================================================================
   Erasyl Evakuator - Pixel-Perfect Responsive UI System
   Strict Mobile Overflow Guard (Zero horizontal scroll on any smartphone)
   ========================================================================== */

:root {
  --color-bg-main: #F8FAFC;
  --color-bg-surface: #FFFFFF;
  --color-bg-subtle: #F1F5F9;
  --color-glass-border: #E2E8F0;
  
  --color-primary: #D97706; /* Amber Safety Gold */
  --color-primary-hover: #B45309;
  
  --color-blue-call: #2563EB;
  --color-blue-call-hover: #1D4ED8;
  
  --color-whatsapp: #10B981;
  --color-whatsapp-hover: #059669;
  
  --color-text-main: #0F172A;
  --color-text-sub: #334155;
  --color-text-muted: #64748B;
  
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 15px -2px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 10px 25px -4px rgba(15, 23, 42, 0.12);
}

/* Reset & Global Overflow Guard */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  max-width: 100%;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  background-color: var(--color-bg-main);
  color: var(--color-text-main);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
  line-height: 1.5;
  min-height: 100vh;
  padding-bottom: 64px; /* Space for sticky mobile bar */
  background-color: var(--color-bg-main);
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* System Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  height: 28px;
  line-height: 1;
  max-width: 100%;
}

.badge-primary {
  background: #FFFBEB;
  color: #B45309;
  border: 1px solid #FCD34D;
}

.badge-info {
  background: #EFF6FF;
  color: #1E40AF;
  border: 1px solid #BFDBFE;
}

.badge-neutral {
  background: #FFFFFF;
  color: #334155;
  border: 1px solid #CBD5E1;
}

/* Base Button Component System with Responsive Text Fitting */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 46px;
  padding: 0 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
  max-width: 100%;
  flex-shrink: 1;
}

.btn svg {
  flex-shrink: 0;
  display: block;
}

.btn-call-main {
  background: var(--color-blue-call);
  color: #FFFFFF;
}

.btn-call-main:hover {
  background: var(--color-blue-call-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-whatsapp-main {
  background: var(--color-whatsapp);
  color: #FFFFFF;
}

.btn-whatsapp-main:hover {
  background: var(--color-whatsapp-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

/* Header Component */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-glass-border);
  height: 56px;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 100vw;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-text-main);
  flex-shrink: 0;
}

.logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.footer-logo-img {
  height: 44px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.phone-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 36px;
  padding: 0 0.75rem;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-blue-call);
  background: #EFF6FF;
  border-radius: var(--radius-full);
  border: 1px solid #BFDBFE;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.phone-link:hover {
  background: var(--color-blue-call);
  color: #FFFFFF;
}

.btn-header-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 36px;
  padding: 0 0.75rem;
  background: #ECFDF5;
  color: var(--color-whatsapp-hover);
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.btn-header-wa:hover {
  background: var(--color-whatsapp);
  color: #FFFFFF;
}

@media (max-width: 420px) {
  .logo-text {
    display: none; /* Hide brand text on ultra-narrow screens to guarantee zero overflow */
  }
}

@media (max-width: 480px) {
  .phone-text {
    display: none;
  }
  .phone-link {
    width: 36px;
    padding: 0;
    justify-content: center;
  }
}

/* Hero Section with Responsive Overflow Guard */
.hero-section {
  padding: 2.25rem 0;
  background: linear-gradient(180deg, #FFFFFF 0%, #F1F5F9 100%);
  border-bottom: 1px solid var(--color-glass-border);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  max-width: 100%;
}

.hero-tag {
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-text-main);
  margin-bottom: 0.75rem;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero-title span {
  color: var(--color-primary);
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-sub);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.hero-description {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  overflow-wrap: break-word;
}

/* HERO BUTTONS: Fully Responsive Padding & Zero Overflow */
.hero-cta-group {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
}

.hero-cta-group .btn {
  min-height: 52px;
  height: auto;
  padding: 0.85rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 800;
  gap: 0.55rem;
  border-radius: 12px;
  flex: 1;
}

.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 3px solid #FFFFFF;
  background: #E2E8F0;
  max-width: 100%;
}

.hero-media img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .hero-cta-group {
    flex-direction: column;
    width: 100%;
  }
  .hero-cta-group .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 1.25rem 0;
  }
  .hero-title {
    font-size: 1.5rem;
  }
  .hero-subtitle {
    font-size: 0.9rem;
  }
  .hero-description {
    font-size: 0.85rem;
    margin-bottom: 1.15rem;
  }
  .hero-cta-group .btn {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    min-height: 48px;
  }
  .hero-media img {
    height: 190px;
  }
}

/* Primary Spotlight Block (Шымкент ↔ Астана) */
.primary-spotlight-section {
  padding: 2.25rem 0;
  background: #FFFFFF;
}

.spotlight-card {
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
  border: 1.5px solid #FCD34D;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  box-shadow: var(--shadow-sm);
  text-align: center;
  max-width: 100%;
  box-sizing: border-box;
}

.spotlight-title {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--color-text-main);
  margin-bottom: 0.5rem;
  overflow-wrap: break-word;
}

.spotlight-title span {
  color: var(--color-primary-hover);
}

.spotlight-text {
  font-size: 0.925rem;
  color: var(--color-text-sub);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  overflow-wrap: break-word;
}

.spotlight-actions-title {
  font-weight: 800;
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.spotlight-btn-group {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  max-width: 100%;
}

.btn-spotlight-wa {
  background: var(--color-whatsapp);
  color: #FFFFFF;
  height: 46px;
  padding: 0 1.25rem;
}

.btn-spotlight-wa:hover {
  background: var(--color-whatsapp-hover);
}

@media (max-width: 640px) {
  .primary-spotlight-section {
    padding: 1.5rem 0;
  }
  .spotlight-title {
    font-size: 1.35rem;
  }
  .spotlight-btn-group {
    flex-direction: column;
    width: 100%;
  }
  .btn-spotlight-wa {
    width: 100%;
  }
}

/* Routes Section */
.routes-section {
  padding: 2.25rem 0;
  background: var(--color-bg-main);
}

.section-title-wrap {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 1.5rem auto;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-text-main);
  margin-bottom: 0.35rem;
  overflow-wrap: break-word;
}

.section-subtitle {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  overflow-wrap: break-word;
}

.routes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.route-card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  max-width: 100%;
}

.route-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.route-card.primary-route {
  border-color: #FCD34D;
  background: linear-gradient(180deg, #FFFBEB 0%, #FFFFFF 100%);
}

.route-card-image-wrap {
  position: relative;
  width: 100%;
  height: 150px;
  overflow: hidden;
  background: #E2E8F0;
  flex-shrink: 0;
}

.route-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

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

.route-card-badge-overlay {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  z-index: 2;
}

.route-card-content {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.route-card-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  overflow-wrap: break-word;
}

.route-card-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex: 1;
  overflow-wrap: break-word;
}

.route-card-action {
  width: 100%;
  margin-top: auto;
}

.btn-card-wa {
  background: var(--color-whatsapp);
  color: #FFFFFF;
  width: 100%;
  height: 44px;
  padding: 0 1rem;
}

.btn-card-phone {
  background: #EFF6FF;
  color: var(--color-blue-call);
  border: 1px solid #BFDBFE;
  width: 100%;
  height: 44px;
  padding: 0 1rem;
}

.btn-card-phone:hover {
  background: var(--color-blue-call);
  color: #FFFFFF;
}

/* Steps Section (Как договориться о перевозке) */
.steps-section {
  padding: 2.25rem 0;
  background: #FFFFFF;
  border-top: 1px solid var(--color-glass-border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.15rem;
}

.step-card {
  background: var(--color-bg-main);
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  position: relative;
  max-width: 100%;
}

.step-num {
  width: 34px;
  height: 34px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
  color: #FFFFFF;
  border-radius: 50%;
  font-weight: 900;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  box-shadow: 0 3px 10px rgba(217, 119, 6, 0.25);
}

.step-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-text-main);
  margin-bottom: 0.35rem;
  overflow-wrap: break-word;
}

.step-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* Benefits Section (Преимущества) */
.benefits-section {
  padding: 2.25rem 0;
  background: var(--color-bg-main);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.15rem;
}

.benefit-card {
  background: #FFFFFF;
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal);
  max-width: 100%;
}

.benefit-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.benefit-icon {
  width: 42px;
  height: 42px;
  background: #EFF6FF;
  color: var(--color-blue-call);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.benefit-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-text-main);
  margin-bottom: 0.35rem;
  overflow-wrap: break-word;
}

.benefit-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  overflow-wrap: break-word;
}

/* Other Routes Section */
.other-routes-section {
  padding: 2rem 0;
  background: #FFFFFF;
  border-top: 1px solid var(--color-glass-border);
  border-bottom: 1px solid var(--color-glass-border);
}

.other-routes-box {
  background: #F8FAFC;
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  max-width: 100%;
}

.other-routes-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-text-main);
  margin-bottom: 0.35rem;
  overflow-wrap: break-word;
}

.other-routes-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  line-height: 1.5;
  overflow-wrap: break-word;
}

.other-routes-buttons {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .other-routes-box {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.15rem;
  }
  .other-routes-buttons {
    width: 100%;
    flex-direction: column;
  }
  .other-routes-buttons .btn {
    width: 100%;
  }
}

/* FAQ Section */
.faq-section {
  padding: 2.25rem 0;
  background: var(--color-bg-main);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.15rem;
}

.faq-item {
  background: #FFFFFF;
  border: 1px solid var(--color-glass-border);
  border-radius: var(--radius-lg);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}

.faq-question {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.faq-question svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

.faq-answer {
  font-size: 0.875rem;
  color: var(--color-text-sub);
  line-height: 1.55;
  overflow-wrap: break-word;
}

/* Direct Call Banner Section */
.direct-call-section {
  padding: 2.25rem 0;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: #FFFFFF;
}

.direct-call-box {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}

.direct-call-title {
  font-size: 1.65rem;
  font-weight: 900;
  margin-bottom: 0.4rem;
  overflow-wrap: break-word;
}

.direct-call-subtitle {
  font-size: 0.925rem;
  color: #94A3B8;
  margin-bottom: 1.15rem;
  overflow-wrap: break-word;
}

.direct-call-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  max-width: 100%;
}

@media (max-width: 640px) {
  .direct-call-section {
    padding: 1.75rem 0;
  }
  .direct-call-title {
    font-size: 1.3rem;
  }
  .direct-call-actions {
    flex-direction: column;
    width: 100%;
  }
  .direct-call-actions .btn {
    width: 100%;
  }
}

/* Footer */
.footer {
  background: #070B14;
  color: #94A3B8;
  padding: 2rem 0 1.25rem 0;
}

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

.footer .logo {
  color: #FFFFFF;
}

.footer-brand p {
  color: #64748B;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.footer-col-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.75rem;
}

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

.footer-links a {
  color: #94A3B8;
  font-size: 0.85rem;
}

.footer-bottom {
  border-top: 1px solid #1E293B;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.775rem;
  color: #64748B;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* STICKY MOBILE BOTTOM BAR (98% MOBILE USERS) */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #FFFFFF;
  border-top: 1px solid var(--color-glass-border);
  padding: 0.45rem 0.65rem;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.1);
  max-width: 100vw;
}

.mobile-bar-inner {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.btn-mobile-call {
  flex: 1;
  background: var(--color-blue-call);
  color: #FFFFFF;
  height: 44px;
  font-size: 0.875rem;
  font-weight: 900;
  border-radius: var(--radius-md);
  padding: 0 0.4rem;
}

.btn-mobile-wa {
  flex: 1;
  background: var(--color-whatsapp);
  color: #FFFFFF;
  height: 44px;
  font-size: 0.875rem;
  font-weight: 900;
  border-radius: var(--radius-md);
  padding: 0 0.4rem;
}

@media (max-width: 767px) {
  .mobile-sticky-bar {
    display: block;
  }
}
