/* Раздел «Диалоги»: /dialoge (список) и страницы диалогов /dialog-<тема>, RU + UK.
   Видео + текст + PDF, который приходит на почту (форма .dlg-get → /api/freebie).
   Токены — из standalone.css; отдельный файл, чтобы не трогать кэш общих стилей. */

.dlg-shell > section + section {
  margin-top: 28px;
}

/* --- первый экран --- */
.dlg-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 0;
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 32px;
}

.dlg-hero-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 52px;
}

.dlg-hero h1 {
  margin: 14px 0 18px;
  font-size: var(--text-h1-split);
  line-height: 1.02;
}

.dlg-hero-text > p:not(.kicker) {
  margin: 0;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.62;
}

/* --- форма «PDF на почту» --- */
.dlg-get {
  margin-top: 26px;
  padding: 18px;
  background: var(--lavender);
  border-radius: var(--radius-md);
}

.dlg-pdf .dlg-get {
  margin-top: 0;
  background: white;
}

.dlg-get-title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.dlg-get-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dlg-get input[type="email"] {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 50px;
  padding: 0 16px;
  color: var(--ink);
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
}

.dlg-get input[type="email"]:focus {
  outline: 3px solid rgba(74, 99, 216, 0.25);
  border-color: var(--blue);
}

.dlg-get button {
  flex: 0 0 auto;
  min-height: 50px;
  padding: 0 22px;
  color: white;
  background: var(--blue);
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s ease;
}

.dlg-get button:hover {
  background: var(--blue-dark);
}

.dlg-get button:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* ловушка для ботов: людям не видна, боты заполняют */
.dlg-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.dlg-get-status {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
}

.dlg-get-status:not(:empty) {
  margin-top: 10px;
}

.dlg-get-status[data-state="ok"] {
  color: #1d6f5a;
}

.dlg-get-status[data-state="error"] {
  color: #b42318;
}

.dlg-get small {
  display: block;
  margin-top: 10px;
  color: var(--soft);
  font-size: 12px;
  line-height: 1.5;
}

.dlg-get small a {
  color: inherit;
  text-decoration: underline;
}

.dlg-link {
  align-self: flex-start;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  color: var(--blue);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.dlg-visual {
  position: relative;
  margin: 0;
  min-height: 100%;
}

.dlg-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% 50%;
}

.dlg-visual figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dlg-visual figcaption span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.93);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.dlg-flag {
  flex-shrink: 0;
  width: 21px;
  height: 14px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(24, 49, 80, 0.18);
}

/* --- что в PDF --- */
.dlg-pdf {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 36px;
  align-items: center;
  padding: 44px;
  background: var(--yellow);
  border-radius: 32px;
}

.dlg-pdf h2,
.dlg-text h2,
.dlg-bavaria h2 {
  margin: 12px 0 20px;
  font-size: var(--text-h2-compact);
  line-height: 1.1;
}

.dlg-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.dlg-stats li {
  padding: 12px 14px;
  background: white;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.dlg-stats b {
  display: block;
  font-size: 28px;
  line-height: 1.1;
}

.dlg-pages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dlg-pages img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(24, 49, 80, 0.16);
  background: white;
}

.dlg-pages img:nth-child(2) {
  transform: translateY(-12px);
}

/* --- диалог --- */
.dlg-text {
  padding: 44px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 32px;
}

.dlg-lead {
  margin: -6px 0 22px;
  color: var(--soft);
  font-size: 16px;
}

.dlg-lines {
  margin: 0;
  padding: 0;
  list-style: none;
}

.dlg-line {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  column-gap: 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.dlg-who {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  align-self: start;
  gap: 8px;
  padding-top: 3px;
  font-size: 13px;
  font-weight: 900;
}

.dlg-line.is-m .dlg-who {
  color: #2f4ec2;
}

.dlg-line.is-f .dlg-who {
  color: #1d6f5a;
}

.dlg-de {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.5;
}

.dlg-tr {
  margin: 3px 0 0;
  color: var(--soft);
  font-size: 15px;
  line-height: 1.5;
}

/* --- Бавария --- */
.dlg-bavaria {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 36px;
  align-items: center;
  padding: 44px;
  background: var(--mint);
  border-radius: 32px;
}

.dlg-bavaria p:not(.kicker) {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
}

.dlg-bav {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background: white;
  border-radius: var(--radius-md);
  font-size: 15px;
}

.dlg-bav th {
  padding: 12px 16px;
  color: white;
  background: var(--ink);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
}

.dlg-bav td {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.dlg-bav td:last-child {
  color: var(--soft);
}

/* --- планшет и телефон --- */
@media (max-width: 860px) {
  .dlg-hero,
  .dlg-pdf,
  .dlg-bavaria {
    grid-template-columns: minmax(0, 1fr);
  }

  .dlg-visual {
    order: -1;
  }

  .dlg-visual img {
    aspect-ratio: 16 / 9;
    height: auto;
  }

  .dlg-hero-text {
    padding: 32px 28px 36px;
  }
}

@media (max-width: 600px) {
  .dlg-shell > section + section {
    margin-top: 18px;
  }

  .dlg-hero,
  .dlg-pdf,
  .dlg-text,
  .dlg-bavaria {
    border-radius: 24px;
  }

  .dlg-hero-text,
  .dlg-pdf,
  .dlg-text,
  .dlg-bavaria {
    padding: 26px 18px;
  }

  .dlg-get button {
    flex-basis: 100%;
  }

  .dlg-visual figcaption {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .dlg-visual figcaption span {
    padding: 5px 10px;
    font-size: 12px;
  }

  .dlg-pages {
    gap: 8px;
  }

  .dlg-pages img:nth-child(2) {
    transform: none;
  }

  .dlg-line {
    grid-template-columns: minmax(0, 1fr);
  }

  .dlg-who {
    grid-row: auto;
    margin-bottom: 4px;
  }

  .dlg-de {
    font-size: 16px;
  }

  .dlg-bav th,
  .dlg-bav td {
    padding: 10px 10px;
  }

  .dlg-bav {
    font-size: 14px;
  }
}

/* ------------------------------------------------------------------ *
 * Раздел /dialoge
 * ------------------------------------------------------------------ */
.dlg-hub-head {
  padding: 50px 52px 46px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 32px;
}

.dlg-hub-head h1 {
  margin: 14px 0 16px;
  font-size: var(--text-h1-sm);
  line-height: 1.02;
}

.dlg-hub-head p:not(.kicker) {
  max-width: 640px;
  margin: 0;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.62;
}

.dlg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 22px;
}

.dlg-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dlg-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.dlg-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.dlg-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px 22px;
}

.dlg-card-meta {
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.dlg-card-meta span {
  padding: 4px 10px;
  background: var(--yellow);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 800;
}

.dlg-card strong {
  font-size: var(--text-h2-card);
  line-height: 1.15;
}

.dlg-card-de {
  color: var(--blue);
  font-size: 14px;
  font-weight: 800;
}

.dlg-card-text {
  color: var(--soft);
  font-size: 15px;
  line-height: 1.55;
}

.dlg-card-cta {
  margin-top: auto;
  padding-top: 10px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
}

.dlg-how {
  padding: 44px;
  background: var(--mint);
  border-radius: 32px;
}

.dlg-how h2 {
  margin: 12px 0 22px;
  font-size: var(--text-h2-compact);
  line-height: 1.1;
}

.dlg-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dlg-steps li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  background: white;
  border-radius: var(--radius-md);
}

.dlg-steps b {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--ink);
  border-radius: 50%;
  font-size: 14px;
}

.dlg-steps strong {
  font-size: 16px;
}

.dlg-steps span {
  color: var(--soft);
  font-size: 14px;
  line-height: 1.5;
}

.dlg-more {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.dlg-more a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.dlg-more a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

@media (max-width: 860px) {
  .dlg-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .dlg-hub-head,
  .dlg-how {
    padding: 26px 18px;
    border-radius: 24px;
  }

  .dlg-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}
