
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f3f4f6;
  color: #111827;
}

a {
  color: inherit;
}

.site-header {
  background: #111827;
  color: #f9fafb;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* лёгкая тень, чтобы хедер отделялся от контента при скролле */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: rgba(15, 23, 42, 0.3);
}


.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 700;
  font-size: 20px;
}

.main-nav a {
  margin-left: 18px;
  text-decoration: none;
  font-size: 15px;
  opacity: 0.9;
}

.main-nav a:hover {
  opacity: 1;
  text-decoration: underline;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.breadcrumbs {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.page-title {
  margin: 0 0 8px;
  font-size: 26px;
}

.page-subtitle {
  margin: 0 0 24px;
  font-size: 15px;
  color: #4b5563;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.folder-card {
  display: block;
  padding: 16px 18px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
  text-decoration: none;
  color: inherit;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.folder-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(0,0,0,0.08);
}

.folder-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.folder-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.folder-card p {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
  gap: 32px;
}

/* Верхняя служебная полоска */
.topbar {
    background: linear-gradient(
        to bottom,
        #0f172a,
        #020617
    );
    color: #e5e7eb;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-phone,
.topbar-email,
.topbar-link {
  color: #f1f5f9;
  text-decoration: none;
  font-weight: 600;
}

.topbar-phone:hover,
.topbar-email:hover,
.topbar-link:hover {
  text-decoration: underline;
}

.topbar-sep {
  opacity: 0.7;
}

.topbar-search-btn {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
}

@media (max-width: 800px) {
  .two-column {
    grid-template-columns: minmax(0, 1fr);
  }
}

.lead-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 12px 26px rgba(0,0,0,0.08);
  margin-bottom: 16px;
}

.lead-card h1 {
  margin-top: 0;
  margin-bottom: 8px;
}

.lead-card p {
  margin-top: 0;
  margin-bottom: 10px;
  color: #4b5563;
}

.badge-row {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e5e7eb;
}

.contact-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
}

.contact-card h2 {
  margin-top: 0;
  margin-bottom: 8px;
}

.contact-row {
  margin-bottom: 6px;
  font-size: 14px;
}

.contact-label {
  font-weight: 600;
}

.table-wrapper {
  background: #ffffff;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 12px 26px rgba(0,0,0,0.08);
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  padding: 8px 10px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}

th {
  background: #f9fafb;
  font-weight: 600;
}

tr:nth-child(even) td {
  background: #f9fafb;
}

.page-section {
  margin-bottom: 24px;
}

.page-section h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.page-section p {
  margin: 0;
  color: #4b5563;
  font-size: 15px;
}

.site-footer {
  border-top: 1px solid #e5e7eb;
  margin-top: 24px;
}

.site-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 16px 18px;
  font-size: 13px;
  color: #6b7280;
}

.main-nav a.active {
    text-decoration: underline;
}

.contact-block-wrapper {
    margin-top: 40px;
    padding: 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* Бургер по умолчанию спрятан (десктоп) */
.burger {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background-color: #ffffff;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Состояние открытого бургера (анимация крестика) */
.burger.burger--open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.burger.burger--open span:nth-child(2) {
  opacity: 0;
}

.burger.burger--open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ===== Адаптив под планшеты (<= 1024px) ===== */
@media (max-width: 1024px) {
  .container {
    padding: 16px;
  }

  /* Верхний блок: две колонки -> одна, либо более компактно */
  .two-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  /* Сетка папок: 2 колонки на планшете */
  .folder-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .lead-card h1 {
    font-size: 24px;
    line-height: 1.25;
  }

  .lead-card p {
    font-size: 14px;
  }
}

/* ===== Адаптив под телефоны (<= 768px) ===== */
@media (max-width: 768px) {
  .container {
    padding: 12px;
  }

  /* Хедер + бургер */
  .site-header {
    position: relative;
  }

  .site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .logo {
    font-size: 18px;
  }

  .burger {
    display: block; /* показываем бургер на мобилке */
  }

  /* Меню спрятано, открывается вниз под хедером */
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #020617; /* тот же цвет, что и шапка */
    padding: 8px 16px 12px;
    display: none;
    flex-direction: column;
    gap: 6px;
    z-index: 20;
  }

  .main-nav.main-nav--open {
    display: flex;
  }

  .main-nav a {
    font-size: 13px;
    padding: 2px 0;
    display: inline-block;
  }

  /* Двухколоночный блок гарантированно в одну колонку */
  .two-column {
    flex-direction: column;
  }

  /* Сетка папок: по одной карточке в строку */
  .folder-grid {
    grid-template-columns: 1fr;
  }

  .folder-card {
    padding: 16px;
  }

  .folder-card h2 {
    font-size: 16px;
  }

  .folder-card p {
    font-size: 13px;
  }

  /* Контактный блок-карточка */
  .contact-block-wrapper,
  .material-contact-block {
    margin-top: 24px;
    padding: 16px;
    font-size: 13px;
  }

  /* Футер: в колонку */
  .site-footer-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .footer-right a {
    font-size: 13px;
  }

    .topbar-inner {
    padding: 6px 12px;
    font-size: 12px;
  }

  /* если вдруг сверху слишком тесно — можно скрыть левую часть */
  /* .topbar-left { display: none; } */
  
  .search-panel-inner {
    padding: 8px 12px 10px;
  }

  .search-panel-form {
    flex-direction: row;
    gap: 6px;
  }
}
