/* === Верхняя узкая шапка === */
.top-header {
  font-size: 20px;
}

.accessibility-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
}

.font-size-controls,
.color-scheme-controls {
  display: flex;
  gap: 5px;
}

/* первая строка */
.top-header-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  border-bottom: 1px solid #ddd;
}

.top-header a {
  color: #000;
  text-decoration: none;
  margin: 0 10px;
  white-space: nowrap;
  transition: color 0.2s;
}

.top-header a:hover {
  color: #0056b3;
}

.left-links,
.right-links,
.social-links {
  display: flex;
  align-items: center;
}

.top-header .social-links img {
  width: 50px;
  height: auto;
  margin: 0 -15px;
  vertical-align: middle;
}

/* вторая строка */
.second-header {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid #ddd;
  padding: 10px 15px;
  background: #fff;
  flex-wrap: wrap; /* логотип с названием — первой строкой, меню — второй */
}

/* Логотип */
.second-left img {
  max-height: 80px;
  height: auto;
  margin-right: 15px;
}

/* Текст в 2 строки */
.second-center p {
  margin: 0;           /* убираем верхний/нижний отступ */
  line-height: 1.2;    /* плотность между строками */
}


/* Меню — отдельной строкой под логотипом, во всю ширину шапки */
.second-right {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 34px;
  flex-basis: 100%;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.second-right a {
  color: #000;
  text-decoration: none;
  font-size: 18px;
  white-space: nowrap;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.second-right a:hover {
  color: #0056b3;
}

/* Пункт текущей страницы */
.second-right a.active {
  color: #0056b3;
  border-bottom-color: #0056b3;
}

/* === Адаптив === */
@media (max-width: 1024px) {
  .second-header {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .second-center {
    margin-right: 0;
    margin-top: 10px;
  }
  .second-right {
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
  }
}

@media (max-width: 768px) {
  .top-header-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .left-links,
  .right-links,
  .social-links {
    flex-wrap: wrap;
    gap: 5px;
  }

  .second-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .second-center {
    margin: 5px 0;
    white-space: normal; /* разрешаем перенос текста */
  }

  .second-right {
    flex-direction: column;
    gap: 5px;
  }
}


/* 3D Карусель */
.carousel-3d {
    position: relative;
    margin: 30px auto 0;
    width: 100%;
    max-width: 1200px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}


.carousel-item {
    position: absolute;
    max-height: 70%;
    max-width: 60%;
    object-fit: contain;
    border-radius: 25px;
    transition: transform 0.6s ease, z-index 0.6s;
    cursor: pointer;
}

.about {
  text-align: center;   /* центрирует текст внутри секции */
  max-width: 900px;     /* ограничивает ширину, чтобы текст не растягивался на всю страницу */
  margin: 0 auto;       /* центрирует сам блок */
  padding: 20px;        /* добавляет отступы */
}

body {
  font-size: 26px;
}


/* === Футер === */
footer {
  background-color: #f9f9f9;
  padding: 30px 50px;
  font-size: 14px;
  color: #000;
}

.footer-container {
  display: flex;
  justify-content: flex-start; /* колонки прижаты к левому краю */
  align-items: flex-start;     
  flex-wrap: wrap;
  gap: 40px;                   
  margin-bottom: 20px;
}

/* Первая колонка: логотип + текст */
.footer-logo-column {
  flex: 0 0 auto; /* не растягивается, занимает ширину содержимого */
}

/* Остальные колонки */
.footer-column:not(.footer-logo-column) {
  flex: 1; /* равномерное растяжение */
}

/* Логотип + текст */
.footer-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* прижато к левому краю */
  text-decoration: none;
  color: inherit;
}

.footer-logo {
  max-height: 100px;
  margin-bottom: 10px;
}

.footer-column h3 {
  font-size: 24px;
  margin-bottom: 10px;
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  font-size: 20px;
  margin: 10px 0;
}

/* Все ссылки в футере */
footer a,
footer a:visited,
footer a:active,
footer a:focus {
  color: #000;
  text-decoration: none;
  transition: color 0.2s;
}

footer a:hover {
  color: #0056b3;
  text-decoration: none;
}

/* Нижняя часть футера */
.footer-bottom {
  border-top: 1px solid #ccc;
  padding-top: 15px;
  text-align: center;
}

.footer-bottom p {
  margin: 5px 0;
  font-size: 18px;
}

.footer-bottom .social-links {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.footer-bottom .social-links img {
  width: 50px;
  height: auto;
}

/* Адаптив */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 20px;
    padding: 0 20px;
  }
  .footer-column:not(.footer-logo-column) {
    flex: 1 1 100%;
  }
}

/* === МОБИЛЬНАЯ ОПТИМИЗАЦИЯ HEADER + FOOTER === */

/* ===== HEADER ===== */

/* Верхняя узкая шапка — мобильная */
@media (max-width: 768px) {
  .top-header {
    font-size: 14px !important; /* уменьшаем шрифт */
  }
  
  .top-header-container {
    flex-direction: column !important;
    gap: 8px;
    padding: 8px 12px !important;
  }
  
  .left-links, .right-links, .social-links {
    gap: 8px !important;
  }
  
  .top-header a {
    margin: 0 4px !important;
    font-size: 13px;
  }
  
  .top-header .social-links img {
    width: 32px !important;
  }
}

/* Вторая строка header — мобильная */
@media (max-width: 768px) {
  .second-header {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    padding: 15px 12px !important;
    gap: 12px;
  }
  
  .second-left img {
    max-height: 60px !important;
    margin: 0 !important;
  }
  
  .second-center p {
    font-size: 14px !important;
    line-height: 1.4;
    margin: 0 !important;
  }
  
  .second-right {
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 12px !important;
    justify-content: center;
  }
  
  .second-right a {
    font-size: 15px !important;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(0, 86, 179, 0.05);
    transition: all 0.2s;
  }
  
  .second-right a:hover {
    background: rgba(0, 86, 179, 0.1) !important;
  }

  .second-right {
    border-top: none;
    margin-top: 0;
    padding-top: 0;
  }

  .second-right a.active {
    background: #0056b3 !important;
    color: #fff !important;
    border-bottom-color: transparent;
  }
}

/* ===== FOOTER ===== */

/* Основной контейнер футера — мобильный */
@media (max-width: 768px) {
  footer {
    padding: 25px 15px !important;
    font-size: 13px;
  }
  
  .footer-container {
    flex-direction: column !important;
    gap: 20px !important;
    padding: 0 10px;
  }
  
  .footer-logo-column {
    text-align: center;
    margin-bottom: 10px;
  }
  
  .footer-logo {
    max-height: 70px !important;
  }
  
  .footer-column h3 {
    font-size: 16px !important;
    text-align: center;
    margin-bottom: 8px;
  }
  
  .footer-column ul {
    text-align: center;
  }
  
  .footer-column ul li {
    font-size: 14px !important;
    margin: 6px 0 !important;
  }
}

/* Нижняя часть футера — мобильная */
@media (max-width: 768px) {
  .footer-bottom {
    padding-top: 12px !important;
  }
  
  .footer-bottom p {
    font-size: 13px !important;
    margin: 4px 0 !important;
  }
  
  .footer-bottom .social-links {
    gap: 8px !important;
  }
  
  .footer-bottom .social-links img {
    width: 36px !important;
  }
}

/* Сверхкомпактный режим (телефоны < 480px) */
@media (max-width: 480px) {
  /* Header */
  .top-header {
    font-size: 12px !important;
  }
  
  .second-right a {
    font-size: 14px !important;
    padding: 4px 8px !important;
  }
  
  .second-center p {
    font-size: 13px !important;
  }
  
  /* Footer */
  footer {
    padding: 20px 10px !important;
  }
  
  .footer-column h3 {
    font-size: 15px !important;
  }
  
  .footer-column ul li {
    font-size: 13px !important;
  }
  
  .footer-bottom p {
    font-size: 12px !important;
  }
}

/* Общие улучшения для touch */
@media (hover: none) and (pointer: coarse) {
  .second-right a,
  .top-header a,
  footer a {
    min-height: 44px; /* стандарт для touch */
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* ===== ОСНОВНОЙ body для мобильных ===== */
@media (max-width: 768px) {
  body {
    font-size: 16px !important; /* базовый размер */
    line-height: 1.5;
  }
}



/* === Новости === */
.news-section {
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.news-section h1 {
  text-align: center;
}



.news-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* всегда 4 колонки */
  gap: 20px;
}

.news-item {
  width: 100%;
  box-sizing: border-box;
}

.news-item:hover {
  transform: translateY(-5px);
}

.news-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.news-item h2 {
  font-size: 18px;
  margin: 10px;
}

.news-item .news-date {
  font-size: 14px;
  color: gray;
  margin: 0 10px 10px;
}

.news-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.news-detail {
  max-width: 800px;       
  margin: 0 auto;         
  display: flex;          
  flex-direction: column; 
  align-items: center;
  text-align: center; 
  padding: 20px;
}

.news-detail-image {
  width: 50vw;
  max-width: 800px;
  height: auto;
  margin-bottom: 20px;
}

.news-detail .news-content {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  font-size: 20px;
  line-height: 1.6;
  text-align: justify;
}






/* === Контакты === */

.contacts-grid {
  display: grid;
  grid-template-columns: 400px 400px 450px;
  gap: 40px;
  margin: 10px auto;
  max-width: 1200px;

  align-items: start;    
  justify-items: start;  
}

.contact-column {
  word-wrap: break-word;
  text-align: left;
}

.contact-column a {
  color: #000;
  text-decoration: none;
}

.contact-column a:hover {
  text-decoration: underline;
}


  .contact-column h2 {
    margin-bottom: 10px;
    font-size: 1.1em;
    color: #333;
  }

  .contact-column p {
    margin: 5px 0;
    line-height: 1.5;
  }

  @media (max-width: 768px) {
    .contacts-grid {
      grid-template-columns: 1fr;
    }
  }



/* === Обратная связь === */
.about h1 {
  text-align: center;  /* заголовок по центру */
}

.about ul {
  text-align: left;    /* список прижат к левому краю */
  padding-left: 20px;
}




.documents-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}



.document-item {
  align-items: flex-start;
  padding: 8px 0;
  border: 2px solid #ccc;
  border-bottom: 1px solid #eee;
  gap: 20px;
  display: flex;
  justify-content: space-between;
  border-radius: 8px;

}

.document-title {
  font-weight: bold;
}

.document-download {
  text-decoration: none;
  color: #0077cc;
  font-weight: bold;
}
.document-download:hover {
  text-decoration: underline;
}

.documents h1 {
  text-align: center;
}

.documents p {
  text-align: center;
}




.activity h1 {
  text-align: center;
}

.activity p {
  text-align: center;
}




/* Секция объявлений */
.announcements-section {
  display: flex;
  flex-direction: column;
  align-items: center;   /* Центрируем карточки */
  gap: 20px;
  margin: 40px auto;
  max-width: 800px;      /* Ограничим ширину блока */
}

/* Карточка объявления */
.announcement-item {
  
  border-radius: 12px;
  padding: 20px;
  width: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.announcement-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Заголовок объявления */
.announcement-item h2 {
  margin: 0 0 10px;
  font-size: 1.8rem;
  color: #333;
  text-align: center;
}

/* Дата */
.announcement-date {
  font-size: 0.9rem;
  margin-bottom: 10px;
  text-align: center;
}

/* Текст */
.announcement-item p {
  font-size: 1.2rem;
  line-height: 1.5;
  
  text-align: center;
}



.antiterror-section h1 {
  text-align: center;
}

.antiterror-section p {
  text-align: center;
}



.document-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid #eee;
  gap: 20px;             
}
.document-item:last-child {
  border-bottom: none;
}
.document-title {
  color: #333;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
  flex: 1;                  
  word-break: break-word;   
}
.document-title:hover {
  color: #0066cc;
}
.document-download {
  flex-shrink: 0;        
  text-decoration: none;
  color: #0066cc;
}
.doc-section {
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}
.doc-section-header {
  cursor: pointer;
  background: #f2f2f2;
  padding: 12px 15px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  user-select: none;
  transition: background 0.2s ease;
  text-align: center;
}
.doc-section-header:hover {
  background: #e8e8e8;
}
.doc-section-header i {
  transition: transform 0.3s;
}
.doc-section-header.collapsed i {
  transform: rotate(-90deg);
}
.documents-list {
  padding: 10px 20px;
  display: block;
  animation: fadeIn 0.2s ease-in;
}



.banners {
  margin: 40px auto;
  max-width: 1200px;
  padding: 0 20px;
}

.banners-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  justify-items: center;
}

.banners-grid img {
  width: 100%;
  max-width: 300px;
  border-radius: 10px;
  transition: transform 0.3s;
}

.banners-grid img:hover {
  transform: scale(1.05);
}


.news-gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
}
.news-gallery img {
  max-height: 480px;
  flex-shrink: 0;
  border-radius: 6px;
}

.gallery-wrapper {
  margin-top: 20px; 
}


