/* rinnai.kz — стили, заменяющие плагины (слайдер, карусель, спойлеры, форма, таблицы) */

/* --- Слайдер на главной (заменяет LayerSlider) --- */
#layer-slider-container, #primary, .site-footer { clear: both; }
.hero-slider { position: relative; overflow: hidden; background: #f1f1f1; }
.hero-slide { position: absolute; top: 0; left: 0; width: 100%; opacity: 0; transition: opacity .9s ease; pointer-events: none; }
.hero-slide.is-active { position: relative; opacity: 1; pointer-events: auto; }
.hero-slide img { display: block; width: 100%; height: auto; }
.hero-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; background: rgba(62,69,73,.55); color: #fff; border: 0; width: 42px; height: 42px; font-size: 18px; line-height: 42px; cursor: pointer; border-radius: 50%; padding: 0; }
.hero-nav:hover, .hero-nav:focus-visible { background: #e00018; outline: none; }
.hero-prev { left: 15px; } .hero-next { right: 15px; }
@media (prefers-reduced-motion: reduce) { .hero-slide { transition: none; } }

/* --- Карусель новостей (заменяет WP Posts Carousel) --- */
.news-carousel { position: relative; padding: 0 20px; }
.nc-track { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 10px 0; }
.nc-track::-webkit-scrollbar { display: none; }
.nc-item { flex: 0 0 calc(33.333% - 7px); scroll-snap-align: start; }
@media (max-width: 991px) { .nc-item { flex-basis: calc(50% - 5px); } }
@media (max-width: 600px) { .nc-item { flex-basis: 100%; } }
.nc-title { font-size: 14px; font-weight: bold; margin: 0 0 6px; line-height: 1.3; text-align: left; }
.nc-title a { color: #ec1f27; text-decoration: none; }
.nc-title a:hover { text-decoration: underline; }
.nc-date { font-size: 12px; color: #777; display: block; margin-bottom: 6px; }
.nc-desc { font-size: 13px; line-height: 1.5; margin: 0; color: #444; }
.nc-nav { position: absolute; top: 50%; transform: translateY(-50%); background: transparent; border: 0; color: #3e4549; font-size: 20px; cursor: pointer; padding: 6px; }
.nc-prev { left: -8px; } .nc-next { right: -8px; }

/* --- Список новостей на страницах рубрик --- */
.page-header { background-color: #e7e7e7; padding: 50px 0; }
.page-header h1 { text-transform: uppercase; color: #666; font-size: 2em; margin: 0; }
.post-list-item { padding: 18px 0; border-bottom: 1px solid #ddd; }
.post-list-item .entry-title { font-size: 18px; margin: 0 0 4px; }
.post-list-item .entry-title a { color: #ec1f27; text-decoration: none; }
.post-list-item .entry-meta { font-size: 12px; color: #777; margin-bottom: 8px; }
.entry-summary { margin: 0; }
.back-link a { color: #3e4549; }

/* --- Спойлеры (заменяют [su_spoiler]) --- */
details.spoiler { border: 1px solid #ddd; margin: 0 0 8px; background: #fff; }
details.spoiler summary { cursor: pointer; padding: 10px 14px; font-weight: bold; color: #3e4549; list-style: none; position: relative; padding-left: 32px; }
details.spoiler summary::-webkit-details-marker { display: none; }
details.spoiler summary::before { content: "+"; position: absolute; left: 12px; top: 8px; font-size: 18px; color: #ec1f27; }
details.spoiler[open] summary::before { content: "\2212"; }
details.spoiler .spoiler-content { padding: 6px 14px 14px; border-top: 1px solid #eee; }
.su-box { border: 2px solid #3e4549; margin: 0 0 20px; }
.su-box-title { background: #3e4549; color: #fff; padding: 8px 14px; font-weight: bold; }
.su-box-content { padding: 14px; }

/* --- Подписи к картинкам (заменяют [caption]) --- */
figure.wp-caption { max-width: 100%; margin: 5px 20px 20px 0; }
figure.wp-caption img { max-width: 100%; height: auto; }
figure.wp-caption.alignright { float: right; margin: 5px 0 20px 20px; }
figure.wp-caption.alignleft { float: left; }
figure.wp-caption.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text { font-size: 12px; color: #666; text-align: center; margin-top: 4px; }
.entry-content img { max-width: 100%; height: auto; }
.map-wrap { margin-bottom: 20px; }
.map-wrap iframe { display: block; width: 100%; }

/* --- Форма обратной связи (заменяет Contact Form 7) --- */
.contact-form label { font-weight: normal; }
.contact-form input[type=text], .contact-form input[type=email], .contact-form input[type=number], .contact-form textarea { width: 100%; padding: 8px 10px; border: 1px solid #ccc; font-size: 14px; }
.contact-form textarea { min-height: 160px; }
.contact-form .captcha-input { width: 100px; }
.hp-field { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.alert { padding: 12px 16px; margin-bottom: 20px; border: 1px solid transparent; }
.alert-success { background: #dff0d8; border-color: #c3e6c3; color: #2d6a2d; }
.alert-danger { background: #f2dede; border-color: #ebccd1; color: #a94442; }

/* --- Таблицы (заменяют TablePress) --- */
.tablepress { font-size: 13px; background: #fff; }
.tablepress th { background: #3e4549; color: #fff; }
.tablepress tr.table-group td { background: #e7e7e7; }

/* --- Мелочи --- */
#logo_main a { display: inline-block; }
.footer-logo { max-width: 100%; height: auto; }
.policy-link { color: #fff; font-size: 16px; font-weight: 700; text-decoration: none; }
.policy-link:hover { color: #ec1f27; }
/* Меню сворачивается ниже 992px (кнопка в теме скрыта только на md/lg) */
@media (max-width: 991px) {
  #bs-example-navbar-collapse-1.collapse { display: none !important; }
  #bs-example-navbar-collapse-1.collapse.in { display: block !important; }
  .dropdown-menu { position: static; float: none; width: 100%; box-shadow: none; }
}
footer .navbar-collapse.collapse { display: block !important; }
