/* Responsive Design - Mobile and Tablet Styles */

/* Base styles - Desktop by default */
.badge-text-desktop {
  display: inline;
}

.badge-text-mobile {
  display: none;
}

.benefit-title-desktop,
.benefit-desc-desktop {
  display: inline;
}

.benefit-title-mobile,
.benefit-desc-mobile {
  display: none;
}

/* Pricing table responsive styles */
.pricing-table-desktop {
  display: block;
}

.pricing-cards-mobile {
  display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  
  .features {
    grid-template-columns: 1fr 1fr;
  }
  
  .process {
    grid-template-columns: 1fr 1fr;
  }
  
  .packages {
    grid-template-columns: 1fr;
  }
  
  nav {
    gap: var(--space-md); /* Уменьшаем отступы между ссылками */
  }
}

@media (max-width: 900px) {
  nav {
    display: none; /* Скрываем навигацию на планшетах и мобильных */
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-lg);
  }
  
  .header-content {
    flex-direction: column;
    gap: var(--space-lg);
    text-align: center;
  }

  /* Adjust scroll margin for mobile header */
  section[id] {
    scroll-margin-top: 120px;
  }
  
  .hero h1 {
    font-size: 36px;
  }
  
  .hero .lead {
    font-size: 18px;
  }
  
  /* Badge responsive styles */
  .badge {
    font-size: 12px;
    padding: var(--space-xs) var(--space-sm);
    line-height: 1.3;
    text-align: center;
    max-width: 100%;
    word-wrap: break-word;
  }
  
  /* Show mobile version, hide desktop */
  .badge-text-desktop {
    display: none;
  }
  
  .badge-text-mobile {
    display: inline;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .process {
    grid-template-columns: 1fr;
  }
  
  .cta {
    flex-direction: column;
  }
  
  .form-actions {
    flex-direction: column;
    margin-bottom: var(--space-xl);
  }
  
  .footer-content {
    flex-direction: column;
  }
  
  .footer-links {
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-lg);
  }
  
  .theme-toggle {
    margin-top: var(--space-lg);
  }
  
  .faq summary {
    padding-right: 55px; /* Промежуточный отступ для планшетов */
  }

  /* Responsive modal */
  .modal-content {
    width: min(90vw, 500px);
    max-height: 85vh;
  }

  .modal-header {
    padding: var(--space-lg);
  }

  .modal-header h2 {
    font-size: 20px;
  }

  .modal-body {
    padding: var(--space-lg);
    max-height: 70vh;
  }

  .modal-body h3 {
    font-size: 16px;
  }

  /* Responsive Cookie Banner */
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }

  .cookie-text {
    min-width: auto;
  }

  .cookie-actions {
    width: 100%;
    justify-content: center;
  }

  .cookie-actions .btn {
    flex: 1;
    max-width: 150px;
  }

  /* Responsive Design for Advantages Section */
  .benefits-grid {
    grid-template-columns: 1fr;
  }
  
  /* На планшетах продолжаем показывать desktop версию текста */
  

  .timeline-comparison {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  
  .timeline-comparison::before {
    display: none;
  }
  
  .timeline-header {
    margin-bottom: var(--space-xl);
  }
  
  .timeline-icon {
    width: 50px;
    height: 50px;
  }
  
  .timeline-icon svg {
    width: 24px;
    height: 24px;
  }
  
  .timeline-header h4 {
    font-size: 20px;
  }
  
  .timeline-duration {
    font-size: 14px;
  }
  
  .timeline-steps {
    padding-left: var(--space-lg);
  }
  
  .step-content {
    padding: var(--space-md);
    overflow-x: auto;
  }
  
  .step-title {
    font-size: 15px;
  }
  
  .step-duration,
  .step-cost,
  .step-team {
    font-size: 13px;
    flex-direction: row;
    align-items: center;
    gap: var(--space-xs);
    white-space: nowrap;
  }
  
  .ai-phase {
    flex-direction: column;
    text-align: center;
    gap: var(--space-md);
  }
  
  .phase-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto;
  }
  
  .phase-icon svg {
    width: 18px;
    height: 18px;
  }
  
  .phase-title {
    font-size: 15px;
  }
  
  .phase-details {
    font-size: 13px;
  }
  
  .comparison-highlight {
    padding: var(--space-xl);
  }
  
  .highlight-content h4 {
    font-size: 24px;
  }
  
  .highlight-content p {
    font-size: 16px;
  }
  
  /* Switch to mobile cards for pricing table */
  .pricing-table-desktop {
    display: none;
  }
  
  .pricing-cards-mobile {
    display: block;
  }
  
  /* Fix text wrapping in pricing cards */
  .pricing-card {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .pricing-card h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .pricing-card .pricing-value {
    white-space: nowrap;
    font-weight: 700;
  }
  
  .pricing-card .pricing-tech {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 28px;
  }
  
  .section-header h2 {
    font-size: 28px;
  }
  
  /* Badge for very small screens */
  .badge {
    font-size: 11px;
    padding: var(--space-xs);
    line-height: 1.2;
  }
  
  .card {
    padding: var(--space-lg);
  }
  
  .faq summary {
    padding-right: 50px; /* Меньший отступ на мобильных */
    font-size: 14px; /* Немного меньший шрифт для лучшего размещения */
  }
  
  .faq summary::after {
    right: var(--space-md); /* Ближе к краю на мобильных */
    font-size: 18px; /* Немного меньше иконка */
  }

  .cookie-banner {
    padding: var(--space-md);
  }

  .cookie-actions {
    flex-direction: column;
  }

  .cookie-actions .btn {
    max-width: none;
  }

  .modal-content {
    width: min(95vw, 400px);
    max-height: 90vh;
  }

  .modal-body {
    max-height: 70vh;
  }

  .advantages-text h3 {
    font-size: 24px;
  }
  
  .advantages-text p {
    font-size: 16px;
  }
  
  .comparison-section h3,
  .savings-chart h3 {
    font-size: 20px;
  }
  
  .benefit-item {
    padding: var(--space-md);
  }
  
  .benefit-icon .icon {
    width: 36px;
    height: 36px;
  }
  
  .benefit-icon .icon svg {
    width: 18px;
    height: 18px;
  }
  
  /* Переключение на мобильную версию текста */
  .benefit-title-desktop,
  .benefit-desc-desktop {
    display: none;
  }
  
  .benefit-title-mobile,
  .benefit-desc-mobile {
    display: inline;
  }
  
  /* Оптимизация размеров для мобильных */
  .benefit-content h4 {
    font-size: 16px;
    line-height: 1.3;
  }
  
  .benefit-content p {
    font-size: 13px;
    line-height: 1.4;
  }
  
  
  .feature .icon.small {
    width: 28px;
    height: 28px;
  }
  
  .feature .icon.small svg {
    width: 14px;
    height: 14px;
  }
}
