/* =====================================================================
   AskNoah — PRINT STYLES
   Подключается с media="print", на экран не влияет.

   Почти все правила начинаются с #top (id у <body>), чтобы перебить
   классовые селекторы с !important из main.css и <style> в шаблонах.
   ===================================================================== */

/* ===== 0. СТРАНИЦА A4 ===== */
@page {
    size: A4;
    margin: 16mm 15mm 18mm 15mm;
}

/* ===== 1. БАЗА ===== */
html,
#top {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    color: #000 !important;
    font-size: 11.5pt !important;
    line-height: 1.5 !important;
}

#top *,
#top *::before,
#top *::after {
    box-shadow: none !important;
    text-shadow: none !important;
    animation: none !important;
    transition: none !important;
}

/* Анимации, слайдеры и hover-эффекты оставляют смещения и opacity:0 */
#top .animslide,
#top .animslide *,
#top .swiper-wrapper,
#top .swiper-slide,
#top .animation_btn_1 {
    transform: none !important;
    opacity: 1 !important;
}

/* Фоновые картинки карточек (home_five_slide_item) печатаются как есть */
#top .home_five_slide_item {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* ===== 2. ЧТО НЕ ПЕЧАТАЕМ ===== */
#wpadminbar,
#top .header_tablet_left,
#top .header_burger_menu_wrapper,
#top .header_top_menu,
#top .header_tablet_right,
#top .header_mobile_right,
#top .header_bottom,
#top .search_box,
#top .search_mobile_box,
#top .mobile_menu_wrapper,
#top .subscribe_pop,
#top .scroll_up,
#top .searchwp-live-search-results,

/* хлебные крошки */
#top .breadcrumbs,

/* блок подписки (template-parts/subscription.php) */
#top .subsc,
#top .subsc_tab,
#top .subsc_mobile,

/* футер — кроме копирайта, см. раздел 3 */
#top .footer_top,
#top .footer_dev,

/* декоративные баннеры в шапках страниц */
#top .page_hero_banner,
#top .donate_banner,

/* кнопки и навигация слайдеров */
#top .slide_btn,
#top .slider_arrows_nav_v,
#top .swiper-button-hero-wrapper,
#top .swiper-button-prev,
#top .swiper-button-next,
#top [class*="swiper-pagination"],
#top .feedback_arrows_box,
#top .feedback_arrows,
#top .swiper-slide-duplicate,
#top .accent_btn,
#top .border_btn,
#top .donate_btn,
#top .subscribe_pop_btn,
#top .blog_pag,
#top .page-links,
#top button,

/* формы: подписка, поиск, CF7, WooCommerce, логин */
#top form,
#top .wpcf7,
#top .search-form,
#top .wpforms-container,
#top .contact_form_l,
#top .contact_follow_us,
#top .woocommerce-tabs,
#top .related.products,
#top .quantity,

/* встраиваемые медиа печатаются пустыми рамками */
#top iframe,
#top video,
#top audio,
#top embed,
#top object,
#top .art_content_video,
#top .wp-block-embed,
#top .wp-block-video,
#top .wp-block-audio,

/* сайдбар со списком категорий (category.php, taxonomy-asknoah_faq.php) */
#top .content_sidebar,

/* иконки-стрелки в аккордеонах */
#top .accordion-header img,
#top .accordion-header svg {
    display: none !important;
}

/* ===== 3. ШАПКА / ФУТЕР ДЛЯ ПЕЧАТИ ===== */
/* Шапка fixed → на печати повторяется на каждом листе.
   Оставляем только логотип, в обычном потоке. */
#top .header {
    position: static !important;
    display: block !important;
    height: auto !important;
    padding: 0 0 4mm 0 !important;
    margin: 0 0 6mm 0 !important;
    border-bottom: 0.5pt solid #43121B !important;
    background: none !important;
}
#top .header_top,
#top .header_top .container_header,
#top .header_top_wrapper {
    display: block !important;
    height: auto !important;
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
}
#top .header_top_wrapper > a {
    display: inline-block !important;
}
#top .header_logo_img {
    display: block !important;
    width: 55mm !important;
    height: auto !important;
}

/* «ב''ה» — небольшим текстом в правом верхнем углу */
#top {
    position: relative !important;
}
#top .under_header {
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    right: 1mm !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
}
#top .under_header p {
    width: auto !important;
    font-size: 10pt !important;
    margin: 0 !important;
    padding: 0 1mm !important;
    white-space: nowrap !important;
}

#top .footer {
    display: block !important;
    margin-top: 10mm !important;
    padding: 3mm 0 0 0 !important;
    border-top: 0.5pt solid #999 !important;
    background: none !important;
    break-inside: avoid;
}
#top .footer .container,
#top .footer_wrapper,
#top .footer_bottom {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
}
#top .footer_copy {
    display: block !important;
    color: #555 !important;
    font-size: 9pt !important;
    text-align: center !important;
    opacity: 1 !important;
}

/* ===== 4. КОНТЕЙНЕРЫ НА ВСЮ ШИРИНУ ЛИСТА ===== */
#top .container,
#top .container2,
#top .container_small,
#top .container_page,
#top .container_bred,
#top .container_hero,
#top .container_home,
#top .container_book,
#top .container_search,
#top .site-main,
#top main,
#top article,
#top .content_main,
#top .post_content,
#top .post_content_wrapper,
#top .text_content,
#top .page_content,
#top .art_content,
#top .art_content_wrapper,
#top .content,
#top .faq_content,
#top .faq_container,
#top .book_content,
#top .noahide_studies_content_wrapper,
#top .other_lang_content_wrapper,
#top .gc_content_wrapper,
#top .accordions_wrapper,
#top .accordions {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Большие экранные отступы между секциями (100–200px) */
#top section,
#top .page_hero,
#top .home_hero,
#top .home_grid,
#top .noah_command,
#top .thought_counts,
#top .book_row,
#top .mb100,
#top .mb200,
#top .page_content,
#top .post_content,
#top .art_content,
#top .book_category,
#top .cat_margin,
#top .page_title {
    margin-top: 0 !important;
    margin-bottom: 8mm !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
    height: auto !important;
}

/* Двухколоночные экранные блоки (картинка + текст с gap 100–160px)
   на A4 ставим друг под другом */
#top .page_content_wrapper,
#top .home_grid_wrapper,
#top .sliber_item,
#top .welcome_wrapper,
#top .thought_counts_wrapper,
#top .thought_counts_box,
#top .book_container,
#top .book_info,
#top .product_wrapper,
#top .academ_box,
#top .academ_wrapper,
#top .about_organisation_wrapper,
#top .about_organisation_box,
#top .about_mission_wrapper,
#top .about_mission_box,
#top .about_item_box,
#top .donate_first_wrapper,
#top .donate_payments_wrapper,
#top .donate_payments_reg_wrapper,
#top .contact_hero_wrapper,
#top .contact_form_wrapper,
#top .group_item,
#top .group_list_wrapper,
#top .error_page_wrapper,
#top .search_head,
#top .search_2box,
#top .search_res_wrapper,
#top .noah_command_wrapper,
#top .insights_wrapper,
#top .insights_wrapper_head,
#top .book_row_wrapper,
#top .book_row_title,
#top .faq_content_top {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    gap: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
#top .home_grid_wrapper > *,
#top .book_container > *,
#top .product_wrapper > *,
#top .academ_box > *,
#top .about_organisation_box > *,
#top .about_mission_box > *,
#top .about_item_box > *,
#top .donate_payments_wrapper > *,
#top .group_item > *,
#top .search_res_wrapper > * {
    width: auto !important;
    max-width: none !important;
    margin-bottom: 4mm !important;
}

/* ===== 5. ТИПОГРАФИКА ===== */
#top h1,
#top .page_hero h1,
#top .page_title h1,
#top .art_content h1,
#top .content_main h1,
#top .book_title,
#top .welcome_h1 {
    font-size: 22pt !important;
    line-height: 1.2 !important;
    color: #43121B !important;
    margin: 0 0 5mm 0 !important;
    padding: 0 !important;
}

#top h2,
#top .page_hero h2,
#top .slide_title,
#top .insights_title,
#top .welcome_h2 {
    font-size: 16pt !important;
    line-height: 1.25 !important;
    color: #43121B !important;
    margin: 6mm 0 3mm 0 !important;
}

#top h3 {
    font-size: 13.5pt !important;
    line-height: 1.3 !important;
    color: #43121B !important;
    margin: 5mm 0 2mm 0 !important;
}

#top h4,
#top h5,
#top h6 {
    font-size: 12pt !important;
    line-height: 1.3 !important;
    color: #43121B !important;
    margin: 4mm 0 2mm 0 !important;
}

#top p,
#top li,
#top dd,
#top dt,
#top td,
#top th,
#top em,
#top blockquote,
#top .slide_undertitle,
#top .book_text,
#top .accordion-content p,
#top .home_grid_two p,
#top .home_grid_two ul li,
#top .thought_counts_text {
    font-size: 11.5pt !important;
    line-height: 1.55 !important;
    color: #000 !important;
}

#top p {
    margin: 0 0 3mm 0 !important;
    orphans: 3;
    widows: 3;
}

#top ul,
#top ol {
    padding-left: 7mm !important;
    margin: 0 0 3mm 0 !important;
}
#top .page_content ul,
#top .text_content ul,
#top .art_content ul,
#top .home_grid_two ul {
    list-style: disc !important;
}
#top .page_content ol,
#top .text_content ol,
#top .art_content ol {
    list-style: decimal !important;
}
#top li {
    margin: 0 0 1.5mm 0 !important;
}

#top blockquote {
    margin: 4mm 0 !important;
    padding: 0 0 0 5mm !important;
    border-left: 2pt solid #43121B !important;
    font-style: italic;
}

#top a {
    color: inherit !important;
    text-decoration: none !important;
}
/* Ссылки внутри текста статьи — подчёркнуты, чтобы было видно, что это ссылка */
#top .page_content a,
#top .text_content a,
#top .art_content a,
#top .accordion-content a {
    color: #182D9A !important;
    text-decoration: underline !important;
}

#top table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 0 4mm 0 !important;
}
#top th,
#top td {
    border: 0.5pt solid #999 !important;
    padding: 1.5mm 2mm !important;
    vertical-align: top !important;
}

#top hr {
    border: 0 !important;
    border-top: 0.5pt solid #999 !important;
    margin: 4mm 0 !important;
}

/* ===== 6. КАРТИНКИ ===== */
#top img,
#top svg,
#top figure {
    max-width: 100% !important;
    height: auto !important;
}
#top .page_content img,
#top .text_content img,
#top .art_content img,
#top .home_grid img,
#top .book_container img,
#top .prod_img img,
#top .academ_box img,
#top .about_item_box img,
#top .thought_counts_box img,
#top .hero_img img {
    display: block !important;
    width: auto !important;
    max-height: 90mm !important;
    margin: 0 0 4mm 0 !important;
    border-radius: 0 !important;
    object-fit: contain !important;
}
#top figure {
    margin: 0 0 4mm 0 !important;
}
#top figcaption {
    font-size: 9.5pt !important;
    color: #444 !important;
}

/* ===== 7. РАЗРЫВЫ СТРАНИЦ ===== */
#top h1,
#top h2,
#top h3,
#top h4,
#top h5,
#top h6 {
    break-after: avoid;
    page-break-after: avoid;
    break-inside: avoid;
}
#top img,
#top figure,
#top blockquote,
#top tr,
#top .accordion-item,
#top .content_item,
#top .book_slide,
#top .home_five_slide_item,
#top .noah_command_item,
#top .pdfs_item,
#top .group_item,
#top .search_item,
#top .thought_counts_slide {
    break-inside: avoid;
    page-break-inside: avoid;
}

/* ===== 8. АККОРДЕОНЫ (FAQ, Global Contacts) — все раскрыты ===== */
#top .accordion {
    display: block !important;
    gap: 0 !important;
}
#top .accordion-item {
    display: block !important;
    margin: 0 0 3mm 0 !important;
    padding: 3mm 4mm !important;
    border: 0.5pt solid #bbb !important;
    border-radius: 2mm !important;
}
#top .accordion-header {
    display: block !important;
}
#top .accordion-header span {
    font-size: 12.5pt !important;
    font-weight: 600 !important;
    color: #43121B !important;
}
/* иконки +/− (специфичнее, чем #top .page_content img из раздела 6) */
#top .accordion .accordion-header img,
#top .accordion .accordion-header svg {
    display: none !important;
}
/* category.php выводит H1 и в .page_hero, и в .faq_content_main — оставляем один */
#top:has(.faq_content_main > h1) .page_hero h1 {
    display: none !important;
}
#top .accordion-content {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding-top: 2mm !important;
}

/* ===== 9. СЛАЙДЕРЫ (Swiper) → сетка карточек ===== */
#top .my_slider,
#top .swiper,
#top [class*="mySwiper"] {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    overflow: visible !important;
}
#top .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 5mm !important;
    width: auto !important;
    height: auto !important;
    padding: 0 !important;
    transform: none !important;
}
#top .swiper-slide {
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
}

/* Книги / видео / аудио (books.php, for-*.php, media.php, store.php, free-download.php) */
#top .book_slide {
    display: block !important;
}
#top .book_slide img {
    display: block !important;
    width: 100% !important;
    height: 45mm !important;
    object-fit: contain !important;
    margin: 0 0 2mm 0 !important;
}
#top .book_slide * {
    font-size: 9.5pt !important;
    line-height: 1.35 !important;
}

/* Карточки категорий с фоновой картинкой (главная) */
#top .home_five_slide_item {
    display: flex !important;
    align-items: flex-end !important;
    height: 35mm !important;
    padding: 3mm !important;
    border-radius: 2mm !important;
}
#top .home_five_slide_item span {
    font-size: 10.5pt !important;
    color: #fff !important;
}

/* Главный слайдер (главная) — только текущий слайд */
#top .mySwiper1 .swiper-wrapper,
#top .swiper_thought_counts .swiper-wrapper,
#top .feedback_wrapper .swiper-wrapper {
    display: block !important;
}
#top .mySwiper1 .swiper-slide:not(.swiper-slide-active),
#top .swiper_thought_counts .swiper-slide:not(.swiper-slide-active) {
    display: none !important;
}

/* Отзывы (contact.php) — списком друг под другом */
#top .feedback_wrapper .swiper-slide {
    display: block !important;
    margin: 0 0 4mm 0 !important;
    break-inside: avoid;
}

/* ===== 10. ЛИСТИНГИ КАТЕГОРИЙ (category, taxonomy, insights, faq, video, audio) ===== */
#top .category_content_wrapper {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 6mm 5mm !important;
    row-gap: 6mm !important;
    width: auto !important;
    max-width: none !important;
}
/* В category.php внутри этой же обёртки лежит весь FAQ (аккордеон),
   а не карточки, — растягиваем всё, что не карточка, на всю ширину */
#top .category_content_wrapper > :not(.content_item) {
    grid-column: 1 / -1 !important;
}
/* «Выберите категорию слева» — сайдбар на печати скрыт */
#top .faq_title_text {
    display: none !important;
}
#top .content_item {
    max-width: none !important;
    max-height: none !important;
    width: auto !important;
    overflow: visible !important;
}
#top .content_item img,
#top .content_item.animation_btn_1 img {
    width: 100% !important;
    height: 40mm !important;
    object-fit: cover !important;
    margin: 0 0 2mm 0 !important;
}
#top .content_item * {
    font-size: 10pt !important;
    line-height: 1.35 !important;
}

/* ===== 11. ГЛАВНАЯ (homepage.php) ===== */
#top .hero_text,
#top .hero_img,
#top .hero_img_wrapper {
    width: auto !important;
    max-width: none !important;
    height: auto !important;
}
#top .hero_img img {
    max-height: 70mm !important;
}
#top .hero_sub_title {
    font-size: 12pt !important;
    color: #43121B !important;
    margin: 0 0 2mm 0 !important;
}
#top .hero_title {
    font-size: 20pt !important;
    line-height: 1.2 !important;
    margin: 0 0 3mm 0 !important;
}
#top .hero_small_text {
    font-size: 11pt !important;
    margin: 0 0 4mm 0 !important;
}
#top .home_grid_one,
#top .home_grid_two {
    display: block !important;
    width: auto !important;
    max-width: none !important;
}
#top .home_grid img {
    max-width: 70mm !important;
    max-height: 60mm !important;
}
#top .home_grid_two ul {
    margin-bottom: 0 !important;
}

/* 7 заповедей — 3 колонки */
#top .noah_command_box {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 5mm !important;
    margin-top: 4mm !important;
}
#top .noah_command_item {
    display: block !important;
    max-width: none !important;
    padding: 3mm !important;
    border: 0.5pt solid #bbb !important;
    border-radius: 2mm !important;
}
#top .noah_command_item img {
    display: block !important;
    width: 100% !important;
    height: 30mm !important;
    object-fit: cover !important;
    margin: 0 0 2mm 0 !important;
}
#top .noah_command_item span {
    display: block !important;
    font-size: 11pt !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin-bottom: 1.5mm !important;
}
#top .noah_command_item p {
    font-size: 9.5pt !important;
    line-height: 1.4 !important;
}

/* ===== 12. ОТДЕЛЬНЫЕ ШАБЛОНЫ ===== */

/* noahide-studies.php — списки PDF: маленькие иконки */
#top .pdfs_box {
    display: block !important;
}
#top .pdfs_item {
    display: flex !important;
    align-items: center !important;
    gap: 3mm !important;
    margin: 0 0 2mm 0 !important;
}
#top .pdfs_item img {
    width: 7mm !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
}

/* single-books.php, woocommerce/single-product.php — обложка поменьше */
#top .book_container img,
#top .prod_img img {
    max-width: 60mm !important;
}

/* affiliated-groups.php */
#top .group_list {
    display: block !important;
}
#top .group_item {
    margin: 0 0 5mm 0 !important;
    padding: 0 !important;
    border: 0 !important;
}
#top .group_item img {
    max-width: 50mm !important;
    max-height: 30mm !important;
}

/* united-noahide-academies.php */
#top .academ_box img {
    max-width: 80mm !important;
}

/* search.php */
#top .search_item {
    margin: 0 0 4mm 0 !important;
    padding: 0 0 3mm 0 !important;
    border-bottom: 0.5pt solid #ddd !important;
}

/* Ссылки-кнопки «See all» у слайдеров */
#top .insights_under_title_a,
#top .book_title_a,
#top .book_title_a_mob,
#top .book_title_a_faq,
#top .book_row_title > a,
#top .book_row_wrapper > a.mob_a {
    display: none !important;
}
