*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --header-bg: #1e3a5f;
  --header-bg-hover: #2a4a75;
  --text-on-header: #fff;
  --text-muted: rgba(255, 255, 255, 0.9);
  --accent: #4a90d9;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background: #fff;
}

/* Header — синий фон, всё в один ряд */
.header {
  background: var(--header-bg);
  color: var(--text-on-header);
  padding: 0.6rem 1.25rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Лого и текст слева */
.logo-block {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.logo-icon {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.35rem 0.5rem;
  border-radius: 5px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Разделитель между лого и навигацией */
.header-divider {
  width: 1px;
  height: 26px;
  background: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-wrap: wrap;
  min-width: 0;
  margin-left: auto;
}

.nav-link {
  color: var(--text-on-header);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: 5px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav-link:hover {
  background: var(--header-bg-hover);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.2);
}

/* Колл-центр с иконкой — в один ряд с остальным */
.call-center {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-on-header);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.4rem 0.65rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  transition: background 0.2s;
  flex-shrink: 0;
}

.call-center:hover {
  background: rgba(255, 255, 255, 0.2);
}

.call-center i {
  font-size: 0.9rem;
}

/* Переключатель языка — выпадающий список, слева от колл-центра */
.lang-switcher {
  position: relative;
  flex-shrink: 0;
}

.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-on-header);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.lang-trigger:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.lang-trigger-icon {
  font-size: 0.65rem;
  opacity: 0.9;
  transition: transform 0.2s;
}

.lang-switcher.is-open .lang-trigger-icon {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin: 0.25rem 0 0;
  padding: 0.35rem 0;
  min-width: 100%;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  list-style: none;
  z-index: 50;
}

.lang-dropdown[hidden] {
  display: none;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  color: #333;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.lang-option:hover {
  background: #f0f4f8;
}

/* Main content */
.main {
  min-height: 60vh;
}

.hero {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin: 0 0 0.5rem;
  color: #1a1a1a;
}

.hero p {
  margin: 0;
  color: #666;
  font-size: 1.1rem;
}

/* Блок проверки VIN */
.vin-check {
  max-width: 560px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.vin-check h2 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  color: #1a1a1a;
}

.vin-check-desc {
  margin: 0 0 1.25rem;
  color: #666;
  font-size: 0.95rem;
}

.vin-form {
  margin-bottom: 1rem;
}

.vin-input-wrap {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.vin-input {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  letter-spacing: 0.05em;
}

.vin-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.25);
}

.vin-btn {
  padding: 0.65rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--header-bg);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.vin-btn:hover {
  background: var(--header-bg-hover);
}

.vin-hint {
  display: block;
  font-size: 0.8rem;
  color: #888;
  margin-top: 0.5rem;
}

.vin-result {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  font-weight: 500;
}

.vin-result--yes {
  background: #e8f5e9;
  color: #2e7d32;
}

.vin-result--no {
  background: #fff3e0;
  color: #e65100;
}

.vin-result--error {
  background: #ffebee;
  color: #c62828;
}

.vin-result-text {
  margin: 0;
}

/* Главная: проверка VIN слева, блок стоимости справа */
.home-two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  align-items: start;
}

.home-col {
  min-width: 0;
}

.home-col--vin .vin-check--home {
  max-width: none;
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.home-col--cost .cost-card--home {
  max-width: none;
}

@media (max-width: 900px) {
  .home-two-cols {
    grid-template-columns: 1fr;
    padding-bottom: 2rem;
  }

  .home-col--vin {
    order: 1;
  }

  .home-col--cost {
    order: 2;
  }
}

/* Страница «Стоимость таможенного оформления ТС» */
.main--cost {
  min-height: 60vh;
  padding: 2rem 1.5rem 4rem;
  background: #f0f2f5;
}

.cost-card {
  max-width: 560px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 2rem;
}

.cost-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 1.5rem;
  line-height: 1.3;
}

.cost-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cost-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cost-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #1a1a1a;
}

.cost-required {
  color: #c62828;
}

.cost-input {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
}

.cost-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(74, 144, 217, 0.2);
}

.cost-input::placeholder {
  color: #999;
}

/* Выпадающий список «Вариант проверки» */
.cost-select-wrap {
  position: relative;
}

.cost-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  font-size: 1rem;
  text-align: left;
  color: #333;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.cost-select-trigger:hover {
  background: #eee;
  border-color: #ccc;
}

.cost-select-text {
  flex: 1;
  color: #666;
}

.cost-select-wrap.is-open .cost-select-text {
  color: #333;
}

.cost-select-icon {
  font-size: 0.75rem;
  color: #666;
  margin-left: 0.5rem;
  transition: transform 0.2s;
}

.cost-select-wrap.is-open .cost-select-icon {
  transform: rotate(180deg);
}

.cost-select-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0.25rem 0 0;
  padding: 0.35rem 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  list-style: none;
  z-index: 20;
}

.cost-select-dropdown[hidden] {
  display: none;
}

.cost-select-option {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  color: #333;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}

.cost-select-option:hover {
  background: #e8eef5;
}

.cost-variant-fields {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cost-variant-fields[hidden] {
  display: none !important;
}

.cost-recaptcha {
  margin: 0.25rem 0 0;
}

.cost-recaptcha-placeholder {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  font-size: 0.9rem;
  color: #555;
}

.cost-recaptcha-placeholder i {
  color: #888;
}

.cost-recaptcha-placeholder small {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #888;
}

.cost-submit {
  width: 100%;
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: #1e3a5f;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}

.cost-submit:hover {
  background: #4a5c6d;
}

/* Карточки: цели и преимущества */
.cards-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem 2rem;
}

.cards-section-title {
  font-size: 1.5rem;
  margin: 0 0 1.25rem;
  color: #1a1a1a;
  text-align: center;
}

/* FAQ на главной */
.faq-section {
  max-width: 800px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem 1rem;
}

.faq-list {
  margin: 0 auto;
  padding: 0;
  list-style: none;
  border-top: 1px solid #eee;
}

.faq-item {
  border-bottom: 1px solid #eee;
}

.faq-question {
  width: 100%;
  padding: 0.9rem 0;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  color: #222;
  cursor: pointer;
}

.faq-question span {
  flex: 1;
  text-align: left;
}

.faq-arrow {
  font-size: 0.9rem;
  color: #555;
  transition: transform 0.2s ease;
}

.faq-item.is-open .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 0 0.9rem;
  font-size: 0.9rem;
  color: #555;
}

.faq-answer p {
  margin: 0 0 0.5rem;
}

.faq-answer ol,
.faq-answer ul {
  margin: 0 0 0.5rem 1.25rem;
  padding: 0;
}

.faq-answer table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0;
  font-size: 0.85rem;
}

.faq-answer table th,
.faq-answer table td {
  border: 1px solid #ddd;
  padding: 0.35rem 0.5rem;
  text-align: left;
}

.faq-more {
  display: block;
  margin: 1.25rem auto 0;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #333;
  background: #f5f5f5;
  border: 1px solid #ddd;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.faq-more:hover {
  background: #eee;
  border-color: #ccc;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.cards:last-of-type {
  margin-bottom: 0;
}

.card {
  background: #f5f7fa;
  border: 1px solid #e8ecf1;
  border-radius: 12px;
  padding: 1.5rem;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.card:hover {
  background: #e8eef5;
  border-color: #c5d4e8;
  box-shadow: 0 4px 12px rgba(30, 58, 95, 0.12);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--header-bg);
  color: #fff;
  border-radius: 10px;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  transition: background 0.25s ease, transform 0.25s ease;
}

.card:hover .card-icon {
  background: var(--header-bg-hover);
  transform: scale(1.05);
}

.card-title {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
  color: #1a1a1a;
}

.card-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #555;
}

/* Данные автомобиля по заявке */
.vehicle-data {
  margin: 0;
  padding: 0;
  list-style: none;
}

.vehicle-data-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #e8ecf1;
  align-items: baseline;
}

.vehicle-data-row:last-child {
  border-bottom: none;
}

.vehicle-data-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #555;
}

.vehicle-data-value {
  font-size: 1rem;
  color: #1a1a1a;
}

.vehicle-data-back {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e8ecf1;
}

.vehicle-data-back a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.vehicle-data-back a:hover {
  text-decoration: underline;
}

@media (max-width: 480px) {
  .vehicle-data-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* Футер */
.footer {
  background: #1a1a1a;
  color: #ccc;
  padding: 2.5rem 1.5rem 1.5rem;
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-block h3,
.footer-block h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: #fff;
}

.footer-block p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-tamognia {
  display: block;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
  font-size: 0.8rem;
  line-height: 1.35;
  color: #6b9bd1;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  text-align: center;
}

.footer-tamognia:hover {
  color: #8ab4f8;
  text-decoration: none;
}

.footer-tamognia-logo {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto 0.5rem;
  object-fit: contain;
}

.footer-tamognia-line {
  display: block;
}

.footer-hours {
  margin-top: 0.5rem !important;
  color: #aaa;
}

.footer-hours i {
  margin-right: 0.35rem;
}

.footer-block a {
  color: #8ab4f8;
  text-decoration: none;
}

.footer-block a:hover {
  text-decoration: underline;
}

.footer-block a i {
  margin-right: 0.35rem;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-nav a {
  color: #aaa;
}

.footer-socials-wrap {
  justify-self: end;
  text-align: right;
}

.footer-socials-wrap h4 {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: #999;
  background: transparent;
  border: none;
  border-radius: 4px;
  transition: color 0.2s, transform 0.15s;
}

.footer-social-link i {
  font-size: 1.15rem;
  margin: 0;
  line-height: 1;
}

.footer-social-link:hover {
  color: #8ab4f8;
  text-decoration: none;
  transform: translateY(-1px);
}

.footer-copy {
  grid-column: 1 / -1;
  padding-top: 1.5rem;
  border-top: 1px solid #333;
  text-align: center;
}

.footer-copy p {
  margin: 0;
  font-size: 0.85rem;
  color: #888;
}

/* Адаптив: на маленьких экранах навигация в колонку */
@media (max-width: 1024px) {
  .header-divider {
    display: none;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .nav {
    order: 1;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .nav {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-link {
    padding: 0.6rem;
  }

}
