/* ========================================= */
/* ===== ГЕРОЙ СЕКЦИЯ - MODERN BG ===== */
/* ========================================= */

.aetherion-pro.anton-hero-section { 
    margin-top: 50px;
    position: relative;
    width: 100%;
    min-height: 650px;
    max-height: 850px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: transparent;
    overflow: hidden;
}

/* ОСНОВНОЙ ФОН С ЗАКРУГЛЕННЫМИ УГЛАМИ */
.anton-hero-bg {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 1400px;
    height: calc(100% - 40px);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: -5px -4px 14px rgb(0 0 0 / 11%), 0 0 0 0px rgb(148 163 184 / 0%);
    z-index: 0;
    background-image: url('/wp-content/uploads/2025/11/BG_N.webp');
    background-size: cover;
}

/* КОНТЕЙНЕР ДЛЯ МЕДИА */
.anton-media-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* ВИДЕО ФОН */
.anton-bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.4) contrast(1.1);
}

/* ФОЛБЭК ИЗОБРАЖЕНИЕ */
.anton-bg-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.5) contrast(1.1);
    display: none;
}

/* НАЛОЖЕНИЕ ДЛЯ ЧИТАЕМОСТИ */
.anton-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--color-surface) 80%, transparent) 0%,
        color-mix(in srgb, var(--color-surface) 50%, transparent) 50%,
        color-mix(in srgb, var(--color-surface) 80%, transparent) 100%
    );
    z-index: 1;
}

/* ДЕКОРАТИВНЫЕ УГЛЫ */
.anton-corner-decor {
    position: absolute;
    width: 60px;
    height: 60px;
    border: 2px solid var(--color-primary);
    z-index: 1;
    opacity: 0;
    animation: anton-corner-fade 1s ease-out 0.5s forwards;
    display: none;
}

.anton-corner-top-left {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
    border-radius: 12px 0 0 0;
}

.anton-corner-top-right {
    top: 20px;
    right: 20px;
    border-left: none;
    border-bottom: none;
    border-radius: 0 12px 0 0;
}

.anton-corner-bottom-left {
    bottom: 20px;
    left: 20px;
    border-right: none;
    border-top: none;
    border-radius: 0 0 0 12px;
}

.anton-corner-bottom-right {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 12px 0;
}

@keyframes anton-corner-fade {
    to { opacity: 1; }
}

/* Основной контейнер */
.anton-hero-container {
    position: relative;
    max-width: 75rem;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    z-index: 3;
    padding: 0 20px;
}

/* Layout - 60/40 на десктопе */
.anton-hero-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1rem;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 2rem 0;
}

/* Текстовая часть */
.anton-hero-content {
    text-align: left;
    max-width: 100%;
}

/* ЗАГОЛОВОК */
.anton-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw + 1rem, 3.5rem);
    font-weight: 600;
    color: var(--color-text);
    margin: 0 0 1.5rem;
    line-height: 1.2;
    text-shadow: var(--shadow-sm);
    transition: color var(--transition-standard);
}

.anton-title-line { display: block; }
.anton-accent {
    background: var(--color-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: var(--color-primary);
    font-weight: 600;
    font-family: var(--font-heading);
}
.anton-hero-title:hover .anton-accent { 
    color: var(--color-primary); 
}

/* ПОДЗАГОЛОВОК */
.anton-hero-subtitle {
    font-family: var(--font-primary);
    font-size: clamp(1.2rem, 1.2vw + 0.5rem, 1.0625rem);
    color: var(--color-text);
    margin: 0 0 2rem;
    line-height: 1.6;
    max-width: 700px;
}
.anton-hero-subtitle strong { font-weight: 600; color: var(--color-text); }

/* НАВЫКИ */
.anton-hero-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}
.anton-skill-item {
    font-family: var(--font-primary);
    font-size: 0.875rem;
    color: var(--color-text);
    background: color-mix(in srgb, var(--color-text) 10%, transparent);
    padding: 0.5rem 1rem;
    border: 1px solid color-mix(in srgb, var(--color-text) 40%, transparent);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all var(--transition-standard);
}
.anton-skill-item:hover {
    background: color-mix(in srgb, var(--color-text) 20%, transparent);
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--color-primary) 60%, transparent);
}

/* КНОПКИ */
.anton-hero-buttons {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}
.anton-cta-button,
.anton-secondary-button {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 700;
    padding: 1rem 2.4rem;
    display: inline-flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border: none;
    text-decoration: none;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all var(--transition-standard);
}
.anton-cta-button { 
    background: var(--color-primary); 
    color: var(--color-bg); 
}
.anton-secondary-button {
    background: color-mix(in srgb, var(--color-secondary) 11%, transparent);
    color: var(--color-text);
    border: 2px solid var(--color-secondary);
}
.anton-cta-button::before,
.anton-secondary-button::before {
    content: '';
    position: absolute;
    top: 0; 
    left: -100%;
    width: 100%; 
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}
.anton-cta-button:hover::before,
.anton-secondary-button:hover::before { left: 100%; }
.anton-cta-button:hover {
    background: var(--color-primary);
    transform: translateY(-2px);
    color: var(--color-bg);
}
.anton-secondary-button:hover {
    background: var(--color-secondary);
    color: var(--color-bg);
    transform: translateY(-2px);
}
.anton-cta-button i,
.anton-secondary-button i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

/* ======================================== */
/*          МОБИЛЬНАЯ ВЕРСИЯ               */
/* ======================================== */
@media (max-width: 768px) {
    .aetherion-pro.anton-hero-section {
        height: auto;
        min-height: 100vh;
        max-height: none;
        padding: 20px 15px;
    }

    .anton-hero-bg {
        top: 10px;
        width: calc(100% - 20px);
        height: calc(100% - 20px);
        border-radius: 16px;
    }

    .anton-hero-container {
        padding: 0 20px;
        height: auto;
    }

    .anton-hero-layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        gap: 2.5rem;
        padding: 1rem 0;
    }

    /* Lottie — сверху по центру */
    .anton-hero-animation {
        height: 240px;
        order: -1;
        margin-bottom: 0;
    }
    .anton-hero-animation lottie-player {
        max-width: 240px;
        max-height: 240px;
    }

    /* ВСЁ ТЕКСТОВОЕ — СЛЕВА */
    .anton-hero-content {
        text-align: left !important;
    }

    .anton-hero-title {
        margin-bottom: 1rem;
        text-align: left;
        font-weight: 600;
    }
    .anton-accent {
         font-weight: 600;
    }

    .anton-hero-subtitle {
        margin: 0 0 1.5rem;
        max-width: none;
        text-align: left;
    }

    .anton-hero-skills {
        justify-content: flex-start;
        margin-bottom: 2rem;
    }

    .anton-hero-buttons {
        justify-content: flex-start;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .anton-cta-button,
    .anton-secondary-button {
        padding: 0.875rem 1.75rem;
        font-size: 0.9rem;
    }

    /* Упрощаем декоративные элементы на мобильных */
    .anton-corner-decor {
        width: 40px;
        height: 40px;
         display: none;
    }
    
    .anton-corner-top-left,
    .anton-corner-top-right,
    .anton-corner-bottom-left,
    .anton-corner-bottom-right {
        top: 10px;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .aetherion-pro.anton-hero-section {
        padding: 15px 10px;
        min-height: 90vh;
    }

    .anton-hero-bg {
        border-radius: 12px;
    }

    .anton-hero-animation {
        height: 200px;
    }
    .anton-hero-animation lottie-player {
        max-width: 200px;
        max-height: 200px;
    }

    .anton-hero-layout { 
        gap: 2rem;
        padding-top: 25px;
        padding-bottom: 25px;
    }

    .anton-hero-title {
        font-size: clamp(1.75rem, 6vw + 1rem, 2.8rem);
        font-family: var(--font-heading);
    }

    .anton-hero-subtitle {
        font-size: clamp(0.875rem, 3vw + 0.5rem, 1rem);
    }

    .anton-hero-skills { gap: 0.5rem; }
    .anton-skill-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .anton-hero-buttons {
        flex-direction: column;
        align-items: flex-start;
    }
    .anton-cta-button,
    .anton-secondary-button {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* Анимация появления */
.anton-hero-content > * { 
    opacity: 0; 
    animation: fadeInUp 0.8s ease-out forwards; 
}
.anton-hero-title { animation-delay: 0.1s; }
.anton-hero-subtitle { animation-delay: 0.2s; }
.anton-hero-skills { animation-delay: 0.3s; }
.anton-hero-buttons { animation-delay: 0.4s; }
.anton-hero-animation {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out 0.5s forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(25px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Доступность */
@media (prefers-reduced-motion: reduce) {
    .anton-hero-content > *, 
    .anton-hero-animation,
    .anton-corner-decor {
        animation: none;
        opacity: 1;
    }
    .anton-skill-item, 
    .anton-cta-button, 
    .anton-secondary-button {
        transition: none;
    }
    
    .anton-corner-decor {
        opacity: 0.5;
         display: none;
    }
    
    .anton-bg-video {
        display: none;
    }
    
    .anton-bg-fallback {
        display: block !important;
    }
}

/* ВИДЕО ФОН - ИСПРАВЛЕНИЯ ДЛЯ SAFARI */
.anton-bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: brightness(0.4) contrast(1.1);
    
    /* Исправления для Safari */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
    
    /* Гарантия отображения */
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

/* Контейнер для видео с исправлениями для Safari */
.anton-media-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    
    /* Для Safari */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Фолбэк для случаев, когда видео не работает */
.anton-bg-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    filter: brightness(0.5) contrast(1.1);
    display: none;
    position: absolute;
    top: 0;
    left: 0;
}

/* Дополнительные исправления для основного контейнера */
.aetherion-pro.anton-hero-section {
    margin-top: 50px;
    position: relative;
    width: 100%;
    min-height: 650px;
    max-height: 850px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: transparent;
    overflow: hidden;
    
    /* Для Safari */
    -webkit-overflow-scrolling: touch;
}


/* ===== СМЕНА ФОНА ДЛЯ ТЕМ ===== */
[data-theme="dark"] .anton-hero-bg {
    background-image: url('/wp-content/uploads/2025/12/BGn_W.webp');
}

[data-theme="light"] .anton-hero-bg {
    background-image: url('/wp-content/uploads/2025/11/Pattern_WH-scaled.webp');
}

/* Прячем видео в светлой теме */
[data-theme="light"] .anton-bg-video {
    display: none;
}

/* Показываем фолбэк в светлой теме */
[data-theme="light"] .anton-bg-fallback {
    display: block;
}