/**
 * Modern Enhancements for TOP AUDIO PRO
 * Современный дизайн с сохранением всех эффектов
 * v1.0.0
 */

/* ========== УЛУЧШЕННАЯ ТИПОГРАФИКА ========== */
:root {
    --primary-color: #000000;
    --accent-color: #ff8562;
    --text-color: #333333;
    --bg-light: #f8f9fa;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Улучшенная читаемость текста */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ========== СОВРЕМЕННОЕ МЕНЮ ========== */
.t454 {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--transition);
}

/* Плавное появление меню при скролле */
.t454.t454_sticky {
    box-shadow: var(--shadow-md);
}

/* Улучшенные ссылки меню */
.t454__list_item a {
    position: relative;
    transition: var(--transition);
}

.t454__list_item a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.t454__list_item a:hover::after,
.t454__list_item a.t-active::after {
    width: 100%;
}

.t454__list_item a:hover {
    opacity: 1 !important;
    transform: translateY(-2px);
}

/* ========== УЛУЧШЕННЫЕ КАРТОЧКИ ========== */
.t686__table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.t686__table:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* Плавная анимация background */
.t686__bg {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.t686__table:hover .t686__bg {
    transform: scale(1.08);
}

/* Улучшенный overlay */
.t686__overlay {
    background: linear-gradient(
        135deg,
        rgba(0,0,0,0.7) 0%,
        rgba(0,0,0,0.4) 100%
    );
    transition: opacity 0.4s ease;
}

/* ========== СОВРЕМЕННЫЕ КНОПКИ ========== */
.t-btn {
    border-radius: 8px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.t-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.t-btn:hover::before {
    width: 300px;
    height: 300px;
}

.t-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.t-btn:active {
    transform: translateY(0);
}

/* ========== УЛУЧШЕННЫЕ ИЗОБРАЖЕНИЯ ========== */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Плавная загрузка изображений */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ========== СОВРЕМЕННЫЕ СЕКЦИИ ========== */
.t-rec {
    position: relative;
}

/* Subtle background animation */
.t-rec::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

/* ========== УЛУЧШЕННЫЕ ПЕРЕХОДЫ ========== */
.t-records {
    -webkit-transition: opacity ease-in-out 0.4s;
    transition: opacity ease-in-out 0.4s;
}

/* ========== СОВРЕМЕННЫЕ ТЕНИ ДЛЯ ТЕКСТА ========== */
.t-title,
.t-name {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ========== ГРАДИЕНТЫ ДЛЯ АКЦЕНТОВ ========== */
.t-section__title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, transparent 100%);
    margin: 20px auto 0;
}

/* ========== УЛУЧШЕННАЯ ПРОКРУТКА ========== */
* {
    scroll-behavior: smooth;
}

html {
    scroll-padding-top: 100px;
}

/* Стилизованный скроллбар (Webkit) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media screen and (max-width: 980px) {
    .t686__table {
        border-radius: 8px;
    }

    .t-btn {
        min-height: 48px; /* Минимум для touch */
    }
}

/* ========== ACCESSIBILITY ========== */
.t-focusable:focus,
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent-color) !important;
    outline-offset: 4px;
}

/* ========== АНИМАЦИИ ПОЯВЛЕНИЯ ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.t-rec[data-animationappear="off"] {
    animation: fadeInUp 0.6s ease-out;
}

/* ========== HOVER ЭФФЕКТЫ ДЛЯ ССЫЛОК ========== */
a {
    transition: var(--transition);
}

a:not(.t-btn):hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* ========== УЛУЧШЕННЫЕ ФОРМЫ (если есть) ========== */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    border-radius: 8px;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 133, 98, 0.2);
    border-color: var(--accent-color);
}

/* ========== LOADING ANIMATION ========== */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* ========== ПЕЧАТЬ ========== */
@media print {
    .t454,
    .t-btn {
        box-shadow: none !important;
    }
}

/* ========== PERFORMANCE ========== */
/* GPU ускорение для анимаций */
.t686__bg,
.t686__overlay,
.t686__textwrapper {
    will-change: transform, opacity;
}

/* После завершения анимации убираем will-change */
.animation-complete {
    will-change: auto;
}
