* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #F6F5FA;
  --surface: #ffffff;
  --border: #e2e5ea;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --accent: #2563eb;
  --green: #16a34a;
  --yellow: #d97706;
  --radius: 16px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* ===== Navbar ===== */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.partners-navbar {
  position: relative;
}

.partners-navbar .navbar-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.navbar-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.navbar-nav {
  display: flex;
  gap: 24px;
  list-style: none;
}

.navbar-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.navbar-nav a:hover {
  color: var(--text);
}

.navbar-cta {
  display: flex;
  gap: 10px;
}

.lang-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.lang-toggle:hover {
  background: var(--bg);
}

.navbar-cta a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.navbar-cta a:hover {
  opacity: 0.85;
}

.btn-telegram {
  background: #2AABEE;
  color: #fff;
}

.btn-whatsapp {
  background: #25D366;
  color: #fff;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Hero section ===== */
.hero {
  padding: 64px 0 48px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -1px;
  margin-bottom: 16px;
  color: var(--text);
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 32px;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-badge .icon {
  font-size: 1.2rem;
}

/* ===== Section ===== */
.section {
  padding: 48px 0;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
  font-size: 1rem;
}

.calculator-section-title {
  text-align: center;
  margin-bottom: 20px;
}

/* ===== Calculator card ===== */
.calculator-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  max-width: 520px;
  margin: 0 auto;
}

/* Banner */
.banner {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.85rem;
  margin-bottom: 16px;
  text-align: center;
}

.banner.warning {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  color: #92400e;
}

.banner.error {
  background: #fee2e2;
  border: 1px solid #ef4444;
  color: #991b1b;
}

.hidden {
  display: none !important;
}

/* Exchange rows */
.exchange-row {
  margin-bottom: 16px;
}

.exchange-row-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.exchange-row-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.field-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  outline: none;
}

.field-help:focus-visible .field-help-icon {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
}

.field-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-muted);
  background: var(--surface);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.field-help:hover .field-help-icon,
.field-help:focus-visible .field-help-icon {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.08);
}

.field-help-tooltip {
  position: absolute;
  z-index: 50;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  width: min(280px, calc(100vw - 48px));
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text);
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s, visibility 0.15s;
}

.field-help-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: var(--border);
}

.field-help:hover .field-help-tooltip,
.field-help:focus .field-help-tooltip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (max-width: 480px) {
  .field-help-tooltip {
    left: 0;
    transform: none;
    width: min(260px, calc(100vw - 40px));
  }

  .field-help-tooltip::after {
    left: 14px;
    margin-left: 0;
  }
}

.exchange-row-rate {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.exchange-input-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
  transition: border-color 0.2s;
}

.exchange-input-group:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.exchange-input-group input {
  flex: 1;
  min-width: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 14px 16px;
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--text);
  outline: none;
}

.exchange-input-group input::placeholder {
  color: #b0b7c3;
}

.exchange-input-group input[readonly] {
  color: var(--green);
  font-weight: 600;
}

.currency-select {
  width: auto;
  min-width: 110px;
  border: none;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: var(--surface);
  padding: 14px 34px 14px 14px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  color: var(--text);
  outline: none;
}

/* Result */
.result {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 4px;
}

.result-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 0;
}

.result-line .label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.result-line .value {
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--text);
}

.result-line.main .value {
  font-size: 1.3rem;
  color: var(--green);
}

.order-actions {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-actions button {
  border: none;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}

.order-actions button:hover {
  opacity: 0.9;
}

.order-status {
  color: var(--text-muted);
  font-size: 0.82rem;
}

/* ===== Reference card ===== */
.reference-card {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.reference-card h2 {
  font-size: 1.12rem;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text);
}

.reference-table {
  width: 100%;
  border-collapse: collapse;
}

.reference-table th,
.reference-table td {
  text-align: center;
  border-top: 1px solid var(--border);
  padding: 10px 8px;
  font-size: 0.92rem;
  color: var(--text);
}

.reference-table th {
  color: #4b5563;
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.reference-table td {
  font-weight: 600;
  font-size: 1rem;
}

.reference-table td:first-child {
  font-weight: 700;
  text-align: left;
}

.reference-table th:first-child {
  text-align: left;
}

/* ===== How it works ===== */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}

.step-card:hover {
  box-shadow: var(--shadow-lg);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 16px;
}

.step-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== Why us ===== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
}

.benefit-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.benefit-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.benefit-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ===== Contacts ===== */
.contacts-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contacts-card h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.contacts-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-buttons a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
}

.contact-buttons a:hover {
  opacity: 0.85;
}

.contacts-hours {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 48px;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.footer-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}

.footer-meta p {
  margin: 2px 0;
}

/* ===== Fee tiers ===== */
.fee-tiers {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.fee-tiers h3 {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.83rem;
  padding: 4px 0;
  color: var(--text-muted);
}

.tier-row.active {
  color: var(--accent);
  font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar-nav {
    display: none;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero .subtitle {
    font-size: 1rem;
  }

  .steps-grid,
  .benefits-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .calculator-card {
    padding: 24px 20px;
  }

  .section-title {
    font-size: 1.4rem;
  }

  .contacts-card {
    padding: 28px 20px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-meta {
    text-align: center;
  }
}

@media (max-width: 400px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .calculator-card {
    padding: 18px 14px;
  }

  .result-line.main .value {
    font-size: 1.1rem;
  }

  .hero-badges {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
}
