/* ===== Шапка: прижата к краям + мобильное меню ===== */
body { margin: 0; padding: 14px; }   /* единый отступ контента от краёв */

.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #FF8900;
  margin: -14px -14px 14px;  /* компенсируем padding body → шапка во всю ширину */
  padding: 8px 12px;
}

/*
.header {
  position: sticky;
  top: 0;
  width: 100%;
  background: #FF8900;
  padding: 10px 15px;
  z-index: 1000;
  box-sizing: border-box;
}
*/

/* Десктоп: обычный ряд кнопок, компактная планка скрыта */
.header-bar  { display: none; }
.header-menu { display: flex; flex-wrap: wrap; gap: 6px; }

/* Мобилка: планка «Главная + бургер», остальные кнопки в панели */
@media (max-width: 700px) {
  .header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  .header-menu { display: none; flex-direction: column; margin-top: 8px; }
  .header-menu.open { display: flex; }
  .m-hide { display: none; }   /* не дублируем «Главную» внутри панели */
}

/*
@media (max-width: 600px) {
  .art-grid {
    grid-template-columns: 1fr; /* одна колонка на телефоне */
/*  }
  body {
    padding: 10px;
    font-size: 16px;
  }
}*/

/* Мобильные: гамбургер виден, кнопки скрыты до клика 
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .menu-items {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
  }
  
  .menu-items.open {
    display: flex;
  }
  
  .menu-items button {
    width: 100%;
    text-align: left;
  }
}
*/
/* Общий фон и текст */
body {
    background-color: #0d0d0d;
    color: #e0e0e0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
}

/* Заголовки */
h1, h2 {
    color: #f39200;
}

/* Ссылки */
a {
    color: #f39200;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.back-to-top {
  position: fixed; /* см. ниже */
  bottom: 20px;
  right: 20px;
}

button {
  background: #1e1e1e;
  color: #f39200;
  border: 1px solid #333;
  padding: 6px 12px;
  margin: 4px;
  cursor: pointer;
}
button:hover {
  background: #2a2a2a;
}
#header-buttons button{
  background: #FFBE73;
  color: #000000;
  display: inline-block;
  margin-right: 8px; /* отступ между кнопками */
  cursor: pointer;
}
header-buttons button:hover {
  background: #2a2a2a;
}
.box {
  position: relative;
  top: 20px;    /* сдвинется на Y px ВНИЗ */
  left: 30px;   /* сдвинется на X px ВПРАВО */
}

.parent {
  position: relative; /* создаём "якорь" */
  height: 400px;
}

.child {
  position: absolute;
  top: 10px;
  right: 20px; /* прикреплён к верхнему правому углу .parent */
}

#back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 10px 15px;
  background: #1e1e1e;
  border: 1px solid #333;
  cursor: pointer;
}

/* Десктоп: кнопки в ряд */
.menu-items {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.menu-items button {
  background: #1e1e1e;
  color: #f39200;
  border: 1px solid #333;
  padding: 6px 12px;
  margin: 0;
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
}

.menu-items button:hover {
  background: #2a2a2a;
}

/* Гамбургер-кнопка: скрыта на десктопе */
.menu-toggle {
  display: none;
  background: #1e1e1e;
  color: #f39200;
  border: 1px solid #333;
  padding: 8px 12px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 4px;
}

/*
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: ;
  z-index: 1000; /* чтобы был поверх всего */
/*}
*/
.logo {
  position: fixed;
  top: 15px;
  left: 15px;
  font-size: 24px;
  color: #64ffda;
  z-index: 100;
}

.post-container {
  position: relative;
  padding-right: 200px; /* место для заметки */
}

.sidebar-note {
  position: absolute;
  top: 0;
  right: 0;
  width: 180px;
  background: #2a2a2a;
}

.like-btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  color: #aaa;
}
.like-btn:hover .like-icon {
  color: #ff4081 !important;
}

.hero-section {
  display: flex;
  align-items: center;
  gap: 30px;
  padding: 40px;
}
.hero-image { max-width: 400px; }

/* Общий контейнер для всех постов */

.news-post {
  position: relative;
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 20px;      /* Отступы по краям на мобильных */
  margin: 0 auto;       /* Центрирует блок по горизонтали */
  margin-bottom: 25px;
  max-width: 640px;
  color: #e0e0e0;
}

.news-post h2 {
  color: #f39200;
  margin-top: 0;
}

.news-post p {
  line-height: 1.6;
  font-size: 17px;
}

.post-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
}

/* 1. Адаптивные картинки внутри поста */
.news-post img {
  max-width: 100%;      /* Картинка не может быть шире самой карточки */
  height: auto;         /* Высота подстраивается автоматически, чтобы не сплющивало */
  border-radius: 8px;   /* Красивые скругленные углы */
  display: block;
  margin-bottom: 15px;
}

/* 2. Адаптивные видео (iframe) внутри поста */
.news-post iframe {
  width: 100%;          /* На мобильных занимает всю ширину карточки */
  max-width: 640px;     /* На ПК не растягивается больше 640 пикселей */
  aspect-ratio: 16 / 9; /* МАГИЯ: сохраняет пропорции 16:9, чтобы видео не было сплюснутым */
  border-radius: 8px;
  margin-bottom: 15px;
}

.auth-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
  z-index: 1000;
  display: none;          /* скрыто по умолчанию */
}

.auth-modal.open {        /* видно, если есть класс open */
  display: flex;
}

.auth-form {
  background: #1e1e1e;
  padding: 30px;
  border-radius: 10px;
  width: 100%;
  max-width: 400px;
}

.auth-form h2 {
  color: #f39200;
  margin-top: 0;
}

.auth-form input {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  background: #2a2a2a;
  border: 1px solid #333;
  color: #e0e0e0;
  border-radius: 4px;
}

.auth-form button {
  background: #f39200;
  color: #000;
  border: none;
  padding: 10px 15px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  font-weight: bold;
}

.auth-form .switch-mode {
  color: #bb86fc;
  text-decoration: underline;
  cursor: pointer;
  text-align: center;
  margin-top: 15px;
}

.consent-label {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 14px; color: #aaa; margin: 10px 0; cursor: pointer;
}
.consent-label a { color: #f39200; }

.site-footer {
  margin-top: 60px;
  border-top: 1px solid #333;
  background: #0d0d0d;
  padding: 30px 20px;
  color: #aaa;
  font-size: 14px;
}
.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
@media (max-width: 600px) {
  .footer-content { grid-template-columns: 1fr; }
}
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-links a {
  color: #f39200;
  text-decoration: none;
}
.footer-links a:hover { text-decoration: underline; }
.footer-requisites p { margin: 4px 0; }
.footer-requisites a { color: #f39200; }
.footer-copy { margin-top: 15px; color: #666; }