/* Медицинский сайт - CSS */

/* Переменные */
:root {
    --primary-color: #498f9b;
    --secondary-color: #3a7482;
    --dark-color: #2c3e50;
    --light-gray: #F5F5F5;
    --medium-gray: #e9ecef;
    --text-color: #495057;
    --text-light: #6c757d;
    --border-color: #dee2e6;
    --success-color: #28a745;
    --error-color: #dc3545;
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    --radius-tag: 6px;
    --radius-card: 8px;
    --radius-pill: 50px;
    --accent-color: #FFE9BE;
    --accent-hover: #F2A93B;
    --accent-text: #412402;
    --font-heading: 'PT Serif', Georgia, 'Times New Roman', serif;
}

/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Плавная прокрутка страницы */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    overflow-x: hidden;
}

/* Плавная инерционная прокрутка для webkit браузеров */
body {
    -webkit-overflow-scrolling: touch;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    overflow-y: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Блокировка прокрутки при открытом модальном окне */
html.modal-open,
body.modal-open {
    overflow: hidden;
}

/* Контейнер */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
 


/* Навигация */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo a:hover {
    color: var(--secondary-color);
}

.social-icons {
    display: inline-flex;
    gap: 0.8rem;
    margin-left: 1.2rem;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: var(--primary-color);
    transition: var(--transition);
    background: var(--white);
    border: 2px solid var(--primary-color);
}

.social-link:hover {
    background: var(--primary-color) !important;
    color: var(--white) !important;
    scale: 1.1;
}

.social-link svg {
    width: 22px;
    height: 22px;
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.3rem;
}

.nav-menu a {
    display: inline-block;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-pill);
    z-index: 1;
    transition: var(--transition);
}

.nav-menu a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-color);
    border-radius: var(--radius-pill);
    transform: scale(0.6);
    opacity: 0;
    z-index: -1;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
}

.nav-menu a:hover {
    color: #fff;
}

.nav-menu a:hover::before {
    transform: scale(1);
    opacity: 1;
}

.menu-toggle {
    display: none;
    position: relative;
    width: 25px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    position: absolute;
    left: 0;
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s ease;
    border-radius: 3px;
    transform-origin: center;
}

.menu-toggle span:nth-child(1) {
    top: 0;
}

.menu-toggle span:nth-child(2) {
    top: 9px;
}

.menu-toggle span:nth-child(3) {
    top: 18px;
}

.menu-toggle.active span:nth-child(1) {
    top: 9px;
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    top: 9px;
    transform: rotate(-45deg);
}

/* Hero секция */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(rgba(0, 0, 0, 0.60), rgba(0, 0, 0, 0.60)), url('../images/hero-background.png');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    padding-top: 80px;
    padding-bottom: 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    background-attachment: scroll;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 900px;
    animation: fadeInUp 0.8s ease;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: none;
}

.hero-subtitle {
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 3rem;
    font-weight: 500;
    text-shadow: none;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 9rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: none;
}

.hero-buttons {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.hero-buttons .btn {
    padding: 1.2rem 3rem;
    font-size: 1.8rem;
    border-radius: var(--radius-pill);
}

.hero-buttons .btn-primary {
    background: var(--accent-color);
    color: var(--accent-text);
    border-color: var(--accent-color);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.hero-buttons .btn-primary:hover {
    background: var(--accent-hover);
    color: var(--accent-text);
    border-color: var(--accent-hover);
}

.btn-primary {
    background: var(--accent-color);
    color: var(--accent-text);
    border-color: var(--accent-color);
    box-shadow: 0 8px 20px rgba(44, 62, 80, 0.2);
}

.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* Секции */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Врачи */
.doctors {
    background: var(--white);
}

.doctors .container {
    max-width: 100%;
    padding: 0;
}

.doctors .section-header {
    padding: 0 20px;
}

.doctors-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.doctor-card {
    background: var(--light-gray);
    border-radius: 0;
    transition: var(--transition);
    border: none;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: row;
    position: relative;
    min-height: calc(100vh - var(--navbar-height, 70px));
}

.doctor-card:hover {
    box-shadow: none;
}

.doctor-photo {
    width: 50%;
    min-width: 50%;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0;
    position: relative;
}

.doctor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    border-radius: 0;
}

.doctor-info {
    padding: 2.5rem 3rem 9rem 3.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    justify-content: flex-start;
}

.doctor-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.4rem;
    margin-top: 0;
    line-height: 1.2;
    padding-right: 180px;
    overflow-wrap: break-word;
}

.doctor-position {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.doctor-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
}

.doctor-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: var(--radius-tag);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    background: #fff;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.13);
}

.doctor-badge-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    transition: var(--transition);
}

.doctor-badge-link svg {
    flex-shrink: 0;
    transition: var(--transition);
}

.doctor-badge-link:hover svg {
    transform: translate(2px, -2px);
}

.doctor-badge-link:hover {
    background: var(--accent-color);
    color: var(--accent-text);
    box-shadow: 0 4px 14px rgba(44, 62, 80, 0.55);
}

.doctor-section-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--text-color);
    opacity: 0.5;
    margin: 0 0 0.1rem 0;
    display: block;
}

.doctor-specialty {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0 0 2rem 0;
    line-height: 1.3;
}

.doctor-qualifications {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.doctor-qualifications li {
    padding: 0.75rem 1rem;
    background: #fff;
    font-size: 1.1rem;
    color: var(--dark-color);
    font-weight: 500;
    line-height: 1.4;
    border-radius: var(--radius-card);
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
}

/* Продающие плашки со статистикой */
.doctor-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    position: absolute;
    bottom: 2.5rem;
    right: 2.5rem;
}

.doctor-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--primary-color);
    color: #fff;
    border-radius: var(--radius-card);
    padding: 0.8rem 1.2rem;
    min-width: 110px;
    max-width: 180px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
}

.doctor-stat-num {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.3rem;
    color: #fff;
}

.doctor-stat-label {
    font-size: 0.78rem;
    font-weight: 500;
    line-height: 1.3;
    opacity: 0.92;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Блок с цитатой врача */
.doctor-quote {
    background: rgba(73, 143, 155, 0.50);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-card);
    padding: 1.2rem 1.8rem;
    margin-top: auto;
    position: absolute;
    bottom: 2.5rem;
    right: 2.5rem;
    max-width: 360px;
}

.doctor-quote p {
    color: var(--white);
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 500;
    margin: 0;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Кнопка "О враче" */
.doctor-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-pill);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
    position: absolute;
    top: 2.5rem;
    right: 2.5rem;
    min-width: 130px;
    text-align: center;
    z-index: 5;
}

.doctor-more-btn svg {
    flex-shrink: 0;
    transition: var(--transition);
}

.doctor-more-btn:hover svg {
    transform: translate(2px, -2px);
}

.doctor-more-btn:hover {
    background: var(--accent-color);
    color: var(--accent-text);
    box-shadow: 0 6px 18px rgba(44, 62, 80, 0.6);
}


/* Заболевания */
.diseases {
    background: var(--light-gray);
    padding: 4rem 0;
}

.diseases .section-header {
    margin-bottom: 2.5rem;
}

.diseases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 280px;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.disease-card {
    background: var(--white);
    padding: 1.5rem 1.5rem 5rem 1.5rem;
    border-radius: var(--radius-card);
    text-align: left;
    transition: var(--transition-bounce);
    border: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    cursor: default;
    min-width: 0;
}

/* Большие блоки - яркий бирюзовый */
.disease-card-large {
    grid-column: span 2;
    background: linear-gradient(135deg, #498f9b 0%, #3a7482 100%);
    padding: 2rem 1.8rem 5.5rem 1.8rem;
    color: var(--white);
}

.disease-card-large *:not(.disease-more-btn) {
    color: var(--white) !important;
}

/* Генитальная хирургия - фото слева 55%, текст справа 45% */
.disease-card[data-disease="surgery"] {
    display: grid;
    grid-template-columns: 55% 45%;
    grid-template-rows: auto 1fr auto;
    text-align: left;
    padding: 0;
    position: relative;
    gap: 0;
}

.disease-card[data-disease="surgery"] .disease-photo {
    grid-column: 1;
    grid-row: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
}

.disease-card[data-disease="surgery"] .disease-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom;
}

.disease-card[data-disease="surgery"] h3 {
    grid-column: 2;
    grid-row: 1;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    align-self: start;
}

.disease-card[data-disease="surgery"] p {
    grid-column: 2;
    grid-row: 2;
    padding: 0 1.5rem;
    align-self: start;
}

.disease-card[data-disease="surgery"] .disease-more-btn {
    grid-column: 2;
    grid-row: 3;
    margin: 0 1.5rem 1.5rem 1.5rem;
    position: static;
    justify-self: end;
    align-self: end;
}

/* Отдельные цвета для каждого блока */
.disease-card[data-disease="menshealth"] {
    background: linear-gradient(135deg, #a8dadc 0%, #9acfd1 100%);
}

.disease-card[data-disease="varicocele"] {
    background: linear-gradient(135deg, #b8e6e8 0%, #a3dfe2 100%);
}

.disease-card[data-disease="diagnostics"] {
    background: linear-gradient(135deg, #c8f0f2 0%, #b5eaec 100%);
}

.disease-card[data-disease="urolithiasis"] {
    background: linear-gradient(135deg, #d4f4f6 0%, #c5eff1 100%);
}

.disease-card h3 {
    font-size: 1.32rem;
    color: var(--dark-color);
    margin-bottom: 0.6rem;
    font-weight: 700;
    line-height: 1.3;
}

.disease-card-large h3 {
    font-size: 1.32rem;
    margin-bottom: 0.8rem;
}

.disease-card p {
    color: var(--text-color);
    font-size: 1.04rem;
    line-height: 1.6;
    margin-bottom: 0;
    overflow-wrap: break-word;
}

.disease-card-large p {
    font-size: 1.04rem;
    line-height: 1.7;
}

.disease-more-btn {
    display: none;
    text-decoration: none;
    background: var(--accent-color);
    color: var(--accent-text);
    border: none;
    padding: 0.65rem 1.3rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    min-width: 110px;
    text-align: center;
}

.disease-more-btn:hover {
    background: var(--accent-hover);
    color: var(--accent-text);
    box-shadow: 0 4px 14px rgba(44, 62, 80, 0.55);
}

/* Кнопка для больших блоков */
.disease-card-large .disease-more-btn {
    bottom: 2rem;
    right: 1.8rem;
}

/* Слинговые операции - текст слева 45%, фото справа 55% */
.disease-card[data-disease="incontinence"] {
    display: grid;
    grid-template-columns: 45% 55%;
    grid-template-rows: auto 1fr auto;
    text-align: left;
    padding: 0;
    position: relative;
    gap: 0;
}

.disease-card[data-disease="incontinence"] h3 {
    grid-column: 1;
    grid-row: 1;
    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
    font-size: 1.32rem;
    margin-bottom: 0;
    line-height: 1.2;
    align-self: start;
}

.disease-card[data-disease="incontinence"] p {
    grid-column: 1;
    grid-row: 2;
    padding: 0 1.5rem;
    font-size: 1.04rem;
    line-height: 1.5;
    margin-bottom: 0;
    align-self: start;
}

.disease-card[data-disease="incontinence"] .disease-photo {
    grid-column: 2;
    grid-row: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
}

.disease-card[data-disease="incontinence"] .disease-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom;
}

.disease-card[data-disease="incontinence"] .disease-more-btn {
    grid-column: 1;
    grid-row: 3;
    margin: 0 1.5rem 1.5rem 1.5rem;
    position: static;
    justify-self: start;
    align-self: end;
}

/* Научная деятельность */
.science {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 4rem 0;
}

.science .section-title {
    color: var(--white);
}

.science .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.science-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-card);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.science-icon {
    flex-shrink: 0;
    color: var(--white);
    animation: fadeInUp 0.8s ease;
}

.science-icon svg {
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.science-text {
    flex: 1;
}

.science-text p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--white);
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.science-text strong {
    font-weight: 700;
    color: var(--white);
    border-bottom: 2px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 2px;
}

/* Отзывы пациентов */
.reviews {
    background: var(--white);
}

.reviews-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-top: 2rem;
}

.reviews-doctor-header {
    margin-bottom: 1.5rem;
}

.reviews-doctor-header h3 {
    font-size: 1.3rem;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.review-stars {
    color: #f5a623;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

.review-card {
    background: var(--light-gray);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.review-text {
    color: var(--text-color);
    font-size: 1.04rem;
    line-height: 1.6;
}

.review-meta {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
}

.reviews-more-link {
    margin-top: 0.5rem;
}

@media (max-width: 767px) {
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Запись на прием */
.appointment {
    background: var(--light-gray);
}

.appointment-buttons {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.contact-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: var(--radius-card);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
}

.contact-btn svg,
.contact-btn img {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: var(--transition);
}

.contact-btn:hover svg,
.contact-btn:hover img {
    transform: scale(1.15);
}

.contact-btn span {
    display: none;
}

.contact-btn.phone-btn {
    width: calc(120px * 3 + 2rem * 2);
    height: 120px;
    padding: 0;
    flex-direction: row;
    gap: 0.6rem;
    justify-self: center;
    margin-bottom: 1rem;
}

.contact-btn.phone-btn span {
    display: inline;
    position: relative;
    z-index: 1;
    text-align: center;
    line-height: 1.3;
    font-size: 1.5rem;
}

.phone-btn {
    background: linear-gradient(135deg, #4a9b5a, #3a8a4a);
    color: var(--white);
    border-color: #4a9b5a;
}

.phone-btn:hover {
    background: linear-gradient(135deg, #3a8a4a, #2d7a3d);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(74, 155, 90, 0.3);
}

.telegram-btn {
    background: linear-gradient(135deg, #0088cc, #00a0e9);
    color: var(--white);
    border-color: #0088cc;
}

.telegram-btn:hover {
    background: linear-gradient(135deg, #006699, #0088cc);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(0, 136, 204, 0.3);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366, #20ba5a);
    color: var(--white);
    border-color: #25D366;
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #1fa855, #25D366);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(37, 211, 102, 0.3);
}

.email-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-color: var(--primary-color);
}

.email-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color), #2563a8);
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(74, 144, 226, 0.3);
}

.appointment-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

.appointment-addresses {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.address-card {
    display: flex;
    gap: 1rem;
    padding: 1.2rem;
    background: var(--white);
    border-radius: var(--radius-card);
    border: 1px solid var(--border-color);
    flex: 1;
    align-items: center;
    transition: var(--transition);
}

.address-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(73, 143, 155, 0.15);
}

.address-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
}

.address-info h3 {
    color: var(--dark-color);
    margin-bottom: 0.3rem;
    font-size: 1rem;
    font-weight: 600;
}

.address-info p {
    color: var(--text-color);
    margin-bottom: 0.15rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.appointment-map {
    background: var(--light-gray);
    border-radius: var(--radius-card);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.appointment-map a {
    display: block;
    width: 100%;
    height: 100%;
}

.appointment-map .map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-card);
    transition: var(--transition);
}

.appointment-map .map-image:hover {
    opacity: 0.85;
}

/* Клиника — full-width карта с карточкой поверх */
.clinic-location {
    position: relative;
    width: 100%;
    height: 480px;
    isolation: isolate;
}

.clinic-map {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 480px;
}

#clinicMap {
    width: 100%;
    height: 480px;
}

.clinic-card {
    position: absolute;
    top: 0; right: 8%;
    width: 360px;
    height: 480px;
    z-index: 1000;
    overflow: hidden;
    background: var(--dark-color);
    color: #fff;
}

.clinic-card__name {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.4rem;
}

.clinic-card__prop-name {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.5);
    margin-bottom: 0.25rem;
}

.clinic-card__prop {
    font-size: 0.98rem;
    color: rgba(255,255,255,0.85);
    line-height: 1.5;
}

.clinic-card__phone {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: var(--transition);
}

.clinic-card__phone:hover {
    color: #fff;
}

.clinic-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding: 0.7rem 1.4rem;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius-pill);
    font-size: 0.95rem;
    font-weight: 600;
    width: fit-content;
    transition: var(--transition);
}

.clinic-card__link:hover {
    background: var(--secondary-color);
}

.clinic-swiper {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 400px;
    overflow: hidden;
}

.clinic-swiper .swiper-wrapper {
    height: 100%;
    padding: 0;
}

.clinic-swiper .swiper-slide {
    height: 100% !important;
    width: 100% !important;
    border-radius: 0;
    box-shadow: none;
    background: var(--dark-color);
}

.clinic-slide {
    display: flex !important;
    flex-direction: column;
    gap: 0.6rem;
    height: 100% !important;
    box-sizing: border-box;
    padding: 1.4rem 2rem 1rem;
}

.clinic-swiper-nav {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 80px;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
}

.clinic-swiper-pagination {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.clinic-swiper-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: rgba(255,255,255,0.35);
    border-radius: 50%;
    opacity: 1;
    transition: var(--transition);
}

.clinic-swiper-pagination .swiper-pagination-bullet-active {
    background: #fff;
}

.carousel-nav-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    flex-shrink: 0;
}

.carousel-nav-btn:hover {
    background: var(--accent-hover);
    color: var(--accent-text);
    box-shadow: 0 4px 14px rgba(44, 62, 80, 0.5);
}

.appointment-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.2rem;
    border-radius: var(--radius-card);
    margin-top: 1.5rem;
}

.appointment-note p {
    color: #856404;
    font-size: 0.95rem;
    margin: 0;
}

/* Контакты (устаревшие стили для обратной совместимости) */
.map-placeholder p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.map-placeholder small {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Футер */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 1.5rem 0;
    transform: translateZ(0);
    isolation: isolate;
}

.footer .container {
    max-width: 1400px;
}

.footer-disclaimer {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    text-align: center;
    margin: 0 0 0.5rem;
    line-height: 1.6;
    letter-spacing: 0.02em;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.8rem;
    text-align: center;
    margin: 0;
}

/* ============================================
   Swiper карусель с эффектом Coverflow
   ============================================ */
.gallery {
   background: linear-gradient(135deg, #2d5f6a 0%, #1e3f48 100%);
    padding: 80px 0 100px;
    overflow: hidden;
}

.gallery .section-header {
    margin-bottom: 2rem;
}

.gallery .section-title {
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Контейнер Swiper - на всю ширину */
#carousel {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 20px 0 80px;
}

.swiper-wrapper {
    padding: 40px 0;
}

/* Стили слайдов */
.swiper-slide {
    width: 400px;
    height: auto;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.6s ease, filter 0.5s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* Активный слайд */
.swiper-slide-active {
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
}

/* Изображения - квадратные */
.swiper-slide img {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    object-fit: cover;
}

/* Подписи к фото */
.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    padding: 2rem 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    pointer-events: none;
}

.swiper-slide-active .carousel-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Пагинация */
.swiper-pagination {
    bottom: 20px !important;
}

.carousel-nav-prev,
.carousel-nav-next {
    position: absolute;
    bottom: 8px;
    z-index: 10;
}

.carousel-nav-prev {
    right: calc(50% + 90px);
}

.carousel-nav-next {
    left: calc(50% + 90px);
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
    transition: var(--transition);
}

.swiper-pagination-bullet:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
}

.swiper-pagination-bullet-active {
    background: var(--accent-color);
    width: 35px;
    border-radius: var(--radius-pill);
}

/* Модальные окна для заболеваний и врачей */
.doctor-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 2000;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
}

.doctor-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    opacity: 1;
}

.doctor-modal.closing {
    background: rgba(0, 0, 0, 0);
    opacity: 0;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-card);
    max-width: 1000px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin: auto;
    transform: scale(0.7) translateY(-20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.doctor-modal.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.doctor-modal.closing .modal-content {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--white);
    border: 2px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--text-color);
    z-index: 10;
    line-height: 1;
}

.modal-close:hover {
    color: #FFD500;
    transform: rotate(90deg) scale(1.1);
}

.modal-close:active {
    transform: rotate(90deg) scale(0.95);
}

.modal-body {
    display: flex;
    flex-direction: row;
    overflow: hidden;
    border-radius: var(--radius-card);
}

.modal-image {
    width: 40%;
    min-height: 500px;
    background: var(--light-gray);
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-card) 0 0 var(--radius-card);
    overflow: hidden;
}

.doctor-modal.active .modal-image {
    opacity: 1;
    transform: translateX(0);
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: var(--radius-card) 0 0 var(--radius-card);
}

.modal-text {
    width: 60%;
    padding: 3rem;
    overflow-y: auto;
    max-height: 80vh;
    scroll-behavior: smooth;
    border-radius: 0 var(--radius-card) var(--radius-card) 0;
}

/* Кастомный scrollbar для модального окна */
.modal-text::-webkit-scrollbar {
    width: 8px;
}

.modal-text::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: var(--radius-card);
}

.modal-text::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: var(--radius-card);
    transition: var(--transition);
}

.modal-text::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

.modal-text h2 {
    color: var(--dark-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--primary-color);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
}

.doctor-modal .modal-section {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-section h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.modal-section p {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 0.8rem;
}

.modal-section ul {
    list-style: none;
    padding: 0;
}

.modal-section ul li {
    padding: 0.5rem 0;
    padding-left: 1.8rem;
    position: relative;
    color: var(--text-color);
    line-height: 1.6;
}

.modal-section ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Стили для модальных окон врачей */
.doctor-modal .modal-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
    color: var(--white) !important;
}

.doctor-modal .modal-text * {
    color: rgba(255, 255, 255, 0.95);
}

.doctor-modal .modal-text h2 {
    color: var(--white) !important;
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
}

.doctor-modal .modal-text .doctor-position {
    color: rgba(255, 255, 255, 0.9) !important;
}

.doctor-modal .modal-section h3 {
    color: var(--white) !important;
}

.doctor-modal .modal-section h4 {
    color: var(--white) !important;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.doctor-modal .modal-section p {
    color: rgba(255, 255, 255, 0.95) !important;
}

.doctor-modal .modal-section ul li {
    color: rgba(255, 255, 255, 0.9) !important;
}

.doctor-modal .modal-section ul li::before {
    color: rgba(255, 255, 255, 0.8) !important;
}

.doctor-modal .modal-section strong {
    color: var(--white) !important;
    font-weight: 700;
}

.doctor-modal .modal-section br {
    content: "";
}

.doctor-modal .modal-section a {
    color: rgba(255, 255, 255, 0.95) !important;
    text-decoration: underline;
}

.doctor-modal .modal-text::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
}

.doctor-modal .modal-text::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.doctor-modal.active .modal-text h2 {
    opacity: 1;
    transform: translateY(0);
}

.doctor-modal.active .modal-section:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.doctor-modal.active .modal-section:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.doctor-modal.active .modal-section:nth-child(4) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.doctor-modal.active .modal-section:nth-child(5) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 1024px) {
    .hero {
        background-attachment: scroll;
    }

    .hero::before {
        background-attachment: scroll;
    }

    .science-content {
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1.5rem;
    }

    .science-icon svg {
        width: 60px;
        height: 60px;
    }

    .science-text p {
        font-size: 1.05rem;
        text-align: center;
    }

    .diseases {
        padding: 3.5rem 0;
    }

    .diseases-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.2rem;
    }

    .disease-card {
        padding: 1.5rem 1.2rem 4.5rem 1.2rem;
        min-height: 200px;
    }

    .disease-card-large {
        grid-column: span 2;
        padding: 1.8rem 1.5rem 5rem 1.5rem;
    }

    .disease-more-btn {
        bottom: 1.2rem;
        right: 1.2rem;
        font-size: 0.8rem;
        padding: 0.6rem 1.1rem;
        min-width: 100px;
    }

    .disease-card-large .disease-more-btn {
        bottom: 1.5rem;
        right: 1.5rem;
    }

    /* Слинговые операции на планшетах - сохраняем layout */
    .disease-card[data-disease="incontinence"] {
        grid-template-columns: 45% 55%;
        padding: 0;
    }

    .disease-card[data-disease="incontinence"] h3 {
        padding: 1.2rem 1.2rem 0.4rem 1.2rem;
        font-size: 1.2rem;
    }

    .disease-card[data-disease="incontinence"] p {
        padding: 0 1.2rem;
        font-size: 0.9rem;
    }

    .disease-card[data-disease="incontinence"] .disease-more-btn {
        margin: 0 1.2rem 1.2rem 1.2rem;
    }

    .appointment-bottom {
        grid-template-columns: 1fr 1fr;
    }

    /* Tablet: вертикальный layout */
    .doctor-card {
        flex-direction: column;
        min-height: auto;
        height: auto;
        border-left: none;
        border-radius: var(--radius-card);
    }

    .doctor-photo {
        width: 100%;
        max-height: 85vw;
        min-width: auto;
        border-radius: var(--radius-card) var(--radius-card) 0 0;
        background: white;
    }

    .doctor-photo img {
        border-radius: var(--radius-card) var(--radius-card) 0 0;
        object-fit: contain;
    }

    .doctor-info {
        border-radius: 0 0 var(--radius-card) var(--radius-card);
        padding: 1.5rem 2rem 2rem;
    }

    .doctor-name {
        margin-top: 0;
        font-size: 1.4rem;
        white-space: normal;
        padding-right: 130px;
    }

    .doctor-more-btn {
        top: 1.5rem;
        right: 1.5rem;
        padding: 0.7rem 1.4rem;
        font-size: 0.9rem;
        min-width: auto;
    }

    .doctor-stats {
        position: static;
        margin-top: 1.2rem;
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .logo {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
    }

    .social-icons {
        margin-left: 0.8rem;
        gap: 0.6rem;
    }

    .social-link {
        width: 38px;
        height: 38px;
        border: none;
        background: transparent;
    }

    .social-link svg {
        width: 34px;
        height: 34px;
    }

    .nav-wrapper {
        padding: 0.4rem 0;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem 0;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        gap: 0;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-menu li {
        text-align: center;
        padding: 0.8rem 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-menu li:last-child {
        border-bottom: none;
    }

    .hero {
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        background-attachment: scroll;
        padding-top: 100px;
        padding-bottom: 50px;
    }

    .hero::before {
        background-attachment: scroll;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .science {
        padding: 3rem 0;
    }

    .science-content {
        padding: 1.5rem;
    }

    .science-icon svg {
        width: 50px;
        height: 50px;
    }

    .science-text p {
        font-size: 1rem;
    }

    body {
        overflow-x: hidden;
    }

    .doctors,
    .appointment {
        padding: 3rem 0;
    }

    .diseases {
        padding: 3rem 0;
    }

    .container {
        padding: 0 15px;
    }

    .diseases .section-header {
        margin-bottom: 2rem;
    }

    .diseases-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
        gap: 0.8rem;
    }

    .disease-card {
        padding: 1.2rem 1rem;
        min-height: auto;
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    .disease-card-large {
        grid-column: span 2;
        padding: 1.2rem 1.5rem;
    }

    .disease-card h3 {
        font-size: 1.05rem;
        margin-bottom: 0.4rem;
    }

    .disease-card p {
        font-size: 0.95rem;
        line-height: 1.45;
    }

    .disease-more-btn {
        bottom: 1rem;
        right: 1rem;
        font-size: 0.75rem;
        padding: 0.55rem 0.9rem;
        min-width: 90px;
    }

    .disease-card-large .disease-more-btn {
        bottom: 1rem;
        right: 1.5rem;
    }

    .disease-card[data-disease="surgery"] .disease-photo img,
    .disease-card[data-disease="incontinence"] .disease-photo img {
        object-position: bottom;
    }

    .disease-card[data-disease="incontinence"] h3,
    .disease-card[data-disease="surgery"] h3 {
        padding: 1rem 1rem 0.3rem 1rem;
        font-size: 1.15rem;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    }

    .disease-card[data-disease="incontinence"] p,
    .disease-card[data-disease="surgery"] p {
        padding: 0 1rem;
        font-size: 0.98rem;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    }

    .disease-card[data-disease="incontinence"] .disease-more-btn,
    .disease-card[data-disease="surgery"] .disease-more-btn {
        margin: 0 1rem 1rem 1rem;
    }

    .appointment-bottom {
        grid-template-columns: 1fr;
    }

    .clinic-location {
        height: auto;
    }

    .clinic-card {
        position: static;
        width: 100%;
        height: auto;
        box-shadow: none;
    }

    .clinic-swiper {
        position: static;
        height: 280px;
    }

    .clinic-swiper-nav {
        position: static;
    }

    .clinic-map {
        height: 280px;
    }

    #clinicMap {
        height: 280px;
    }

    .contact-btn.phone-btn {
        width: 100%;
        max-width: 100%;
    }

    .carousel-wrapper {
        padding: 0 20px;
    }

    .carousel-slide {
        width: 20%;
    }

    .carousel-slide.active {
        width: 60%;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-btn.prev {
        left: 10px;
    }

    .carousel-btn.next {
        right: 10px;
    }

    .carousel-caption {
        font-size: 1.1rem;
        padding: 1.5rem;
    }

    /* Адаптивность карусели для планшетов */
    .gallery {
        padding: 48px 0 68px;
    }

    #carousel {
        padding: 20px 0 60px;
    }

    .swiper-slide {
        width: 350px;
    }

    .carousel-caption {
        font-size: 1rem;
        padding: 1.5rem 1rem;
    }

    .carousel-nav-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-nav-btn svg {
        width: 16px;
        height: 16px;
    }

    .swiper-pagination {
        bottom: 15px !important;
    }

    .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
    }

    .swiper-pagination-bullet-active {
        width: 28px;
    }

    .modal-body {
        flex-direction: column;
    }

    .modal-image {
        width: 100%;
        min-height: 300px;
    }

    .modal-text {
        width: 100%;
        padding: 2rem;
    }

    .modal-text h2 {
        font-size: 1.6rem;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        font-size: 1.7rem;
    }

    /* Карточки врачей на мобильных - вертикальный layout */
    .doctor-card {
        flex-direction: column;
        min-height: auto;
        height: auto;
        border-left: none;
        border-radius: var(--radius-card);
    }

    .doctor-photo {
        width: 100%;
        max-height: 85vw;
        min-width: auto;
        border-radius: var(--radius-card) var(--radius-card) 0 0;
        background: white;
    }

    .doctor-photo img {
        border-radius: var(--radius-card) var(--radius-card) 0 0;
        object-fit: contain;
    }

    .doctor-info {
        border-radius: 0 0 var(--radius-card) var(--radius-card);
        display: flex;
        flex-direction: column;
        padding: 1.5rem;
    }

    .doctor-name {
        order: 1;
        margin-top: 0;
        font-size: 1.7rem;
        white-space: normal;
        margin-bottom: 0.3rem;
        padding-right: 110px;
    }

    .doctor-position {
        order: 2;
        font-size: 1.05rem;
        margin-bottom: 0.6rem;
    }

    .doctor-badges {
        order: 3;
        margin-bottom: 1.4rem;
        padding-bottom: 1.2rem;
        border-bottom: 1px solid rgba(73, 143, 155, 0.15);
    }

    .doctor-more-btn {
        top: 1rem;
        right: 1rem;
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        min-width: auto;
    }

    .doctor-section-label {
        order: 4;
    }

    .doctor-specialty {
        order: 5;
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .doctor-qualifications {
        order: 6;
        background: #fff;
        border-radius: var(--radius-card);
        box-shadow: 0 2px 8px rgba(44, 62, 80, 0.08);
        padding: 0.3rem 1rem;
        gap: 0;
    }

    .doctor-qualifications li {
        font-size: 0.9rem;
        background: none;
        box-shadow: none;
        border-radius: 0;
        padding: 0.65rem 0;
        border-bottom: 1px solid rgba(44, 62, 80, 0.08);
    }

    .doctor-qualifications li:last-child {
        border-bottom: none;
    }

    .doctor-stats {
        position: static;
        order: 7;
        margin-top: 1rem;
        justify-content: flex-start;
        flex-wrap: nowrap;
    }

    .carousel-wrapper {
        padding: 0 10px;
    }

    .carousel-container {
        padding: 30px 0;
    }

    .carousel-container::before,
    .carousel-container::after {
        flex: 0 0 calc((100% - 70%) / 2);
        min-width: calc((100% - 70%) / 2);
    }

    .carousel-slide {
        flex: 0 0 70%;
        min-width: 70%;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .carousel-btn.prev {
        left: 10px;
    }

    .carousel-btn.next {
        right: 10px;
    }
}

/* 768px (портретный iPad) выпадает из диапазона max-width:767px выше —
   без этого правила .appointment-bottom остаётся двухколоночным и
   фиксированная ширина .phone-btn вылезает за край экрана */
@media (max-width: 768px) {
    .appointment-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 100vh;
        min-height: 100dvh;
        padding-top: 80px;
        padding-bottom: 40px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    body {
        overflow-x: hidden;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .container {
        padding: 0 15px;
    }

    .doctors,
    .appointment {
        padding: 2.5rem 0;
    }

    .diseases {
        padding: 2.5rem 0;
    }

    .diseases .section-header {
        margin-bottom: 1.5rem;
    }

    .diseases-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: auto;
        gap: 0.7rem;
    }

    .disease-card {
        padding: 1rem 0.8rem;
        min-height: auto;
        text-align: left;
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    .disease-card-large {
        grid-column: span 2;
        padding: 1rem 1rem;
    }

    .disease-card h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
        line-height: 1.3;
    }

    .disease-card-large h3 {
        font-size: 1.05rem;
        margin-bottom: 0.3rem;
        line-height: 1.3;
    }

    .disease-card p {
        font-size: 0.92rem;
        line-height: 1.45;
        margin-bottom: 0;
    }

    .disease-card-large p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 0;
    }

    .disease-more-btn {
        bottom: 0.6rem;
        right: 0.6rem;
        font-size: 0.7rem;
        padding: 0.45rem 0.7rem;
        min-width: 70px;
    }

    .disease-card-large .disease-more-btn {
        bottom: 0.6rem;
        right: 1rem;
    }

    .disease-card[data-disease="incontinence"] h3,
    .disease-card[data-disease="surgery"] h3 {
        padding: 0.7rem 0.7rem 0.2rem 0.7rem;
        font-size: 1.05rem;
        line-height: 1.3;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    }

    .disease-card[data-disease="incontinence"] p,
    .disease-card[data-disease="surgery"] p {
        padding: 0 0.7rem;
        font-size: 0.92rem;
        line-height: 1.45;
        text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
    }

    .disease-card[data-disease="incontinence"] .disease-more-btn,
    .disease-card[data-disease="surgery"] .disease-more-btn {
        margin: 0 0.7rem 0.7rem 0.7rem;
    }

    .disease-card[data-disease="incontinence"] .disease-more-btn {
        left: 1rem;
        right: auto;
        bottom: 0.6rem;
    }

    .disease-card[data-disease="surgery"] .disease-photo img,
    .disease-card[data-disease="incontinence"] .disease-photo img {
        object-position: bottom;
    }

    .science {
        padding: 2.5rem 0;
    }

    .science-content {
        padding: 1.2rem;
        gap: 1.5rem;
    }

    .science-icon svg {
        width: 45px;
        height: 45px;
    }

    .science-text p {
        font-size: 0.95rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        padding: 0.75rem 1.8rem;
        font-size: 1.2rem;
        width: auto;
        align-self: center;
    }

    .btn {
        width: 100%;
    }

    .appointment-buttons {
        gap: 1.2rem;
        flex-wrap: wrap;
    }

    .contact-btn {
        width: 100px;
        height: 100px;
        font-size: 0.8rem;
    }

    .contact-btn.phone-btn {
        width: 100%;
        max-width: 100%;
    }

    .contact-btn svg {
        width: 40px;
        height: 40px;
    }

    .carousel-wrapper {
        padding: 0 10px;
    }

    .carousel-slide {
        width: 15%;
    }

    .carousel-slide.active {
        width: 70%;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .carousel-caption {
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }

    .carousel-indicators {
        gap: 0.5rem;
    }

    .indicator {
        width: 10px;
        height: 10px;
    }

    .indicator.active {
        width: 28px;
    }

    .modal-image {
        min-height: 200px;
    }

    .modal-text {
        padding: 1.5rem;
    }

    .modal-text h2 {
        font-size: 1.4rem;
    }

    .modal-section h3 {
        font-size: 1.1rem;
    }

    .modal-close {
        width: 44px;
        height: 44px;
        font-size: 1.6rem;
    }

    /* Карточки врачей на 480px - компактная версия */
    .doctor-card {
        flex-direction: column;
        min-height: auto;
        height: auto;
        border-left: none;
        border-radius: var(--radius-card);
    }

    .doctor-photo {
        width: 100%;
        max-height: 85vw;
        min-width: auto;
        border-radius: var(--radius-card) var(--radius-card) 0 0;
        background: white;
    }

    .doctor-photo img {
        border-radius: var(--radius-card) var(--radius-card) 0 0;
        object-fit: contain;
    }

    .doctor-info {
        border-radius: 0 0 var(--radius-card) var(--radius-card);
        display: flex;
        flex-direction: column;
        padding: 1.2rem;
    }

    .doctor-name {
        order: 1;
        margin-top: 0;
        font-size: 1.2rem;
        padding-right: 0;
    }

    .doctor-position {
        order: 2;
        font-size: 0.9rem;
    }

    .doctor-more-btn {
        top: 1rem;
        right: 1rem;
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        min-width: auto;
    }

    .doctor-qualifications {
        font-size: 0.85rem;
    }

    .doctor-quote {
        position: static;
        max-width: 100%;
        margin-top: 1.2rem;
        padding: 1rem;
        padding-top: 1.2rem;
        border-top: 2px solid var(--primary-color);
        border-left: none;
        border-right: none;
        border-bottom: none;
        border-radius: 0 0 var(--radius-card) var(--radius-card);
        order: 6;
    }

    .doctor-quote p {
        font-size: 0.85rem;
    }

    .carousel-container {
        padding: 20px 0;
    }

    .carousel-container::before,
    .carousel-container::after {
        flex: 0 0 calc((100% - 80%) / 2);
        min-width: calc((100% - 80%) / 2);
    }

    .carousel-slide {
        flex: 0 0 80%;
        min-width: 80%;
    }

    .carousel-caption {
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }

    .carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .carousel-btn.prev {
        left: 5px;
    }

    .carousel-btn.next {
        right: 5px;
    }

    /* Адаптивность карусели для мобильных */
    .gallery {
        padding: 40px 0 60px;
    }

    #carousel {
        padding: 15px 0 50px;
    }

    .swiper-slide {
        width: 300px;
    }

    .carousel-caption {
        font-size: 0.9rem;
        padding: 1.2rem 0.8rem;
    }

    .carousel-nav-btn {
        width: 36px;
        height: 36px;
    }

    .carousel-nav-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Хлебные крошки */
.breadcrumbs {
    background: linear-gradient(to right, rgba(73, 143, 155, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
    padding: 20px 0;
    margin-top: 70px;
    font-size: 0.95em;
    border-bottom: 1px solid rgba(73, 143, 155, 0.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.breadcrumbs .container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    display: inline-flex;
    align-items: center;
}

.breadcrumbs a:hover {
    background: rgba(73, 143, 155, 0.08);
    color: var(--secondary-color);
    transform: translateY(-1px);
}

.breadcrumbs a::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--primary-color);
    margin-right: 8px;
    opacity: 0.6;
    display: none;
}

.breadcrumbs a:first-child::before {
    content: '🏠';
    border: none;
    margin-right: 6px;
    font-size: 0.9em;
    opacity: 1;
}

.breadcrumbs span {
    color: var(--dark-color);
    font-weight: 600;
    padding: 6px 12px;
    background: rgba(73, 143, 155, 0.12);
    border-radius: var(--radius-tag);
}

.breadcrumbs .container > *:not(:last-child)::after {
    content: '›';
    margin-left: 8px;
    color: var(--primary-color);
    font-size: 1.3em;
    font-weight: 300;
    opacity: 0.5;
}

/* Страница заболевания */
.disease-page {
    padding: 60px 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 300px);
}

.disease-page h1 {
    font-size: 2.8em;
    color: var(--dark-color);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    position: relative;
    padding-bottom: 20px;
}

.disease-page h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 2px;
}

.disease-content {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.9;
    font-size: 1.05rem;
}

.disease-content h2 {
    font-size: 2em;
    color: var(--primary-color);
    margin-top: 50px;
    margin-bottom: 25px;
    font-weight: 700;
    padding-left: 0;
}

.disease-content h3 {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-top: 35px;
    margin-bottom: 18px;
    font-weight: 700;
}

.disease-content p {
    margin-bottom: 22px;
    color: #333;
    text-align: justify;
}

.disease-content p strong {
    color: var(--primary-color);
    font-weight: 600;
}

.disease-content ul {
    margin: 25px 0;
    padding-left: 0;
    list-style: none;
}

.disease-content li {
    margin-bottom: 15px;
    color: #333;
    padding-left: 35px;
    position: relative;
    line-height: 1.7;
}

.disease-content li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2em;
}

.disease-page .modal-section {
    margin-bottom: 50px;
    background: white;
    padding: 30px;
    border-radius: var(--radius-card);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: var(--transition);
    opacity: 1 !important;
    transform: none !important;
}

.disease-page .modal-section:hover {
    box-shadow: 0 4px 16px rgba(73, 143, 155, 0.15);
}

.disease-page .modal-section:first-child {
    background: linear-gradient(135deg, rgba(73, 143, 155, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    padding-left: 22px;
}

/* Призыв к действию */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 40px;
    border-radius: var(--radius-card);
    text-align: center;
    color: white;
    margin-top: 60px;
}

.cta-section h2 {
    font-size: 2em;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 1.1em;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 767px) {
    .disease-page h1 {
        font-size: 2em;
    }

    .disease-page h1::after {
        width: 60px;
        height: 3px;
    }

    .disease-content {
        padding: 0 20px;
        font-size: 1rem;
    }

    .disease-content h2 {
        font-size: 1.6em;
        padding-left: 15px;
        border-left-width: 4px;
    }

    .disease-content h3 {
        font-size: 1.3em;
    }

    .disease-page .modal-section {
        padding: 20px;
        margin-bottom: 30px;
    }

    .disease-page .modal-section:first-child {
        padding-left: 16px;
        border-left-width: 3px;
    }

    .disease-content p {
        text-align: left;
    }

    .cta-section {
        padding: 40px 20px;
    }

    .cta-buttons {
        flex-direction: column;
    }
}
