/* ============================================
   ANIMATIONS.CSS - Анимации и эффекты
   ============================================ */

/* Общие настройки для плавности */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   HOVER ЭФФЕКТЫ ДЛЯ КАРТОЧЕК
   ============================================ */

/* Карточки схем получения УКЭП на главной */
.hover\:shadow-lg {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover\:shadow-lg:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

/* Карточки блога */
.blog-card {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(161, 161, 161, 0.25) !important;
}

/* Карточки документов */
.document-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.document-card:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 0 20px 40px rgba(161, 161, 161, 0.2) !important;
}

.document-card:hover .relative {
    transform: rotate(-3deg);
}

/* Карточки адресов на странице контактов */
.address-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.address-card:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(161, 161, 161, 0.18) !important;
}

/* Карточки на странице продуктов и услуг */
.card-hover {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(161, 161, 161, 0.2) !important;
}

/* ============================================
   HOVER ЭФФЕКТЫ ДЛЯ КНОПОК
   ============================================ */

/* Основные кнопки */
button, .bg-primary, .bg-green-btn, .bg-blue-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-primary:hover, .bg-green-btn:hover, .bg-blue-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(55, 93, 116, 0.3);
}

.bg-primary:active, .bg-green-btn:active, .bg-blue-btn:active {
    transform: translateY(0);
}

/* Кнопка "Посмотреть все" */
.view-all-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.view-all-btn:hover {
    transform: translateX(5px);
}

.view-all-btn:hover .arrow-icon {
    transform: translateX(3px);
}

.arrow-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   HOVER ЭФФЕКТЫ ДЛЯ ФОРМ
   ============================================ */

/* Поля ввода */
.form-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus {
    transform: scale(1.01);
    box-shadow: 0 0 0 3px rgba(55, 93, 116, 0.1);
}

/* Кнопка оплаты/отправки */
.payment-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.payment-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.payment-button:hover::before {
    width: 300px;
    height: 300px;
}

.payment-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(55, 93, 116, 0.4);
}

/* ============================================
   ЭФФЕКТЫ ДЛЯ ВЫБОРА ТИПА ЛИЦА
   ============================================ */

.entity-card {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.entity-card:not(.entity-card-active):hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.entity-card-active {
    animation: pulse-active 2s infinite;
}

@keyframes pulse-active {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(55, 93, 116, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(55, 93, 116, 0);
    }
}

/* ============================================
   CHECKBOX АНИМАЦИИ
   ============================================ */

.checkbox-custom {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-custom:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(55, 93, 116, 0.1);
}

.checkbox-custom-agree {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-custom-agree.checked {
    animation: check-bounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes check-bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* ============================================
   QUANTITY CONTROLS
   ============================================ */

.quantity-btn {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quantity-btn:hover {
    transform: scale(1.15);
    background-color: rgba(55, 93, 116, 0.1);
}

.quantity-btn:active {
    transform: scale(0.95);
}

/* ============================================
   НАВИГАЦИЯ И МЕНЮ
   ============================================ */

/* Десктоп навигация */
.desktop-nav a {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #375d74;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.desktop-nav a:hover::after {
    width: 100%;
}

/* Dropdown меню */
.dropdown-menu {
    animation: dropdown-slide 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdown-slide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Мобильное меню */
.mobile-menu.active {
    animation: slide-in-right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slide-in-right {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ============================================
   МОДАЛЬНОЕ ОКНО
   ============================================ */

.modal-overlay {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content {
    animation: modal-scale 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modal-scale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   ИКОНКИ И ДЕКОРАТИВНЫЕ ЭЛЕМЕНТЫ
   ============================================ */

/* Иконки времени чтения */
.blog-card-meta img {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-card-meta img {
    transform: rotate(15deg);
}

/* Поисковая иконка */
#searchIcon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#searchIcon:hover {
    transform: scale(1.1) rotate(10deg);
}

/* ============================================
   ФУТЕР АНИМАЦИИ
   ============================================ */

footer .cursor-pointer {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

footer .cursor-pointer:hover {
    transform: translateX(3px);
}

/* ============================================
   ДОПОЛНИТЕЛЬНЫЕ УТИЛИТЫ
   ============================================ */

/* Плавное появление элементов */
.fade-in {
    animation: fade-in 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Пульсация для важных элементов */
.pulse-attention {
    animation: pulse-attention 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-attention {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* ============================================
   ОПТИМИЗАЦИЯ ПРОИЗВОДИТЕЛЬНОСТИ
   ============================================ */

/* Использование GPU для анимаций */
.card-hover, .blog-card, .document-card, .address-card, .entity-card {
    will-change: transform;
}

/* Отключение анимаций при уменьшении движения (доступность) */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   ЗАГРУЗКА СТРАНИЦЫ
   ============================================ */

body {
    animation: page-fade-in 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes page-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}



