.hero-enhanced {
    position: relative;
    background: transparent;
    width: 100%;
    display: block;
}

.hero-background-enhanced {
    position: relative;
    width: 100%;
    z-index: 1;
}

.video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
}

.video-fallback-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../images/cer-favicon.svg");
    background-size: 60% auto;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
    display: none;
}

.video-fallback-background.fallback-active {
    display: block;
}

.hero-video-enhanced {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    z-index: 1;
    filter: brightness(1) contrast(1.05);
}

.hero-video-enhanced.video-active {
    display: block;
}

.hero-overlay-enhanced {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(14, 23, 42, 0.15) 0%,
        rgba(30, 41, 59, 0.1) 100%
    );
    z-index: 2;
    pointer-events: none;
}

.hero-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-content-enhanced {
    text-align: center;
    color: white;
    z-index: 4;
}

.scroll-indicator-enhanced {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.33, 1, 0.68, 1) 1s forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    pointer-events: auto;
}

.scroll-text-enhanced {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    white-space: nowrap;
}

.scroll-arrow-enhanced {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
    animation: float 2s ease-in-out infinite;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-arrow-enhanced i {
    display: block;
}

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

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 1440px) {
    .scroll-indicator-enhanced {
        padding: 6px;
        position: static;
        margin-bottom: -35px;
    }

    .scroll-text-enhanced {
        font-size: clamp(1rem, 2.5vw, 1.5rem);
    }
}

@media (max-width: 768px) {
    .hero-grid {
        padding: 0 1rem;
    }

    .scroll-indicator-enhanced {
        bottom: 1rem;
    }

    .scroll-text-enhanced {
        font-size: clamp(1rem, 2vw, 1rem);
    }

    .scroll-arrow-enhanced {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .scroll-indicator-enhanced {
        bottom: 0.75rem;
    }

    .scroll-text-enhanced {
        font-size: clamp(1rem, 1.8vw, 0.85rem);
    }

    .scroll-arrow-enhanced {
        font-size: 0.9rem;
    }
}

@media (min-width: 321px) and (max-width: 460px) {
    .scroll-indicator-enhanced {
        bottom: 0.6rem;
    }

    .scroll-text-enhanced {
        font-size: clamp(0.8rem, 1.6vw, 0.8rem);
    }

    .scroll-arrow-enhanced {
        font-size: 0.85rem;
    }
}

@media (min-width: 321px) and (max-width: 360px) {
    .scroll-indicator-enhanced {
        bottom: 0.5rem;
    }

    .scroll-text-enhanced {
        font-size: clamp(0.8rem, 1.5vw, 0.75rem);
    }

    .scroll-arrow-enhanced {
        font-size: 0.8rem;
    }
}

@media (max-width: 320px) {
    .scroll-indicator-enhanced {
        bottom: 0.4rem;
    }

    .scroll-text-enhanced {
        font-size: clamp(0.75rem, 1.3vw, 0.7rem);
    }

    .scroll-arrow-enhanced {
        font-size: 0.75rem;
    }
}

.video-text-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 4;
    padding: 2rem;
    box-sizing: border-box;
    pointer-events: none;
    overflow: hidden;
}

.video-text-header {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    flex-shrink: 0;
    width: calc(100% - 4rem);
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: clamp(-180px, -20vh, -120px);
    padding: 0;
    box-sizing: border-box;
}

.video-text-content-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
    width: calc(100% - 4rem);
    max-width: 900px;
    padding: 0;
    box-sizing: border-box;
}

.video-text-content-wrapper.overlay-active {
    opacity: 1;
    pointer-events: auto;
}

.video-text-header-line {
    color: white;
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 600;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(96, 213, 248, 0.3);
    line-height: 1.2;
    text-align: center;
    margin-bottom: clamp(-1.5rem, -2.5vh, 1rem);
}

.video-text-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    width: 100%;
}

.cer-logo-overlay {
    max-width: clamp(120px, 15vw, 200px);
    height: auto;
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.5))
        drop-shadow(0 0 25px rgba(96, 213, 248, 0.4));
}

.video-text-content {
    color: white;
    font-size: clamp(0.75rem, 1.8vw, 1.2rem);
    font-weight: 400;
    text-align: center;
    width: 100%;
    max-width: 100%;
    line-height: 1.6;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6), 0 0 15px rgba(96, 213, 248, 0.2);
    padding: 0;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.video-text-content.video-text-simple {
    font-size: clamp(1.2rem, 4vw, 2.5rem);
    font-weight: 700;
    text-shadow: 0 3px 15px rgba(0, 0, 0, 0.7), 0 0 30px rgba(96, 213, 248, 0.5);
    letter-spacing: 0.05em;
}

@media (max-width: 1440px) {
    .video-text-container {
        padding: 1.5rem;
    }

    .video-text-content-wrapper {
        width: calc(100% - 3rem);
        max-width: 800px;
        padding: 0;
    }

    .video-text-header {
        width: calc(100% - 3rem);
        max-width: 800px;
        padding: 0;
        margin-top: clamp(-160px, -18vh, -100px);
    }
}

@media (min-width: 1070px) and (max-width: 1440px) {
    .video-text-header {
        top: 45%;
    }
}

@media (max-width: 768px) {
    .video-text-container {
        padding: 1rem;
    }

    .video-text-content-wrapper {
        width: calc(100% - 2rem);
        max-width: 100%;
        padding: 0;
    }

    .video-text-header {
        width: calc(100% - 2rem);
        max-width: 100%;
        padding: 0;
        margin-top: clamp(-135px, -1vh, -85px);
    }
}

@media (max-width: 480px) {
    .video-text-container {
        padding: 0.75rem;
    }

    .video-text-content-wrapper {
        width: calc(100% - 1.5rem);
        padding: 0;
    }

    .video-text-header {
        width: calc(100% - 1.5rem);
        padding: 0;
        margin-top: clamp(-120px, -14vh, -70px);
    }
}

@media (min-width: 321px) and (max-width: 460px) {
    .video-text-container {
        padding: 0.6rem;
    }

    .video-text-header-line {
        font-size: clamp(1rem, 3.5vw, 1.8rem);
        line-height: 1.1;
        margin-bottom: clamp(-0.5rem, -1.5vh, 1rem);
    }

    .cer-logo-overlay {
        max-width: clamp(85px, 13vw, 130px);
    }

    .video-text-content {
        font-size: clamp(0.7rem, 1.9vw, 1rem);
        line-height: 1.35;
    }

    .video-text-content.video-text-simple {
        font-size: clamp(0.85rem, 3.5vw, 1.5rem);
        line-height: 1.15;
    }

    .video-text-content-wrapper {
        width: calc(100% - 1.2rem);
    }

    .video-text-header {
        width: calc(100% - 1.2rem);
        margin-top: clamp(-70px, -10vh, -45px);
    }
}

@media (min-width: 321px) and (max-width: 360px) {
    .video-text-container {
        padding: 0.5rem;
    }

    .video-text-header-line {
        font-size: clamp(0.9rem, 3.2vw, 1.4rem);
        line-height: 1.05;
    }

    .cer-logo-overlay {
        max-width: clamp(70px, 11vw, 110px);
    }

    .video-text-content {
        font-size: clamp(0.6rem, 1.6vw, 0.9rem);
        line-height: 1.3;
    }

    .video-text-content.video-text-simple {
        font-size: clamp(0.75rem, 3vw, 1.2rem);
        line-height: 1.1;
    }

    .video-text-content-wrapper {
        width: calc(100% - 1rem);
    }

    .video-text-header {
        width: calc(100% - 1rem);
        margin-top: clamp(-60px, -9vh, -40px);
    }
}

@media (max-width: 320px) {
    .video-text-container {
        padding: 0.4rem;
    }

    .video-text-header-line {
        font-size: clamp(0.75rem, 2.2vw, 1rem);
        line-height: 1;
        margin-bottom: clamp(-0.5rem, -1.5vh, 1rem);
    }

    .cer-logo-overlay {
        max-width: clamp(55px, 8vw, 80px);
    }

    .video-text-content {
        font-size: clamp(0.55rem, 1.3vw, 0.75rem);
        line-height: 1.2;
    }

    .video-text-content.video-text-simple {
        font-size: clamp(0.6rem, 2.5vw, 0.85rem);
        line-height: 1.05;
        letter-spacing: 0.02em;
    }

    .video-text-content-wrapper {
        width: calc(100% - 0.8rem);
        padding: 0;
    }

    .video-text-header {
        width: calc(100% - 0.8rem);
        padding: 0;
        margin-top: clamp(-45px, -7vh, -30px);
    }
}
