/* Дополнения к старому style.css: современные мелочи + адаптация под телефоны/планшеты */
html { -webkit-text-size-adjust: 100%; }
.content img { max-width: 100%; height: auto; }
.content iframe, .content video { max-width: 100%; }
.content audio { width: 100%; max-width: 600px; margin: 8px 0; display: block; }
.content table { max-width: 100%; }
.menu-toggle { display: none; }

/* Галерея (MIGX) */
.gallery-block { clear: both; text-align: center; margin: 15px 0; }
.gallery-block .photographer { margin-bottom: 10px; color: #555; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 10px 0; }
.gallery__item { display: block; border-radius: 7px; overflow: hidden; background: #eee; }
.gallery__item img { width: 100%; height: 157px; object-fit: cover; display: block; border-radius: 7px; transition: opacity .2s; }
.gallery__item:hover img { opacity: .7; }

/* Список новостей: картинка может отсутствовать */
.news { height: auto; min-height: 180px; margin-bottom: 10px; }
.news .ntext { height: auto; max-height: 140px; }
.news-strip { clear: both; overflow: hidden; padding-bottom: 8px; }
.pagination { margin: 15px 0; font-size: 14px; }
.pagination ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; }
.pagination li a, .pagination li span { display: inline-block; padding: 4px 9px; border-radius: 4px; background: #eee; }
.pagination li.active a, .pagination li.active span { background: #4f75b3; color: #fff; }
.pagination li.disabled { display: none; }
.like { width: auto; margin: 15px 0; }
.radio-btn { cursor: pointer; padding: 6px 10px; border-radius: 5px; border: 1px solid #c3c3c3; background: #f4f4f4; }

/* ---------- Планшеты и телефоны ---------- */
@media (max-width: 1190px) {
  body { font-size: 14px; }
  .page, .main_page, .footer, .partners { width: auto !important; min-width: 0 !important; }
  .page { background: none; }
  .header { height: auto; min-height: 0; background-size: 100% auto; background-repeat: no-repeat; background-color: #fff; background-position: center top; padding-top: 42vw; position: relative; }
  .top_menu { margin: 0; }
  .top_menu ul { top: auto; margin-top: 0; }
  .top_menu ul#nav { width: auto; margin: 0; display: none; padding: 8px; background: rgba(255,255,255,.95); }
  .top_menu.open ul#nav { display: block; }
  .top_menu ul#nav li { display: block; height: auto; }
  .top_menu ul li a, .top_menu ul li.active a { float: none; display: block; width: auto; margin: 3px 0; font-size: 15px; text-align: left; padding: 0 12px; }
  ul#nav li ul, ul#nav li:hover ul, ul#nav li.active:hover ul { display: block; position: static; padding: 0 0 0 18px; margin: 0; animation: none; overflow: visible; }
  ul#nav li ul li, .top_menu ul#nav li ul li { width: auto; height: auto; background: none; }
  ul#nav li ul li a, ul#nav li.active ul li a { width: auto; color: #000; background: rgba(224,224,224,.6); white-space: normal; text-align: left; }
  .menu-toggle { display: block; position: static; margin: 8px 10px; font-size: 16px; padding: 8px 14px; border-radius: 6px; border: 0; background: rgba(79,117,179,.95); color: #fff; cursor: pointer; }
  .main_page { margin: 10px auto 0; display: flex; flex-direction: column; padding: 0 10px; overflow: visible; }
  .content { order: 1; margin: 0; width: auto; min-width: 0; font-size: 15px; }
  .content p { line-height: 1.5; }
  .left_block { order: 2; float: none; width: auto; margin: 20px 0 0; }
  .right_block { order: 3; float: none; width: auto; margin: 20px 0 0; }
  .right_block img { margin: 2px 0; }
  .cnzl, .lbzl, .rbzl { width: auto; height: auto; }
  .newsimage { float: none; width: 100%; max-width: 500px; margin: 10px 0; display: block; }
  .news { width: auto; margin-left: 0; }
  .news-image { float: none; margin: 10px 0; }
  .news-image img { width: 100%; height: auto; max-height: none; }
  .ntext { width: auto; height: auto; max-height: none; }
  .anonsy_text { width: auto; }
  .partners { height: auto; overflow: hidden; }
  .partners img { max-width: 45%; margin: 5px; }
  .footer { height: auto; }
  .footer_in, .copyright_center { width: auto; }
  .razrabotka { position: static; margin: 10px auto; }
  table[style*="width:540px"], table[style*="width: 540px"] { width: 100% !important; }
  .anonsy_date[style], .anonsy_text[style], div[style*="width:197px"] { width: auto !important; text-align: left !important; }
}

/* Календарь «Азбуки веры» в узкой левой колонке */
.azbyka-calendar { font-size: 12px; line-height: 1.4; overflow: hidden; text-align: left; }
.azbyka-calendar img { max-width: 100%; height: auto; }
@media (max-width: 1190px) { .azbyka-calendar { width: auto; font-size: 14px; } }
