:root {
  --bg: #f2f6f9;
  --paper: #ffffff;
  --text: #122231;
  --muted: #425466;
  --primary: #0b6e4f;
  --primary-soft: #d8f2e7;
  --danger-bg: #fff2f2;
  --danger-border: #efb1b1;
  --border: #d9e3ea;
  --shadow: 0 12px 30px rgba(18, 34, 49, 0.08);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Manrope", "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, #ffffff 0%, transparent 40%),
    radial-gradient(circle at 90% 0%, #e1f0ff 0%, transparent 35%),
    var(--bg);
}

.page {
  width: min(1150px, 100% - 2rem);
  margin: 0 auto;
  padding: 1.25rem 0 2rem;
}

.hero {
  background: linear-gradient(145deg, #0d4f8f 0%, #0b6e4f 100%);
  color: #f7fbff;
  border-radius: var(--radius);
  padding: clamp(1.1rem, 4vw, 2rem);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.9;
}

h1 {
  margin: 0.5rem 0 0;
  font-size: clamp(1.45rem, 4.5vw, 2.4rem);
  line-height: 1.25;
}

.lead {
  margin: 0.9rem 0 0;
  max-width: 80ch;
  line-height: 1.65;
  color: #e9f4ff;
}

.hero-meta {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-meta span {
  font-size: 0.88rem;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
}

.alert {
  margin-top: 1rem;
  background: #fff9df;
  border: 1px solid #f0dc8c;
  border-left: 6px solid #d0a300;
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.alert h2 {
  margin: 0;
  font-size: 1.1rem;
}

.alert p {
  margin: 0.5rem 0 0;
  color: #4d421d;
  line-height: 1.6;
}

.layout {
  margin-top: 1rem;
  display: grid;
  gap: 1rem;
}

.toc,
.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.toc {
  padding: 1rem;
}

.toc h2 {
  margin: 0;
  font-size: 1.05rem;
}

.toc a {
  display: block;
  margin-top: 0.55rem;
  color: #1d4568;
  text-decoration: none;
  line-height: 1.4;
  font-size: 0.95rem;
}

.toc a:hover {
  text-decoration: underline;
}

.content {
  display: grid;
  gap: 0.9rem;
}

.card {
  padding: 1rem;
}

.card h2 {
  margin: 0;
  font-size: 1.13rem;
}

.card p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  line-height: 1.68;
}

.card ul {
  margin: 0.65rem 0 0;
  padding-left: 1.1rem;
}

.card li {
  margin-top: 0.42rem;
  line-height: 1.62;
  color: var(--muted);
}

.danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.footer {
  margin-top: 1.1rem;
  text-align: center;
  color: var(--muted);
  padding-bottom: 1rem;
}

.footer a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .page {
    width: min(1150px, 100% - 3rem);
    padding-top: 1.5rem;
  }

  .layout {
    grid-template-columns: 280px 1fr;
    align-items: start;
  }

  .toc {
    position: sticky;
    top: 1rem;
    max-height: calc(100vh - 2rem);
    overflow: auto;
  }

  .card {
    padding: 1.1rem 1.2rem;
  }
}

@media (min-width: 1100px) {
  .hero {
    padding: 2rem 2.2rem;
  }

  .content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .content .card:nth-child(1),
  .content .card:nth-child(2),
  .content .card:nth-child(7),
  .content .card:nth-child(12) {
    grid-column: span 2;
  }
}

.lang-switch {
  position: sticky;
  top: 0.5rem;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-bottom: 0.8rem;
}

.lang-btn {
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--text);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.lang-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.icon {
  line-height: 1;
}

.lang-block {
  display: none;
}

body[data-lang='en'] .lang-en {
  display: block;
}

body[data-lang='am'] .lang-am {
  display: block;
}

/* Support Button and Modal */
.support-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(11, 110, 79, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: transform 0.2s, box-shadow 0.2s;
}

.support-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(11, 110, 79, 0.4);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(18, 34, 49, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-card {
  background: var(--paper);
  width: min(450px, 90%);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s;
}

.modal-overlay.active .modal-card {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--muted);
  cursor: pointer;
}

.modal-card h2 {
  margin: 0 0 0.5rem;
  color: var(--text);
}

.modal-card p {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.field textarea {
  height: 120px;
  resize: vertical;
}

.submit-btn {
  width: 100%;
  padding: 0.85rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.submit-btn:hover {
  background: #095940;
}

.submit-btn:disabled {
  background: var(--border);
  cursor: not-allowed;
}
