/* auto-insurance — consumer checkout, not an admin panel.
   Clean, airy, mobile-first. No framework. */

:root {
  --background: #ffffff;
  --surface: #f7f8fa;
  --text: #14181f;
  --muted: #6b7280;
  --border: #e7e9ee;
  --accent: #2f5bff;
  --accent-dark: #1f42cc;
  --success: #1f9d55;
  --danger: #d1483a;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(20, 24, 31, 0.06);
  --content-width: 480px;

  /* Homepage-only decorative accent — a dosed nod to Georgia/the route,
     never used for interactive/brand elements shared with checkout. */
  --ge-accent: #b3402f;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 20px 20px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ---------- progress indicator ---------- */

.progress {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}

.progress__row {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}

.progress__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.progress__num {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--muted);
  text-decoration: none;
}

a.progress__num {
  cursor: pointer;
}

/* Blue is reserved for the one active step -- hover is the only place a
   done-and-clickable step ever gets an accent color, and it's transient. */
a.progress__num:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.progress__step.is-active .progress__num {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.progress__step.is-done .progress__num {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
}

.progress__step.is-future .progress__num {
  background: var(--surface);
  border-color: var(--border);
  color: var(--muted);
  opacity: 0.55;
  cursor: not-allowed;
}

.progress__label {
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  line-height: 1.15;
}

.progress__step.is-active .progress__label {
  color: var(--text);
}

.progress__current-label {
  display: none;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 640px) {
  .progress__label {
    display: none;
  }

  .progress__current-label {
    display: block;
  }
}

/* ---------- generic content ---------- */

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step--centered {
  text-align: center;
  align-items: center;
}

.step__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 4px 0 0;
}

.step__text {
  color: var(--muted);
  margin: 0;
}

.step__hint {
  color: var(--muted);
  font-size: 0.9rem;
  margin: -8px 0 0;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.05s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-dark);
}

.btn--ghost {
  background: var(--surface);
  color: var(--text);
}

.btn--lg {
  padding: 16px 24px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn--sm {
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn--block {
  width: 100%;
}

/* ---------- forms ---------- */

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field__label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.field input[type="text"],
.field input[type="date"],
.field input[type="tel"],
.field input[type="email"],
.field select,
.contact-row__field input[type="text"],
.contact-row__field input[type="tel"],
.contact-row__field input[type="email"] {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease;
  width: 100%;
}

.field input:focus,
.field select:focus,
.contact-row__field input:focus {
  border-color: var(--accent);
  background: #fff;
}

.field__input--mono {
  font-family: "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.03em;
}

.field__input--upper {
  text-transform: uppercase;
}

.field__error {
  color: var(--danger);
  font-size: 0.85rem;
}

.form__error {
  color: var(--danger);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------- contact block (policyholder) ---------- */

.contact-block {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- driver / owner subsections (policyholder) ---------- */

.subsection {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 18px;
  border-top: 1.5px solid var(--border);
}

.subsection__title {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

#driver-fields,
#owner-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* [hidden] vs. our own `display: flex` above are equal-or-lower specificity
   (see .picker__panel[hidden] above for the same fix on the same root
   cause) -- without this, the server-rendered `hidden` attribute (see
   policyholder.html/checkout_routes.py's relationship-state context) is
   silently defeated and the block stays visible even when Driver/Owner =
   "Да" says it shouldn't be. */
#driver-fields[hidden],
#owner-fields[hidden],
#owner-citizenship-field[hidden] {
  display: none;
}

.contact-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-row__label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.contact-row__required {
  color: var(--danger);
}

.contact-row__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (min-width: 480px) {
  .contact-row {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .contact-row__label {
    flex: 0 0 110px;
  }

  .contact-row__field {
    flex: 1;
  }
}

.radio-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.95rem;
}

.radio-option input {
  accent-color: var(--accent);
}

/* ---------- choice cards (method / period) ---------- */

.choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.choice-grid--periods {
  grid-template-columns: 1fr 1fr;
}

.choice-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.choice-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.choice-card__icon {
  font-size: 1.6rem;
}

.choice-card__title {
  font-weight: 700;
  font-size: 1.05rem;
}

.choice-card__hint {
  color: var(--muted);
  font-size: 0.9rem;
}

.choice-card--period {
  align-items: center;
  text-align: center;
}

.choice-card--period.is-selected {
  border-color: var(--accent);
  background: #eef2ff;
}

.choice-card__price {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.1rem;
}

.choice-grid--categories {
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 480px) {
  .choice-grid--categories {
    grid-template-columns: repeat(3, 1fr);
  }
}

.choice-card--category {
  align-items: center;
  text-align: center;
  padding: 16px 12px;
  gap: 8px;
  position: relative;
}

.choice-card--category.is-selected {
  border-color: var(--accent);
  background: #eef2ff;
}

.choice-card__vehicle-icon {
  width: 28px;
  height: 28px;
  color: var(--muted);
}

.choice-card--category.is-selected .choice-card__vehicle-icon {
  color: var(--accent);
}

.choice-card--category .choice-card__title {
  font-size: 0.85rem;
  font-weight: 600;
}

.choice-card__check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.choice-card__check svg {
  width: 10px;
  height: 10px;
}

.choice-card:disabled,
.choice-card.is-unavailable {
  cursor: not-allowed;
  opacity: 0.6;
}

.choice-card__soon-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.step__title--sm {
  font-size: 1.1rem;
  margin-top: 4px;
}

/* ---------- segmented toggle (VIN / chassis, entity type) ---------- */

.segmented {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
}

.segmented__option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: calc(var(--radius-md) - 3px);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.segmented__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented__option.is-active {
  background: var(--surface);
  color: var(--accent);
}

.radio-group--entity {
  /* Mobile-first single column: at narrow widths (e.g. 375px) two 1fr
     columns squeeze "Юридическое лицо" + its "СКОРО" badge into ~150px,
     causing horizontal overflow -- full width avoids that without
     changing any behavior. Widened back to two columns once there's
     room (matches .choice-grid--categories' own breakpoint). */
  grid-template-columns: 1fr;
  margin-bottom: 4px;
}

@media (min-width: 480px) {
  .radio-group--entity {
    grid-template-columns: 1fr 1fr;
  }
}

.radio-option--disabled {
  cursor: not-allowed;
  opacity: 0.6;
  justify-content: space-between;
}

/* ---------- searchable catalog picker (manufacturer / model) ---------- */

.picker {
  position: relative;
}

.picker__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: var(--surface);
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.picker__trigger:focus {
  border-color: var(--accent);
}

.picker--disabled .picker__trigger {
  cursor: not-allowed;
  opacity: 0.6;
}

.picker__trigger-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker__chevron {
  color: var(--muted);
  flex-shrink: 0;
  margin-left: 8px;
}

.picker__panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 10px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* [hidden] vs. our own `display: flex` above are equal specificity — without
   this, the panel stays laid out (and intercepts clicks on whatever sits
   below it) after being closed via the `hidden` attribute. */
.picker__panel[hidden] {
  display: none;
}

.picker__search {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.95rem;
  outline: none;
}

.picker__search:focus {
  border-color: var(--accent);
}

.picker__list {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.picker__option {
  text-align: left;
  border: none;
  background: none;
  padding: 10px 8px;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
}

.picker__option:hover {
  background: var(--surface);
}

.picker__empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 8px;
  margin: 0;
}

.picker__empty--error {
  color: var(--danger);
}

.picker__retry {
  border: none;
  background: none;
  padding: 0;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

/* ---------- date preview ---------- */

.date-preview {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.date-preview__label {
  color: var(--muted);
  font-size: 0.85rem;
}

.date-preview__value {
  font-weight: 700;
  font-size: 1.05rem;
}

/* ---------- summary ---------- */

.summary-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.summary-card__row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.summary-card__row--main {
  font-weight: 700;
  font-size: 1.1rem;
}

.summary-card__label {
  color: var(--muted);
}

.summary-card__total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1.5px solid var(--border);
  padding-top: 14px;
  font-weight: 700;
}

.summary-card__price {
  font-size: 1.4rem;
  color: var(--accent);
}

.summary-actions {
  display: flex;
  gap: 12px;
}

.summary-actions .btn {
  flex: 1;
}

.summary-actions form {
  flex: 1;
  display: flex;
}

/* ---------- shared Back/Next row (every checkout step) ---------- */

.step-nav {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.step-nav .btn {
  flex: 1;
}

.step-nav--start {
  justify-content: flex-start;
}

.step-nav--start .btn {
  flex: 0 0 auto;
}

.step-nav .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- date step: computed (read-only) end date ---------- */

.field--readonly {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  color: var(--text);
  font-size: 1rem;
}

.field--readonly.is-empty {
  color: var(--muted);
}

/* ---------- summary sections (review step) ---------- */

.summary-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1.5px solid var(--border);
}

.summary-section:first-child {
  padding-top: 0;
  border-top: none;
}

.summary-section__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.summary-section__title {
  font-weight: 700;
  font-size: 0.95rem;
}

.summary-section__edit {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

/* ---------- document upload ---------- */

.upload-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.upload-area:hover {
  border-color: var(--accent);
}

.upload-area__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}

.upload-area__icon--svg {
  padding: 9px;
  box-sizing: border-box;
}

.upload-area__label {
  font-weight: 600;
  text-align: center;
}

/* ---------- camera + gallery: two upload actions side by side ---------- */

.upload-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 480px) {
  .upload-actions {
    flex-direction: row;
  }
}

.upload-actions .upload-area {
  flex: 1;
}

.upload-area--compact {
  padding: 24px 16px;
}

.upload-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  background: var(--surface);
}

.upload-list__name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}

.upload-list__remove {
  flex: 0 0 auto;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

/* ---------- camera capture modal (getUserMedia live preview) ---------- */

.camera-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000;
  display: flex;
  flex-direction: column;
}

.camera-modal[hidden] {
  display: none;
}

.camera-modal__video {
  flex: 1;
  width: 100%;
  min-height: 0;
  object-fit: cover;
  background: #000;
}

.camera-modal__controls {
  display: flex;
  gap: 12px;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: #000;
}

.camera-modal__controls .btn {
  flex: 1;
}

/* Sub-states inside the modal (loading / live preview / error) are switched
   via a `data-state` attribute on .camera-modal, not via `hidden` -- this
   deliberately avoids the [hidden]-vs-author-`display` specificity trap
   (see #driver-fields/#owner-fields above): plain attribute-selector
   scoping like this has no competing native UA rule to fight, so there's
   no equivalent bug to reintroduce here. Default (loading): status text
   shown, video and error hidden, capture button disabled via its own
   `disabled` attribute (set in JS). */
.camera-modal__status--loading,
.camera-modal__status--error {
  display: none;
  color: #fff;
  text-align: center;
  padding: 24px 20px 0;
  margin: 0;
}

.camera-modal[data-state="loading"] .camera-modal__status--loading {
  display: block;
}

.camera-modal[data-state="error"] .camera-modal__status--error {
  display: block;
}

.camera-modal:not([data-state="active"]) .camera-modal__video {
  display: none;
}

.upload-list__remove:hover {
  color: var(--text);
}

/* ---------- payment ---------- */

.payment-amount {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.payment-amount__label {
  color: var(--muted);
  font-size: 0.9rem;
}

.payment-amount__value {
  font-size: 2rem;
  font-weight: 800;
}

.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.payment-qr {
  display: flex;
  justify-content: center;
}

.payment-transfer-url {
  display: block;
  text-align: center;
  color: var(--accent);
  font-size: 0.9rem;
  /* Long URLs must never force horizontal scroll on narrow phones --
     overflow-wrap alone isn't enough for a single unbroken token (no
     spaces/hyphens for the browser to break on), so allow a mid-word
     break as a last resort; word-break: break-all is intentionally NOT
     used here, since it would also break short/normal text awkwardly if
     this class were ever reused elsewhere. */
  overflow-wrap: anywhere;
}

.payment-qr__image {
  /* Fixed real size (not full-width) so it stays legibly scannable rather
     than shrinking on narrow phones or growing awkwardly large on desktop
     -- max-width/height guarantee it never overflows a narrow viewport. */
  width: 220px;
  height: 220px;
  max-width: 100%;
  max-height: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  object-fit: contain;
}

/* ---------- small screens (default already mobile-first, this just caps desktop width) ---------- */

@media (min-width: 540px) {
  .page {
    padding-top: 40px;
  }
}

/* ==========================================================================
   Homepage — Variant 2 ("В дорогу"): big hero photo, three country cards
   (Georgia active/automated, Armenia/Turkey routed to an operator via the
   support block), and a support/contact block. Wider container than the
   checkout wizard;
   scoped to .page--home so the checkout screens (still 480px, mobile-first)
   are untouched.
   ========================================================================== */

.page--home {
  gap: 0;
  padding-top: 20px;
}

@media (min-width: 960px) {
  .page--home {
    max-width: 1180px;
  }
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand__dot {
  color: var(--accent);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-header__help {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.site-header__help:hover {
  color: var(--text);
}

@media (max-width: 420px) {
  .site-header__actions {
    gap: 12px;
  }

  .site-header__help {
    display: none; /* CTA alone is enough on the narrowest phones — keeps the header from crowding */
  }
}

/* ---------- hero banner (approved final asset, rendered as one image --
   see landing.html's comment on .hero-banner) ---------- */

.hero-banner {
  position: relative;
}

.hero-banner__img {
  display: block;
  width: 100%;
  height: auto;
  /* No border-radius/overflow-hidden here on purpose -- the banner already
     has its rounded card + shadow baked in against a near-white
     background that matches --background exactly (verified against the
     source file), so adding our own would only risk clipping it. */
}

/* Transparent hotspot over the button already drawn into the image.
   Percentage-based box (measured directly from the source PNG's pixel
   coordinates: left 4.62% / top 54.98% / width 24.41% / height 11.95% of
   1774x502 -- re-measured after cropping the file's own baked-in
   top/bottom white canvas margins, which shifted the button's relative
   position) so it tracks the image precisely at any displayed size --
   the two always share the same aspect ratio since one is
   `width:100%; height:auto` on the other's intrinsic ratio. */
.hero-banner__hotspot {
  position: absolute;
  left: 4.62%;
  top: 54.98%;
  width: 24.41%;
  height: 11.95%;
}

/* ---------- country cards ---------- */

.countries {
  margin-top: 20px;
}

.countries__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 760px) {
  .countries__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.country-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--background);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a.country-card:hover,
a.country-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(20, 24, 31, 0.1);
}

.country-card__photo {
  position: relative;
  height: 150px;
}

.country-card__photo-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.country-card--soon .country-card__photo-img {
  filter: grayscale(55%);
  opacity: 0.75;
}

.country-card__photo-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 14, 20, 0.65) 0%, rgba(10, 14, 20, 0) 55%);
}

.country-card__name {
  position: absolute;
  left: 14px;
  bottom: 10px;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.country-card__body {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 18px;
}

.country-card__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.country-card__desc {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.3;
}

.country-card__price {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text);
}

.country-card__operator-link {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

.country-card__operator-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

.country-card__operator-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

.country-card__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  color: var(--muted);
  font-size: 1rem;
  transition: transform 0.15s ease, color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

a.country-card:hover .country-card__arrow {
  transform: translateX(3px);
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

@media (min-width: 960px) {
  .country-card__photo {
    height: 170px;
  }
}

/* ---------- support / contact block ---------- */

.support {
  margin: 44px 0 8px;
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.support__title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.support__text {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 20px;
}

.support__contacts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 4px 14px rgba(47, 91, 255, 0.12);
}

.contact-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent);
}

@media (max-width: 420px) {
  .support {
    padding: 24px 16px;
  }

  .support__contacts {
    flex-direction: column;
    align-items: stretch;
  }

  .contact-link {
    justify-content: center;
  }
}

/* ---------- photo credits ---------- */

.photo-credits {
  margin-top: 16px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}

.photo-credits a {
  color: inherit;
}
