/* Дополнительные стили для всего сайта */

/* Плавные переходы для всех элементов */
* {
    transition: all 0.3s ease;
}

/* Улучшение фокуса для доступности */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Улучшение типографики */
body {
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
}

/* Улучшение форм */
input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
select:hover,
textarea:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Улучшение кнопок */
button,
.btn,
.cta-button,
.submit-button {
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    font-weight: 600;
}

button:hover,
.btn:hover,
.cta-button:hover,
.submit-button:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

button:active,
.btn:active,
.cta-button:active,
.submit-button:active {
    transform: translateY(1px);
}

/* Улучшение изображений */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Анимации для карточек */
.advantage-card,
.testimonial-card,
.step-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.advantage-card:hover,
.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Улучшение навигации */
nav a {
    position: relative;
    overflow: hidden;
}

nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

nav a:hover::before {
    width: 100%;
}

/* Улучшение секций */
section {
    scroll-margin-top: 4rem;
}

/* Анимации для загрузки */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Улучшение hero секции */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #005577 100%);
    opacity: 0.1;
    z-index: 1;
    pointer-events: none;
}

/* Улучшение подсветки текста */
::selection {
    background: var(--accent-color);
    color: white;
}

::-moz-selection {
    background: var(--accent-color);
    color: white;
}

/* Улучшение скроллбара */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-gray);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Улучшение загрузки */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    to {
        left: 100%;
    }
}

/* Улучшение accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Медиа запросы для принтера */
@media print {
    header,
    footer,
    .cookie-popup,
    .cta-button,
    .submit-button,
    .action-buttons {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    section {
        padding: 1rem 0;
        page-break-inside: avoid;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    img {
        max-width: 100% !important;
    }
}

/* Улучшение для высоких разрешений */
@media (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        font-size: 1.3rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

/* Улучшение для очень маленьких экранов */
@media (max-width: 320px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #e0e0e0;
        --light-gray: #2a2a2a;
        --border-color: #404040;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .about-section,
    .services-section,
    .contact-info-section {
        background: #1a1a1a;
    }
    
    .advantages-section,
    .support-section,
    .testimonials-section,
    .contact-form-section {
        background: #2a2a2a;
    }
    
    .advantage-card,
    .testimonial-card,
    .next-steps,
    .contact-form {
        background: #1a1a1a;
        border: 1px solid #404040;
    }
    
    .cookie-popup {
        background: rgba(0,0,0,0.95);
    }
}

/* Анимации для элементов при скролле */
@media (prefers-reduced-motion: no-preference) {
    .fade-in-up {
        animation: fadeInUp 0.8s ease-out;
    }
    
    .advantage-card,
    .testimonial-card {
        animation: fadeInUp 0.6s ease-out;
    }
    
    .advantage-card:nth-child(1) { animation-delay: 0.1s; }
    .advantage-card:nth-child(2) { animation-delay: 0.2s; }
    .advantage-card:nth-child(3) { animation-delay: 0.3s; }
    .advantage-card:nth-child(4) { animation-delay: 0.4s; }
}

/* Улучшение для пользователей с ограниченными возможностями */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Улучшение контрастности для пользователей с нарушениями зрения */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #003d4d;
        --accent-color: #cc2900;
        --text-color: #000000;
        --border-color: #000000;
    }
    
    .advantage-card,
    .testimonial-card,
    .contact-form {
        border: 2px solid #000000;
    }
    
    button,
    .btn,
    .cta-button,
    .submit-button {
        border: 2px solid #000000;
    }
} 