/* aktualnosci-mobile.css - Мобильные стили для страницы Aktualności */

/* ===== ОСНОВНЫЕ МОБИЛЬНЫЕ СТИЛИ ===== */
@media (max-width: 768px) {
  
  /* Базовые исправления для горизонтального скролла */
  html, body {
    overflow-x: hidden;
    max-width: 100%;
    position: relative;
  }
  
  body {
    width: 100%;
  }
  
  /* Адаптация верхней панели */
  header {
    top: 15px;
    width: 100%;
    padding: 0 10px;
    box-sizing: border-box;
  }
  
  .top-left-icons {
    left: 15px;
    gap: 8px;
  }
  
  .top-left-icons img,
  .top-right-icon img {
    width: 18px;
    height: 18px;
  }
  
  .main-nav {
    display: none; /* Скрываем основное меню на мобильных */
  }
  
  .top-right-icon {
    right: 15px;
  }
  
  /* Бургер-меню для мобильных */
  .burger-menu {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .burger-line {
    width: 100%;
    height: 2px;
    background-color: #000; /* Черный цвет для контраста */
    transition: all 0.3s ease;
  }

  .burger-menu.active .burger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }

  .burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
  }

  .burger-menu.active .burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }

  /* Боковое меню - ИСПРАВЛЕННАЯ ВЕРСИЯ */
.side-menu {
  position: fixed;
  top: 0;
  right: 100%; /* Меню скрыто справа */
  width: 80%;
  max-width: 300px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: right 0.3s ease; /* Анимация для right */
  padding: 60px 20px 20px;
  overflow-y: auto;
}

.side-menu.open {
  right: 0; /* Меню появляется справа */
}

.side-menu nav {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.side-menu a {
  color: #333;
  text-decoration: none;
  font-size: 18px;
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

.close-menu {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}

.overlay-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 999;
  display: none;
}

.overlay-blur.active {
  display: block;
}
  
  /* Адаптация секции новостей */
  .units-frame {
    padding: 80px 15px 40px 15px !important;
    margin-top: 0;
  }
  
  .units-main-title {
    font-size: 32px !important;
    text-align: center;
    margin-bottom: 30px !important;
    line-height: 1.2;
  }
  
  .news-section {
    margin: 20px 0 !important;
    padding: 0 !important;
  }
  
  .news-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
    max-width: 100% !important;
  }
  
  .news-card {
    margin-bottom: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1) !important;
  }
  
  .news-image {
    height: 180px !important;
    border-radius: 12px 12px 0 0 !important;
  }
  
  .news-content {
    padding: 15px !important;
  }
  
  .news-date {
    font-size: 11px !important;
    margin-bottom: 8px !important;
  }
  
  .news-title {
    font-size: 16px !important;
    margin-bottom: 10px !important;
    line-height: 1.3 !important;
  }
  
  .news-excerpt {
    font-size: 13px !important;
    margin-bottom: 12px !important;
    line-height: 1.4 !important;
  }
  
  .news-link {
    font-size: 13px !important;
  }
  
  /* Адаптация пагинации */
  .pagination {
    margin-top: 30px !important;
    flex-wrap: wrap;
    gap: 10px !important;
  }
  
  .page-numbers {
    gap: 5px !important;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .page-number,
  .page-arrow {
    width: 32px !important;
    height: 32px !important;
    font-size: 13px !important;
    border-radius: 6px !important;
  }
  
  /* Адаптация для детальной страницы новости */
  .news-detail {
    padding: 80px 15px 30px 15px !important;
    max-width: 100% !important;
  }
  
  .news-detail-header {
    margin-bottom: 20px !important;
  }
  
  .news-detail-date {
    font-size: 13px !important;
    margin-bottom: 8px !important;
  }
  
  .news-detail-title {
    font-size: 22px !important;
    margin-bottom: 15px !important;
    line-height: 1.3 !important;
  }
  
  .news-detail-image {
    max-height: 250px !important;
    border-radius: 10px !important;
    margin-bottom: 20px !important;
  }
  
  .news-detail-content {
    font-size: 15px !important;
    line-height: 1.6 !important;
  }
  
  .news-detail-content p {
    margin-bottom: 15px !important;
  }
  
  .news-detail-content h2,
  .news-detail-content h3 {
    margin: 20px 0 12px !important;
    font-size: 18px !important;
  }
  
  .back-link {
    margin-bottom: 20px !important;
    font-size: 14px !important;
  }
  
  /* Дополнительные исправления для переполнения */
  * {
    max-width: 100%;
  }
  
  img, video {
    max-width: 100%;
    height: auto;
  }
}

/* ===== СКРЫТИЕ МОБИЛЬНОГО МЕНЮ В ДЕСКТОП ВЕРСИИ ===== */
@media (min-width: 769px) {
  .burger-menu,
  .side-menu,
  .overlay-blur {
    display: none !important;
  }
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ОЧЕНЬ МАЛЕНЬКИХ ЭКРАНОВ ===== */
@media (max-width: 480px) {
  .units-frame {
    padding: 70px 10px 30px 10px !important;
  }
  
  .units-main-title {
    font-size: 28px !important;
    margin-bottom: 25px !important;
  }
  
  .news-card {
    margin-bottom: 15px !important;
  }
  
  .news-image {
    height: 160px !important;
  }
  
  .news-content {
    padding: 12px !important;
  }
  
  .news-title {
    font-size: 15px !important;
  }
  
  .pagination {
    margin-top: 25px !important;
  }
  
  .page-number,
  .page-arrow {
    width: 30px !important;
    height: 30px !important;
    font-size: 12px !important;
  }
  
  .news-detail {
    padding: 70px 10px 25px 10px !important;
  }
  
  .news-detail-title {
    font-size: 20px !important;
  }
  
  .news-detail-image {
    max-height: 200px !important;
  }
}

/* ===== ТЕМНАЯ ТЕМА ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
  body.dark-theme .burger-line {
    background-color: #fff; /* Белый цвет для темной темы */
  }
  
  body.dark-theme .side-menu {
    background: rgba(40, 40, 40, 0.95);
  }
  
  body.dark-theme .side-menu a {
    color: #e0e0e0;
    border-bottom-color: #444;
  }
  
  body.dark-theme .close-menu {
    color: #e0e0e0;
  }
  
  body.dark-theme .units-main-title {
    color: #ffffff;
  }
}