/* Enhanced Header Block Frontend Styles */

.crates-enhanced-header {
    position: relative;
    width: 100%;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Video Background */
.enhanced-header__video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.enhanced-header__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.enhanced-header__video-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0A1914 0%, #163832 100%);
}

.enhanced-header__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0A1914;
    opacity: 0.8;
    z-index: 2;
}

/* Particles */
.enhanced-header__particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: auto;
}

.particle {
    transition: opacity 0.3s ease;
}

.connection-line {
    transition: opacity 0.1s ease;
}

/* Content */
.enhanced-header__content {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
    color: #ffffff;
}

@media (min-width: 768px) {
    .enhanced-header__content {
        padding: 0 1.5rem;
    }
}

.enhanced-header__content-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

/* Badge */
.enhanced-header__badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 9999px;
    background-color: #163832;
    color: #F39A76;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Title */
.enhanced-header__title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #d1d5db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

@media (min-width: 768px) {
    .enhanced-header__title {
        font-size: 4.5rem;
    }
}

@media (min-width: 1024px) {
    .enhanced-header__title {
        font-size: 5rem;
    }
}

/* Typing Animation */
.typing-text {
    display: inline-block;
    overflow: hidden;
    border-right: 2px solid #F39A76;
    white-space: nowrap;
    animation: blink-caret 1s step-end infinite;
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: #F39A76;
    }
}

/* Divider */
.enhanced-header__divider {
    width: 6rem;
    height: 0.375rem;
    background-color: #F39A76;
    margin: 0 auto 2rem auto;
    border-radius: 9999px;
}

/* Description */
.enhanced-header__description {
    font-size: 1.125rem;
    line-height: 1.75;
    color: #d1d5db;
    max-width: 48rem;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (min-width: 768px) {
    .enhanced-header__description {
        font-size: 1.25rem;
    }
}

.enhanced-header__description p {
    margin-bottom: 1rem;
}

.enhanced-header__description p:last-child {
    margin-bottom: 0;
}

/* Fade-in Animation */
.fade-in-text.fade-in-active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .enhanced-header__title {
        font-size: 2.5rem;
    }

    .enhanced-header__description {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .enhanced-header__badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.75rem;
    }

    .enhanced-header__content-inner {
        min-height: 50vh;
        padding: 2rem 0;
    }
}

/* Animation Performance */
.enhanced-header__particles,
.particle,
.connection-line {
    will-change: transform, opacity;
}

.typing-text {
    will-change: border-color;
}

.fade-in-text {
    will-change: opacity, transform;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .enhanced-header__overlay {
        opacity: 0.9;
    }

    .enhanced-header__title {
        background: #ffffff;
        -webkit-background-clip: initial;
        -webkit-text-fill-color: initial;
        background-clip: initial;
        color: #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .typing-text {
        animation: none;
        border-right: none;
    }

    .fade-in-text {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .particle {
        display: none;
    }
}

/* Print Styles */
@media print {
    .enhanced-header__video-container,
    .enhanced-header__particles {
        display: none;
    }

    .enhanced-header__overlay {
        opacity: 1;
        background-color: #000000;
    }

    .enhanced-header__title {
        background: none;
        -webkit-background-clip: initial;
        -webkit-text-fill-color: initial;
        background-clip: initial;
        color: #ffffff;
    }
}