/* БАЗОВАЯ ТЕМА */

body {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  background: #f4f4f4;
  color: #333;
  line-height: 1.6;
}

a {
  color: #6a1b9a;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ШАПКА */

header {
  background: #6a1b9a;
  color: #fff;
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.8em;
  font-weight: bold;
}

nav .nav-links a {
  color: #fff;
  margin-left: 20px;
  font-weight: bold;
}
nav .nav-links a:hover {
  text-decoration: underline;
}

/* МЕНЮ */

.main-menu {
  background: #8e24aa;
  padding: 10px 0;
}

.main-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: center;
}

.main-menu li {
  display: inline-block;
  margin: 0 20px;
}

.main-menu a {
  color: #fff;
  font-weight: bold;
}

/* КОНТЕНТ */

.content {
  padding: 30px;
  max-width: 1200px;
  margin: auto;
  background: #fff;
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
  border-radius: 6px;
}

.hero {
  text-align: center;
  margin-bottom: 40px;
}
.hero h1 {
  font-size: 2.2em;
  color: #4a148c;
}
.hero p {
  font-size: 1.1em;
  margin-top: 10px;
  margin-bottom: 20px;
}

.features {
  margin-bottom: 40px;
}
.features h2 {
  text-align: center;
  margin-bottom: 20px;
}
.features-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.feature {
  background: #fafafa;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
  box-shadow: 0 0 6px rgba(0,0,0,0.04);
}
.feature h3 {
  margin-top: 0;
  color: #6a1b9a;
}

/* КНОПКИ */

.btn {
  display: inline-block;
  padding: 10px 20px;
  background: #6a1b9a;
  color: white;
  border-radius: 5px;
  font-weight: bold;
  margin: 5px;
}
.btn:hover {
  background: #8e24aa;
}
.btn.small {
  padding: 6px 14px;
  font-size: 0.9em;
}
.btn.primary {
  background: #8e24aa;
}
.btn.primary:hover {
  background: #6a1b9a;
}

/* СЕКЦИИ */

section {
  margin-bottom: 40px;
}

section.about.full {
  background: #fff7ff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0,0,0,0.03);
}

.news ul {
  padding-left: 20px;
}
.news li {
  margin-bottom: 10px;
}

/* ФУТЕР */

footer {
  background: #eee;
  text-align: center;
  padding: 20px;
  font-size: 0.9em;
  margin-top: 40px;
}

/* ФОРМЫ */

.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.login-form button {
  background-color: #6a1b9a;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.login-form button:hover {
  background-color: #8e24aa;
}

/* УВЕДОМЛЕНИЯ */

.error-box {
  background: #ffd4d4;
  color: #900;
  border: 1px solid #e88;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 4px;
}

.success-box {
  background: #d4ffd4;
  color: #070;
  border: 1px solid #8e8;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 4px;
}

/* ТАБЛИЦЫ */

table.default-table {
  border-collapse: collapse;
  width: 100%;
}

table.default-table th,
table.default-table td {
  padding: 8px;
  border-bottom: 1px solid #ddd;
  text-align: left;
  vertical-align: top;
}

table.default-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

table.default-table th.sortable {
  cursor: pointer;
  color: #007bff;
}

table.default-table th.sortable:hover {
  text-decoration: underline;
}

th span[data-sort] {
  cursor: pointer;
  text-decoration: underline dotted;
}
th span[data-sort]:hover {
  color: #007bff;
}
.pricing-grid {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 30px 0;
}
.tariff {
  background: #fafafa;
  border-radius: 8px;
  padding: 20px;
  width: 300px;
  box-shadow: 0 0 8px rgba(0,0,0,0.05);
  text-align: center;
}
.tariff h2 {
  margin-top: 0;
  color: #6a1b9a;
}
.tariff ul {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}
.tariff ul li {
  padding: 5px 0;
  border-bottom: 1px solid #eee;
}
.faq h3 {
  margin-top: 20px;
}
.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

.form-group input {
  width: 100%;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 4px;
  border: 1px solid #ccc;
}
.news-page h1 {
  margin-bottom: 10px;
}

.news-list {
  padding-left: 20px;
  list-style: disc;
}

.news-list li {
  margin-bottom: 12px;
}

.default-table td,
.default-table th {
  vertical-align: middle;
  text-align: left;
}

.default-table img {
  border-radius: 4px;
  max-width: 80px;
  max-height: 80px;
}

.default-table form {
  margin: 0;
}

.default-table button {
  background: #f5f5f5;
  border: 1px solid #ccc;
  padding: 4px 8px;
  cursor: pointer;
  border-radius: 4px;
}

.default-table button:hover {
  background: #e0e0e0;
}

textarea {
  font-family: inherit;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.dashboard-menu {
  margin-bottom: 25px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-menu a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background-color: #f2f2f2;
  border-radius: 8px;
  color: #333;
  font-weight: bold;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s ease;
}

.dashboard-menu a:hover {
  background-color: #e0e0e0;
}

.dashboard-menu a.active {
  background-color: #6a1b9a;
  color: #fff;
}


/* Lightbox */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 60px;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.85);
}
.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(255,255,255,0.3);
}
.close {
  position: absolute;
  top: 20px; right: 35px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: #bbb;
}

/* ===== Навигация (main-menu / nav-links) ===== */

/* Базовая сетка */
.main-menu{ margin:0; }
.main-menu ul{
  display:flex; align-items:center; gap:16px;
  list-style:none; padding:0; margin:0;
}
.nav-links a{
  display:inline-block;
  text-decoration:none;
  color:#e6e8f0;
  padding:8px 10px;
  border-radius:10px;
  transition:background .2s ease, color .2s ease, box-shadow .2s ease;
}
.nav-links a:hover{
  background:rgba(108,92,255,.12);
}

/* Активный пункт меню */
.nav-links a.active{
  background:#6c5cff;
  color:#fff;
  box-shadow:0 4px 14px rgba(108,92,255,.35);
}

/* Кнопка «Регистрация», если нет своих стилей */
.nav-links .btn.small{
  background:#6c5cff; color:#fff;
  padding:8px 14px; border-radius:999px;
  font-weight:600; border:0;
}
.nav-links .btn.small:hover{
  filter:brightness(1.07);
}

/* ===== Мобильное меню (раскрытие по классу .open) ===== */
@media (max-width: 920px){
  /* По умолчанию скрываем список ссылок,
     и показываем его только когда JS добавит .open */
  .nav-links{ display:none; }
  .nav-links.open{
    display:block;
    position:absolute; right:16px; top:64px;
    background:#0f1016;
    border:1px solid #20222b;
    border-radius:12px;
    padding:8px 10px;
    box-shadow:0 10px 30px rgba(0,0,0,.3);
    z-index:1000;
  }
  .nav-links.open ul{
    display:flex; flex-direction:column; gap:6px;
  }
  .nav-links.open a{
    display:block; padding:10px 12px;
  }
}
/* ==== Главная: CTA-кнопки в герое ==== */
.cta-row{
  display:flex; gap:12px; flex-wrap:wrap; margin-top:14px;
}
.cta-row .btn{ min-height:40px; padding:10px 16px; }

/* ==== Общие отступы секций на главной ==== */
.content section{ padding: 32px 0; }
.content section + section{ margin-top: 12px; }

/* ==== Блок "Что вы получаете" ==== */
.features-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.feature{
  border:1px solid rgba(0,0,0,.08);
  border-radius:12px;
  padding:16px;
  background:rgba(0,0,0,.02);
}
.feature h3{ margin:0 0 6px; font-size:18px; line-height:1.25; }
.feature p{ margin:0; }

/* ==== Новости ==== */
.news ul{ list-style:none; padding:0; margin:0 0 12px; }
.news li{ padding:8px 0; }
.news li + li{ border-top:1px dashed rgba(0,0,0,.12); }
.news time{ font-variant-numeric:tabular-nums; opacity:.8; }

/* ==== О сервисе (читабельная ширина текста) ==== */
.about.full p{ max-width: 920px; }

/* ==== Адаптив ==== */
@media (max-width: 960px){
  .features-grid{ grid-template-columns:1fr; }
  .news li strong{ display:block; margin-bottom:4px; }
}
/* ===== Декоративная полоса под шапкой (вместо второго меню) ===== */
.menu-strip{
  height:12px;
  background:linear-gradient(90deg, #6c5cff 0%, #7c4dff 50%, #6c5cff 100%);
  box-shadow: inset 0 -1px rgba(0,0,0,.12), 0 1px 2px rgba(0,0,0,.06);
  border-bottom: 1px solid rgba(0,0,0,.08);
}
/* небольшой отступ перед контентом */
.menu-strip + .content{ margin-top: 12px; }

@media (max-width: 960px){
  .menu-strip{ height:10px; }
}

/* ==== Header layout ==== */
.site-header{
  display:flex; align-items:center; gap:16px;
  min-height:64px; padding:10px 16px;
  position: relative;
}
.site-header .logo{
  text-decoration:none; color:#fff; font-weight:700;
  display:inline-flex; align-items:center; gap:8px;
}
.site-header .slogan{ opacity:.9; }
.site-header .nav-links{
  margin-left:auto; display:flex; align-items:center; gap:14px;
}

/* Бургер по умолчанию скрыт на десктопе */
.burger{ display:none; background:transparent; border:0; padding:8px; margin-left:8px; }
.burger span{
  display:block; width:24px; height:2px; background:#fff; margin:5px 0;
}

/* Мобильный режим: меню по бургеру */
@media (max-width: 920px){
  .burger{ display:inline-flex; align-items:center; justify-content:center; }
  .site-header .nav-links{ display:none; }
  .site-header .nav-links.open{
    display:block;
    position:absolute; right:12px; top:64px;
    background:#0f1016; border:1px solid #20222b; border-radius:12px;
    padding:8px 10px; z-index:1000;
    box-shadow:0 10px 30px rgba(0,0,0,.3);
  }
  .site-header .nav-links.open a{ display:block; padding:10px 12px; }
}
/* === FIX: шапка и бургер === */

/* 1) Насильно делаем текст в шапке белым и видимым */
.site-header,
.site-header a,
.site-header .logo,
.site-header .nav-links a,
.site-header .slogan{
  color:#fff !important;
  opacity:1 !important;
  text-decoration:none;
}

/* 2) На десктопе бургер и его полоски полностью прячем */
@media (min-width: 921px){
  .site-header .burger,
  .site-header .burger span{
    display:none !important;
  }
  /* и показываем меню на всякий случай */
  .site-header .nav-links{
    display:flex !important;
  }
}

/* 3) На мобиле — наоборот: меню скрыто, бургер виден */
@media (max-width: 920px){
  .site-header .burger{
    display:inline-flex !important;
    background:transparent; border:0; padding:8px; margin-left:auto;
  }
  .site-header .burger span{
    display:block; width:24px; height:2px; background:#fff; margin:5px 0;
  }
  .site-header .nav-links{ display:none !important; }
  .site-header .nav-links.open{
    display:block !important;
    position:absolute; right:12px; top:64px;
    background:#0f1016; border:1px solid #20222b; border-radius:12px;
    padding:8px 10px; z-index:1000; box-shadow:0 10px 30px rgba(0,0,0,.3);
  }
  .site-header .nav-links.open a{ display:block; padding:10px 12px; }
}

/* 4) Мелочь: логотип-ссылка без подчёркивания на hover */
.site-header .logo:hover{ text-decoration:none; }
