.custom-top-bar {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 0;
    font-size: 14px;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.custom-top-bar .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* АДАПТИВНЫЕ ИСПРАВЛЕНИЯ ДЛЯ ВЕРХНЕЙ ПОЛОСКИ НА МОБИЛЬНЫХ */
@media (max-width: 768px) {
    .custom-top-bar {
        padding: 10px 0;
        font-size: 13px;
    }
    
    .custom-top-bar .container {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .top-left-links {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .top-left-links a {
        margin: 0;
        text-align: center;
        flex: 1;
        min-width: 120px;
    }
    
    .top-right-links {
        display: flex;
        justify-content: center;
        width: 100%;
    }
    
    .custom-auth-buttons {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }
    
    .custom-btn-login, .custom-btn-register {
        flex: 1;
        max-width: 120px;
        min-width: 100px;
        text-align: center;
        padding: 8px 12px;
        font-size: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
    
    .custom-user-greeting {
        font-size: 13px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .custom-top-bar {
        padding: 8px 0;
        font-size: 12px;
    }
    
    /* Сокращаем длинный текст на очень маленьких экранах */
    .top-left-links a[href*="okohbvl"] {
        font-size: 11px;
        line-height: 1.2;
    }
    
    .custom-btn-login, .custom-btn-register {
        padding: 6px 10px;
        font-size: 11px;
        min-width: 90px;
        max-width: 110px;
    }
    
    .custom-btn-login i, .custom-btn-register i {
        font-size: 10px;
    }
}

/* ИСПРАВЛЕНИЕ ДЛЯ ДЛИННОГО ТЕКСТА */
@media (max-width: 480px) {
    .top-left-links a[href*="okohbvl"]:after {
        content: "Medical tourism (Eng)";
    }

    .top-left-links a[href*="okohbvl"] {
        text-indent: -9999px;
        position: relative;
    }
    
    .top-left-links a[href*="okohbvl"]:after {
        text-indent: 0;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}


/* АДАПТИВНЫЕ ОТСТУПЫ ДЛЯ КНОПОК НА ГЛАВНОЙ */
@media (max-width: 767.98px) {
    .covid-buttons {
        margin: 10px 0 0px 0 !important; /* Уменьшаем отступ с 50px до 20px на мобильных */
    }
    
    .covid-buttons .btn {
        margin: 0 5px 10px 0 !important; /* Уменьшаем боковые отступы кнопок */
        font-size: 14px !important; /* Чуть уменьшаем шрифт */
        padding: 12px 8px !important; /* Уменьшаем внутренние отступы */
    }
}

@media (max-width: 576px) {
    .covid-buttons {
        margin: 8px 0 15px 0 !important; /* Еще меньше отступ на очень маленьких экранах */
        flex-direction: column; /* Кнопки в столбик */
    }
    
    .covid-buttons .btn {
        margin: 0 0 8px 0 !important; /* Убираем боковые отступы, оставляем только нижние */
        width: 100% !important; /* Кнопки на всю ширину */
        text-align: center !important;
    }
}

.custom-top-bar a {
    color: #666;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.custom-top-bar a:hover {
    color: #007d9a;
    text-decoration: none;
}

.custom-auth-buttons {
    display: flex;
    gap: 10px;
}

.custom-btn-login, .custom-btn-register {
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s ease;
    border: 1px solid #007d9a;
}

.custom-btn-login {
    background: #007d9a;
    color: white;
}

.custom-btn-register {
    background: transparent;
    color: #007d9a;
}

.custom-btn-login:hover {
    background: #005a6b;
    color: white;
    text-decoration: none;
}

.custom-btn-register:hover {
    background: #007d9a;
    color: white;
    text-decoration: none;
}

.custom-user-greeting {
    color: #007d9a;
    font-weight: 500;
}

/* Исправление цветов меню */
.page-menu .navbar .nav-item {
    border-left: 1px solid #007d9a !important;
}

.page-menu .navbar .nav-item::after {
    background: #007d9a !important;
}

.page-menu .dropdown-menu {
    border: 1px solid #007d9a !important;
}

/* РАДИКАЛЬНО СКРЫВАЕМ ВСЕ ЭЛЕМЕНТЫ ИЗ ОРИГИНАЛЬНЫХ КОМПОНЕНТОВ */
.col-sm-7 .bx-menu,
.col-sm-7 .menu,
.col-sm-7 .top-menu,
.col-sm-7 .header-menu,
.col-sm-7 .studio-header,
.col-sm-7 .header2,
.col-sm-7 nav,
.col-sm-7 ul,
.col-sm-7 .nav,
.col-sm-7 .navbar,
.col-sm-7 .menu-top,
.col-sm-7 .menu-horizontal,
.col-sm-7 .phone,
.col-sm-7 .contact,
.col-sm-7 .social,
.col-sm-7 .auth,
.col-sm-7 .user,
.col-sm-7 .login,
.col-sm-7 .greeting {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* СКРЫВАЕМ ВСЕ ССЫЛКИ И КНОПКИ В ПРАВОЙ КОЛОНКЕ КРОМЕ НАШИХ */
.col-sm-7 > * {
    display: none !important;
}

/* ПОКАЗЫВАЕМ ТОЛЬКО НАШИ ЭЛЕМЕНТЫ */
.col-sm-7 .header-additions {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
}

.header-additions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: 35px; /* СДВИГАЕМ ВНИЗ ЧТОБЫ БЫЛО ПОСЕРЕДИНЕ ШАПКИ */
}

.search-and-phones {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* ИЗМЕНИЛИ С center НА flex-start ДЛЯ ВЫРАВНИВАНИЯ ПО ЛЕВОМУ КРАЮ */
    gap: 15px;
    flex: 1;
}

/* УВЕЛИЧЕННЫЙ ПОИСК КАК В ОРИГИНАЛЕ */
.search-container {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-container input {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.search-container input:focus {
    outline: none;
    border-color: #007d9a;
    box-shadow: 0 0 12px rgba(0, 125, 154, 0.3);
    background: white;
}

.search-container button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: #007d9a;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-container button:hover {
    background: #005a6b;
}

.phone-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: flex-start; /* ДОБАВИЛИ ДЛЯ ВЫРАВНИВАНИЯ ПО ЛЕВОМУ КРАЮ */
}

/* УВЕЛИЧЕННЫЕ КНОПКИ ТЕЛЕФОНОВ КАК В ОРИГИНАЛЕ */
.call-center-btn, .emergency-btn {
    background: #007d9a;
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    border: 2px solid #007d9a;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.call-center-btn:hover, .emergency-btn:hover {
    background: #005a6b;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,125,154,0.3);
}

/* УВЕЛИЧЕННАЯ КРАСИВАЯ КНОПКА ОБРАЩЕНИЯ К ГЛАВНОМУ ВРАЧУ */
.chief-doctor-btn {
    background: linear-gradient(135deg, #007d9a 0%, #4ECDC4 100%);
    color: white;
    padding: 15px 25px; /* УВЕЛИЧИЛИ PADDING */
    border-radius: 30px; /* УВЕЛИЧИЛИ РАДИУС */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px; /* УВЕЛИЧИЛИ ШРИФТ */
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 25px rgba(0, 125, 154, 0.3);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-width: 200px; /* УВЕЛИЧИЛИ МИНИМАЛЬНУЮ ШИРИНУ */
    justify-content: center;
    text-align: center;
    line-height: 1.3;
}

.chief-doctor-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.chief-doctor-btn:hover::before {
    left: 100%;
}

.chief-doctor-btn:hover {
    background: linear-gradient(135deg, #005a6b 0%, #3bb3a8 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-3px); /* УВЕЛИЧИЛИ ЭФФЕКТ HOVER */
    box-shadow: 0 10px 35px rgba(0, 125, 154, 0.4);
}

.chief-doctor-btn i {
    font-size: 16px; /* УВЕЛИЧИЛИ ИКОНКУ */
    z-index: 1;
}

.chief-doctor-btn span {
    z-index: 1;
}

.auth-required-notice {
    font-size: 10px;
    color: #666;
    text-align: center;
    opacity: 0.8;
    font-style: italic;
    margin-top: 5px;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .header-additions {
        flex-direction: column;
        gap: 20px;
        margin-top: 20px;
    }
    
    .search-and-phones {
        gap: 12px;
    }
    
    .phone-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .chief-doctor-btn {
        padding: 12px 20px;
        font-size: 13px;
        min-width: 180px;
    }
    
    .search-container {
        max-width: 300px;
    }
    
    .search-container input {
        padding: 10px 40px 10px 15px;
        font-size: 14px;
    }
    
    .call-center-btn, .emergency-btn {
        padding: 8px 15px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .chief-doctor-btn {
        padding: 10px 16px;
        font-size: 12px;
        min-width: 160px;
    }
}

/* АДАПТИВНЫЙ ОТСТУП МЕЖДУ КНОПКАМИ И НОВОСТЯМИ */
.section-spacer {
    padding-top: 80px; /* Для больших экранов */
}

@media (max-width: 768px) {
    .section-spacer {
        padding-top: 35px; /* В 2 раза меньше для мобильных */
    }
}

@media (max-width: 576px) {
    .section-spacer {
        padding-top: 5px; /* Еще меньше для очень маленьких экранов */
    }
}

/* ===== ПРЕЛОАДЕР СТИЛИ ===== */
.medical-preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.medical-preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.preloader-logo {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
}

.medical-cross {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
}

.cross-horizontal,
.cross-vertical {
    position: absolute;
    background: #007d9a;
    border-radius: 4px;
    animation: crossPulse 2s ease-in-out infinite;
}

.cross-horizontal {
    width: 60px;
    height: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.cross-vertical {
    width: 12px;
    height: 60px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.pulse-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    border: 3px solid rgba(0, 125, 154, 0.3);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.pulse-circle::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    width: 130px;
    height: 130px;
    border: 2px solid rgba(0, 125, 154, 0.1);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite 0.5s;
}

.preloader-text {
    font-size: 24px;
    font-weight: 600;
    color: #007d9a;
    margin-bottom: 20px;
    animation: textGlow 2s ease-in-out infinite;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: #007d9a;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes crossPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.7;
    }
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 125, 154, 0.3);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 125, 154, 0.6);
    }
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    .preloader-logo {
        width: 80px;
        height: 80px;
    }
    
    .medical-cross {
        width: 40px;
        height: 40px;
    }
    
    .cross-horizontal {
        width: 40px;
        height: 8px;
    }
    
    .cross-vertical {
        width: 8px;
        height: 40px;
    }
    
    .pulse-circle {
        width: 80px;
        height: 80px;
    }
    
    .pulse-circle::before {
        width: 90px;
        height: 90px;
        top: -10px;
        left: -10px;
    }
    
    .preloader-text {
        font-size: 18px;
    }
}
