/* style.css - Основные стили InfraPay */
:root {
  --accent: #D32F2F;
  --accent-600: #B71C1C;
  --accent-100: #FFEBEE;
  --bg: #FFFFFF;
  --muted: #666666;
  --card: #FAFAFA;
  --border: #E0E0E0;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(211,47,47,0.08);
  --shadow-hover: 0 8px 30px rgba(211,47,47,0.12);
}

/* Базовые стили */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #333;
}

/* Навигация */
.navbar {
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.nav-link {
  font-weight: 500;
  color: var(--muted) !important;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: var(--accent) !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* Кнопки */
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: var(--accent-600);
  border-color: var(--accent-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-outline-primary {
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.btn-outline-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

/* Hero секция */
.hero {
  background: linear-gradient(135deg, var(--accent-100) 0%, rgba(255,255,255,0) 100%);
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
    margin-top: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 2rem;
}

.hero-actions {
  margin: 2rem 0;
}

.trust {
  color: var(--muted);
  font-size: 0.9rem;
}

.trust div {
  margin-bottom: 0.5rem;
}

/* Карточки */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  margin-bottom: 1.5rem;
}

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

.card-title {
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
}

/* Курсы валют */
.rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.rate-row:first-child {
  border-top: none;
}

.pair {
  color: var(--muted);
  font-weight: 500;
}

.value {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}

/* Шаги работы */
.step-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.step-item:last-child {
  border-bottom: none;
}

.step-number {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.step-content strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #333;
}

.step-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Полностью переписываем FAQ для устранения дерганства */
.faq-list {
    margin: 0;
    padding: 0;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    transition: none;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.25rem 0;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
    transition: color 0.2s ease;
    position: relative;
}

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

.faq-question::after {
    content: "+";
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--muted);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.faq-question[aria-expanded="true"]::after {
    content: "−";
    transform: rotate(180deg);
}

/* Убираем все стандартные стили Bootstrap для accordion */
.faq-answer.collapse {
    display: none;
}

.faq-answer.collapse.show {
    display: block;
}

.faq-answer.collapsing {
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
}

/* Кастомные стили для контента FAQ */
.faq-answer {
    padding: 0 0 1.25rem;
}

.faq-answer p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.faq-answer a {
    color: var(--accent);
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Отключаем все transition для collapsing, чтобы не было дерганства */
.collapsing {
    transition: none !important;
}

/* Принудительно задаем высоту для плавной анимации */
.collapsing {
    position: relative;
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
}

/* Отзывы */
.review {
  background: var(--accent-100);
  padding: 1.5rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  margin: 0;
  font-style: italic;
  line-height: 1.6;
  color: #333;
  height: 100%;
}

.review cite {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Галерея */
.gallery-thumb {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gallery-thumb:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-hover);
}

/* Модальные окна */
.modal-content {
  border: none;
  border-radius: var(--radius);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 1.5rem;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

/* Конвертер */
.result-card {
  background: linear-gradient(135deg, var(--accent-100) 0%, #fff 100%);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.result-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.result-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.result-currency {
  font-size: 1.125rem;
  font-weight: 600;
  color: #333;
}

.result-rate {
  font-size: 0.875rem;
  color: var(--muted);
  font-style: italic;
}

/*/* Боковое меню - компактная версия */
.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.side-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    right: -400px;
    width: 320px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 20px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.side-menu.active {
    right: 0;
}

.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--accent-100), var(--bg));
    flex-shrink: 0;
}

.menu-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.menu-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
}

.menu-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--muted);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.menu-close:hover {
    background: var(--accent-100);
    color: var(--accent);
}

.menu-content {
    flex: 1;
    padding: 0.75rem 0;
    overflow-y: auto;
}

.menu-section {
    margin-bottom: 1rem;
    padding: 0 1.25rem;
}

.section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-links li {
    margin-bottom: 0.25rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    text-decoration: none;
    color: #333;
    border-radius: var(--radius);
    transition: all 0.3s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.95rem;
}

.menu-link:hover {
    background: var(--accent-100);
    color: var(--accent);
    transform: translateX(3px);
}

.menu-button {
    cursor: pointer;
}

.menu-icon {
    font-size: 1.1em;
    width: 20px;
    text-align: center;
    color: var(--muted);
}

.menu-link:hover .menu-icon {
    color: var(--accent);
}

.menu-text {
    flex: 1;
    font-weight: 500;
}

.menu-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--card);
    flex-shrink: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.contact-icon {
    font-size: 1em;
    width: 16px;
    text-align: center;
}

/* Кнопка меню для мобильных */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    padding: 0;
    gap: 3px;
    transition: all 0.3s ease;
}

.menu-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: #333;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.menu-toggle.active {
    background: rgba(0, 0, 0, 0.1);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Адаптивность для меню */
@media (max-width: 768px) {
    .navbar-collapse {
        display: none !important;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .side-menu {
        width: 280px;
    }
}

@media (max-width: 480px) {
    .side-menu {
        width: 260px;
    }
    
    .menu-section {
        padding: 0 1rem;
    }
    
    .menu-header {
        padding: 0.875rem 1rem;
    }
    
    .menu-footer {
        padding: 0.875rem 1rem;
    }
}
/* Футер */
.footer {
  background: #fafafa;
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.25rem;
  margin-top: 3rem;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.125rem;
  color: #333;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.divider {
  color: var(--border);
}

/* Анимации */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Утилиты */
.small-note {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 1rem;
  line-height: 1.5;
}

.text-accent {
  color: var(--accent) !important;
}

.bg-accent {
  background-color: var(--accent) !important;
}

/* Адаптивность */
@media (max-width: 768px) {
  .navbar-collapse {
    display: none !important;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .hero {
    padding: 3rem 0;
    text-align: center;
        margin-top: 70px;
  }
  
  .brand {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-actions {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-actions .btn {
    width: 100%;
  }
  
  .footer-top {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  
  .footer-info {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .divider {
    display: none;
  }
  
  .side-menu {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 1rem;
  }
  
  .step-item {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .step-number {
    align-self: center;
  }
}



/* Супер компактная версия */
.hero {
    padding: 30px 0 20px 0;
}

.brand {
    margin-bottom: 1rem;
}

.hero-actions {
    margin: 1rem 0;
}

.trust {
    margin-top: 1rem;
}

#rates {
    margin-bottom: 1.5rem;
}

.card-body.p-4 {
    padding: 1.25rem !important;
}

/* Уменьшаем общие отступы между секциями */
main.container.my-5 {
    margin-top: 2rem !important; /* Было 3rem */
    margin-bottom: 2rem !important;
}

/* Уменьшаем отступы между карточками */
.mb-5 {
    margin-bottom: 2rem !important; /* Было 3rem */
}



/* Исправление поддергивания анимаций */
.faq-answer.collapse {
    transition: all 0.3s ease;
}

.faq-answer.collapsing {
    transition: height 0.3s ease;
}

/* Убираем поддергивание бокового меню */
.side-menu {
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.side-menu:not(.active) {
    transform: translateX(100%);
}

.side-menu-overlay {
    transition: all 0.3s ease;
}

/* Улучшаем плавность анимаций */
.menu-link {
    transition: all 0.2s ease;
}

.faq-question {
    transition: all 0.2s ease;
}

/* Убираем резкие переходы */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Оптимизация производительности анимаций */
.side-menu,
.side-menu-overlay,
.faq-answer,
.menu-link,
.faq-question {
    will-change: transform, opacity;
    backface-visibility: hidden;
}


/* Дополнительные улучшения для плавности бокового меню */
body.side-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

.side-menu {
    transform: translateX(100%);
}

.side-menu.active {
    transform: translateX(0);
}

/* Убираем скачки при открытии/закрытии */
.menu-toggle span {
    transform-origin: center;
}