/* global constraints */
html {
    background-color: #ffffff; 
}

body {
    background-color: #f8f9fa; 
    max-width: 1300px;         
    margin: 0 auto;            
    overflow-x: hidden; 
    position: relative;
}

/* header elements */
.logo-icon {
    color: #2d64f3;
    font-size: 32px;
}

.logo-title {
    color: #2d64f3;
    font-size: 18px;
    line-height: 1;
}

/* hero section */
.hero-section {
    background-color: #ffffff;
    position: relative;
    overflow: hidden;
    padding-bottom: 60px;
}

.hero-title {
    font-size: 48px;
    color: #1a1a1a;
    word-spacing: 5px; 
}

.hero-subtitle {
    font-size: 18px;
    color: #4a4a4a;
    word-spacing: 3px; 
}

/* swiper structural fixes */
.heroSwiper .swiper-slide {
    height: auto !important; 
}

.hero-bg-image {
    top: 0;
    right: 0;
    width: 55%;
    min-height: 100%;
    object-fit: cover;
    z-index: 0;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 25%);
    mask-image: linear-gradient(to right, transparent 0%, black 25%);
}

/* hero icons styling (transparent background) */
.hero-feature .feature-icon {
    background: transparent;
    width: auto;
    height: auto;
    border-radius: 0;
}

/* floating promo card */
.promo-card {
    position: absolute !important;
    bottom: 120px !important;
    right: 3rem;
    background-color: #ffffff;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    z-index: 20 !important;
}

/* reviews avatars */
.avatar {
    width: 48px !important; 
    height: 48px !important;
    object-fit: cover !important;
}

.avatar + .avatar {
    margin-left: -15px !important;
}

img.avatar.border {
    border-width: 3px !important;
}

/* advantages banner */
.overlap-block {
    margin-left: -15px;
    margin-right: -15px;
    margin-top: -90px;
    background-color: #ffffff;      
    border-radius: 12px;            
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08); 
    position: relative;
    z-index: 10;                    
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;          
    height: 56px;
    background: #f8f9fa;  
    border-radius: 50%;
    flex-shrink: 0; 
    color: #2d64f3;
}

/* results section */
.results-section {
    margin-top: 40px; 
}

/* result card styling */
.result-card {
    background-color: #ffffff;
    border-radius: 12px; 
    border: none; 
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); 
    overflow: hidden; 
}

.result-image-wrapper {
    position: relative;
    overflow: hidden;
}

.result-badge {
    position: absolute;
    bottom: 15px; 
    padding: 4px 10px;
    background-color: rgba(0, 0, 0, 0.6); 
    color: #ffffff; 
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    z-index: 2; 
}

.badge-before {
    left: 15px;
}

.badge-after {
    right: 15px;
}

/* media queries (mobile constraints) */
@media (max-width: 767.98px) {

    .overlap-block {
        margin-top: 15px; 
    }
    
    .hero-title {
        font-size: 26px;
        word-spacing: normal; 
        line-height: 1.2;
        text-align: left;
        margin-bottom: 8px !important;
    }
    
    .hero-subtitle {
        font-size: 14px;
        text-align: left;
        margin-bottom: 12px !important;
    }
    
    .hero-section {
        padding-bottom: 40px !important;
        padding-top: 20px !important;
        text-align: left;
        background-color: #f4f6f9; 
    }

    .hero-content-wrapper {
        background-color: #ffffff;
        padding: 16px 12px;
        border-radius: 16px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .hero-content-wrapper > .d-flex.flex-column.mb-0 {
        margin-top: auto;
    }

    .mobile-image-wrap {
        border-radius: 12px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
        overflow: hidden;
        margin-bottom: 12px !important;
    }

    .mobile-image-wrap img {
        width: 100%;
        height: 150px;
        object-fit: cover;
        display: block;
    }

    .hero-feature {
        flex-direction: column !important;
        align-items: center !important;
    }

    .hero-feature .feature-icon svg {
        width: 26px;
        height: 26px;
    }

    .hero-feature .feature-icon {
        margin-right: 0 !important;
        margin-bottom: 4px !important;
    }

    .hero-feature-text {
        font-size: 11px;
        line-height: 1.1;
        text-align: center;
    }

    .mobile-logo svg {
        width: 32px;
        height: 32px;
    }
    
    .mobile-phone-text {
        font-size: 13px;
    }

    .mobile-btn {
        font-size: 12px;
        padding: 0.4rem 0.6rem !important;
    }
    
    .hero-section .container-fluid {
        z-index: 1;
        padding-left: 10px;
        padding-right: 10px;
    }

    .results-section {
        margin-top: 60px; 
    }
}

/* Tablet styles for overlap block */
@media (min-width: 768px) and (max-width: 991.98px) {
    .overlap-block {
        margin-top: 20px;
    }
    
    .hero-section {
        padding-bottom: 20px;
    }
    
    .features-bar {
        flex-wrap: wrap;
    }
    
    .feature-item {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
        margin-bottom: 20px !important;
    }
}

/* Nav breakpoint configuration */
@media (max-width: 1250px) {
    .desktop-nav-only {
        display: none !important;
    }
    .mobile-menu-trigger {
        display: inline-block !important;
    }
}

@media (min-width: 1251px) {
    .desktop-nav-only {
        display: block !important;
    }
    .mobile-menu-trigger {
        display: none !important;
    }
}

/* --- styles for  --- */
.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%; 
    width: 280px;
    height: 100vh;
    background-color: #ffffff;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 9999; 
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
}

.mobile-sidebar.open {
    left: 0; 
}

/* header navigation spacing fix */
.header-nav {
    flex-wrap: nowrap !important;
}

.header-nav .nav-link {
    padding-left: 0.6rem !important; 
    padding-right: 0.6rem !important; 
    white-space: nowrap;              
    font-size: 15px;                  
}

/* styles for "Как проходит лечение" */
.treatment-section {
    position: relative;
    z-index: 5;
    background-color: #ffffff;
}

.treatment-line {
    position: absolute;
    top: 55px;
    left: 10%;
    right: 10%;
    height: 1px;
    border-top: 1px dashed #cdd8fb;
    z-index: 0;
}

.step-icon-wrapper {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 15px 35px rgba(45, 100, 243, 0.12), inset 0 0 20px rgba(45, 100, 243, 0.05); 
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2d64f3;
    z-index: 2;
}

.step-number {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #e4eaff; 
    color: #2d64f3;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    border: 3px solid #ffffff; 
    box-sizing: content-box;
}

.treatment-step p {
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 991.98px) {
    .treatment-line {
        display: none; 
    }
}

.step-icon-wrapper::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top: 2px solid #2d64f3; 
    
    -webkit-mask-image: linear-gradient(to right, transparent 20%, black 30%, black 70%, transparent 80%);
    mask-image: linear-gradient(to right, transparent 20%, black 30%, black 70%, transparent 80%);
    z-index: 1;
}

/* step number */
.step-number {
    position: absolute;
    top: -13px; 
    left: 50%;
    transform: translateX(-50%);
    background-color: #e4eaff;
    color: #2d64f3;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    border: 3px solid #ffffff;
    
    box-sizing: border-box; 
    z-index: 2;
}

@media (min-width: 992px) {
    .treatment-step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 55px;
        right: 0; 
        width: 8px;
        height: 8px;
        background-color: #cdd8fb; 
        border-radius: 50%;
        transform: translate(50%, -50%);
        z-index: 1;
    }
}

@media (max-width: 767.98px) {

    .treatment-step p {
        display: none !important;
    }


    .treatment-step {
        margin-bottom: 15px !important; 
        padding-bottom: 0 !important;
    }

    .treatment-step .step-icon-wrapper {
        margin-bottom: 3px !important;
        width: 80px;
        height: 80px;
        box-shadow: 0 8px 20px rgba(45, 100, 243, 0.1);
    }

    .treatment-step .step-icon-wrapper svg {
        width: 32px;
        height: 32px;
    }

    .treatment-step h6 {
        font-size: 15px;
        margin-bottom: 2px !important;
    }

    .step-number {
        top: -12px;
        width: 24px;
        height: 24px;
        font-size: 10px;
        border-width: 2px;
    }

    .treatment-step p {
        font-size: 13px;
        line-height: 1.3;
        margin-bottom: 0 !important;
    }
}

/* --- Pricing Section --- */
.pricing-section {
    padding-top: 25px;
    padding-bottom: 60px;
}

.pricing-card {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    padding: 24px 20px;
    position: relative;
    transition: box-shadow 0.2s ease-in-out;
}

.pricing-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

/* popular card */
.pricing-card.popular {
    border: 2px solid #2d64f3;
    box-shadow: 0 8px 20px rgba(45, 100, 243, 0.1);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #2d64f3;
    color: #ffffff;
    padding: 4px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.pricing-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 10px;
}


.pricing-card.popular .pricing-title {
    color: #2d64f3;
}

.pricing-price {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.pricing-price .price-from {
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
}

.pricing-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.pricing-list li {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
    color: #2d2d2d;
    margin-bottom: 10px;
    line-height: 1.4;
}

.pricing-list li svg {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    margin-top: 1px;
    flex-shrink: 0;
    color: #2d64f3;
}

.pricing-img-wrapper.one-tooth {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;           
    width: 50%;               
    max-width: 160px;         
    flex-shrink: 0;
    margin-left: auto;
    overflow: hidden;         
    border-radius: 8px;       
}

.pricing-img-wrapper.four-toothes {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;             
    width: 49%;              
    max-width: 160px;         
    flex-shrink: 0;
    margin-left: auto;
    overflow: hidden;         
    border-radius: 8px;      
}

.pricing-img-wrapper.all-toothes {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;             
    width: 48%;              
    max-width: 160px;         
    flex-shrink: 0;
    margin-left: auto;
    overflow: hidden;        
    border-radius: 8px;       
}

.pricing-img {
    width: 100%;              
    height: 100%;        
    object-fit: cover;     
}

.btn-pricing {
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 0;
    width: 100%;
}

/* Cost Calculator */
.calculator-section {
    margin-top: 40px;
    margin-bottom: 40px;
}

.cost-calculator-tile {
    background: linear-gradient(135deg, #2b5ce6 0%, #5984ef 100%);
    border-radius: 20px;
    padding: 40px 30px;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.cost-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 15px;
}

.cost-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-cost-calc {
    background-color: #ffffff;
    color: #2b5ce6;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 8px;
    border: none;
    font-size: 15px;
    transition: 0.2s;
}

.btn-cost-calc:hover {
    background-color: #f0f4ff;
    color: #204bc2;
    text-decoration: none;
}

.feature-icon-circle {
    width: 80px;
    height: 80px;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    color: #2b5ce6;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08); /* Добавил легкую тень для объема */
}

.feature-icon-circle svg {
    width: 34px;
    height: 34px;
}

.feature-text {
    font-size: 12px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.95);
    max-width: 130px;
    margin: 0 auto;
}

.doctor-wrapper {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 2;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
}

.doctor-img {
    width: auto;
    height: 140%;
    object-fit: cover;
    transform: scale(1.4);
    object-position: right;
}

@media (max-width: 1199.98px) {
    .doctor-wrapper {
        display: none !important;
    }
}


/* Card Styles */
.trust-card {
    background-color: #ffffff;
    border: none;
    border-radius: 16px; /* Единое скругление для всех плиток */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04); /* Мягкая "воздушная" тень */
    transition: box-shadow 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.trust-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08); 
    transform: translateY(-2px); 
}


@media (max-width: 767.98px) {
    .trust-stat {
        width: 100%;
        border-bottom: 1px solid #eef2f6;
        padding-bottom: 24px;
        margin-bottom: 24px !important;
    }
    .trust-stat:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0 !important;
    }
    
    .review-platform {
        width: 100%;
        border-bottom: 1px solid #eef2f6;
        padding-bottom: 20px;
        margin-bottom: 20px !important;
    }
    .review-platform:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0 !important;
    }
}

/* Form Custom Styles */
.custom-input {
    background-color: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 6px;
    padding: 0.6rem 1rem;
    font-size: 14px;
    height: auto;
    box-shadow: none;
    transition: border-color 0.2s ease-in-out;
}

.custom-input:focus {
    border-color: #2d64f3;
    box-shadow: 0 0 0 3px rgba(45, 100, 243, 0.1);
}

.custom-btn {
    border-radius: 6px;
    padding: 0.7rem 1rem;
    font-size: 15px;
}

.input-icon-wrapper {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #c0c7d6; 
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none; 
}

.custom-input.with-icon {
    padding-left: 38px;
}

.round-checkbox .custom-control-label::before {
    border-radius: 50% !important;
    border: 1px solid #eef2f6;
}

.round-checkbox .custom-control-label::after {
    border-radius: 50% !important;
}

/* Footer Styles */
.footer-section {
    border-top: 1px solid #eef2f6 !important;
}

.footer-link {
    font-size: 13px;
    transition: color 0.2s ease;
    text-decoration: none !important;
}

.footer-link:hover {
    color: #2d64f3 !important;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none !important;
}

.social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: white;
}

.social-icon.vk { background-color: #2787F5; }
.social-icon.tg { background-color: #039BE5; }
.social-icon.wa { background-color: #25D366; }
.social-icon.ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

@media (max-width: 767.98px) {
    .footer-patients-col {
        margin-bottom: 2rem !important; 
    }
}

/* =========================================
   1. БЕЗОПАСНЫЙ ВОЗВРАТ .row ДЛЯ СТАРОЙ ТЕМЫ
   ========================================= */
/* Применяем старый код ко всем .row, КРОМЕ тех, что лежат внутри твоей верстки .lecardo-scope */
.row:not(.lecardo-scope .row) {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    margin-bottom: 75px;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
}


/* =========================================
   2. ПОЧИНКА ШАПКИ (HEADER)
   ========================================= */
/* Принудительно выстраиваем шапку в одну аккуратную линию без переносов */
.header-main .row,
header .row {
    margin-bottom: 0 !important; /* Убиваем отступ 75px в шапке */
    align-items: center !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
}

/* Выравниваем меню навигации */
.header-nav {
    display: flex !important;
    align-items: center !important;
    flex-grow: 1;
    justify-content: center;
}

.header-nav ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 15px; /* Расстояние между пунктами меню */
}

.header-nav ul li a {
    white-space: nowrap !important; 
    font-size: 16px !important;
    padding: 5px 10px !important;
    color: #1a1a1a !important; /* Делаем текст темно-серым (почти черным) */
    text-decoration: none !important; /* Убираем подчеркивание, если есть */
    font-weight: 600 !important; /* Делаем шрифт чуть жирнее, как на макете */
    transition: color 0.2s ease-in-out;
}

/* Цвет при наведении мышки (опционально, будет красиво) */
.header-nav ul li a:hover {
    color: #2d64f3 !important; /* Становится фирменным синим */
}


/* =========================================
   3. ПРЯЧЕМ ВЫЛЕЗШИЕ ФОРМЫ (МОДАЛЬНЫЕ ОКНА)
   ========================================= */
/* Эти формы вылезли, потому что потеряли родительский класс скрытия. Прячем их жестко. */
/* Плагины всплывающих окон (типа Fancybox) сами покажут их при клике */
footer ~ div:not(#wpadminbar),
.site-footer ~ div:not(#wpadminbar),
div[id*="modal"]:not(#wpadminbar),
div[id*="popup"]:not(#wpadminbar),
.wpcf7 form {
    display: none;
}

/* Исключение: если форма внутри Fancybox уже открыта - показываем */
.fancybox-content div[id*="modal"],
.fancybox-content div[id*="popup"],
.fancybox-content .wpcf7 form {
    display: block;
}

/* Добавляем аккуратные отступы сверху и снизу для шапки */
header, 
.header-main {
    background-color: #ffffff !important;
    padding-top: 40px !important;    /* Воздух сверху */
    padding-bottom: 40px !important; /* Воздух снизу */
}


#wpadminbar {
    display: block !important;
}

/* --- СТИЛИ ДЛЯ СТРАНИЦЫ КОНТАКТОВ --- */

/* 1. Общий контейнер-карточка (белый фон + тень) */
.contact-page-content .contact-page-top {
    display: flex;
    flex-wrap: wrap;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08); /* Тень как на макете */
    overflow: hidden; /* Обрезаем углы у карты */
    margin-bottom: 40px;
}

/* 2. Левая колонка с текстом */
.contact-page-content .contact-page-items {
    flex: 0 0 45%;
    max-width: 45%;
    padding: 50px 40px; /* Внутренние отступы */
    display: flex;
    flex-direction: column;
    gap: 25px; /* Расстояние между блоками текста */
}

/* 3. Правая колонка с картой */
.contact-page-content .contact-page-map {
    flex: 0 0 55%;
    max-width: 55%;
    position: relative;
    min-height: 450px;
}

/* Растягиваем карту на всю правую часть */
.contact-page-content .contact-page-map #map {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
}

/* 4. Текст и ссылки */
.contact-page-content .contact-page-phone {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    text-decoration: none;
    margin-bottom: 10px;
}

.contact-page-content .contacts-emails-item strong {
    display: block;
    color: #888; /* Серый подзаголовок */
    font-weight: 400;
    font-size: 14px;
    margin-bottom: 5px;
}

.contact-page-content .contact-page-email,
.contact-page-content .contact-page-address a {
    color: #0056b3; /* Синие ссылки */
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
}

/* 5. Синие кнопки внизу (в ряд) */
.contact-page-content .contact-page-bottom {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.contact-page-content .btn,
.contact-page-content .btn-second {
    padding: 14px 24px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    text-align: center;
    transition: 0.3s;
}

/* Кнопка "Написать нам" (залитая синяя) */
.contact-page-content .btn {
    background-color: #007bff;
    color: #fff;
    border: 2px solid #007bff;
}
.contact-page-content .btn:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Кнопка "Перезвоните мне" (контурная синяя) */
.contact-page-content .btn-second {
    background-color: transparent;
    color: #007bff;
    border: 2px solid #007bff;
}
.contact-page-content .btn-second:hover {
    background-color: #007bff;
    color: #fff;
}

/* 6. Мобильная адаптация (до 992px колонки встают друг под друга) */
@media (max-width: 991px) {
    .contact-page-content .contact-page-items,
    .contact-page-content .contact-page-map {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .contact-page-content .contact-page-map {
        min-height: 350px;
    }
    .contact-page-content .contact-page-bottom {
        flex-direction: column; /* На телефоне кнопки друг под другом */
    }
}