body {
  font-family: 'PT Sans', sans-serif;
  margin: 0;
  padding: 0;
  background: #fff;
  color: #222;
}

/* ---------- Хедер ---------- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 2rem;
  border-bottom: 2px solid #43d35f;;
  background: #f9f9f9;
  position: sticky;
  top: 0;
  z-index: 300;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-center ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.header-center a {
  text-decoration: none;
  color: #222;
  font-weight: 500;
  font-family: 'PT Sans', sans-serif;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;

  /* 🔄 Динамический размер шрифта */
  font-size: clamp(0.65rem, 0.90vw, 0.90rem);
}

.logo {
  font-weight: bold;
  font-size: 1.4rem;
  font-family: 'PT Sans', sans-serif;
}

.menu-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.icon {
  user-select: none;
}

/* ---------- Затемнение фона при открытом меню ---------- */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(255, 255, 255, 0.4);
  display: none;
  z-index: 250;
}
.overlay.show {
  display: block;
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  background: #f9f9f9;
}
.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  font-family: 'PT Sans', sans-serif;
}
.hero p {
  margin-bottom: 1rem;
  color: #555;
}
.btn {
  display: inline-block;
  margin: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: #43d35f;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
  font-family: 'PT Sans', sans-serif;
}
.btn:hover {
  background: #31b64b;
}

/* ---------- Категории ---------- */
.categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: 2rem;
}
.card {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
  transition: box-shadow 0.2s;
  font-family: 'PT Sans', sans-serif;
}
.card:hover {
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* ---------- Боковое меню ---------- */
.side-menu {
  position: fixed;
  top: 60px;
  left: -250px;
  width: 250px;
  height: calc(100% - 60px);
  background: #f5f6f7;
  border-right: 1px solid #eee;
  box-shadow: ;
  transition: left 0.3s ease;
  z-index: 400;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.side-menu.open {
  left: 0;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  z-index: 999;
}

/* ---------- Меню-пункты ---------- */
.menu-list {
  list-style: none;
  padding: 0;
  margin: 3rem 0 0;
}
.menu-list li {
  margin: 0;
}

.menu-list a,
.menu-item-toggle {
  font-family: 'PT Sans', sans-serif;
  font-size: 18px;
  font-weight: 500;
  color: #111;
  padding: 8px 20px;
  line-height: 1.6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  transition: background 0.2s ease;
}

.menu-list a:hover,
.menu-item-toggle:hover {
  background: #e9ecef;
}

/* ---------- Подменю ---------- */
.has-submenu .menu-item-toggle {
  cursor: pointer;
}

.arrow {
  margin-left: 0.6rem;
  font-size: 1.1rem;
  color: #555;
  transition: transform 0.3s ease;
}

.submenu {
  list-style: none;
  margin: 0;
  padding-left: 1rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.submenu li a {
  padding: 7px 20px;
  font-size: 18px;
  font-family: 'PT Sans', sans-serif;
  color: #333;
  font-weight: 400;
}

/* Когда подменю открыто */
.has-submenu.open .submenu {
  max-height: 500px;
}
.has-submenu.open .arrow {
  transform: rotate(90deg);
}

/* ---------- Футер ---------- */
footer {
  text-align: center;
  padding: 1rem;
  border-top: 1px solid #eee;
  margin-top: 2rem;
  color: #777;
  font-size: 0.9rem;
  font-family: 'PT Sans', sans-serif;
}

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .header-center {
    display: none;
  }
  .header {
    padding: 0.8rem 1rem;
  }
  .header-right {
    gap: 0.7rem;
  }
  .logo {
    font-size: 1.2rem;
  }
}

/* === Иконки в хедере (Phosphor Icons) === */
.header-right .ph {
  font-size: clamp(18px, 2vw, 26px);;
  color: #444;
  margin: 0 2px;
  vertical-align: middle;
  cursor: pointer;
  transition: color 0.2s ease;
}

.header-right .ph:hover {
  color: #000;
}


/* Ещё более мелкие экраны — как в light.css */
@media (max-width: 600px) {
  body {
    margin: 0;
    padding: 0;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 1.6rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .categories {
    padding: 1rem;
    grid-template-columns: 1fr;  /* карточки в одну колонку */
  }

  .card {
    padding: 0.8rem;
  }

  /* Хедер чуть компактнее */
  .header {
    padding: 0.6rem 0.8rem;
  }

  .btn-login {
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
  }

  /* если есть длинный текст справа от кнопки — можно спрятать */
  .small-text {
    display: none;
  }
}

/* Ошибка логина в модальном окне */
.login-error {
  margin-top: 5px;
  font-size: 0.9rem;
  color: #c00;
  text-align: center;
  min-height: 1.2em; /* чтобы блок не прыгал */
}

.login-error {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #c00;
  text-align: center;
  min-height: 1.2em;
}

.login-link-row {
  text-align: center;
  margin-top: 10px;
  font-size: 0.95rem;
}

.login-link {
  color: #5a2fd8;
  text-decoration: none;
  font-weight: 500;
}

.login-link:hover {
  text-decoration: underline;
}


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