/******************************/
/***** СОВРЕМЕННЫЕ УЛУЧШЕНИЯ *****/
/******************************/

/* Современные карточки услуг с анимациями */
.user .moduletable {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.user .moduletable::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    transition: left 0.3s ease;
}

.user .moduletable:hover::before {
    left: 0;
}

.user .moduletable:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Современные кнопки */
.btn-modern {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    text-align: center;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
    color: white;
    text-decoration: none;
}

/* Улучшенные заголовки */
.page-header {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 2px;
}

/* Современная навигация */
#menu .menu a {
    transition: all 0.3s ease;
    position: relative;
}

#menu .menu a:hover {
    background: #333 !important;
    transform: translateX(5px);
}

/* Анимации появления */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerFadeIn 0.6s ease forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes staggerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Современные формы */
.contact-form input,
.contact-form textarea,
.contact-form select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    width: 100%;
    margin-bottom: 15px;
    font-size: 16px;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
    outline: none;
}

/* Улучшенный футер */
#footer {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d) !important;
    padding: 40px 0 20px !important;
}

.footer .moduletable {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #ccc;
}

.footer .moduletable h3 {
    color: #fff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

/* Социальные иконки */
.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.social-link:hover {
    background: #007bff;
    transform: translateY(-3px);
    color: white;
}

/* Хлебные крошки */
.breadcrumb-modern {
    background: #f8f9fa;
    padding: 15px 0;
    margin-bottom: 30px;
    border-radius: 8px;
}

.breadcrumb-modern a {
    color: #007bff;
    text-decoration: none;
}

/* Уведомления */
.alert-modern {
    border: none;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 15px 0;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

/* Адаптивные улучшения для больших экранов */
@media (min-width: 1200px) {
    .container-wide {
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .user .moduletable {
        padding: 30px;
    }
}

/* Темная тема для карточек в футере */
.footer a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #007bff;
}

/* Улучшенная типографика */
.typography-improved {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

.typography-improved h1, 
.typography-improved h2, 
.typography-improved h3 {
    font-weight: 600;
    line-height: 1.3;
}

/* Градиентные тексты */
.gradient-text {
    background: linear-gradient(135deg, #007bff, #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Уведомления для пользователя */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    z-index: 1000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success { background: #28a745; }
.notification.error { background: #dc3545; }
.notification.info { background: #17a2b8; }

/* Улучшения для таблиц */
.table-modern {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.table-modern th,
.table-modern td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.table-modern th {
    background: #f8f9fa;
    font-weight: 600;
}

.table-modern tr:hover {
    background: #f8f9fa;
}

/* Прогресс бар для загрузки */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Кастомные чекбоксы и радиокнопки */
.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 10px 0;
}

.custom-checkbox input {
    display: none;
}

.custom-checkbox .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.custom-checkbox input:checked + .checkmark {
    background: #007bff;
    border-color: #007bff;
}

.custom-checkbox input:checked + .checkmark::after {
    content: '✓';
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    font-weight: bold;
}

/* Анимация пульсации для важных элементов */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0,123,255,0.4); }
    70% { box-shadow: 0 0 0 10px rgba(0,123,255,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,123,255,0); }
}

/* Улучшения для выделения текста */
::selection {
    background: rgba(0,123,255,0.2);
    color: inherit;
}

::-moz-selection {
    background: rgba(0,123,255,0.2);
    color: inherit;
}

/* Плавный скролл для всей страницы */
html {
    scroll-behavior: smooth;
}

/* Улучшения для фокуса */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Темная тема для системных предпочтений */
@media (prefers-color-scheme: dark) {
    .user .moduletable {
        background: #2d2d2d;
        color: #fff;
        border-color: #444;
    }
    
    .user .moduletable h2,
    .user .moduletable h3,
    .user .moduletable h4 {
        color: #fff;
    }
}

/* Адаптация для высоких пиксельных соотношений */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Улучшения для печати */
@media print {
    .social-links,
    #mobile-menu-toggle,
    #navigation {
        display: none !important;
    }
    
    .user .moduletable {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}