/* ========== Section Styles ========== */

/* ========== Alternative Fix ========== */

.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    isolation: isolate; /* Створює новий stacking context */
}

.hero__background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    filter: brightness(0.7);
    transform: translateZ(0); /* Примусова GPU прискорення */
    backface-visibility: hidden; /* Виправлення мерехтіння */
    z-index: 0;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(15, 23, 42, 0.95) 0%,
        rgba(15, 23, 42, 0.85) 40%,
        rgba(30, 64, 175, 0.3) 70%,
        transparent 100%
    );
    transform: translateZ(0);
    backface-visibility: hidden;
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
}


.hero__wrapper {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 4rem;
    align-items: center;
}

/* Left Side - Main Content */
.hero__main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero__label {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.hero__title {
    font-size: clamp(3rem, 7vw, 6.5rem);
    font-weight: 900;
    line-height: 0.95;
    color: #ffffff;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.hero__highlight {
    display: block;
    background: linear-gradient(135deg, #3B82F6 0%, #F59E0B 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero__subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    max-width: 560px;
    font-weight: 300;
}

.hero__cta {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Hero Buttons */
.btn--hero-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn--hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
}

.btn--hero-secondary {
    display: inline-flex;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.btn--hero-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Right Side - Stats */
.hero__stats {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero__stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    transition: all 0.4s ease;
}

.hero__stat-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero__stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.15);
    border-radius: 12px;
    color: #3B82F6;
}

.hero__stat-value {
    font-size: 2.5rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.02em;
}

.hero__stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* Bottom Badge */
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 100px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    width: fit-content;
}

/* ========== Responsive Breakpoints ========== */

/* 4K & Ultra HD (2560px+) */
@media (min-width: 2560px) {
    .hero__content {
        max-width: 2000px;
        padding: 4rem;
    }

    .hero__wrapper {
        grid-template-columns: 1fr 480px;
        gap: 6rem;
    }

    .hero__title {
        font-size: clamp(5rem, 6vw, 8rem);
    }

    .hero__subtitle {
        font-size: 1.75rem;
        max-width: 720px;
    }

    .hero__stat-card {
        padding: 3rem;
    }

    .hero__stat-value {
        font-size: 3.5rem;
    }

    .hero__stat-icon {
        width: 64px;
        height: 64px;
    }

    .btn--hero-primary,
    .btn--hero-secondary {
        padding: 1.25rem 2.5rem;
        font-size: 1.125rem;
    }
}

/* Ultra Wide & Large Desktops (1920px - 2559px) */
@media (min-width: 1920px) and (max-width: 2559px) {
    .hero__content {
        max-width: 1600px;
        padding: 3rem;
    }

    .hero__wrapper {
        grid-template-columns: 1fr 420px;
        gap: 5rem;
    }

    .hero__title {
        font-size: clamp(4rem, 6vw, 7rem);
    }

    .hero__subtitle {
        font-size: 1.5rem;
        max-width: 640px;
    }

    .hero__stat-card {
        padding: 2.5rem;
    }

    .hero__stat-value {
        font-size: 3rem;
    }

    .hero__stat-icon {
        width: 56px;
        height: 56px;
    }
}

/* Large Desktop (1536px - 1919px) */
@media (min-width: 1536px) and (max-width: 1919px) {
    .hero__content {
        max-width: 1400px;
    }

    .hero__wrapper {
        grid-template-columns: 1fr 400px;
        gap: 4rem;
    }
}

/* Desktop (1280px - 1535px) */
@media (min-width: 1280px) and (max-width: 1535px) {
    .hero__wrapper {
        grid-template-columns: 1fr 360px;
        gap: 3.5rem;
    }
}

/* Small Desktop (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
    .hero__content {
        padding: 0 1.5rem;
    }

    .hero__wrapper {
        grid-template-columns: 1fr 340px;
        gap: 3rem;
    }

    .hero__title {
        font-size: clamp(2.5rem, 6vw, 5rem);
    }
}

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero__content {
        padding: 2rem 1.5rem;
    }

    .hero__wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero__title {
        font-size: clamp(2.75rem, 8vw, 4.5rem);
    }

    .hero__subtitle {
        font-size: 1.25rem;
        max-width: 100%;
    }

    .hero__stats {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 1rem;
        gap: 1.25rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .hero__stat-card {
        min-width: 260px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .hero__background {
        background-position: 60% center;
    }
}

/* Mobile (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .hero {
        height: 85vh;
        height: 85dvh;
        min-height: 600px; /* Мінімальна висота */
    }
    .hero__overlay {
        background: linear-gradient(
            to top,
            rgba(15, 23, 42, 0.95) 0%,
            rgba(15, 23, 42, 0.85) 40%,
            rgba(30, 64, 175, 0.4) 70%,
            transparent 100%
        );
    }

    .hero__content {
        padding: 2rem 1.25rem;
    }

    .hero__wrapper {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .hero__main {
        gap: 1.5rem;
    }

    .hero__title {
        font-size: 2.75rem;
        line-height: 1;
    }

    .hero__subtitle {
        font-size: 1.125rem;
    }

    .hero__cta {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .btn--hero-primary,
    .btn--hero-secondary {
        flex: 1;
        min-width: 160px;
        justify-content: center;
    }

    .hero__stats {
        flex-direction: row;
        overflow-x: auto;
        gap: 1rem;
        padding-bottom: 1rem;
    }

    .hero__stat-card {
        min-width: 220px;
        padding: 1.5rem;
        flex-shrink: 0;
    }

    .hero__stat-value {
        font-size: 2.25rem;
    }

    .hero__background {
        background-position: center center;
    }
}

/* Small Mobile (361px - 480px) */
@media (min-width: 361px) and (max-width: 480px) {
    .hero {
        height: 90vh;
        height: 93dvh;
        min-height: 560px;
    }
    .hero__overlay {
        background: linear-gradient(
            to top,
            rgba(15, 23, 42, 0.95) 0%,
            rgba(15, 23, 42, 0.88) 35%,
            rgba(30, 64, 175, 0.45) 65%,
            transparent 100%
        );
    }

    .hero__content {
        padding: 1.75rem 1rem;
    }

    .hero__wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero__main {
        gap: 1.25rem;
    }

    .hero__label {
        font-size: 0.75rem;
    }

    .hero__title {
        font-size: 2.25rem;
        line-height: 1.05;
    }

    .hero__subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }

    .hero__cta {
        flex-direction: column;
        gap: 0.875rem;
    }

    .btn--hero-primary,
    .btn--hero-secondary {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }

    .hero__stats {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.875rem;
        padding-bottom: 0.75rem;
    }

    .hero__stat-card {
        min-width: 200px;
        padding: 1.25rem;
    }

    .hero__stat-icon {
        width: 44px;
        height: 44px;
    }

    .hero__stat-value {
        font-size: 2rem;
    }

    .hero__stat-label {
        font-size: 0.8125rem;
    }

    .hero__badge {
        padding: 0.875rem 1rem;
        font-size: 0.8125rem;
    }

    .hero__background {
        background-position: center center;
    }
}

/* Extra Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .hero {
        height: 75vh;
        height: 75dvh;
        min-height: 520px;
    }ы
    .hero__overlay {
        background: linear-gradient(
            to top,
            rgba(15, 23, 42, 0.96) 0%,
            rgba(15, 23, 42, 0.9) 30%,
            rgba(30, 64, 175, 0.5) 60%,
            rgba(30, 64, 175, 0.2) 85%,
            transparent 100%
        );
    }

    .hero__content {
        padding: 1.5rem 0.875rem;
    }

    .hero__wrapper {
        gap: 1.75rem;
    }

    .hero__main {
        gap: 1rem;
    }

    .hero__label {
        font-size: 0.6875rem;
        padding: 0.4rem 0.75rem;
    }

    .hero__title {
        font-size: 2rem;
        line-height: 1.1;
    }

    .hero__subtitle {
        font-size: 0.9375rem;
    }

    .hero__cta {
        gap: 0.75rem;
    }

    .btn--hero-primary,
    .btn--hero-secondary {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .hero__stats {
        gap: 0.75rem;
    }

    .hero__stat-card {
        min-width: 180px;
        padding: 1rem;
    }

    .hero__stat-icon {
        width: 40px;
        height: 40px;
    }

    .hero__stat-value {
        font-size: 1.75rem;
    }

    .hero__stat-label {
        font-size: 0.75rem;
    }

    .hero__badge {
        padding: 0.75rem 0.875rem;
        font-size: 0.75rem;
    }

    .hero__background {
        background-position: center center;
    }
}

/* Mobile Landscape */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        height: auto;
        min-height: 480px;
        padding: 2rem 0;
    }
    .hero__overlay {
        background: linear-gradient(
            to top,
            rgba(15, 23, 42, 0.95) 0%,
            rgba(15, 23, 42, 0.85) 40%,
            rgba(30, 64, 175, 0.3) 70%,
            transparent 100%
        );
    }

    .hero {
        min-height: auto;
    }

    .hero__content {
        padding: 1.5rem 1rem;
    }

    .hero__wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .hero__main {
        gap: 1rem;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__subtitle {
        font-size: 0.9375rem;
    }

    .hero__stats {
        gap: 0.75rem;
    }

    .hero__stat-card {
        padding: 1rem;
    }

    .hero__stat-value {
        font-size: 1.5rem;
    }

    .hero__badge {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }
}
