/* === ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ДЛЯ ЭТАПА 3.2 === */

/* Кнопка "Наверх" scroll-top */
.scroll-top {
    visibility: hidden;
    padding: 18px 20px;
    background-color: #111;
    color: #fff;
    position: fixed;
    right: 20px;
    bottom: 15px;
    z-index: 999;
    border-radius: 100%;
    cursor: pointer;
    -moz-transition: all .3s;
    -o-transition: all .3s;
    -webkit-transition: all .3s;
    transition: all .3s;
    opacity: 0;
    border: none;
}

.scroll-top.visible {
    visibility: visible;
    opacity: 1;
}

.scroll-top:hover {
    background-color: #333;
}

.scroll-top.active {
    bottom: 15px;
}

@media(min-width:768px) {
    .scroll-top.active {
        bottom: 545px;
    }
}

@media(min-width:992px) {
    .scroll-top.active {
        bottom: 590px;
    }
}

@media(min-width:1200px) {
    .scroll-top.active {
        bottom: 620px;
    }
}

/* Блокировка скролла при открытом модальном окне */
body.modal-open {
    overflow: hidden;
    padding-right: 17px; /* Компенсация скроллбара */
}

/* Стили загрузки */
.loading {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Анимация для изображений */
img.loaded {
    animation: fadeInScale 0.6s ease-out;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Улучшенные фильтры */
.filters-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
}

.filter-toggle {
    background: #fff;
    border: 2px solid #e0e0e0;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    color: #333;
    display: inline-block;
    margin: 5px;
    transition: all 0.3s ease;
}

.filter-toggle:hover,
.filter-toggle.active {
    border-color: #d35400;
    background: #d35400;
    color: white;
    transform: translateY(-2px);
}

.filter-content {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

/* Счетчики */
.counter {
    font-size: 2.5rem;
    font-weight: bold;
    color: #d35400;
    display: block;
}

.counter-label {
    font-size: 1rem;
    color: #666;
    margin-top: 5px;
}

/* Улучшенные всплывающие подсказки */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background: #333;
    border-radius: 6px;
    padding: 8px 12px;
}

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

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #d35400;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Стили для карусели Owl Carousel */
.owl-carousel .owl-nav {
    margin-top: 20px;
    text-align: center;
}

.owl-carousel .owl-nav button {
    background: #d35400 !important;
    color: white !important;
    border-radius: 50% !important;
    width: 45px !important;
    height: 45px !important;
    margin: 0 10px !important;
    transition: all 0.3s ease !important;
}

.owl-carousel .owl-nav button:hover {
    background: #b8470f !important;
    transform: translateY(-2px) !important;
}

/* Адаптивные видео */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-responsive iframe,
.video-responsive object,
.video-responsive embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Улучшенные стили для мобильных устройств */
@media (max-width: 576px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .filter-toggle {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .counter {
        font-size: 2rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* Анимации появления элементов */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.fade-in-left {
    animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
    animation: fadeInRight 0.8s ease-out;
}

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

@keyframes fadeInLeft {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Стили для ошибок и уведомлений */
.notice {
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    position: relative;
}

.notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.notice-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.notice-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.notice-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Скрытие элементов для анимации */
.animate-me {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.animate-me.animated {
    opacity: 1;
    transform: translateY(0);
}
