/*
 Theme Name:   Astra Child
 Description:  Дочерняя тема для Astra (кастомные стили и функции)
 Author:       Erik Badalyan
 Template:     astra
 Version:      1.0.0
*/

/* HORIZONTAL MENU & HEADER LAYOUT */
.my-sub-menu-row{background:0 0;padding:0;margin:0 auto 30px;margin-bottom: 0px; max-width:1095px;width:100%;display:block}
.my-sub-menu-row ul{display:flex!important;flex-wrap:nowrap!important;justify-content:space-between;gap:5px;margin:0!important;padding:0!important;list-style:none!important}
.my-sub-menu-row li{flex:1 1 auto!important;margin:0!important;padding:0!important;list-style:none!important;display:flex}
.my-sub-menu-row li a{display:flex;align-items:center;justify-content:center;width:100%;min-height:30px;padding:5px 15px;background-color:#E6E6E6;color:#000;text-decoration:none!important;text-align:center;font-size:16px;line-height:1.1;font-weight:500;border-radius:0;transition:all .2s ease;border:none}
.my-sub-menu-row li a:hover{color:#2ea3f2;background-color:#dcdcdc}
.my-sub-menu-row li.current-menu-item a{color:#2ea3f2!important;background-color:#E6E6E6;font-weight:500!important;cursor:default}
@media (max-width:768px){.my-sub-menu-row ul{flex-direction:column}.my-sub-menu-row li a{margin-bottom:0}}

/* HIDE DEFAULT DROPDOWNS */
.ast-desktop .main-header-menu .sub-menu,.ast-header-break-point .main-header-menu .sub-menu,.ast-hfb-header .main-header-menu .sub-menu,.main-header-menu .sub-menu{display:none!important;opacity:0!important;visibility:hidden!important;pointer-events:none!important}
.menu-item-has-children>.menu-link .ast-icon,.menu-item-has-children>.menu-link:after{display:none!important;content:none!important}
.main-header-menu .menu-item-has-children>.menu-link{padding-right:15px!important}

/* HEADER ELEMENTS & WIDGETS */
.ast-header-right-section{display:flex;flex-direction:column;align-items:flex-end;justify-content:center}
.phone-link{display:flex;align-items:center;text-decoration:none;color:#f1d32d;font-weight:700;font-size:1.3rem;line-height:1;margin-bottom:2px!important}
.phone-icon{width:25px;height:auto;margin-right:10px}
.header-widget-area .widget{margin-bottom:0!important;padding-bottom:0!important}
.widget_polylang ul{display:flex;list-style:none;margin:0!important;padding:0!important;justify-content:flex-end}
.widget_polylang li{margin-left:5px;line-height:1}
.widget_polylang a{color:#fbde10;text-decoration:none;text-transform:uppercase;font-size:1rem;font-weight:700}
.widget_polylang .current-lang a{color:#8c95a0!important}
.widget_polylang li:last-child{margin-right:0}
.site-header-section.main-header-bar-navigation,.main-navigation,.ast-builder-menu-1{flex:1!important;width:100%!important;display:flex!important}

/* MAIN NAVIGATION STYLING */
.main-header-menu{display:flex!important;justify-content:space-between!important;flex-wrap:nowrap!important;gap:5px!important;width:100%!important;margin:0!important;padding:0!important;list-style:none!important}
.main-header-menu .menu-item{flex:1 1 auto!important;margin:0!important;display:flex!important;justify-content:center!important}
.main-header-menu .menu-item>a{white-space:normal!important;word-break:normal!important;overflow-wrap:normal!important;hyphens:none!important;text-align:center;line-height:1.2!important;padding:5px 5px!important;max-width:none!important;font-size:14px;color:#333;font-weight:500;display:flex!important;align-items:center;justify-content:center;transition:all .3s ease}
.main-header-menu .menu-item:hover>a,.main-header-menu .current-menu-item>a,.main-header-menu .current-menu-ancestor>a{color:#31a7d3!important}
.main-header-menu .menu-item:first-child{justify-content:flex-start!important}
.main-header-menu .menu-item:first-child>a{padding-left:0!important;white-space:nowrap!important}
.main-header-menu .menu-item:last-child{justify-content:flex-end!important}
.main-header-menu .menu-item:last-child>a{padding-right:0!important}

/* GLOBAL CONTAINER WIDTHS */
.site-header,.ast-main-header-wrap,.main-header-bar,.ast-theme-transparent-header .main-header-bar-wrap,.site-footer,.ast-footer-builder-1,.site-below-footer-wrap,.site-above-footer-wrap,.footer-adv{max-width:1100px!important;margin-left:auto!important;margin-right:auto!important;width:100%!important}
.site-header .ast-container,.site-footer .ast-container,.site-footer .ast-builder-footer-grid{max-width:1100px!important;padding-left:20px!important;padding-right:20px!important;margin-left:auto!important;margin-right:auto!important}

/* SITEMAP FOOTER MENU */
.site-above-footer-wrap .ast-builder-menu .main-header-menu,.site-above-footer-wrap .ast-builder-menu ul.menu,.site-above-footer-wrap .widget_nav_menu ul.menu{display:block!important;column-count:2!important;column-gap:60px!important;width:auto!important;max-width:600px!important;margin:0!important;padding:0!important}
.site-above-footer-wrap ul.menu>li,.site-above-footer-wrap .menu-item-has-children{-webkit-column-break-inside:avoid!important;page-break-inside:avoid!important;break-inside:avoid!important;display:inline-block!important;width:100%!important;margin-bottom:10px!important;float:none!important}
.site-above-footer-wrap a,.site-above-footer-wrap li a{color:#fff!important;font-weight:400!important;text-decoration:none!important;background:0 0!important;white-space:nowrap!important;line-height:1.2!important;padding:1px 0!important;margin:0!important;min-height:0!important;display:block!important}
.site-above-footer-wrap ul.menu>li>a{text-transform:uppercase!important;font-size:14px!important;margin-bottom:2px!important}
.site-above-footer-wrap .sub-menu li a{text-transform:none!important;font-size:13px!important;opacity:.9}
.site-above-footer-wrap .current-menu-item>a,.site-above-footer-wrap .current_page_item>a,.site-above-footer-wrap .current-menu-ancestor>a,.site-above-footer-wrap .current-menu-parent>a,.site-above-footer-wrap .current_page_ancestor>a{font-weight:700!important;color:#fff!important;opacity:1!important}
.site-above-footer-wrap a:hover{color:#2ea3f2!important;opacity:1!important}
.site-above-footer-wrap .sub-menu{display:block!important;position:static!important;visibility:visible!important;opacity:1!important;width:auto!important;padding:0 0 0 15px!important;margin:0!important;box-shadow:none!important;border:none!important}
.site-above-footer-wrap .sub-menu li{margin:0!important;padding:0!important;display:block!important;line-height:0!important}
.site-above-footer-wrap .menu-item-has-children>a:after,.site-above-footer-wrap .ast-icon,.site-above-footer-wrap svg{display:none!important;content:none!important}
@media (max-width:768px){.site-above-footer-wrap .ast-builder-menu .main-header-menu,.site-above-footer-wrap .ast-builder-menu ul.menu,.site-above-footer-wrap .widget_nav_menu ul.menu{column-count:1!important}.site-above-footer-wrap a,.site-above-footer-wrap li a{white-space:normal!important}}

/* CUSTOM FOOTER WIDGET */
.untc-footer-widget {
    color: #fff;
    max-width: 500px;
    margin: 10px 0 0 20px
}
.untc-footer-title {
    color: #fff!important;
    font-size: 16px!important;
    text-transform: uppercase;
    margin-bottom: 25px!important;
    letter-spacing: .5px
}
.untc-footer-title.social-header {
    margin: 35px 0 20px!important
}
.untc-footer-row {
    display: flex;
    align-items: center;
    margin: 0 0 15px 10px
}
.untc-icon-box {
    width: 30px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center
}
.untc-icon-box img {
    width: 22px;
    height: auto;
    display: block
}
.untc-icon-box img[alt*=mail],
.untc-icon-box img[src*=mail] {
    width: 28px!important
}
.untc-footer-link,
.untc-footer-text {
    color: #fff!important;
    font-size: 16px;
    line-height: 1.2;
    text-decoration: none!important;
    display: block
}
.untc-footer-text {
    line-height: 1.4
}
.untc-footer-link:hover {
    color: #2ea3f2!important
}
.untc-social-container {
    display: flex;
    margin-left: 10px
}
.untc-social-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: #8c95a0;
    border-radius: 6px;
    transition: all .3s ease;
    text-decoration: none!important
}
.untc-social-item:hover {
    background-color: #2ea3f2;
    transform: translateY(-2px)
}
.untc-social-item img {
    width: 40px;
    height: auto
}

@media (max-width: 768px) {
    .untc-footer-widget {
        margin-left: 0;
        margin-bottom: 30px
    }
    .my-sub-menu-row ul {
        flex-direction: column;
    }
    .my-sub-menu-row li a {
        margin-bottom: 0;
    }
} 
.site-above-footer-wrap .sub-menu .sub-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.my-sub-menu-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px;
    width: 100%;
}

/* СТАНДАРТНЫЕ ССЫЛКИ: строго в одну строку */
.my-sub-menu-row .standard-links ul {
    display: flex !important;
    flex-wrap: nowrap !important; 
    justify-content: space-between !important;
}

.my-sub-menu-row .custom-links ul {
    display: flex !important;
    flex-wrap: wrap !important; 
    justify-content: flex-start !important;
    margin-top: 0px !important;
}

@media (max-width: 768px) {
    .my-sub-menu-row .standard-links ul,
    .my-sub-menu-row .custom-links ul {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }
}


.single-post .site-content, 
.single-post .entry-title, 
.single-post .entry-meta,
.single-post .entry-content p {
    font-family: 'Play', sans-serif !important;
}

/* 3. ЗАГОЛОВОК ПОСТА: Синий, справа, капсом, НЕ ЖИРНЫЙ */
.single-post .entry-title {
    text-align: right !important;
    text-transform: uppercase !important;
    color: #073F6B !important; 
    font-size: 28px !important;
    font-weight: 500 !important; 
	!important;
    margin-bottom: 5px !important;
}

/* 4. ДАТА (entry-meta): Справа, Черная, НЕ ЖИРНАЯ */
.single-post .entry-meta,
.single-post .entry-meta * {
    text-align: right !important;
    color: #000000 !important;
    font-size: 16px !important;
    font-weight: 600 !important; /* Убрана жирность */
    text-decoration: none !important;
}

.single-post .entry-meta {
    margin-bottom: 25px !important;
    display: block !important;
    background: transparent !important;
}

/* Скрываем лишние элементы Astra (иконки, автор и т.д.) */
.single-post .entry-meta .ast-icon, 
.single-post .entry-meta .ast-view-replace,
.single-post .entry-meta .byline {
    display: none !important;
}

/* 5. СОДЕРЖИМОЕ ПОСТА: Выравнивание по ширине */
.single-post .entry-content {
    text-align: justify !important;
    line-height: 1.6 !important;
    color: #000 !important;
}

.single-post .entry-content p {
    margin-bottom: 1.5rem !important;
    color: #000 !important;
}

/* 6. ИЗОБРАЖЕНИЯ: По центру */
.single-post .entry-content img {
    display: block !important;
    margin: 20px auto !important;
    max-width: 100% !important;
    height: auto !important;
}

/* 7. КНОПКА НАЗАД (из PHP): Оставляем жирной для акцента, как в примере */
.back-link-wrapper {
    margin-top: 30px !important;
    text-align: left !important;
}

.back-link-wrapper a {
    color: #000 !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
}

.back-link-wrapper a {
    color: #000 !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
    text-decoration-skip-ink: none !important;
}




/* Глобальный шрифт Play */
.custom-news-container, .custom-pagination-area {
    font-family: 'Play', sans-serif !important;
}

/* Настройка блока новости */
.custom-news-item {
    background: transparent !important;
    border: none !important;
    /* ЦВЕТ РАМКИ: СРЕДНЕ-СЕРЫЙ (#ccc) */
    border-bottom: 1px solid #ccc !important; 
    /* ОТСТУПЫ: СРЕДНИЕ (12px) */
    padding: 12px 0 !important; 
    margin: 0 !important;
    display: block !important;
}

/* Убираем линию у последней новости */
.custom-news-item:last-of-type {
    border-bottom: none !important;
}

/* Шапка: Заголовок и Дата */
.news-header-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline !important;
    width: 100% !important;
    margin-bottom: 5px !important;
}

.news-title {
    margin: 0 !important;
    padding: 0 !important;
    flex: 1 !important;
    line-height: 1.5 !important; /* Уменьшает отступ между строками самого заголовка */
}

.news-title a {
    font-size: 18px !important;
    color: #000 !important;
    font-weight: bold !important;
    text-decoration: none !important;
    line-height: 1.5 !important; /* Дублируем для ссылки, чтобы точно применилось */
    display: block; /* Позволяет заголовку корректно схлопывать пространство */
}
.news-date {
    font-weight: bold !important;
    font-size: 16px !important;
    color: #000 !important;
    white-space: nowrap !important;
    margin-left: 15px !important;
}

/* Описание */
.news-excerpt {
    font-size: 16px !important;
    color: #212529 !important;
    margin: 5px 0 8px 0 !important; /* Умеренный отступ */
    text-align: justify !important;
    text-indent: 0 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}

/* Ссылка Подробно... */
.news-more {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #000 !important;
    text-decoration: none !important;
}

/* Пагинация */
.custom-pagination-area {
    margin-top: 25px;
}

.custom-pagination-area .page-numbers {
    color: black !important;
    font-weight: bold !important;
    text-decoration: none !important;
    padding: 0 4px !important;
    font-size: 17px;
}

/* Выбранная страница: БЕЗ жирности */
.custom-pagination-area .page-numbers.current {
    font-weight: normal !important;
}

.custom-pagination-area a.page-numbers:hover {
    color: #093F6B !important;
}


.custom-cf7-style {
    background-color: #f2f2f2;
    width: 100%;
    padding: 20px 0;
    box-sizing: border-box;
}

.custom-cf7-style .cf7-inner-content {
    max-width: 550px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
    font-family: sans-serif;
}

.custom-cf7-style .cf7-title {
    color: #104066;
    text-align: center;
    text-transform: uppercase;
    font-size: 24px;
    font-weight: normal;
    margin-bottom: 25px;
    margin-top: 0;
}

.custom-cf7-style .cf7-row {
    width: 100%;
    margin-bottom: 15px;
}

.custom-cf7-style input[type="text"],
.custom-cf7-style input[type="email"],
.custom-cf7-style textarea {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding: 8px 13px !important;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 16px;
    color: #333;
    outline: none;
    background: #fff;
    transition: border 0.3s;
    margin: 0 !important;
}

.custom-cf7-style ::placeholder {
    color: #999;
    opacity: 1;
}

.custom-cf7-style input:focus,
.custom-cf7-style textarea:focus {
    border-color: #2c5e88;
}

.custom-cf7-style .cf7-consent {
    margin-bottom: 25px;
}

.custom-cf7-style .cf7-consent label {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.custom-cf7-style .cf7-consent input[type="checkbox"] {
    margin-top: 3px;
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0;
    margin-right: 0 !important;
}

.custom-cf7-style .wpcf7-list-item-label {
    font-size: 16px;
    color: #444;
    line-height: 1.4;
    text-align: left;
}

.custom-cf7-style .cf7-submit-wrap {
    text-align: center;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.custom-cf7-style input[type="submit"] {
    background-color: #104066;
    color: #ffffff;
    border: none;
    width: auto !important;
    display: inline-block;
    padding: 10px 25px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: none;
    line-height: 1.2;
}

.custom-cf7-style input[type="submit"]:hover {
    background-color: #0d3352;
}

.custom-cf7-style .wpcf7-spinner {
    position: absolute;
    margin: 0 !important;
    right: 0;
    transform: translateX(150%);
}

.custom-cf7-style p {
    margin-bottom: 0;
}

.custom-cf7-style .wpcf7-form-control-wrap {
    display: flex;
    flex-direction: column-reverse;
    width: 100%;
    align-items: stretch;
}

.custom-cf7-style .wpcf7-not-valid-tip {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    font-size: 16px;
    padding: 6px 12px;
    border-radius: 6px;
    width: fit-content;
    margin-bottom: 8px;
    display: block;
    animation: fadeIn 0.3s ease-in;
}

.custom-cf7-style input.wpcf7-not-valid,
.custom-cf7-style textarea.wpcf7-not-valid {
    border-color: #dc3545 !important;
    background-color: #fff8f8;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}