:root {
  --primary: #0d3528;
  --primary-hover: #0a2d22;
  --text: #000000;
  --text-muted: #6C757D;
  --bg: #FFFFFF;
  --bg-alt: #F8F9FA;
  --border: #dee2e6;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-layout main {
  flex: 1 0 auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.header {
  background: #f0f4f2;
  color: var(--primary);
  padding: 12px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 var(--border);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  flex-shrink: 0;
}

.logo-wrap:hover {
  color: var(--primary-hover);
}

.logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--primary);
}

.nav-toggle span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-block;
  padding: 8px 14px;
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-hover);
}

.nav-link.active {
  font-weight: 600;
}

.nav-link-parent {
  cursor: pointer;
}

.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: white;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
  z-index: 200;
}

.nav-item:hover .nav-dropdown,
.nav-dropdown-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown-link {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
}

.nav-dropdown-link:hover {
  background: var(--bg-alt);
  color: var(--primary);
}

.hero {
  padding: 64px 0 80px;
  text-align: center;
}

.hero-title {
  margin: 0 0 16px;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.hero-subtitle {
  margin: 0 0 32px;
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
  border: 1px solid transparent;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-outline {
  background: white;
  color: var(--primary);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  text-align: center;
}

.card {
  background: var(--bg-alt);
  padding: 32px 24px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--primary);
  font-weight: 600;
  transition: background 0.2s, box-shadow 0.2s;
}

.card:hover {
  background: #eef0f2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  color: var(--primary);
}

.card-icon-svg {
  display: block;
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--primary);
}

.card-title {
  font-size: 1rem;
}

.section {
  padding: 56px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.page-title,
.section h2 {
  margin: 0 0 20px;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.section p,
.page-body {
  margin: 0;
  color: var(--text);
  max-width: 720px;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.contacts-section .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contacts-section .page-title {
  text-align: center;
}

.contacts-section .contacts-block {
  margin-bottom: 32px;
  max-width: 560px;
}

.contacts-section .contacts-block p {
  margin-bottom: 20px;
}

.contacts-section .contacts-block strong {
  color: var(--primary);
}

.contacts-section .page-body {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.contacts-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.contacts-buttons .btn-outline {
  color: var(--primary);
}

.footer {
  background: var(--primary);
  color: white;
  padding: 20px 0;
  text-align: center;
  border-radius: 8px 8px 0 0;
}

.footer p {
  margin: 0;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s, opacity 0.2s;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    border-top: 1px solid var(--border);
  }
  .nav-open {
    max-height: 80vh;
    overflow-y: auto;
    opacity: 1;
  }
  .nav-item { border-bottom: 1px solid var(--border); }
  .nav-item:last-child { border-bottom: none; }
  .nav-link, .nav-link-parent {
    display: block;
    padding: 12px 0;
    color: var(--primary);
  }
  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: var(--bg-alt);
    border-radius: 6px;
    margin: 8px 0 0 12px;
    padding: 4px 0;
    max-height: 0;
    overflow: hidden;
  }
  .nav-dropdown-open { max-height: 300px; }
  .nav-dropdown-link { color: var(--text); padding: 8px 16px; }
  .nav-dropdown-link:hover {
    background: rgba(13, 53, 40, 0.08);
    color: var(--primary);
  }
}

@media (max-width: 640px) {
  .header-container { padding: 0 16px; }
  .logo-img { height: 36px; }
  .hero-title { font-size: 1.5rem; }
  .hero-subtitle { font-size: 1rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .btn { min-width: 200px; text-align: center; }
  .cards { grid-template-columns: 1fr; }
  .contacts-buttons { flex-direction: column; }
  .contacts-buttons .btn { width: 100%; text-align: center; }
}

.admin-page { padding: 32px 0 56px; min-height: 60vh; }
.admin-page h1 { color: var(--primary); margin-bottom: 24px; }
.admin-list { list-style: none; padding: 0; margin: 0 0 32px; }
.admin-list li { margin-bottom: 8px; }
.admin-list a { color: var(--primary); text-decoration: none; font-weight: 500; }
.admin-list a:hover { text-decoration: underline; }
.admin-form label { display: block; margin-bottom: 8px; font-weight: 600; color: var(--primary); }
.admin-form input,
.admin-form textarea {
  width: 100%;
  max-width: 560px;
  padding: 10px 12px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
}
.admin-form textarea { min-height: 120px; resize: vertical; }
.admin-form textarea.contacts-block { min-height: 200px; }
.admin-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.admin-actions .btn { min-width: 120px; }
.admin-link { display: inline-block; margin-bottom: 24px; color: var(--primary); text-decoration: none; font-size: 0.9rem; }
.admin-link:hover { text-decoration: underline; }
.admin-message { padding: 12px 16px; margin-bottom: 20px; border-radius: 8px; max-width: 560px; }
.admin-message.success { background: #d4edda; color: #155724; }
.admin-message.error { background: #f8d7da; color: #721c24; }

.page-body-html {
  white-space: normal;
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
}
.page-body-html img { max-width: 100%; height: auto; }
.page-body-html a { color: var(--primary); text-decoration: underline; }
.page-body-html a:hover { text-decoration: none; }
.page-body-html ul, .page-body-html ol { margin: 0.5em 0; padding-left: 1.5em; }
.page-body-html h1, .page-body-html h2, .page-body-html h3 { margin: 1em 0 0.5em; color: var(--primary); }
.page-body-html h1 { font-size: 1.4rem; }
.page-body-html h2 { font-size: 1.2rem; }
.page-body-html h3 { font-size: 1.1rem; }
.page-body-html p { margin: 0.5em 0; }
