/* ==================== ГЛОБАЛЬНЫЕ СТИЛИ ==================== */

/* Выравнивание текста */
p {
    text-align: justify;
}

/* Скрытие Яндекс счетчика */
.ym-advanced-informer {
    display: none;
}

/* Текст в православном календаре */
.justicy {
    text-align: justify;
}

/* ФОРМА ПОИСКА - СИНИЙ ФОН НА ВСЮ ШИРИНУ И ЦЕНТРИРОВАНИЕ */
.header-search-box .search-box-wrap {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    background: #2e75b6 !important;
}

/* ==================== ИЗОБРАЖЕНИЯ В КОНТЕНТЕ ==================== */

/* Масштабирование картинок в слайдшоу */
.cycle-slideshow img,
.blue_posts_slider-3 img {
    height: 499px;
    object-fit: cover;
}

/* Картинки в разделе публикации - СОВРЕМЕННЫЙ СТИЛЬ */
.images-publication {
    float: left;
    width: 400px;
    margin: 10px 20px 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: #f3f4f6;
}

.images-publication:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.images-publication img {
    width: 100% !important;
    height: 300px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    transition: transform 0.3s ease !important;
}

.images-publication:hover img {
    transform: scale(1.05);
}

/* Подпись к картинке в публикациях */
.images-publication figcaption {
    font-size: 13px;
    color: #6b7280;
    padding: 12px 15px;
    background: #f9fafb;
    text-align: center;
    line-height: 1.4;
    border-top: 1px solid #e5e7eb;
}

/* Картинки и день памяти в житиях святых - СОВРЕМЕННЫЙ СТИЛЬ БЕЗ ОБРЕЗКИ */
.images-zhitia {
    float: left;
    max-width: 350px;
    margin: 10px 20px 20px 0;
    padding: 0;
    transition: all 0.3s ease;
}

.images-zhitia img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.images-zhitia:hover img {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Подпись к картинке в житиях */
.images-zhitia figcaption {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    margin-top: 8px;
    line-height: 1.4;
}

/* Картинка богослужебные тексты */
.bogosluzeibnia-tekst {
    width: 100% !important;
}

/* День памяти по центру */
.denpamyati {
    text-align: center !important;
    font-style: italic;
    font-size: 14px;
    margin-top: -10px;
    margin-bottom: 5px;
}

/* ============================================
   КРАСИВЫЕ BREADCRUMBS (СТИЛИЗАЦИЯ)
   ============================================ */

#breadcrumb {
    background: transparent !important;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 5px auto -20px auto;
    box-shadow: none;
    width: 100%;
}

#breadcrumb .container {
    padding: 8px 15px;
}

.breadcrumb-trail,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    line-height: 1.5;
    margin: 0;
    padding: 0;
}

.breadcrumb-trail ul,
.breadcrumbs ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-trail li,
.breadcrumbs li,
.trail-item {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 0;
}

/* Первая ссылка (Главная) */
.trail-begin a,
.breadcrumb-trail li:first-child a,
.breadcrumbs li:first-child a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 4px;
}

.trail-begin a:hover,
.breadcrumb-trail li:first-child a:hover,
.breadcrumbs li:first-child a:hover {
    background: #eff6ff;
    color: #2563eb;
}

/* Обычные ссылки */
.breadcrumb-trail a,
.breadcrumbs a {
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 500;
}

.breadcrumb-trail a:hover,
.breadcrumbs a:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Разделитель */
.breadcrumb-trail li:not(:last-child)::after,
.breadcrumbs li:not(:last-child)::after {
    content: '→';
    color: #9ca3af;
    font-weight: 600;
    margin: 0 3px;
    user-select: none;
}

/* Текущая страница */
.trail-end span,
.breadcrumb-trail li:last-child span,
.breadcrumbs li:last-child span {
    color: #111827;
    font-weight: 600;
    padding: 2px 4px;
    background: transparent;
    border-radius: 4px;
}

/* ============================================
   Дизайн богослужебные тексты правая колонка
   ============================================ */

#media_image-16 {
    margin-top: 8px !important;
}

#media_image-16 img {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    width: 100%;
    height: auto;
    transition: all 0.3s ease;
    display: block;
    margin-bottom: 0 !important;
}

#media_image-16 img:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Баннеры #start-magazine-images-grid-7
   ============================================ */

#start-magazine-images-grid-7 {
    margin-top: 8px !important;
}

#start-magazine-images-grid-7 .images-block-item {
    background: transparent !important;
}

#start-magazine-images-grid-7 .images-block-inner {
    background: transparent !important;
    overflow: hidden !important;
    border-radius: 12px !important;
}

#start-magazine-images-grid-7 .images-block-inner a {
    display: block !important;
    line-height: 0 !important;
}

#start-magazine-images-grid-7 .images-block-inner img {
    border-radius: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    object-fit: cover !important;
    width: 100% !important;
    height: auto !important;
    transition: all 0.3s ease !important;
    display: block !important;
}

#start-magazine-images-grid-7 .images-block-inner img:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

/* ============================================
   Футер - синий фон, белый текст
   ============================================ */

#footer-widgets.footer-widget-area {
    background: #2e75b6;
    border-top: none;
    padding: 45px 0 35px;
    margin-top: 50px;
}

#footer-widgets .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#footer-widgets .inner-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 35px;
    justify-content: space-between;
}

#footer-widgets .widget-column {
    flex: 1;
    min-width: 250px;
    border: none !important;
}

#footer-widgets .widget-column.footer-active-2 {
    flex-basis: calc(50% - 18px);
}

#footer-widgets .widget-column.footer-active-3 {
    flex-basis: calc(33.333% - 24px);
}

#footer-widgets .widget-column.footer-active-4 {
    flex-basis: calc(25% - 27px);
}

#footer-widgets .widget {
    margin: 0;
    padding: 0;
    border: none !important;
}

#footer-widgets .widget::before,
#footer-widgets .widget::after,
#footer-widgets .widget-column::before,
#footer-widgets .widget-column::after {
    display: none !important;
}

#footer-widgets .widget-title {
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    margin: 0 0 20px 0;
    padding: 0 0 0 10px;
    border-bottom: none;
    border-left: 3px solid #d83645;
    line-height: 1.4;
    display: flex;
    align-items: center;
    min-height: 26px;
}

#footer-widgets .textwidget {
    margin: 0;
    padding: 0;
}

#footer-widgets .textwidget p {
    color: #ffffff;
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 8px 0;
    padding: 0;
    text-align: left;
}

#footer-widgets .textwidget p:last-child {
    margin-bottom: 0;
}

#footer-widgets .textwidget a {
    color: #ffffff;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

#footer-widgets .textwidget a:hover {
    color: #d83645;
    border-bottom-color: #d83645;
}

/* Социальные сети в футере */
#footer-widgets .start_magazine_widget_social ul#menu-social-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

#footer-widgets .start_magazine_widget_social ul li {
    margin: 0;
    padding: 0;
    list-style: none;
}

#footer-widgets .start_magazine_widget_social ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
}

#footer-widgets .start_magazine_widget_social ul li a:hover {
    background: #d83645;
    border-color: #d83645;
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

#footer-widgets .start_magazine_widget_social ul li a span.screen-reader-text {
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    width: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    word-wrap: normal;
}

/* Форма подписки Fluent Forms */
#footer-widgets .widget_fluentform_widget .fluentform {
    margin: 0;
}

#footer-widgets .widget_fluentform_widget .ff-el-group {
    margin: 0 0 10px 0;
}

#footer-widgets .widget_fluentform_widget input[type="email"] {
    width: 100%;
    padding: 11px 14px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: #111827;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

#footer-widgets .widget_fluentform_widget input[type="email"]:focus {
    outline: none;
    background: #ffffff;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

#footer-widgets .widget_fluentform_widget input[type="email"]::placeholder {
    color: #6b7280;
}

#footer-widgets .widget_fluentform_widget .ff_submit_btn_wrapper {
    margin: 0;
}

#footer-widgets .widget_fluentform_widget button.ff-btn-submit {
    width: 100%;
    padding: 11px 18px;
    background: #d83645;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.5;
}

#footer-widgets .widget_fluentform_widget button.ff-btn-submit:hover {
    background: #c12a38;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

#footer-widgets .widget_fluentform_widget button.ff-btn-submit:active {
    transform: translateY(0);
}

/* ============================================
   Копирайт - в стиле синего футера
   ============================================ */

.site-footer {
    background: #2e75b6;
    padding: 0 0 25px 0;
    margin: 0;
}

.copyright {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 0 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.6;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.copyright a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.copyright a:hover {
    color: #d83645;
}

/* ============================================
   Кнопка Телеграм
   ============================================ */

#menu-item-64144 {
    position: relative !important;
}

#menu-item-64144 a {
    position: relative !important;
}

#menu-item-64144 svg.bi-telegram {
    position: absolute !important;
    top: 50% !important;
    left: 51% !important;
    transform: translate(-50%, -50%) !important;
    width: 25px !important;
    height: 25px !important;
    z-index: 2147483647 !important;
    isolation: isolate !important;
    background: transparent !important;
    pointer-events: none !important;
    fill: #ffffff !important;
}

#menu-item-64144 svg.bi-telegram path {
    fill: #ffffff !important;
}

#menu-item-64144 a:hover svg.bi-telegram,
#menu-item-64144 a:hover svg.bi-telegram path {
    fill: #ffffff !important;
}

#menu-item-64144 .screen-reader-text {
    display: none !important;
}

/* ============================================
   Скрытие дат в категории новомучеников
   ============================================ */

article.category-newmartyrs .entry-meta .posted-on,
body.category-newmartyrs .entry-meta .posted-on {
    display: none !important;
}

/* В блоке "Похожие записи" */
.related-posts-wrapper .related-posts-item a[href*="newmartyrs"] ~ .related-posts-meta .posted-on {
    display: none !important;
}

/* Скрыть даты во ВСЕХ похожих записях на страницах категории "Новомученики" */
article.category-newmartyrs ~ .related-posts-wrapper .related-posts-meta .posted-on,
article.category-newmartyrs ~ .related-posts-wrapper .related-posts-meta {
    display: none !important;
}

/* 
   ПРИМЕЧАНИЕ: Селекторы с :has() закомментированы из-за ограниченной поддержки браузерами.
   Раскомментируйте, если ваша аудитория использует современные браузеры (Chrome 105+, Safari 15.4+, Firefox 121+)
*/
/*
.related-posts-wrapper .related-posts-item:has(a[href*="cvjashhennomuchenik"]) .posted-on,
.related-posts-wrapper .related-posts-item:has(a[href*="svjatitel"]) .posted-on {
    display: none !important;
}
*/

/* ==================== АДАПТИВНОСТЬ ==================== */

/* Планшеты (720px - 999px) */
@media (min-width: 720px) and (max-width: 999px) {
    .cycle-slideshow img,
    .blue_posts_slider-3 img {
        height: 400px;
    }

    .images-publication {
        width: 350px;
    }

    .images-publication img {
        height: 260px !important;
    }

    .images-zhitia {
        max-width: 320px;
    }

    /* Футер */
    #footer-widgets.footer-widget-area {
        padding: 40px 0 30px;
        margin-top: 40px;
    }

    #footer-widgets .inner-wrapper {
        gap: 30px;
    }

    #footer-widgets .widget-column.footer-active-3 {
        flex-basis: calc(50% - 15px);
    }

    #footer-widgets .widget-column.footer-active-3:last-child {
        flex-basis: 100%;
    }

    #footer-widgets .widget-title {
        font-size: 17px;
    }

    .copyright {
        font-size: 13px;
    }
}

/* Мобильные и breadcrumbs (до 768px) */
@media (max-width: 768px) {
    #breadcrumb {
        display: none !important;
    }

    #media_image-16 img:hover {
        transform: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    #start-magazine-images-grid-7 .images-block-inner img:hover {
        transform: none !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }

    #start-magazine-images-grid-7 .images-grid-list {
        display: block !important;
    }

    #start-magazine-images-grid-7 .inner-wrapper {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
    }

    #start-magazine-images-grid-7 .images-block-item {
        width: 100% !important;
        float: none !important;
        margin-bottom: 0 !important;
    }
}

/* Мобильные (до 720px) */
@media (max-width: 720px) {
    .cycle-slideshow img,
    .blue_posts_slider-3 img {
        height: 250px;
    }

    .start-magazine-post-thumb {
        max-height: 250px;
    }

    .category-publikacii .moretag {
        width: 100%;
        text-align: center;
    }

    .images-publication {
        float: none;
        width: 100%;
        margin: 15px 0 20px 0;
    }

    .images-publication img {
        height: 280px !important;
    }

    .images-zhitia {
        max-width: 100%;
    }

    /* Футер */
    #footer-widgets.footer-widget-area {
        padding: 35px 0 25px 15px;
        margin-top: 10px;
    }

    #footer-widgets .inner-wrapper {
        flex-direction: column;
        gap: 20px;
    }

    #footer-widgets .widget-column {
        flex-basis: 100%;
        min-width: 100%;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    #footer-widgets .widget-title {
        font-size: 16px;
        margin-bottom: 16px;
        padding-left: 12px;
    }

    #footer-widgets .textwidget p {
        font-size: 14px;
    }

    #footer-widgets .start_magazine_widget_social ul#menu-social-menu {
        justify-content: flex-start;
    }
}

/* Очень маленькие экраны (до 499px) */
@media (max-width: 499px) {
    .images-zhitia {
        float: none;
        max-width: 100%;
        margin: 10px auto 20px;
        padding: 0;
    }

    .recent-posts-extended-thumb img {
        width: 200px !important;
        min-height: 180px;
    }

    .images-publication img {
        height: 240px !important;
    }
}

/* Самые маленькие экраны (до 480px) */
@media (max-width: 480px) {
    #footer-widgets.footer-widget-area {
        padding: 30px 0 20px 10px;
        margin-top: 10px;
    }

    #footer-widgets .container {
        padding: 0 15px;
    }

    #footer-widgets .inner-wrapper {
        gap: 10px;
    }

    #footer-widgets .widget-title {
        font-size: 16px;
        padding-left: 10px;
    }

    #footer-widgets .textwidget p {
        font-size: 14px;
    }
}