/* =================================
   HERO-PARALLAX COMPONENT
   Універсальний паралакс hero з фіксованим відео
   Підтримує обидва варіанти класів: .hero-parallax та .hero-section
   ================================= */

/* ===== BASE HERO PARALLAX (всі варіанти класів) ===== */
.hero-parallax,
.hero-section,
.blog-hero,
.developer-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-content-base, 10);
    overflow: visible;
}

/* ===== ФІКСОВАНЕ ВІДЕО (всі варіанти класів) ===== */
.hero-parallax__video,
.hero-parallax .video-background,
.hero-section .video-background,
.blog-hero .video-background,
.developer-hero .video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: var(--z-background, -1);
}

/* Desktop відео */
.hero-parallax__video--desktop,
.desktop-video {
    display: block;
}

/* Mobile відео */
.hero-parallax__video--mobile,
.mobile-video {
    display: none;
}

/* ===== OVERLAY (всі варіанти) ===== */
.hero-parallax__overlay,
.hero-parallax .video-overlay,
.hero-section .video-overlay,
.blog-hero .video-overlay,
.developer-hero .video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: var(--z-video-background, 0);
}

/* ===== КОНТЕНТ (обидва варіанти) ===== */
.hero-parallax__content,
.hero-content {
    position: relative;
    z-index: var(--z-content-hero, 100);
    width: 100%;
    padding: var(--space-xl) 0;
    pointer-events: auto;
}

.hero-text {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: var(--z-content-hero, 100);
    pointer-events: auto;
}

.hero-text h1 {
    margin-bottom: var(--space-xl);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-text p {
    margin-bottom: var(--space-xl);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.hero-services {
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
    justify-content: center;
    align-items: center;
    margin-top: var(--space-xl);
}

.hero-buttons .btn {
    text-transform: lowercase;
    letter-spacing: 0.5px;
    min-width: 200px;
}

/* ===== АНІМАЦІЇ HERO КОНТЕНТУ ===== */
.hero-text h1 {
    opacity: 1;
    transform: translateY(0);
}

.hero-text p {
    opacity: 1;
    transform: translateY(0);
}

.hero-buttons {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .hero-text h1 {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 1s ease-out 0.3s forwards;
    }

    .hero-text p {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 1s ease-out 0.6s forwards;
    }

    .hero-buttons {
        opacity: 0;
        transform: translateY(30px);
        animation: fadeInUp 1s ease-out 0.9s forwards;
    }

    @keyframes fadeInUp {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* ===== ПЕРША СЕКЦІЯ ПІСЛЯ HERO ===== */
/* Має особливий дизайн з rounded top */
.content-section--first,
.services-section,
.blog-header,
.events-filter {
    position: relative;
    background: #090407;
    z-index: 10;
    border-radius: 20px 20px 0 0;
    margin-top: -20px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    padding-top: 60px;
}

/* ===== RESPONSIVE ===== */

/* Tablet і Mobile */
@media (max-width: 1024px) {
    .hero-parallax {
        min-height: calc(var(--vh, 1vh) * 100);
    }

    .content-section--first {
        padding-top: 50px;
    }
}

/* Mobile only */
@media (max-width: 767px) {

    /* Показати mobile відео */
    .hero-parallax__video--desktop,
    .desktop-video {
        display: none;
    }

    .hero-parallax__video--mobile,
    .mobile-video {
        display: block;
    }

    /* Адаптація spacing */
    .hero-parallax__content,
    .hero-content {
        padding: var(--space-md) 0;
    }

    .content-section--first,
    .services-section,
    .blog-header,
    .events-filter {
        border-radius: 16px 16px 0 0;
        margin-top: -16px;
        padding-top: 40px;
    }
}

/* ===== iOS SAFARI ПІДТРИМКА ===== */
@supports (-webkit-touch-callout: none) {
    .hero-parallax {
        min-height: 100vh;
        min-height: calc(var(--vh, 1vh) * 100);
    }

    .hero-parallax__video {
        height: 100vh;
        height: calc(var(--vh, 1vh) * 100);
    }
}

/* ===== LANDSCAPE MODE (низькі екрани) ===== */
@media (max-height: 500px) and (orientation: landscape) {

    /* Вимкнути fixed для дуже низьких екранів */
    .hero-parallax__video {
        position: absolute;
    }

    .hero-parallax__overlay {
        position: absolute;
    }

    .hero-parallax {
        min-height: 100vh;
    }
}