/* ==========================================================================
   Elmar Sucai Theme — Modern Design System
   ========================================================================== */

:root {
    --elmar-primary: #1a365d;
    --elmar-primary-light: #2d4a7a;
    --elmar-secondary: #c9a84c;
    --elmar-secondary-light: #d4b86a;
    --elmar-bg: #f8f9fa;
    --elmar-text: #374151;
    --elmar-text-light: #6b7280;
    --elmar-white: #ffffff;
    --elmar-border: #e5e7eb;
    --elmar-shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --elmar-shadow: 0 4px 20px rgba(0,0,0,0.08);
    --elmar-shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
    --elmar-radius: 16px;
    --elmar-font-heading: 'Montserrat', sans-serif;
    --elmar-font-body: 'Open Sans', sans-serif;
}

/* === Базовая типография === */
body {
    font-family: var(--elmar-font-body);
    color: var(--elmar-text);
    background-color: var(--elmar-bg);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--elmar-font-heading);
    color: var(--elmar-primary);
    line-height: 1.3;
}

/* === Скрыть заголовок страницы "Главная" === */
.page-id-4 .entry-header,
.page-id-4 .ast-archive-description,
body.page .entry-header .entry-title {
    display: none !important;
}

/* Убрать дефолтные отступы Astra для контента */
.page-id-4 .entry-content > .wp-block-html {
    max-width: none;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/* === Контейнер === */
.elmar-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Секция общая === */
.elmar-section {
    padding: 80px 0;
}

.elmar-section-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--elmar-secondary);
    margin-bottom: 8px;
    font-family: var(--elmar-font-heading);
}

.elmar-section h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--elmar-primary);
}

.elmar-lead {
    font-size: 1.15rem;
    color: var(--elmar-text-light);
    max-width: 700px;
    line-height: 1.8;
}

/* === КНОПКИ === */
.elmar-btn {
    display: inline-block;
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    font-family: var(--elmar-font-heading);
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.elmar-btn-primary {
    background: var(--elmar-secondary);
    color: var(--elmar-primary);
}
.elmar-btn-primary:hover {
    background: var(--elmar-secondary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 168, 76, 0.35);
    color: var(--elmar-primary);
}

.elmar-btn-outline {
    border-color: rgba(255,255,255,0.5);
    color: var(--elmar-white);
    background: transparent;
}
.elmar-btn-outline:hover {
    border-color: var(--elmar-white);
    background: rgba(255,255,255,0.1);
    color: var(--elmar-white);
}

.elmar-btn-white {
    background: var(--elmar-white);
    color: var(--elmar-primary);
}
.elmar-btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(255,255,255,0.25);
    color: var(--elmar-primary);
}

.elmar-btn-outline-white {
    border-color: rgba(255,255,255,0.5);
    color: var(--elmar-white);
    background: transparent;
}
.elmar-btn-outline-white:hover {
    border-color: var(--elmar-white);
    background: rgba(255,255,255,0.1);
    color: var(--elmar-white);
}

.elmar-hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* === HERO === */
.elmar-hero {
    background: linear-gradient(135deg, var(--elmar-primary) 0%, var(--elmar-primary-light) 50%, #1e3a5f 100%);
    color: var(--elmar-white);
    padding: 100px 24px 90px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.elmar-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201,168,76,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.elmar-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.elmar-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 750px;
    margin: 0 auto;
}

.elmar-hero-badge {
    display: inline-block;
    background: rgba(201, 168, 76, 0.2);
    border: 1px solid rgba(201, 168, 76, 0.4);
    color: var(--elmar-secondary);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 28px;
    font-family: var(--elmar-font-heading);
}

.elmar-hero h1 {
    color: var(--elmar-white);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.elmar-hero p {
    font-size: 1.2rem;
    opacity: 0.85;
    max-width: 580px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

/* === О ВРАЧЕ === */
.elmar-about {
    background: var(--elmar-white);
}

.elmar-about-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 48px;
    align-items: start;
    margin-top: 12px;
}

.elmar-about-photo {
    position: relative;
    display: flex;
    justify-content: center;
}

.elmar-about-photo::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 2px dashed var(--elmar-secondary);
    opacity: 0.4;
}

.elmar-about-img {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--elmar-white);
    box-shadow: var(--elmar-shadow-lg);
    position: relative;
    z-index: 1;
}

.elmar-about-lead {
    font-size: 1.15rem !important;
    font-weight: 600;
    color: var(--elmar-primary) !important;
    line-height: 1.7;
}

.elmar-about-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--elmar-text);
}

.elmar-about-directions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 28px 0;
}

.elmar-direction {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: var(--elmar-bg);
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid var(--elmar-border);
}

.elmar-direction-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.elmar-direction strong {
    display: block;
    font-family: var(--elmar-font-heading);
    color: var(--elmar-primary);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.elmar-direction span {
    font-size: 0.9rem;
    color: var(--elmar-text-light);
    line-height: 1.5;
}

.elmar-about-geo {
    font-size: 0.9rem !important;
    color: var(--elmar-text-light) !important;
    background: linear-gradient(135deg, rgba(26,54,93,0.05), rgba(201,168,76,0.08));
    padding: 14px 18px;
    border-radius: 10px;
    border-left: 3px solid var(--elmar-secondary);
    margin-top: 8px;
}

.elmar-stats {
    display: flex;
    gap: 48px;
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px solid var(--elmar-border);
}

.elmar-stat {
    text-align: center;
}

.elmar-stat-num {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--elmar-font-heading);
    color: var(--elmar-primary);
    line-height: 1;
}

.elmar-stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--elmar-text-light);
    margin-top: 6px;
}

/* === ЧТО ТАКОЕ СЮЦАЙ === */
.elmar-what {
    background: var(--elmar-bg);
}

.elmar-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.elmar-feature {
    background: var(--elmar-white);
    padding: 32px 24px;
    border-radius: var(--elmar-radius);
    text-align: center;
    border: 1px solid var(--elmar-border);
    transition: all 0.3s ease;
}

.elmar-feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--elmar-shadow-lg);
    border-color: transparent;
}

.elmar-feature-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.elmar-feature h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--elmar-primary);
}

.elmar-feature p {
    font-size: 0.9rem;
    color: var(--elmar-text-light);
    line-height: 1.6;
    margin: 0;
}

/* === УСЛУГИ === */
.elmar-services {
    background: var(--elmar-white);
}

.elmar-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 48px;
}

.elmar-card {
    background: var(--elmar-bg);
    padding: 36px 28px;
    border-radius: var(--elmar-radius);
    border: 1px solid var(--elmar-border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.elmar-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--elmar-shadow-lg);
    border-color: var(--elmar-secondary);
}

.elmar-card-icon {
    font-size: 2.2rem;
    margin-bottom: 20px;
}

.elmar-card h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    color: var(--elmar-primary);
}

.elmar-card p {
    font-size: 0.95rem;
    color: var(--elmar-text-light);
    line-height: 1.7;
    flex: 1;
}

.elmar-card-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--elmar-secondary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.elmar-card-link:hover {
    color: var(--elmar-primary);
}

/* === CTA === */
.elmar-cta {
    background: linear-gradient(135deg, var(--elmar-primary) 0%, var(--elmar-primary-light) 100%);
    color: var(--elmar-white);
    padding: 80px 24px;
    text-align: center;
}

.elmar-cta h2 {
    color: var(--elmar-white);
    font-size: 2.2rem;
    margin-bottom: 16px;
}

.elmar-cta p {
    opacity: 0.85;
    font-size: 1.1rem;
    margin-bottom: 36px;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

/* === ЛОГОТИП === */
.site-logo-img .custom-logo,
.custom-logo-link img,
.ast-site-identity .custom-logo {
    max-height: 150px !important;
    width: auto !important;
    object-fit: contain;
}

/* Скрыть название рядом с лого */
.ast-site-identity .site-title,
.ast-site-identity .site-description,
.site-branding .ast-site-title-wrap {
    display: none !important;
}

/* === ХЕДЕР Astra === */
.main-header-bar,
.ast-primary-header-bar,
.site-header {
    background: #ffffff !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
}

/* === НАВИГАЦИЯ === */
.main-navigation a {
    font-family: var(--elmar-font-heading) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    letter-spacing: 0.5px;
}

/* === ФУТЕР === */
.site-footer {
    background: var(--elmar-primary) !important;
}

.ast-footer-copyright,
.ast-footer-copyright p,
.site-below-footer-wrap {
    background: var(--elmar-primary) !important;
    color: rgba(255,255,255,0.7) !important;
}

.ast-footer-copyright p {
    font-size: 0.85rem;
}

/* === WhatsApp === */
.elmar-whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: transform 0.3s;
}

.elmar-whatsapp-float:hover {
    transform: scale(1.1);
}

/* === МОБИЛЬНОЕ МЕНЮ (Astra Header Builder) === */
@media (max-width: 921px) {
    /* Контейнер мобильного меню — все уровни обёртки */
    .ast-mobile-header-wrap,
    .ast-mobile-header-wrap .ast-mobile-header-content,
    .ast-mobile-header-content,
    body .ast-mobile-header-content,
    .ast-mobile-header-content.content-align-flex-start {
        --ast-global-color-0: #ffffff;
        --ast-global-color-3: #ffffff;
        background: #1a365d !important;
        background-color: #1a365d !important;
    }

    .ast-mobile-header-content {
        padding: 8px 0 16px !important;
        border-top: 3px solid var(--elmar-secondary);
        box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    }

    /* Ссылки меню — максимальная специфичность + переопределение переменных */
    body .ast-mobile-header-content .menu-link,
    body .ast-mobile-header-content a.menu-link,
    body .ast-builder-menu-mobile .main-navigation .main-header-menu .menu-item > .menu-link,
    body .ast-mobile-header-content .main-header-menu .menu-item > .menu-link,
    body .ast-mobile-header-content .main-header-menu a,
    body .ast-builder-menu-mobile .main-header-menu a {
        color: #ffffff !important;
        font-size: 1rem !important;
        font-family: var(--elmar-font-heading) !important;
        font-weight: 600 !important;
        padding: 13px 24px !important;
        line-height: 1.4 !important;
        letter-spacing: 0.5px;
        transition: all 0.2s ease;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        opacity: 1 !important;
    }

    body .ast-mobile-header-content .main-header-menu li:last-child a,
    body .ast-mobile-header-content .main-header-menu li:last-child > .menu-link {
        border-bottom: none !important;
    }

    /* Hover + текущая страница */
    body .ast-builder-menu-mobile .main-navigation .main-header-menu .menu-item > .menu-link:hover,
    body .ast-builder-menu-mobile .main-navigation .main-header-menu .current-menu-item > .menu-link,
    body .ast-mobile-header-content .main-header-menu .menu-item > .menu-link:hover,
    body .ast-mobile-header-content .main-header-menu .current-menu-item > .menu-link,
    body .ast-mobile-header-content .main-header-menu a:hover,
    body .ast-mobile-header-content .main-header-menu .current-menu-item > a {
        color: var(--elmar-secondary) !important;
        background: rgba(255,255,255,0.08) !important;
        padding-left: 30px !important;
    }

    /* Иконка-гамбургер */
    .ast-mobile-menu-trigger-minimal {
        border: 2px solid var(--elmar-primary) !important;
        border-radius: 8px !important;
        padding: 6px 8px !important;
        transition: all 0.2s ease;
    }

    .ast-mobile-menu-trigger-minimal:hover,
    .ast-mobile-menu-trigger-minimal:focus {
        border-color: var(--elmar-secondary) !important;
    }

    .ast-mobile-menu-trigger-minimal svg {
        fill: var(--elmar-primary) !important;
    }

    /* Убрать дефолтные отступы Astra */
    .ast-mobile-header-content .ast-builder-menu-mobile .main-header-bar-navigation {
        padding: 0 !important;
    }
}

/* ==========================================================================
   РЕСПОНСИВ
   ========================================================================== */

/* Планшет */
@media (max-width: 1024px) {
    .elmar-hero {
        padding: 70px 20px 60px;
    }
    .elmar-hero h1 {
        font-size: 2.4rem;
    }
    .elmar-about-grid {
        grid-template-columns: 180px 1fr;
        gap: 32px;
    }
    .elmar-about-img {
        width: 180px;
        height: 180px;
    }
    .elmar-features {
        grid-template-columns: repeat(2, 1fr);
    }
    .elmar-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .elmar-cards .elmar-card:last-child {
        grid-column: 1 / -1;
        max-width: 400px;
        margin: 0 auto;
    }
    .elmar-stats {
        gap: 32px;
    }
    .elmar-section h2 {
        font-size: 1.9rem;
    }
}

/* Мобильный */
@media (max-width: 600px) {
    .elmar-hero {
        padding: 60px 16px 50px;
    }
    .elmar-hero h1 {
        font-size: 1.8rem;
    }
    .elmar-hero p {
        font-size: 1rem;
    }
    .elmar-hero-badge {
        font-size: 0.75rem;
    }
    .elmar-about-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }
    .elmar-about-photo {
        position: static;
        display: flex;
        justify-content: center;
    }
    .elmar-about-img {
        width: 160px;
        height: 160px;
    }
    .elmar-about-directions {
        text-align: left;
    }
    .elmar-stats {
        justify-content: center;
    }
    .elmar-section {
        padding: 50px 0;
    }
    .elmar-section h2 {
        font-size: 1.6rem;
    }
    .elmar-features {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .elmar-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .elmar-cards .elmar-card:last-child {
        max-width: none;
    }
    .elmar-stats {
        gap: 24px;
    }
    .elmar-stat-num {
        font-size: 2rem;
    }
    .elmar-cta {
        padding: 50px 16px;
    }
    .elmar-cta h2 {
        font-size: 1.6rem;
    }
    .elmar-hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    .elmar-btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
    .elmar-whatsapp-float {
        bottom: 16px;
        right: 16px;
        width: 52px;
        height: 52px;
    }
}

/* Маленький мобильный */
@media (max-width: 360px) {
    .elmar-hero h1 {
        font-size: 1.5rem;
    }
    .elmar-stat-num {
        font-size: 1.7rem;
    }
}
