/* Основные стили */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Навигация */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    background-color: #ffffff !important;
    height: 80px;
    min-height: 80px;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    padding: 0;
    margin-right: 2rem;
    height: 100%;
    display: flex;
    align-items: center;
}

.logo-container {
    padding: 0;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.logo-container img {
    max-height: 60px;
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1) drop-shadow(0 2px 8px rgba(255, 255, 255, 0.3));
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* Кнопки */
.btn {
    border-radius: 25px;
    font-weight: 600;
    padding: 10px 25px;
    transition: all 0.3s ease;
    border: none;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Карточки */
.card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.card-header {
    border-bottom: none;
    font-weight: 600;
}

/* Героическая секция */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Уменьшенная версия hero-section для внутренних страниц */
.hero-section-small {
    min-height: 50vh;
    padding: 60px 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.1)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Формы */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

/* Календарь */
.calendar {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.calendar-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
}

.calendar-day {
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    margin: 2px;
}

.calendar-day:hover {
    background: var(--light-color);
    transform: scale(1.05);
}

.calendar-day.selected {
    background: var(--primary-color);
    color: white;
}

.calendar-day.disabled {
    color: #ccc;
    cursor: not-allowed;
}

/* Временные слоты */
.time-slot {
    padding: 10px 15px;
    margin: 5px;
    border: 2px solid #e9ecef;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-weight: 500;
}

.time-slot:hover {
    border-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.1);
}

.time-slot.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.time-slot.disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Врачи */
.doctor-card {
    position: relative;
    overflow: hidden;
}

.doctor-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.doctor-card:hover .doctor-image {
    transform: scale(1.1);
}

.doctor-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: all 0.3s ease;
}

.doctor-card:hover .doctor-overlay {
    transform: translateY(0);
}

/* Услуги */
.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
}

/* Футер */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 50px 0 20px;
}

.footer h5 {
    color: white;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    color: #bdc3c7;
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
        text-align: center;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 12px 25px;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .calendar-day {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    .time-slot {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* Загрузка */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Уведомления */
.alert {
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* Прелоадер */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Скролл */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(4, 150, 255, 0.9) 0%, rgba(40, 199, 111, 0.9) 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(4, 150, 255, 0.9) 0%, rgba(40, 199, 111, 0.9) 100%);
}

/* Дополнительные утилиты */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.border-radius-custom {
    border-radius: 15px;
}

/* News Slider Styles */
.news-slider-section {
    position: relative;
    overflow: hidden;
}

.news-slider {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s ease-in-out;
    transform: translateX(100%);
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    z-index: 2;
}

.slide.prev {
    transform: translateX(-100%);
    z-index: 1;
}

.slide-background {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.slide-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    color: white;
    animation: slideInLeft 1s ease-out;
}

.slide.active .slide-content {
    animation: slideInLeft 1s ease-out;
}

.slide-image {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: slideInRight 1s ease-out;
}

.slide.active .slide-image {
    animation: slideInRight 1s ease-out;
}

.news-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.slide-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.6;
    opacity: 0.95;
}

.slide-meta {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.slide-date {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 500;
}

/* Navigation Buttons */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 10;
    pointer-events: none;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    pointer-events: all;
    font-size: 1.2rem;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-btn:active {
    transform: scale(0.95);
}

/* Dots Indicator */
.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.dot.active {
    background: white;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.1);
}

/* Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .news-slider {
        height: 60vh;
        min-height: 400px;
    }
    
    .slide-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .slide-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .slide-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .slider-nav {
        padding: 0 1rem;
    }
    
    .slider-dots {
        bottom: 1rem;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 576px) {
    .news-slider {
        height: 50vh;
        min-height: 350px;
    }
    
    .slide-title {
        font-size: 1.5rem;
    }
    
    .slide-description {
        font-size: 0.9rem;
    }
    
    .news-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* Стили для баннера новостей */
.news-banner-content {
    position: relative;
}

.news-banner-content::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    border-radius: 20px;
    z-index: -1;
}

.news-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-left-color: var(--secondary-color);
}

.news-item h6 {
    font-weight: 600;
    line-height: 1.4;
}

.news-item p {
    line-height: 1.5;
}

.news-banner-action .bg-white {
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.news-banner-action .bg-white:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.15);
}

.news-banner-action i {
    transition: all 0.3s ease;
}

.news-banner-action:hover i {
    transform: scale(1.1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1.1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1.1);
    }
}

/* Адаптивность для баннера новостей */
@media (max-width: 768px) {
    .news-banner-content::before {
        top: -10px;
        left: -10px;
        right: -10px;
        bottom: -10px;
    }
    
    .news-item {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .news-banner-action {
        margin-top: 30px;
    }
}