:root {
    --medical-blue: #1565c0; 
    --accent-red: #d32f2f;
    --text-dark: #333;
    
    --font-main: 'Roboto', sans-serif;
    --font-hebrew: 'Heebo', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: #dceef7;
    background-image: 
        radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.8) 0%, transparent 80%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='rgba%28255,255,255,0.45%29'%3E%3Cpath d='M20 20 h10 v-10 h10 v10 h10 v10 h-10 v10 h-10 v-10 h-10 z'/%3E%3Cpath d='M90 60 l17.32 10 v20 L90 100 L72.68 90 v-20 L90 60z m0 4 l-13.86 8 v16 L90 96 l13.86-8 v-16 L90 64z'/%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
    font-family: var(--font-main);
    color: var(--text-dark);
    min-height: 100vh;
    line-height: 1.5;
}

body[dir="rtl"] { font-family: var(--font-hebrew); }

.container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 16px;
    position: relative;
}

/* Переключатель языка */
.top-bar {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    margin-bottom: 16px;
}

.lang-switcher {
    display: inline-flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.lang-text-btn {
    text-decoration: none;
    color: #555;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.95rem;
    transition: 0.3s;
}

.lang-text-btn:hover { background: rgba(0,0,0,0.05); }
.lang-text-btn.active {
    color: var(--medical-blue);
    background: #eaf3fa;
}

/* Шапка (в 1 строку) */
header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
    margin-bottom: 32px;
    /* Плавно увеличиваем высоту шапки от 90px до 140px */
    min-height: clamp(90px, 15vw, 140px);
}

.doctor-photo-wrapper {
    transform: rotate(-3deg);
    /* Рамка и отступы тоже немного растут */
    border: clamp(2px, 0.4vw, 4px) solid white;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.15);
    background: white;
    padding: clamp(3px, 0.6vw, 6px);
    
    /* Адаптивная ширина: мин 75px, растет до 130px на ПК */
    width: clamp(75px, 15vw, 130px); 
    z-index: 2;
}

.doctor-photo-wrapper img { width: 100%; display: block; }

.title-block {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
    width: 60%;
    /* Логотип по центру: мин 220px, растет до 400px на ПК */
    max-width: clamp(220px, 40vw, 400px); 
}

.title-block img.logo-main {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    /* Высота главного логотипа тоже адаптируется */
    max-height: clamp(85px, 12vw, 140px); 
    object-fit: contain;
    filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.1));
}

.logo-wrapper { 
    /* Правый логотип: мин 65px, растет до 110px на ПК */
    width: clamp(65px, 12vw, 110px); 
    z-index: 2; 
}

.logo-wrapper img { width: 100%; display: block; }

/* Карточка (общая стилистика) */
.modern-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.05);
}

.info-block { display: flex; flex-direction: column; gap: 16px; }
.info-item-modern { display: flex; align-items: center; gap: 16px; }

.info-icon, .map-icon {
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    flex-shrink: 0;
    background: #eaf3fa;
    color: var(--medical-blue);
}

.info-title { display: block; font-weight: 700; font-size: 1.1rem; color: #222; }
.info-desc { display: block; font-size: 0.95rem; color: #666; }

/* Главная красная кнопка (по центру) */
.main-call-btn {
    background-color: var(--accent-red);
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    text-align: center;
    padding: 16px 24px;
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(211,47,47,0.35);
    margin: 0 auto 32px auto;
    max-width: 450px;
    transition: transform 0.2s;
}
.main-call-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(211,47,47,0.45); }
.main-call-btn i { font-size: 1.5rem; }

/* Карта и Зона */
.map-header-content { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.map-text-content h3 { font-size: 1.15rem; margin: 0 0 4px 0; color: #222; }
.map-text-content p { margin: 0; font-size: 0.95rem; color: #555; }
#map { width: 100%; height: 350px; border-radius: 12px; border: 3px solid white; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

/* Услуги - список 5 строк */
.services-section {
    display: flex;
    flex-direction: column;
}

.service-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
}

.service-row:first-child {
    padding-top: 0;
}

.service-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Обертка, которая создает синюю рамку и жестко фиксирует размер */
.hex-border {
    width: 70px;
    min-width: 70px;
    max-width: 70px;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    background: var(--medical-blue); /* Цвет рамки */
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Сама картинка, чуть меньше обертки */
.service-hex-icon {
    width: 66px;
    min-width: 66px;
    max-width: 66px;
    height: 56px;
    min-height: 56px;
    max-height: 56px;
    object-fit: cover;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
    display: block;
    flex-shrink: 0;
    background-color: white; /* На случай, если картинка прозрачная */
}

.service-text {
    font-weight: 700;
    font-size: 1.1rem;
    color: #222;
    line-height: 1.3;
}

/* Хлебные крошки (городские и внутренние страницы) */
.breadcrumb {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 14px;
}
.breadcrumb a { color: var(--medical-blue); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* Заголовок городской страницы */
.city-title {
    font-size: 1.45rem;
    color: #222;
    margin: 0 0 10px 0;
    line-height: 1.3;
}
.city-intro-text { font-size: 1rem; color: #555; }
.city-intro-text p { margin: 0 0 10px 0; }
.city-intro-text p:last-child { margin-bottom: 0; }

/* Ссылки на города внутри текста */
.map-text-content a { color: var(--medical-blue); text-decoration: none; font-weight: 600; }
.map-text-content a:hover { text-decoration: underline; }

/* Статичная карта-зона (без Google API, для внутренних страниц) */
.map-static {
    width: 100%;
    border-radius: 12px;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
}
.map-static img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* FAQ (городские страницы) */
.section-title { font-size: 1.15rem; color: #222; margin: 0 0 6px 0; }
.faq-item { padding: 12px 0; border-top: 1px dashed rgba(0,0,0,0.1); }
.faq-item:first-of-type { border-top: none; padding-top: 2px; }
.faq-item h3 { font-size: 1rem; color: #222; margin: 0 0 6px 0; }
.faq-item p { margin: 0; font-size: 0.95rem; color: #555; }

/* Страница «О докторе» */
.about-layout { display: flex; flex-direction: column; gap: 20px; }
.about-photo { border-radius: 12px; overflow: hidden; flex-shrink: 0; }
.about-photo img { width: 100%; display: block; }
.about-text h1 { font-size: 1.45rem; color: #222; margin: 0 0 10px 0; line-height: 1.3; }
.about-text p { margin: 0 0 10px 0; font-size: 0.98rem; color: #555; }
.about-text ul { margin: 0 0 14px 0; padding-inline-start: 20px; }
.about-text li { font-size: 0.95rem; color: #444; margin-bottom: 6px; }
.license-note {
    background: #fff8e1;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #6d4c00;
    margin-top: 8px;
}

/* Нижний блок футера: «О докторе» + дисклеймер */
.footer-meta {
    text-align: center;
    padding-bottom: 28px;
}
.about-link {
    display: inline-block;
    color: var(--medical-blue);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 10px;
    border-bottom: 2px solid rgba(21,101,192,0.2);
}
.about-link:hover { border-bottom-color: var(--medical-blue); }

/* Плавающая кнопка WhatsApp (мобильные) */
.wa-float {
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 999;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #25D366;
    color: #fff;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
    text-decoration: none;
    font-size: 1.7rem;
    display: none;
    transition: transform 0.2s;
}
.wa-float:hover { transform: scale(1.05); color: #fff; }

@media (min-width: 768px) {
    .about-layout { flex-direction: row; align-items: flex-start; }
    .about-photo { width: 280px; }
}

@media (max-width: 767px) {
    .wa-float { display: flex; }
}

/* Footer & Кнопки связи */
footer { display: flex; flex-direction: column; gap: 16px; padding: 32px 0; align-items: center; }
.contact-btn {
    color: white; text-decoration: none; padding: 12px 24px; border-radius: 50px;
    font-size: 1.2rem; font-weight: bold; display: flex; align-items: center; gap: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25); min-height: 50px; width: 100%; max-width: 320px; justify-content: center;
    transition: 0.2s;
}

.contact-btn:hover { transform: translateY(-2px); }
.phone-btn { background-color: var(--accent-red); }
.phone-btn:hover { background-color: #b71c1c; }
.wa-btn { background-color: #25D366; }
.wa-btn:hover { background-color: #20bd5a; }
.fb-btn { background-color: #1877F2; }
.fb-btn:hover { background-color: #166fe5; }

.icon-circle { background: white; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.phone-btn .icon-circle { color: var(--accent-red); }
.wa-btn .icon-circle { color: #25D366; }
.fb-btn .icon-circle { color: #1877F2; }

@media (min-width: 768px) {
    .info-block { flex-direction: row; justify-content: space-around; }
    footer { flex-direction: row; justify-content: center; flex-wrap: wrap; }
    .contact-btn { width: auto; min-width: 240px; }
}