/* =================================
   ОСНОВНЫЙ СТИЛЬ САЙТА ДОСААФ
   ================================= */

/* --- СБРОС И БАЗА --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  height: 100%;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f5f7fa;
  color: #222;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
a   { color: #003b8e; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Контейнер всей страницы */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------------------------------
   1. ШАПКА
   --------------------------------- */
.site-header {
  background: #003b8e;
  color: #fff;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  z-index: 10;
}
.logo {
  display: flex;
  align-items: center;
}
.logo img { height: 60px; margin-right: 10px; }
.logo h1 { font-size: 1.2em; line-height: 1.2; }
.logo p  { font-size: 0.9em; }

.menu-toggle { display: none; }
.menu-btn {
  display: none;
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background .3s;
  cursor: pointer;
}
.menu-btn:hover { background: rgba(255,255,255,0.35); }

#main-nav {
  display: flex;
  gap: 10px;
}
#main-nav a {
  color: #fff;
  padding: 8px 12px;
  border-radius: 4px;
  transition: background .3s;
}
#main-nav a:hover {
  background: rgba(255,255,255,0.2);
}

@media(max-width:768px){
  .menu-btn { display:block; }
  #main-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #003b8e;
  }
  .menu-toggle:checked ~ #main-nav { display: flex; }
  #main-nav a {
    border-bottom: 1px solid rgba(255,255,255,0.2);
    text-align: center;
  }
}

/* ---------------------------------
   2. ОСНОВНОЙ КОНТЕНТ
   --------------------------------- */
main.content {
  flex: 1 0 auto;
  max-width: 1100px;
  margin: 20px auto;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Секция контента внутри админки или публичных */
h2.page-title {
  text-align: center;
  color: #003b8e;
  margin-bottom: 20px;
}

/* ---------------------------------
   3. ПОДВАЛ
   --------------------------------- */
.site-footer {
  background: #003b8e;
  color: #fff;
  text-align: center;
  padding: 15px;
  font-size: 0.95em;
  flex-shrink: 0;
}
.site-footer a {
  color: #fff;
  text-decoration: underline;
}

/* ---------------------------------
   4. СЛАЙДЕР (CSS-only)
   --------------------------------- */
.slider-container {
  position: relative;
  width: 100%;
  height: 30vh;
  min-height: 250px;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 30px;
}
.slider { position: relative; width:100%; height:100%; }
.slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: fadeSlide 20s infinite;
}
.slide.s1 { background-image: url('/images/slider/1.jpg'); animation-delay: 0s; }
.slide.s2 { background-image: url('/images/slider/2.jpg'); animation-delay: 5s; }
.slide.s3 { background-image: url('/images/slider/3.jpg'); animation-delay: 10s; }
.slide.s4 { background-image: url('/images/slider/4.jpg'); animation-delay: 15s; }

@keyframes fadeSlide {
  0%{opacity:0;} 5%{opacity:1;} 25%{opacity:1;} 30%{opacity:0;} 100%{opacity:0;}
}

/* ---------------------------------
   5. НОВОСТИ
   --------------------------------- */
.news-grid {
  display:flex;flex-wrap:wrap;justify-content:center;gap:20px;
}
.news-card {
  width: 18%;
  background:#fff;
  border-radius:8px;
  overflow:hidden;
  box-shadow:0 2px 6px rgba(0,0,0,0.15);
  transition: transform .25s;
}
.news-card:hover { transform: scale(1.04); }
.news-card img {
  width:100%;height:120px;object-fit:cover;
}
.news-info { padding:10px; background:#fff; }
.news-info h3 { font-size:1em;margin-bottom:5px;color:#003b8e; }
.news-info p { font-size:.9em; color:#333; }

@media(max-width:992px){.news-card{width:45%;}}
@media(max-width:768px){.news-card{width:90%;}}
/* ==== НОВОСТИ (обновлённые обложки) ==== */
.news-card {
  width: 20%;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform .25s;
}
.news-card:hover { transform: scale(1.03); }

.news-card .news-image img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.news-info {
  padding: 10px;
  background: #fff;
  color: #222;
}
.watch-video {
  text-align: center;
  font-weight: 600;
  color: #fff;
  background: #da2228;
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 8px;
  transition: background .3s;
}
.watch-video:hover {
  background: #bf1c22;
}
/* ---------------------------------
   6. АДМИНКА
   --------------------------------- */
.admin-main {
  flex: 1 0 auto;
  max-width: 1100px;
  background: #fff;
  margin: 20px auto;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.admin-main h2 {
  margin-bottom: 15px;
  color: #003b8e;
  text-align: center;
}
.ok-msg{color:green;margin:5px 0;}
.err-msg{color:red;margin:5px 0;}

.add-block {
  background:#eef4ff;padding:15px;border-radius:8px;margin-bottom:25px;
}
.add-block label{display:block;margin:5px 0 3px;}
.checkline{display:flex;align-items:center;gap:8px;margin-top:6px;}
.section-item{background:#fafafa;border:1px solid #ddd;border-radius:6px;padding:15px;margin-bottom:15px;}
.section-item h3{margin-bottom:8px;color:#003b8e;}
.edit-form textarea{width:100%;height:100px;resize:vertical;}
.inline-img{display:flex;align-items:center;gap:10px;margin:6px 0;}
.inline-img .preview{max-width:120px;border-radius:4px;}
.btnline{display:flex;gap:10px;margin-top:6px;}
.btn-green{background:#008251;color:#fff;padding:6px 12px;border-radius:4px;text-decoration:none;}
.btn-red{background:#da2228;color:#fff;padding:6px 12px;border-radius:4px;text-decoration:none;}
.btn-green:hover{background:#006b44;}
.btn-red:hover{background:#bf1c22;}
.file-block{margin-top:10px;border-top:1px dashed #ccc;padding-top:8px;}
.file-list{list-style:none;padding:0;margin:8px 0;}
.file-list li{margin-bottom:8px;}
.rename-form{display:flex;align-items:center;gap:6px;margin-top:3px;}
.rename-form input[type=text]{padding:4px;border:1px solid #ccc;border-radius:4px;}
.btn-small{padding:3px 6px;font-size:0.85em;}
/* ======= ШАПКА АДМИНКИ ======= */
.admin-header {
  background:#003b8e;
  color:#fff;
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  padding:10px 20px;
  border-bottom:4px solid #da2228;
}
.admin-logo-block h1 {
  font-size:1.4em;
  margin-bottom:2px;
}
.admin-logo-block .admin-subtitle {
  font-size:0.9em;
  color:#d0d8f8;
}

.admin-nav {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:flex-end;
}

.admin-nav a {
  text-decoration:none;
}

.admin-header-a {
  display:inline-block;
  background:#0054cb;
  color:#fff;
  padding:6px 14px;
  border-radius:5px;
  font-size:0.95em;
  font-weight:600;
  transition:background .3s, transform .2s;
}
.admin-header-a:hover {
  background:#da2228;
  transform:translateY(-1px);
}
.admin-header-a:active {
  background:#bf1c22;
  transform:translateY(0);
}

@media(max-width:768px){
  .admin-header {
    flex-direction:column;
    align-items:flex-start;
  }
  .admin-nav { justify-content:flex-start; flex-wrap:wrap; margin-top:5px; }
  .admin-header-a {
    margin-bottom:6px;
  }
}
/* ---------------------------------
   7. ПУБЛИЧНАЯ СТРАНИЦА "СВЕДЕНИЯ"
   --------------------------------- */
.about-public h2{
  color:#003b8e;
  margin-bottom:25px;
  text-align:center;
}
.about-item {
  background:#fff;
  border-radius:8px;
  margin-bottom:15px;
  box-shadow:0 2px 6px rgba(0,0,0,0.1);
  overflow:hidden;
}
.about-item summary {
  display:block;
  padding:12px 15px;
  background:#003b8e;
  color:#fff;
  font-weight:600;
  font-size:1.1em;
  cursor:pointer;
  user-select:none;
}
.about-item summary:hover { background:#0054cb; }
.about-inner { padding:15px; background:#fff; }
.about-img img { width:100%; max-height:350px; object-fit:contain; border-radius:6px; margin-bottom:10px; }
.about-text { margin-bottom:10px; color:#222; }
.about-files h4 { color:#003b8e; margin-bottom:5px; }
.about-files ul { list-style:disc; padding-left:18px; }
.about-files li { margin-bottom:4px; }
.about-item[open] summary { background:#bf1c22; }
/* ================================
   СТРАНИЦА "СВЕДЕНИЯ ОБ ОРГАНИЗАЦИИ"
=================================== */

/* Контейнер: меню + контент */
.about-container {
  display: flex;
  gap: 20px;
}

/* ------- МЕНЮ ПОДПУНКТОВ ------- */
.about-menu {
  flex: 0 0 25%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.about-menu-item {
  display: block;
  background: rgba(0,59,142,0.1);
  color: #003b8e;
  padding: 8px 10px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  opacity: .7;
  transition: all .3s;
}
.about-menu-item:hover {
  opacity: .9;
}
.about-menu-item.active {
  background: #da2228;
  color: #fff;
  opacity: 1;
}

/* ------- ОСНОВНОЙ КОНТЕНТ ------- */
.about-content {
  flex: 1 1 75%;
}
.about-article {
  background: #fff;
  border-radius: 8px;
  padding: 15px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.about-title {
  color: #003b8e;
  margin-bottom: 10px;
  font-size: 1.3em;
}
.about-text {
  text-indent: 25px;
  margin-bottom: 15px;
  line-height: 1.6;
  color: #222;
}
.about-text p + p { margin-top: 10px; }

/* ------- ИЗОБРАЖЕНИЯ ------- */
.about-img {
  margin-bottom: 10px;
  text-align: center;
}
.about-img img {
  max-width: 90%;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.about-img a:hover img {
  opacity: .9;
}

/* ------- ФАЙЛЫ ------- */
.about-files {
  margin-top: 15px;
}
.about-files h4 {
  color: #003b8e;
  margin-bottom: 8px;
}
.about-file-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.file-btn {
  display: inline-block;
  background: rgba(0,59,142,0.1);
  color: #003b8e;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: background .3s, color .3s;
}
.file-btn:hover {
  background: #da2228;
  color: #fff;
}

/* ------- АДАПТИВ ------- */
@media(max-width:992px) {
  .about-container {
    flex-direction: column;
  }
  .about-menu {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 15px;
  }
  .about-menu-item {
    flex: 1 0 calc(50% - 6px);
    text-align: center;
  }
}
@media(max-width:576px) {
  .about-menu-item {
    flex: 1 0 100%;
  }
  .about-menu-item.active {
    background: #da2228;
    color: #fff;
    opacity: 1;
  }
}
/* ---------------------------------
   8. ПРОЧЕЕ
   --------------------------------- */
button {
  background:#003b8e;color:#fff;padding:6px 12px;border:none;border-radius:4px;transition:.2s;
}
button:hover { background:#0054cb; }

input,textarea,select {
  font-family:inherit;
  padding:6px 8px;
  border:1px solid #ccc;
  border-radius:4px;
  font-size:1em;
}
textarea{resize:vertical;}
/*РЕДАКЦИЯ НОВОСТЕЙ*/
.inline-imgs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}
.img-mini {
  position: relative;
}
.img-mini img {
  max-width: 120px;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.img-mini .btn-small {
  position: absolute;
  top:3px; right:3px;
  background:#da2228;
  color:#fff;
  text-decoration:none;
  padding:2px 5px;
  border-radius:50%;
  font-size:0.8em;
}
.video-mini {margin-top:10px;}
.video-mini iframe, .iframe-preview iframe {max-width:350px; height:200px; border:0;}
/* плавность и акценты */
hr{border:none;border-top:1px solid #ddd;margin:20px 0;}

/* Скроллбар */
::-webkit-scrollbar{width:8px;}
::-webkit-scrollbar-thumb{background:#003b8e;border-radius:4px;}
::-webkit-scrollbar-thumb:hover{background:#0054cb;}
/* ====== КОНТАКТЫ ====== */
.contacts-block {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.contacts-info {
  flex: 1 1 40%;
}
.contacts-info h3 {
  color:#003b8e;
  margin-top:10px;
}
.contacts-info p, .contacts-info li {
  font-size:0.95em;
  line-height:1.6;
}
.social-list {list-style:none;padding:0;margin:0;}
.social-list li {margin-bottom:5px;}
.social-list a {color:#003b8e;font-weight:600;}
.contacts-map {
  flex: 1 1 55%;
  min-height:300px;
}
.map-frame iframe {
  width:100%;
  height:100%;
  border:0;
}
.map-placeholder {
  width:100%;
  height:300px;
  background:#eef4ff;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#777;
  border-radius:6px;
  font-style:italic;
}
@media(max-width:768px){
  .contacts-info, .contacts-map {flex:1 1 100%;}
}
/* ===============================================
   СЛАЙДЕР (CSS ONLY)
   =============================================== */
.slider-container{
  position:relative;
  width:100%;
  height:30vh;
  margin:0 auto 30px;
  overflow:hidden;
  border-radius:10px;
}
.slider{
  position:relative;
  width:100%;
  height:100%;
}
.slide{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  opacity:0;
  animation:fade 20s infinite;
}
.slide-text{
  position:absolute;
  bottom:15%;
  left:15px;
  right:15px;
  text-align:center;
  font-size:2em;
  font-weight:700;
  color:#fff;
  text-shadow:2px 2px 8px rgba(0,0,0,0.6);
}
/* слайды с задержкой */
.slide.s1{background-image:url('/images/slide1.jpg');animation-delay:0s;}
.slide.s2{background-image:url('/images/slide2.jpg');animation-delay:5s;}
.slide.s3{background-image:url('/images/slide3.jpg');animation-delay:10s;}
.slide.s4{background-image:url('/images/slide4.jpg');animation-delay:15s;}
@keyframes fade{
  0%{opacity:0;}
  5%{opacity:1;}
  25%{opacity:1;}
  30%{opacity:0;}
  100%{opacity:0;}
}
@media(max-width:768px){.slide-text{font-size:1.4em;}}

@keyframes fade{
  0%{opacity:0;}
  5%{opacity:1;}
  25%{opacity:1;}
  30%{opacity:0;}
  100%{opacity:0;}
}

@media(max-width:768px){
  .slider-container{height:25vh;}
  .slide-text{font-size:1.2em;}
}
/*таблица*/
.2tbl {
    display: block;
    position: absolute;
    width: 100%;
    height: 600px;
    overflow: scroll;
}
.tbl {
  display: block;
  position: inherit;
  text-align: center;
  font-size: 10px;
  width: 100%;
  margin: 0 auto;
}
.tbl_h {
  font-weight: bolder;
  color: rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid black;
  background: rgba(0,0,0,0.05);
}
.tbl_stroke {
  position: relative;
  font-weight: lighter;
  color: rgba(0, 0, 0, 1.0);
  border-bottom: 1px solid rgba(0,0,0,0.5);
}
.tbl_l {
  width: 140px;
  height: auto;
  text-align: center;
  white-space: pre-line;
  margin: 0 auto;
  padding: 5px 10px;
  vertical-align: top;
}