/*!
Theme Name:  Page Builder Framework - Child
Template: page-builder-framework
*/

/* =========== ДИЗАЙН СИСТЕМА =========== */

:root {
    /* ЦВЕТ */
    --color-primary: #00923f;
    --color-bg-soft: #d8ece0;
    --color-bg-muted: #f2faf5;
    --color-bg-light: #f5f7f8;
    --color-text: #3e4349;
    --color-text-secondary: #4b5563;
    --color-text-muted: #6b7280;
    --color-text-soft: #8b949e;
    --color-white: #fff;
    --color-border: rgba(0,0,0,.05);
    --color-border-soft: rgba(0,0,0,.04);

    --accent-color: var(--color-primary);

    /* ТИПОГРАФИКА */
    --font-size-body: 16px;
    --font-size-small: 14px;
    --font-size-xs: 12px;
    --font-size-section-title: 28px;
    --font-size-subtitle: 20px;
    --font-size-card-title: 18px;
    --font-size-button: 16px;

    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    --line-height-body: 1.6;
    --line-height-tight: 1.3;
    --line-height-normal: 1.4;
    --line-height-relaxed: 1.7;

    /* КОНТЕЙНЕРЫ */
    --container: 1100px;
    --container-small: 900px;

    /* Spacing — 8px base */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 32px;
    --space-5: 40px;
    --space-6: 48px;
    --space-7: 56px;
    --space-8: 64px;

    --section-space: 60px;
    --section-space-mobile: 40px;
    --section-padding: 40px;
    --section-padding-mobile: 24px;

    /* РАДИУСЫ */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-pill: 999px;

    /* ТЕНИ */
    --shadow-soft: 0 10px 40px rgba(0,0,0,.06);
    --shadow-card: 0 6px 20px rgba(0,0,0,.05);
    --shadow-hover: 0 15px 35px rgba(0,0,0,.10);
    --shadow-button: 0 4px 12px rgba(0,146,63,.25);
    --shadow-button-hover: 0 6px 16px rgba(0,146,63,.25);

    /* Motion */
    --transition-fast: .2s ease;
    --transition-base: .3s ease;
    --transition-slow: .4s ease;

    /* Shine effects */
    --shine-duration: 8s;
    --shine-hover-duration: .7s;
}

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

body {
    color: var(--color-text);
    font-size: var(--font-size-body);
    line-height: var(--line-height-body);
}

html {
    scroll-behavior: smooth;
}

p {
	margin-bottom: 0;
}

#schedule {
    scroll-margin-top: 100px;
}

#map {
    scroll-margin-top: 100px;
}

/* =========== КОНТЕЙНЕРЫ И КАРТОЧКИ =========== */

.card-section {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: var(--section-padding);
    box-shadow: var(--shadow-soft);
}

.section-container {
    max-width: var(--container);
    margin: 0 auto;
}

/* =========== ТИПОГРАФИКА =========== */

.section-title {
    margin: 0 0 var(--space-3);
    font-size: var(--font-size-section-title);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--color-text);
}

.section-subtitle {
    margin: 0 0 var(--space-2);
    font-size: var(--font-size-subtitle);
    font-weight: var(--font-weight-semibold);
    line-height: 1.35;
    color: var(--color-text-muted);
}

/* Home page: keep SiteOrigin headings visually inside the same hierarchy. */
body.home .sow-headline {
    color: var(--color-text);
    line-height: var(--line-height-tight);
}

body.home .sow-headline-container h2,
body.home .sow-headline-container h3 {
    color: inherit;
    line-height: inherit;
}

/* =========== УТИЛИТЫ =========== */

.notonmobile { display: initial !important; }

.mobileonly { display: none !important; }

@media (max-width: 768px) {
    .notonmobile { display: none !important; }
    .mobileonly { display: initial !important; }
}

/* =========== ФУТЕР =========== */

.custom-footer {
    background: var(--color-bg-soft);
    color: var(--color-primary);
    width: 100%;
    position: relative;
    z-index: 10;
}

.custom-footer-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-6) var(--space-2);
}

.custom-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.footer-column { min-width: 0; }

/* ССЫЛКИ */

.custom-footer a {
    position: relative;
    display: inline-block;
    color: var(--color-text);
}

.custom-footer a::after,
.custom-footer a::before {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform 0.35s ease;
}

.custom-footer a::after {
    bottom: -1px;
    transform-origin: right;
}

.custom-footer a::before {
    top: -1px;
    transform-origin: left;
}

.custom-footer a:hover::after,
.custom-footer a:hover::before {
    transform: scaleX(1);
}

/* КОПИРАЙТ */

.custom-footer-copyright {
    background: var(--color-white);
    color: #666;
    font-size: var(--font-size-small);
}

.custom-footer-copyright-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: var(--space-1) var(--space-2);
}

@media (max-width: 768px) {
    .custom-footer-grid {
        grid-template-columns: 1fr;
    }
}

/* =========== КАРТОЧКИ ВРАЧЕЙ =========== */

.doctor-card {
    cursor: pointer;
    display: block;
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: var(--space-2);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.doctor-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft);
}

.doctor-photo {
    position: relative;
    height: 260px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}

.doctor-photo img {
    max-height: 100%;
    transition: transform var(--transition-slow), filter var(--transition-base);
	border-radius: var(--radius-md);
}

.doctor-card:hover .doctor-photo img {
    transform: scale(1.03);
    filter: brightness(0.95);
}

.doctor-name {
    height: 42px;
    margin-top: 12px;
    font-size: var(--font-size-body);
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doctor-role {
    margin-top: 10px;
    padding: var(--space-1) var(--space-2);
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    font-size: var(--font-size-small);
    display: inline-block;
}

.sow-carousel-item {
    display: flex;
    justify-content: center;
}

/* "Подробнее" */

.doctor-more {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: var(--space-1);
    color: var(--color-text);
    font-size: var(--font-size-small);
    font-weight: var(--font-weight-medium);
    background: linear-gradient(to top, var(--color-bg-soft), var(--color-white));
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-base);
}

.doctor-card:hover .doctor-more {
    opacity: 1;
    transform: translateY(0);
}

/* =========== БЛОК ВРАЧЕЙ =========== */

.doctors-section {
    background: var(--color-bg-soft);
    border-radius: var(--radius-lg);
    padding: var(--space-5) var(--space-6);
}

/* =========== ОТЗЫВЫ =========== */

.reviews-block {
    max-width: var(--container-small);
    margin: auto;
    text-align: center;
}

.reviews-widget-wrapper {
    display: flex;
    justify-content: center;
    padding: 0 var(--space-2);
}

.reviews-widget {
    width: 100%;
    max-width: 560px;
    height: 800px;
    position: relative;
}

.reviews-widget iframe {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-md);
}

.reviews-link {
    display: block;
    margin-top: 0;
    font-size: var(--font-size-small);
    line-height: 1.4;
	padding-bottom: 8px;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* =========== GENERIC КНОПКА =========== */

.btn {
    position: relative;
    display: block;
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 0 0 1em 1em;
    cursor: pointer;
    overflow: hidden;
}

/* Continuous shine — intentionally separate from hover shine. */
.btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 100%;
    height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255,255,255,.25), transparent);
    filter: blur(6px);
    animation: shine-continuous var(--shine-duration) infinite;
    pointer-events: none;
}

/* Hover shine — intentionally separate from continuous shine. */
.btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 100%;
    height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255,255,255,.4), transparent);
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    filter: blur(4px);
    transition: opacity var(--transition-fast);
}

.btn:hover::before {
    opacity: 1;
    animation: shine-hover var(--shine-hover-duration) ease forwards;
}

/* =========== АНИМАЦИЯ ПОДЧЕРКИВАНИЯ =========== */

.hover-underline {
    position: relative;
    color: var(--color-white);
    display: inline-block;
}

.hover-underline::before,
.hover-underline::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-white);
    transform: scaleX(0);
    transition: transform 0.35s ease;
}

.hover-underline::before {
    top: 0;
    transform-origin: left;
}

.hover-underline::after {
    bottom: 0;
    transform-origin: right;
}

.hover-underline:hover::before,
.hover-underline:hover::after {
    transform: scaleX(1);
    transition-delay: 0.05s;
}

/* =========== ЛИПКАЯ ШАПКА =========== */

.wpbf-page-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--color-white);
    transition: box-shadow var(--transition-base), background var(--transition-base);
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
}

/* =========== КНОПКИ ЗАПИСИ =========== */

.cta-row {
    max-width: var(--container-small);
    margin: 0 auto;
    padding-top: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.cta-row a {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    will-change: transform;
    backface-visibility: hidden;
    padding: 12px 16px;
    font-size: var(--font-size-button);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-tight);
    border-radius: var(--radius-md);
    background: var(--color-bg-light);
    color: #2f3a34;
    transition: all var(--transition-fast);
}

.cta-row a:hover {
    background: var(--color-bg-soft);
    color: var(--color-primary);
    transform: translateY(-2px) scale(1.01);
}

.cta-row a:first-child {
    background: var(--color-primary);
    color: var(--color-white);
    box-shadow: var(--shadow-button);
}

/* Continuous shine */
.cta-row a:first-child::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 100%;
    height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255,255,255,.25), transparent);
    filter: blur(6px);
    animation: shine-continuous var(--shine-duration) infinite;
    pointer-events: none;
}

/* Hover shine */
.cta-row a:first-child::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 100%;
    height: 100%;
    background: linear-gradient(110deg, transparent, rgba(255,255,255,.5), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.cta-row a:first-child:hover::before {
    opacity: 1;
    animation: shine-hover var(--shine-hover-duration) ease forwards;
}

.cta-wrapper {
    background: var(--color-white);
    border-radius: var(--radius-md);
    border-top: 1px solid var(--color-border-soft);
    box-shadow: 0 -10px 20px rgba(0,0,0,.04), 0 10px 30px rgba(0,0,0,.06);
    padding: var(--space-3) var(--space-3) 20px;
    max-width: none;
    width: 100%;
    margin: 0;
    position: relative;
    z-index: 2;
}

.cta-title {
    text-align: center;
    font-size: var(--font-size-card-title);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    margin: 0 0 18px;
    color: var(--color-text-soft);
    letter-spacing: .3px;
}

/* =========== ГАСТРОЭНТЕРОЛОГИ В ПЕРМИ =========== */

.about-left {
    padding-right: var(--space-4);
}

.about-left h3 {
    font-size: 24px;
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    margin: 0 0 var(--space-1);
}

.about-left p {
    margin-bottom: var(--space-2);
    line-height: var(--line-height-body);
    color: var(--color-text-secondary);
}

.about-left .wpb_text_column + .wpb_text_column {
    margin-top: 20px;
}

.section_header em {
    color: var(--color-text-muted);
    font-style: normal;
}

.about-right {
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 24px rgba(0,0,0,.06);
    padding: var(--space-2);
}

.about-right img {
    width: 100%;
    height: auto;
    max-height: 260px;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
    margin-bottom: 12px;
}

.about-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.about-buttons a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    font-size: var(--font-size-button);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid rgba(0,146,63,.3);
}

.btn-outline:hover {
    background: var(--color-bg-soft);
    transform: translateY(-1px);
    color: var(--color-primary);
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-button-hover);
    color: var(--color-white);
}

/* =========== ДОКАЗАТЕЛЬНАЯ МЕДИЦИНА =========== */

.evidence-block .panel-grid-cell {
	padding-top: 0;
    padding-left: 10px;
    padding-right: 10px;
}

.evidence-list {
    list-style: none;
    padding: 0;
    margin: var(--space-2) auto var(--space-2);
    display: table;
    text-align: left;
}

.evidence-list li {
    position: relative;
    padding-left: 30px;
    margin-bottom: var(--space-1);
    line-height: var(--line-height-normal);
}

.evidence-list li:last-child {
    margin-bottom: 0;
}

.evidence-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
    font-weight: var(--font-weight-bold);
}

.evidence-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
}

.evidence-card {
    background: var(--color-white);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.evidence-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.evidence-card img {
    display: block;
    width: 100%;
    max-width: 140px;
    height: auto;
    margin: 0 auto var(--space-2);
}

.evidence-card span {
    display: block;
    font-size: var(--font-size-card-title);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
}

.evidence-content .siteorigin-widget-tinymce {
    background: var(--color-bg-soft);
    padding: var(--space-3);
    border-radius: var(--radius-md);
}

/* =========== ДМС =========== */

.dms-note {
    max-width: var(--container-small);
    margin: 0 auto;
    padding: 15px 20px;
    background: var(--color-bg-soft);
    text-align: center;
}

.dms-note-top {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    margin-bottom: 0;
}

.dms-note-bottom {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    margin-top: 0;
}

.dms-logos {
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg-muted);
    margin: 0 auto;
}

.logo-slider {
    margin: 0;
}

.dms-companies-title {
    margin: var(--space-2) 0 var(--space-2);
    text-align: center;
    font-size: 22px;
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
}

.logo-slider .swiper-wrapper {
    align-items: center;
    transition-timing-function: linear !important;
}

.logo-slider .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
}

.logo-slider img {
    height: 130px;
    object-fit: contain;
    opacity: .8;
    filter: grayscale(100%);
    transition: opacity var(--transition-base), filter var(--transition-base);
}

.logo-slider img:hover {
    opacity: 1;
    filter: grayscale(0);
}

.section-container .panel-grid-cell > .so-panel:has(.dms-note-top),
.section-container .panel-grid-cell > .so-panel:has(.dms-logos),
.section-container .panel-grid-cell > .so-panel:has(.dms-note-bottom) {
    margin-bottom: 0;
}

/* =========== КАРТА И РАСПИСАНИЕ =========== */

.map-card iframe {
    width: 100% !important;
    border: 0;
    border-radius: var(--radius-md);
}

.schedule-address + .schedule-address {
    margin-top: var(--space-5);
}

.schedule-address {
    padding: 18px 20px;
    background: var(--color-bg-soft);
    border-radius: var(--radius-sm);
    line-height: 1.5;
}

.schedule-address strong {
    display: block;
    margin-bottom: var(--space-1);
    font-size: var(--font-size-card-title);
    font-weight: var(--font-weight-bold);
    color: var(--accent-color);
}

.schedule-card h2 {
    font-size: 24px;
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-normal);
    margin: 0 0 var(--space-5);
}

/* =========== ANIMATION KEYFRAMES =========== */

@keyframes shine-continuous {
    0% { left: -120%; }
    10% { left: 120%; }
    100% { left: 120%; }
}

@keyframes shine-hover {
    0% { left: -120%; }
    100% { left: 120%; }
}

/* =========== MOBILE =========== */

@media (max-width: 768px) {

    .card-section {
        padding: var(--section-padding-mobile);
    }

    .section-title {
        font-size: 24px;
        margin-bottom: var(--space-2);
    }

    .section-subtitle {
        font-size: 18px;
    }

    .custom-footer-inner {
        padding: var(--space-5) var(--space-2);
    }

    .reviews-block {
        margin: var(--section-space-mobile) auto;
        padding: var(--space-3) var(--space-2);
    }

    .reviews-widget-wrapper {
        padding: 0;
    }

    .reviews-widget {
        max-width: 100%;
        height: 720px;
    }

    .cta-wrapper {
        padding: 20px 15px 16px;
		width: auto;
        margin: 0 15px;
        box-sizing: border-box;
    }

    .cta-row {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-1);
    }

    .cta-row a {
        font-size: var(--font-size-small);
        padding: 12px 10px;
    }

    .about-block {
        padding: var(--section-padding-mobile) 20px;
    }

    .about-left {
        padding-right: 0;
    }

    .about-right {
        margin-top: 20px;
        padding: 14px;
    }

    .about-left h3 {
        font-size: 20px;
    }

    .about-buttons a {
        font-size: 15px;
        padding: 12px;
    }

    .evidence-block {
        padding: 15px;
    }

    .evidence-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .evidence-card:last-child {
        grid-column: 1 / -1;
        max-width: 180px;
        margin: 0 auto;
    }

    .evidence-card {
        padding: 15px;
    }

    .evidence-card img {
        max-width: 80px;
        margin-bottom: 10px;
    }

    .evidence-card span {
        font-size: var(--font-size-small);
    }

    .evidence-content {
        text-align: center;
        margin-top: 20px;
    }

    .evidence-content p {
        margin-bottom: 0;
    }

    .evidence-block .panel-grid-cell {
        padding-left: 0;
        padding-right: 0;
    }

    .dms-note {
        margin: 0 auto;
        padding: 14px 18px;
    }

    .dms-companies-title {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .logo-slider img {
        height: 60px;
    }

    .schedule-card,
    .map-card {
        padding: 20px;
        border-radius: var(--radius-md);
        text-align: center;
    }

    .schedule-card h2 {
        font-size: 18px;
        font-weight: var(--font-weight-bold);
        line-height: var(--line-height-tight);
    }

    .schedule-address {
        font-size: 15px;
        line-height: 1.7;
        padding: 16px;
    }

    .schedule-address strong {
        margin-bottom: var(--space-1);
        font-size: 17px;
    }

    .schedule-address + .schedule-address {
        margin-top: 20px;
        padding-top: 20px;
    }

    .map-card iframe {
        height: 320px;
    }
}

/* =========== REDUCED MOTION
   Keep layout/interaction intact, only disable decorative motion. =========== */

@media (prefers-reduced-motion: reduce) {
    .btn::after,
    .cta-row a:first-child::after {
        animation: none;
    }

    .btn,
    .btn::before,
    .cta-row a,
    .doctor-card,
    .doctor-photo img,
    .doctor-more,
    .evidence-card,
    .about-buttons a,
    .logo-slider img,
    .hover-underline::before,
    .hover-underline::after {
        transition-duration: .01ms !important;
    }
}
