/* ===== БАЗОВЫЕ СБРОСЫ ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: #e5e5e5;
  color: #333;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== НОВЫЙ НАВБАР (компактный, помещается в 1320px) ===== */
.header {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-inner {
  max-width: 1320px;
  margin: 0 auto 5px auto;
  padding: 10px 0px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 5px;
  position: relative;
}

.logo-local {
  font-family: 'Arial Narrow', 'Arial', sans-serif;
  font-size: 2.4rem;
  background: #ff0000;
  color: #fff;
  padding: 0.1rem 0.7rem 0.2rem 0.7rem;
  line-height: 1.1;
  display: inline-block;
  border-radius: 2px;
  letter-spacing: 5px;
  box-shadow: 0 0 0 1px #aaa;
  white-space: nowrap;
  flex-shrink: 0;
  text-transform: uppercase;
}

.mobile-toggle {
  display: none;
  font-size: 2.4rem;
  cursor: pointer;
  padding: 10px;
  color: #141414;
}

.menu {
  display: flex;
  align-items: center;
  flex-shrink: 1;
}

.menu ul {
  display: flex;
  flex-wrap: nowrap;
  list-style: none;
  gap: 0;
  margin: 0;
  padding: 0;
}

.menu li {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.menu a {
  font-family: 'Arial Narrow', 'Arial', sans-serif;
  font-size: 1.1rem;
  padding: 0 8px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  color: #141414;
  line-height: 2.2rem;
  display: inline-block;
  border: 3px solid transparent;
  transition: all 0.1s;
  text-transform: uppercase;
}

.menu a.donate {
  border: 3px solid #a4a4a4;
  background: #a4a4a4;
  color: #fff;
  font-size: 1rem;
  padding: 2px 8px;
  line-height: 2rem;
  margin-left: 2px;
}
.menu a.donate:hover,
.menu a.donate:active {
  border-color: #ff0000 !important;
  background: #ff0000;
  color: #fff;
}

.menu a.bookit {
  border: 3px solid #ccc;
  background: #e5e5e5;
  color: #141414;
  font-size: 0.95rem;
  padding: 2px 6px;
  margin-right: 2px;
  line-height: 2rem;
}
.menu a.bookit:hover,
.menu a.bookit:active {
  border-color: #141414 !important;
  background: #e5e5e5;
}

/* МОБИЛЬНАЯ ВЕРСИЯ НАВБАРА */
@media (max-width: 1300px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 5px 20px 0;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    width: 100%;
  }

  .mobile-toggle {
    display: block;
  }

  .menu {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    left: 0;
    top: 75px;
    width: 260px;
    z-index: 999;
    padding: 10px 0;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    border-radius: 0 4px 4px 0;
  }

  .menu.open {
    display: flex;
  }

  .menu ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }

  .menu li {
    width: 100%;
  }

  .menu a {
    white-space: normal;
    width: 100%;
    padding: 14px 22px;
    border-bottom: 1px solid #ddd;
    font-size: 1.3rem;
    letter-spacing: 1px;
    border: none;
    background: transparent;
    color: #141414;
    line-height: 1.4;
  }

  .menu a.donate,
  .menu a.bookit,
  .menu a.donate:hover,
  .menu a.bookit:hover,
  .menu a.donate:active,
  .menu a.bookit:active {
    background: #fff;
    border: none !important;
    border-bottom: 1px solid #ddd !important;
    color: #141414 !important;
    font-size: 1.3rem;
    padding: 14px 22px;
    margin: 0;
  }

  .logo-local {
    font-size: 2.2rem;
    letter-spacing: 4px;
  }
  /* ===== мобильный навбар меньше 1300px ===== Добавить */
  .bookmark-icon,
  .menu a.bookit svg {
    display: none !important;
  }
  
  .book-text {
    display: inline !important;
  }
}
/* ===== конец мобильный навбар меньше 1300px =====  */
@media (max-width: 480px) {
  .logo-local {
    font-size: 1.8rem;
    letter-spacing: 3px;
  }
}

/* ========== ОРИГИНАЛЬНЫЕ СТИЛИ КОНТЕНТА ========== */
main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 9px;
  background: #fff;
  position: relative;
  z-index: 1;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.08), inset 0 -2px 5px rgba(0,0,0,0.08);
}

img {
  max-width: 100%;
  width: auto \9;
  height: auto;
  vertical-align: middle;
  border: 0;
  -ms-interpolation-mode: bicubic;
}

p {
  margin-block-start: 1.3em;
  margin-block-end: 1.5em;
}

ul, ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.com-content-article__body ul,
.com-content-article__body ol {
  list-style: disc;
  padding-left: 20px;
  margin: 1em 0;
}

.com-content-article__body ul li {
  list-style-type: disc;
}

.item-page a {
  color: #CC0000;
  text-decoration: none;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.item-page a:hover {
  color: #e63946;
  text-decoration: underline;
}

.article-index , li.toclink, .pagenavcounter {
  display: none !important;
}

.prime-layout {
  display: flex;
  flex-wrap: nowrap;
  gap: 30px;
}

.prime-content {
  flex: 1 1 auto;
  max-width: 100%;
}

.item-image {
  text-align: center;
}

figure.item-image {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

figure.item-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.com-content-article__body {
  max-width: 100%;
  overflow-x: hidden;
}

#textwrap { padding: 0px 15% !important; }
@media (max-width:968px){ #textwrap { padding: 15px 25px !important; } }
@media (max-width:768px){ #textwrap { padding: 15px !important; } }

h1, h2, h3, h4, h5, h6 {
  color: #141414;
  font-family: 'Pathway Gothic One', Arial, sans-serif;
  font-weight: normal;
  line-height: 1.2;
  text-rendering: optimizeLegibility;
  margin: 0 0 0.5em;
}

.item-page h1,
.item-page h2,
.item-page h3,
.item-page h4,
.item-page h5,
.item-page h6 {
  font-size: 1.8rem;
  line-height: 1.1;
  padding: 30px 0;
  margin: 0;
  text-align: center;
}

/* ===== ДОБАВЛЕННЫЕ СТИЛИ ДЛЯ ТАЙМЕРА И SETS ===== */
#toolbox_wrapper {
  margin: 0px 0;
}

.toolbar-panel {
  background: #f9f9f9;
  border: 1px solid #eee;
  padding: 15px;
  margin-bottom: 0px;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.08), inset 0 -2px 5px rgba(0,0,0,0.08);
}

.toolbar-header {
  font-weight: bold;
  color: #2c3e50;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.toolbar-header .caret {
  margin-left: 8px;
  font-size: 0.8em;
  transition: transform 0.3s;
}

.timerContainer, .setsWrapper {
  margin-top: 15px;
}

#timerDisplay {
  font-size: 3.5em;
  font-weight: bold;
  text-align: center;
  font-family: monospace;
  color: #2c3e50;
  margin: 15px 0;
  letter-spacing: 2px;
}

.quickTimerGroup, .timer-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 10px 0;
}

.btn {
  padding: 10px 18px;
  border: none;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s;
}

.quickTimerBtn {
  background-color: #3498db;
  color: white;
}

.quickTimerBtn:hover {
  background-color: #2980b9;
}

#startTimer {
  background-color: #2ecc71;
  color: white;
}

#pauseTimer {
  background-color: #f39c12;
  color: white;
}

#resetTimer {
  background-color: #e74c3c;
  color: white;
}

#customTimerToggle {
  background-color: #9b59b6;
  color: white;
}

.btn:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.btn:disabled {
  background-color: #bdc3c7 !important;
  cursor: not-allowed;
  transform: none;
}

#customTimerSection input {
  width: 70px;
  padding: 10px;
  border: 1px solid #ddd;
  font-size: 1.1em;
  text-align: center;
}

#message {
  display: block;
  text-align: center;
  margin-top: 15px;
  min-height: 1.5em;
  color: #e74c3c;
  font-weight: bold;
}

.setsWrapper {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 15px;
  justify-content: center;
}

.dareset {
  width: 50px;
  height: 50px;
  border: 3px solid #3498db;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  background: #fff;
  transition: all 0.3s;
  font-size: 1.2em;
}

.dareset:hover {
  background: #ebf5fb;
  transform: scale(1.05);
}

.dareset.dareset-done {
  background-color: #2ecc71;
  border-color: #27ae60;
  color: white;
}

/* ===== ДОБАВЛЕННЫЙ КОНТЕЙНЕР ДЛЯ ИНСТРУКЦИЙ ===== */
.program-index-container {
  margin-top: 0px;
  padding: 20px;
  background: #fafafa;
  border-radius: 0;
  border: 1px solid #e0e0e0;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.08), inset 0 -2px 5px rgba(0,0,0,0.08);
}

/* ===== картинки иконки над текстом (ИКОНКИ) ===== */
.infobox {
  display: block;
  position: relative;
  overflow: hidden;
  padding: 20px 0 0 0;
  margin: 0;
  width: 100%;
  background: #e8e8e8 url('img/') repeat-x 0 0;
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.08), inset 0 -2px 5px rgba(0,0,0,0.08);
}
.infobox-map {
  display: block;
  width: 40%;
  float: left;
  background: #e8e8e8 url('img/') no-repeat 0 0;
  padding-left: 80px;
}
.infobox-focus,
.infobox-works,
.infobox-difficulty {
  display: block;
  width: 20%;
  float: left;
}
@media (max-width: 768px) {
  .infobox { width: 100%; }
  .infobox-map { width: 100%; float: none; }
  .infobox-focus, .infobox-works, .infobox-difficulty { width: 30%; float: left; }
}
/* ===== СТИЛИ ДЛЯ КНОПКИ ЗАКЛАДКИ ===== Добавить */
.nav-item {
  display: flex;
  align-items: center;
}

.bookit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}

.bookmark-icon {
  display: inline-block;
}

.book-text {
  display: none;
}

/* Выравнивание SVG по вертикали */
.menu a.bookit svg {
  vertical-align: middle;
  display: inline-block;
}

/* Мобильная версия */
@media (max-width: 768px) {
  .bookmark-icon,
  .menu a.bookit svg {
    display: none;
  }
  
  .book-text {
    display: inline;
  }
}
/* ===== кнопка над картинкой ===== */
/* Стили для плавающей кнопки - оригинальный дизайн, размер 50x50 */
.image-container {
  position: relative;
  display: inline-block;
  width: 100%;
}

.floating-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 50px;           /* такой же размер как тестовая */
  height: 50px;          /* такой же размер как тестовая */
  background: #ff0000;
  border: 2px solid #ffffff;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.floating-btn svg {
  stroke: #ffffff;
  fill: none;
  width: 26px;          /* чуть больше под размер кнопки */
  height: 26px;
}

.floating-btn:hover {
  background: #cc0000;
  transform: scale(1.05);
}

.floating-btn:hover svg {
  stroke: #fff;
}

.floating-btn.active {
  background: #141414;
}

.floating-btn.active svg {
  stroke: #fff;
  fill: #ff0000;
}

/* ===== конец кнопка над картинкой ===== */

/* ===== СТИЛИ ДЛЯ ВИДЕО КОНТЕЙНЕРА (видео YouTube) ===== */
    /* .video-wrapper {
      margin-top: 30px;           
      width: 100%;
      position: relative;
      padding-bottom: 56.25%;     
      height: 0;
      overflow: hidden;
      background: #000;           
      border-radius: 4px;
    }

    .video-wrapper iframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: 0;
    } */
    /* ===== СТИЛИ КОНЕЦ (видео локальное) ===== */

    /* ===== СТИЛИ ДЛЯ ВИДЕО КОНТЕЙНЕРА (видео локальное) ===== */
    /* .video-wrapper {
      position: relative;
      padding-bottom: 56.25%; 
      height: 0;
      overflow: hidden;
      background: #000;
    }

    .video-wrapper video {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
    } */
    /* ===== СТИЛИ КОНЕЦ (видео локальное) ===== */

/* ===== СТИЛИ ФУТЕРА ===== */

/* Если нужно увеличить только внутри #textwrap */
#textwrap p {
  font-size: 1.2rem;
  line-height: 1.6;
}

.footer {
  background: #f0f0f0;
  color: #333;
  font-family: Arial, sans-serif;
  font-size: 0.9rem;
  padding: 30px 20px 20px;
  margin-top: 0px;
  border-top: 1px solid #ddd;
  box-shadow: 0 -2px 5px rgba(0,0,0,0.02);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 30px;
}

.footer-col p {
  font-weight: bold;
  margin-bottom: 10px;
  color: #141414;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 6px;
  line-height: 1.4;
}

.footer-col ul li a {
  color: #555;
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: #ff0000;
  text-decoration: underline;
}

.footer-info {
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  padding: 20px 0;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: #555;
  line-height: 1.5;
}

.footer-info p {
  margin-bottom: 8px;
}

.footer-info p:last-child {
  margin-bottom: 0;
}

.footer-info a {
  color: #141414;
  text-decoration: underline;
}

.footer-info a:hover {
  color: #ff0000;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  font-size: 0.8rem;
  color: #777;
}

.footer-copyright a {
  color: #555;
  text-decoration: underline;
}

.footer-copyright a:hover {
  color: #ff0000;
}

@media (max-width: 768px) {
  .footer-links {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-col p {
    cursor: pointer;
    margin-bottom: 8px;
    position: relative;
    user-select: none;
  }

  .footer-col p::after {
    content: '▼';
    font-size: 0.7rem;
    position: absolute;
    right: 0;
    top: 2px;
    transition: transform 0.3s;
    color: #555;
  }

  .footer-col.active p::after {
    transform: rotate(180deg);
  }

  .footer-col ul {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    margin: 0;
  }

  .footer-col.active ul {
    max-height: 300px;
    margin-bottom: 15px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}