:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1f2a37;
  --accent: #1d4ed8;
  --accent-light: #dbeafe;
  --accent-dark: #1e3a8a;
  --muted: #5b6470;
  --border: #e5e7eb;
  --danger: #dc2626;
  --success: #16a34a;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #eef3ff 0%, var(--bg) 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* === NAV === */
.nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.nav-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.nav-logo {
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.nav-burger {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  color: var(--text);
}

/* === MAIN === */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  flex: 1;
}

/* === CARD === */
.card {
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 38px rgba(17, 24, 39, 0.12);
  margin-bottom: 24px;
}

.card-body {
  padding: 28px 24px 30px;
}

.hero {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

/* === TYPOGRAPHY === */
h1 { font-size: 32px; line-height: 1.2; margin-bottom: 12px; }
h2 { font-size: 24px; line-height: 1.3; margin-bottom: 10px; }
h3 { font-size: 20px; line-height: 1.3; margin-bottom: 8px; }

p {
  margin: 10px 0;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
}

/* === BADGE === */
.badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 16px;
}

.badge-danger {
  background: #fee2e2;
  color: var(--danger);
}

/* === INFO BOX === */
.info {
  margin-top: 16px;
  padding: 14px 16px;
  background: #f8fafc;
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  color: #334155;
  font-size: 16px;
  line-height: 1.6;
}

.info strong { color: var(--text); }

/* === TABLE === */
.info-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 16px;
}

.info-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.info-table td:first-child {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  width: 180px;
}

.info-table td:last-child {
  color: var(--muted);
}

/* === LINKS === */
a { color: var(--accent); }
a:hover { text-decoration: underline; }

/* === SECTION === */
.section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

/* === TG QR === */
.tg-qr {
  text-align: center;
}

.tg-qr img {
  width: 220px;
  max-width: 100%;
  height: auto;
  display: block;
  margin: 12px auto;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
}

/* === FOOTER === */
.footer {
  background: #1f2a37;
  color: #94a3b8;
  padding: 24px 16px;
  font-size: 14px;
  text-align: center;
  line-height: 1.8;
  margin-top: auto;
}

.footer a {
  color: #93c5fd;
}

/* === DOC LIST === */
.doc-list {
  list-style: none;
  margin: 16px 0;
}

.doc-list li {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  color: var(--muted);
}

.doc-list li::before {
  content: "\1F4C4";
  font-size: 20px;
}

/* === FAQ === */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.faq-q {
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-q::after {
  content: "+";
  font-size: 22px;
  color: var(--accent);
  transition: transform 0.2s;
}

.faq-item.open .faq-q::after {
  content: "\2212";
}

.faq-a {
  display: none;
  padding-top: 10px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}

.faq-item.open .faq-a {
  display: block;
}

/* === CHAT WIDGET === */
.chat-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(29, 78, 216, 0.4);
  z-index: 1000;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-btn:hover { transform: scale(1.1); }

.chat-window {
  display: none;
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  height: 520px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
  z-index: 1001;
  flex-direction: column;
  overflow: hidden;
}

.chat-window.open {
  display: flex;
}

.chat-header {
  background: var(--accent);
  color: #fff;
  padding: 16px;
  font-weight: 600;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header button {
  background: none;
  border: none;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
}

.chat-disclaimer {
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  padding: 8px 16px;
  border-bottom: 1px solid #fde68a;
  line-height: 1.4;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-msg.bot {
  background: #f1f5f9;
  color: var(--text);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.chat-msg.user {
  background: var(--accent);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.chat-input-wrap {
  display: flex;
  border-top: 1px solid var(--border);
  padding: 10px;
  gap: 8px;
}

.chat-input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.chat-input:focus { border-color: var(--accent); }

.chat-send {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  font-weight: 600;
}

.chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-footer-note {
  font-size: 11px;
  color: #94a3b8;
  text-align: center;
  padding: 4px 16px 10px;
  line-height: 1.3;
}

/* === MOBILE === */
@media (max-width: 720px) {
  .hero { height: 200px; }
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  p { font-size: 15px; }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  }

  .nav-links.open { display: flex; }
  .nav-burger { display: block; }

  .chat-window {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .chat-btn {
    bottom: 16px;
    right: 16px;
    width: 52px;
    height: 52px;
    font-size: 24px;
  }

  .info-table td:first-child { width: auto; }
}
