/* =============================================================
   design.css - Shared design layer (Kazakhstan eVisa redesign)
   Loaded AFTER css/style.css. All tokens derive from the
   existing brand palette (style.css :root).
   Conventions:
   - New layout primitives use the "dl-" prefix (design layer).
   - No destructive global resets: existing rules stay intact;
     this layer adds structure, rhythm and component styling.
   ============================================================= */

/* ---------- 1. Design tokens (derived from brand palette) ---- */
:root {
  --dl-primary: var(--primary-color, #2563eb);
  --dl-primary-600: var(--primary-dark, #1d4ed8);
  --dl-primary-050: #eff6ff;
  --dl-primary-100: #dbeafe;
  --dl-ink: var(--dark-color, #1e293b);
  --dl-ink-2: var(--gray-700, #334155);
  --dl-muted: var(--gray-500, #64748b);
  --dl-line: var(--gray-200, #e2e8f0);
  --dl-line-soft: var(--gray-100, #f1f5f9);
  --dl-surface: #ffffff;
  --dl-canvas: var(--light-color, #f8fafc);
  --dl-success: var(--success-color, #10b981);
  --dl-accent: var(--accent-color, #f59e0b);
  --dl-radius: 14px;
  --dl-radius-sm: 10px;
  --dl-radius-pill: 999px;
  --dl-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .08);
  --dl-shadow-md: 0 4px 6px -2px rgba(15, 23, 42, .06), 0 10px 20px -6px rgba(15, 23, 42, .10);
  --dl-w: 1180px;
  --dl-w-wide: 1340px;
  --dl-gutter: clamp(16px, 3vw, 28px);
  --dl-space-section: clamp(44px, 6.5vw, 72px);
  --dl-transition: .25s cubic-bezier(.25, .6, .35, 1);
      --kzp-navy-950: #061428;
    --kzp-navy-900: #0b203d;
    --kzp-navy-800: #123a68;
    --kzp-navy-700: #164b70;
    --kzi-sky:#38bdf8;
    --kzi-sky-soft:#7dd3fc;
    --kzi-blue:#2563eb;
    --kzi-blue-dark:#1d4ed8;
    --kzi-gold:#f7b32b;
    --kzi-gold-deep:#f59e0b;
    --kzi-ink:#0f172a;
    --kzi-slate:#475569;
    --kzi-muted:#64748b;
    --kzi-line:#e2e8f0;
    --kzi-cloud:#f5f8fd;
    --kzi-white:#ffffff;
}

/* ---------- 2. Base typography & rhythm ----------------------- */
html { scroll-behavior: smooth; }
body {
  font-size: 16px;
  line-height: 1.65;
  color: var(--dl-ink-2);
  background: var(--dl-canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6 {
  /* color: var(--dl-ink); */
  font-weight: 650;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(1.9rem, 3.4vw, 2.75rem); line-height: 1.18; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.25; }
h3 { font-size: clamp(1.2rem, 2vw, 1.45rem); line-height: 1.3; }
p  { font-size: 1rem; }
a  { text-underline-offset: 2px; }

::selection { background: var(--dl-primary-100); color: var(--dl-ink); }
:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .55);
  outline-offset: 2px;
  border-radius: 4px;
}
section.bg-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--kzp-navy-950) 0%, var(--kzp-navy-900) 55%, var(--kzp-navy-700) 100%) !important;
    color: #fff;
}
/* ---------- 3. Page shells & containers ----------------------- */
/* NOTE: page container widths are intentionally NOT changed by this
   layer. The dl-container / dl-container--wide markers below are
   intentionally EMPTY (no width, margin or padding rules) so the
   pages keep their original Bootstrap container widths exactly. */
.dl-page { display: block; }
.dl-section { padding-block: var(--dl-space-section); }
.dl-section--tint { background: var(--dl-canvas); }
.dl-section--surface { background: var(--dl-surface); }
.dl-section--flush { padding-block: 0; }
.dl-stack { display: flex; flex-direction: column; gap: 20px; }
.dl-row { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; }
.dl-row--between { justify-content: space-between; }
.dl-row--end { justify-content: flex-end; }
.dl-spacer { flex: 1 1 0; }

/* ---------- 4. Hero (content pages) --------------------------- */
.dl-hero {
  background:linear-gradient(135deg,var(--kzp-navy-950) 0%,var(--kzp-navy-900) 55%,var(--kzp-navy-700) 100%) !important;
    /* linear-gradient(180deg, var(--dl-primary-050) 0%, var(--dl-canvas) 100%); */
  border-bottom: 1px solid var(--dl-line);
  padding-block: clamp(40px, 5.5vw, 64px);
}
.dl-hero__inner {
  display: grid;
  gap: 28px;
  align-items: center;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
}
.dl-hero__inner--text-only { grid-template-columns: 1fr; }
.dl-hero h1 { margin-bottom: 14px;}
.dl-hero h1 i { color: var(--dl-primary); }
.dl-hero__lead, .lead {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  /* color: var(--dl-ink-2); */
  margin-bottom: 22px;
}
.dl-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

.dl-hero__media img, .dl-hero__media picture { display: block; width: 100%; height: auto; }
@media (max-width: 900px) {
  .dl-hero__inner { grid-template-columns: 1fr; }
  .dl-hero__media { order: -1; max-width: 560px; }
}

/* ---------- 5. Cards & grids — redesigned look ------------------ */
.dl-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}
.dl-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dl-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dl-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 991px) {
  .dl-grid--3, .dl-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575px) {
  .dl-grid--2, .dl-grid--3, .dl-grid--4 { grid-template-columns: 1fr; }
}

/* New card surface: tall radius, gradient surface, layered shadow,
   hover lift with brand-blue glow. */
.dl-card {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid var(--dl-line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 28px -20px rgba(15, 23, 42, .18);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow var(--dl-transition), transform var(--dl-transition), border-color var(--dl-transition);
}
.dl-card:hover {
  box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 22px 44px -18px rgba(37, 99, 235, .25);
  transform: translateY(-4px);
  border-color: #bfdbfe;
}
.dl-card--flat { box-shadow: none; }
.dl-card--flat:hover { box-shadow: 0 12px 28px -20px rgba(15, 23, 42, .18); }
.dl-card__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 8px;
}
/* Icon tile — the visual anchor of the new card */
.dl-card__icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--dl-primary-050), var(--dl-primary-100));
  color: var(--dl-primary);
  font-size: 1.3rem;
  border: 1px solid #bfdbfe;
}
.dl-card__title { font-size: 1.06rem; font-weight: 650; color: var(--dl-ink); line-height: 1.35; }
.dl-card__text { font-size: .97rem; color: var(--dl-ink-2); }
.dl-card__foot { margin-top: auto; padding-top: 10px; }
.dl-card__foot p {
  display: inline-block;
  margin: 0;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--dl-line-soft);
  border: 1px solid var(--dl-line);
  font-size: .84rem;
  font-weight: 600;
  color: var(--dl-ink-2);
}

/* Icon-led generic page cards (art-card, overview-card, tip-card,
   culture-card, lifestyle-card, fact-card, value-card, info-card…):
   the leading <i> becomes the new icon tile. */
.dl-card > i,
.dl-card > .art-icon,
.dl-card > .overview-icon,
.dl-card > .tip-icon,
.dl-card > .payment-icon,
.dl-card > .culture-icon,
.dl-card > .lifestyle-icon {
  flex: none;
  width: 48px !important; height: 48px !important;
  border-radius: 13px !important;
  background: linear-gradient(135deg, var(--dl-primary-050), var(--dl-primary-100)) !important;
  border: 1px solid #bfdbfe !important;
  color: var(--dl-primary) !important;
  margin: 0 auto 4px !important;
  display: flex !important; align-items: center; justify-content: center;
  font-size: 21px !important;
}
.dl-card h3, .dl-card h4 { font-size: 1.06rem; }
.dl-card p { color: var(--dl-ink-2); }

/* Value block (fees / times) */
.dl-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--dl-ink) !important;
  margin: 2px 0 !important;
}

/* Media cards (image on top) — new look */
.dl-media-card {
  background: #fff;
  border: 1px solid var(--dl-line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 28px -20px rgba(15, 23, 42, .18);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--dl-transition), transform var(--dl-transition), border-color var(--dl-transition);
}
.dl-media-card:hover { box-shadow: 0 22px 44px -18px rgba(37, 99, 235, .25); transform: translateY(-4px); border-color: #bfdbfe; }
.dl-media-card picture,
.dl-media-card__media { display: block; width: 100%; overflow: hidden; background: var(--dl-line-soft); }
.dl-media-card picture img,
.dl-media-card__media img {
  display: block; width: 100%; height: auto; object-fit: cover;
  transition: transform .6s ease;
}
.dl-media-card:hover picture img { transform: scale(1.05); }
.dl-media-card__body,
.dl-media-card .destination-card-content,
.dl-media-card .destination-content {
  padding: 18px 20px 20px;
  border-top: 3px solid var(--dl-primary);
  background: linear-gradient(180deg, #ffffff, #f5f9ff);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dl-media-card__title,
.dl-media-card .destination-card-content h3,
.dl-media-card .destination-content h3 {  font-weight: 650; color: var(--dl-ink); margin: 0; }
.dl-media-card__text,
.dl-media-card .destination-card-content p,
.dl-media-card .destination-content p { font-size: .95rem; color: var(--dl-ink-2); margin: 0; }

/* ---------- 6. Prose blocks (article pages) --------------------- */
.dl-prose > * + * { margin-top: 14px; }
.dl-prose > h2 { margin-top: 40px; }
.dl-prose > h2:first-child { margin-top: 0; }
.dl-prose > h3 { margin-top: 28px; }
.dl-prose ul, .dl-prose ol { padding-left: 22px; }
.dl-prose li::marker { color: var(--dl-primary); }

.dl-note {
  border: 1px solid var(--dl-line);
  border-left: 4px solid var(--dl-primary);
  background: var(--dl-surface);
  border-radius: 0 var(--dl-radius-sm) var(--dl-radius-sm) 0;
  padding: 14px 18px;
  font-size: .98rem;
}
.dl-note--accent { border-left-color: var(--dl-accent); background: #fffbeb; }
.dl-note--success { border-left-color: var(--dl-success); background: #ecfdf5; }

/* Checklist: pure-CSS markers (no added text) */
.dl-checklist { list-style: none; padding-left: 0; margin: 0; display: grid; }
.dl-checklist li {
  position: relative;
  padding-left: 28px;
  font-size: .99rem;
}
.dl-checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .52em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dl-primary-050);
  border: 2px solid var(--dl-primary);
}
.dl-checklist--filled li::before { background: var(--dl-primary); }

.dl-numlist { list-style: none; counter-reset: dlstep; padding-left: 0; display: grid; gap: 10px; }
.dl-numlist > li { counter-increment: dlstep; position: relative; padding-left: 44px; }
.dl-numlist > li::before {
  content: counter(dlstep);
  position: absolute;
  left: 0; top: 0;
  width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--dl-primary);
  color: #fff;
  font-size: .9rem; font-weight: 700;
}

/* ---------- 7. Steps / process cards — new look ----------------- */
.dl-steps { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.dl-step {
  position: relative;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid var(--dl-line);
  border-radius: 18px;
  padding: 24px 22px 22px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 28px -20px rgba(15, 23, 42, .18);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
  transition: box-shadow var(--dl-transition), transform var(--dl-transition), border-color var(--dl-transition);
}
.dl-step::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--dl-primary), var(--dl-accent));
}
.dl-step:hover {
  box-shadow: 0 22px 44px -18px rgba(37, 99, 235, .25);
  transform: translateY(-4px);
  border-color: #bfdbfe;
}
/* leading icon (before the h3) becomes an icon tile */
.dl-step > i {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--dl-primary-050), var(--dl-primary-100));
  border: 1px solid #bfdbfe;
  color: var(--dl-primary) !important;
  margin: 0 auto 4px;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px !important;
}
.dl-step h3, .dl-step h4 { margin: 0;  }
.dl-step h3 { display: flex; align-items: center; gap: 10px; }
.dl-step h3 > i {
  flex: none;
  width: 42px; height: 42px;
  border-radius: 12px;
  display: inline-flex !important; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--dl-primary-050), var(--dl-primary-100));
  border: 1px solid #bfdbfe;
  color: var(--dl-primary) !important;
  font-size: 18px !important;
  margin: 0 !important;
}
.dl-step h3 > strong { font-size: 1.02rem; }
.dl-step p { margin: 0; font-size: .96rem; color: var(--dl-ink-2); }
.dl-step p.rc-value, .dl-step .rc-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dl-ink) !important;
  margin: 0;
}
.dl-step .rc-foot { margin-top: auto; padding-top: 6px; text-align: center; }
.dl-step .rc-foot p {
  display: inline-block;
  margin: 0;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--dl-line-soft);
  border: 1px solid var(--dl-line);
  font-size: .84rem;
  font-weight: 600;
}

/* ---------- 8. Tables -------------------------------------------- */
.dl-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--dl-line);
  border-radius: var(--dl-radius);
  background: var(--dl-surface);
  -webkit-overflow-scrolling: touch;
}
.dl-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.dl-table th, .dl-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--dl-line-soft); }
.dl-table thead th {
  background: var(--dl-ink);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  letter-spacing: .01em;
  white-space: nowrap;
}
.dl-table thead th:first-child { border-top-left-radius: 0; }
.dl-table tbody tr + tr td { border-top: 1px solid var(--dl-line-soft); }
.dl-table tbody tr:hover td { background: var(--dl-primary-050); }
.dl-table tbody tr:last-child td { border-bottom: none; }
.dl-table tfoot td { background: var(--dl-canvas); font-weight: 600; }

/* ---------- 9. Forms (shared) -------------------------------------- */
.form-label, .form-check-label { font-weight: 600; color: var(--dl-ink); font-size: .95rem; }
.form-control, .form-select, .custom-form-control {
  border: 1.5px solid var(--dl-line);
  border-radius: var(--dl-radius-sm);
  background: var(--dl-surface);
  color: var(--dl-ink);
  padding: 10px 14px;
  font-size: 1rem;
  transition: border-color var(--dl-transition), box-shadow var(--dl-transition);
}
.form-control:focus, .form-select:focus, .custom-form-control:focus {
  border-color: var(--dl-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
}
.form-control::placeholder { color: var(--dl-muted); }
.input-group-text { background: var(--dl-canvas); border: 1.5px solid var(--dl-line); color: var(--dl-ink-2); }

/* ---------- 10. Buttons ------------------------------------------------ */
.btn { border-radius: var(--dl-radius-sm);border-color: rgba(255, 255, 255, .45); transition: all var(--dl-transition);color:#fff;/*background: rgba(255, 255, 255, .08)*/; }
.btn:focus-visible { box-shadow: 0 0 0 4px rgba(37, 99, 235, .3); }
.btn-primary {
  background: var(--dl-primary);
  border-color: var(--dl-primary);
  box-shadow: var(--dl-shadow-sm);
}
.btn:hover{    /*background-color: rgba(255, 255, 255, .08)*/;
    border-color: #fff;
    color: #fff !important;
    transform: translateY(-3px);}
.btn-primary:hover { background: var(--dl-primary-600); border-color: var(--dl-primary-600); color: #fff; transform: translateY(-1px); }
.btn-outline-primary { color: var(--dl-primary); border-color: var(--dl-primary); background: var(--dl-surface); }
.btn-outline-primary:hover { background: var(--dl-primary); color: #fff; }
.btn-light { background:linear-gradient(135deg,var(--kzi-gold) 0%,var(--kzi-gold-deep) 100%);color:#3a2703;box-shadow:var(--kzi-shadow-gold);border: 0; }
.btn-light:hover {    transform: translateY(-2px);
    box-shadow: 0 16px 34px -10px rgba(247, 179, 43, .65);
    color: var(--primary-dark) !important;
}


.btn-lg { min-height: 48px; padding: 12px 22px; font-size: 1.05rem; }
.btn-sm { min-height: 36px; }

/* ---------- 11. Lists, badges, misc ------------------------------------- */
.badge { font-weight: 600; }
.alert { border-radius: var(--dl-radius-sm); border: 1px solid transparent; }
.dropdown-menu { border-radius: var(--dl-radius-sm); border: 1px solid var(--dl-line); box-shadow: var(--dl-shadow-md); }

/* Divider with tick */
.dl-divider { display: flex; align-items: center; gap: 12px; margin: 28px 0; }
.dl-divider::before, .dl-divider::after { content: ""; flex: 1; height: 1px; background: var(--dl-line); }

/* ---------- CTA band (shared across pages) ------------------------- */
.dl-cta-band { padding-block: clamp(40px, 5vw, 60px) !important; }
.dl-cta-band .btn-light { min-width: 260px; }
@media (max-width: 768px) {
  /* .dl-cta-band .btn-light { width: 100%; } */
  .dl-cta-split .dl-cta-actions { margin-top: 8px; }
}

/* ---------- 14. Cookie bar & floating button polish -------------------- */
#cookie_div_bar {
  background: #22314a;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, .12);
}
#cookie_div_bar .cookie_action_btn {
  background: var(--dl-primary);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
}
.btn-floating {
  width: 44px; height: 44px;
  border-radius: 12px;
  box-shadow: var(--dl-shadow-md);
  display: none;
  position: fixed;
  right: 18px; bottom: 22px;
  z-index: 1050;
}

/* ---------- 15. Reduced motion ------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .dl-card:hover, .dl-media-card:hover { transform: none !important; }
}

/* .hero-subtitle {
  color: var(--dl-ink);
} */
.accordion-button:not(.collapsed)::after {filter: none;}