/* ============================================================
   video_hero — landing builder component
   Hero with title + description + image + play button.
   Click play swaps the row for an in-flow video player so the
   surrounding section actually grows and pushes the next
   component down. Light & Dark + RTL aware.
   ============================================================ */

.video-hero-section {
    position: relative;
}

/* ---- State toggle ---- */
.video-hero-section[data-active="hero"]   .video-hero-section__player { display: none; }
.video-hero-section[data-active="player"] .video-hero-section__row    { display: none; }

/* ---- Text side (bumped up — title + highlight + description) ---- */
.video-hero-section__title {
    font-size: clamp(1.6rem, 2.4vw, 2.4rem);
    line-height: 1.3;
    font-weight: 800;
    margin: 0;
    color: var(--dark);
}
.video-hero-section__title-line {
    display: block;
}
.video-hero-section__title-accent {
    color: var(--primary);
    margin-top: 6px;
}

/* Rotating highlight word — sits inline with the static part of line #1.
   Typed.js cursor (.typed-cursor) inherits this color so the blinking
   cursor matches the highlighted word. */
.video-hero-section__title-highlight {
    display: inline-block;
    color: var(--primary);
    min-width: 1ch;                 /* keep the line height stable while
                                       characters are typed/erased */
}
.video-hero-section__title-highlight + span {
    display: inline-block;
    margin-inline-start: 0.4em;
}
body.home-wallpaper-active:not(.dark-mode) .video-hero-section__title-highlight {
    color: #f5d8ff;
}

.video-hero-section__description {
    font-size: clamp(1rem, 1.15vw, 1.2rem);
    line-height: 1.75;
    color: var(--gray-500);
    max-width: 540px;
    margin-bottom: 0;
}
body.dark-mode .video-hero-section__description {
    color: var(--gray-400);
}
/* On the home wallpaper (purple background), gray reads muddy.
   Lift secondary text to a soft snow tone in light mode. */
body.home-wallpaper-active:not(.dark-mode) .video-hero-section__description {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 2px rgba(20, 0, 40, 0.18);
}
body.home-wallpaper-active:not(.dark-mode) .video-hero-section__title {
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(20, 0, 40, 0.20);
}
body.home-wallpaper-active:not(.dark-mode) .video-hero-section__title-accent {
    color: #f5d8ff;
}

/* ---- CTA button ---- */
.video-hero-section__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 10px 28px;
    border-radius: 100px;
    background: var(--primary);
    color: var(--primary-btn-color);
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
    box-shadow: 0 8px 24px rgba(62, 0, 95, 0.25);
}
.video-hero-section__cta:hover,
.video-hero-section__cta:focus-visible {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(62, 0, 95, 0.35);
    outline: none;
}
body.dark-mode .video-hero-section__cta {
    box-shadow: 0 8px 24px rgba(180, 143, 255, 0.18);
}
body.dark-mode .video-hero-section__cta:hover {
    box-shadow: 0 12px 30px rgba(180, 143, 255, 0.28);
}

.video-hero-section__cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    padding-left: 2px;
}

/* ---- Media side (image with play overlay) ---- */
.video-hero-section__media {
    position: relative;
}

.video-hero-section__image-wrap {
    position: relative;
    aspect-ratio: 16 / 11;
    /* No background, border, or shadow — keep PNG transparency intact */
}

.video-hero-section__image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform .6s ease;
}
.video-hero-section__image-wrap:hover .video-hero-section__image {
    transform: scale(1.04);
}

/* ---- Play overlay ---- */
.video-hero-section__play-overlay {
    position: absolute;
    top: 80%;
    left: 32px;
    right: auto;
    transform: translateY(-50%);
    width: 88px;
    height: 88px;
    padding: 0;
    border-radius: 50%;
    background: var(--primary);
    color: var(--primary-btn-color);
    border: 4px solid rgba(255, 255, 255, 0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 40px rgba(62, 0, 95, 0.35);
    transition: transform .2s ease, background-color .2s ease;
    z-index: 2;
}
.video-hero-section__play-overlay:hover,
.video-hero-section__play-overlay:focus-visible {
    background: var(--primary-hover);
    transform: translateY(-50%) scale(1.06);
    outline: none;
}
.video-hero-section__play-overlay svg {
    display: block;
}
body.dark-mode .video-hero-section__play-overlay {
    border-color: rgba(212, 186, 255, 0.6);
}

.video-hero-section__play-overlay-pulse {
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.30;
    animation: video-hero-pulse 2.4s ease-out infinite;
    z-index: -1;
}
@keyframes video-hero-pulse {
    0%   { transform: scale(1);   opacity: 0.40; }
    70%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ============================================================
   Inline player — sits in the document flow so the next
   component is naturally pushed down by its real height.
   ============================================================ */
.video-hero-section__player {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 60px rgba(62, 0, 95, 0.20);
    animation: video-hero-fade-in .35s ease-out;
}
body.dark-mode .video-hero-section__player {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.video-hero-section__player-frame,
.video-hero-section__player-frame iframe,
.video-hero-section__player-frame video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.video-hero-section__player-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color .2s ease, transform .2s ease;
    z-index: 5;
}
.video-hero-section__player-close:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: rotate(90deg);
}
body.rtl .video-hero-section__player-close {
    right: auto;
    left: 16px;
}

@keyframes video-hero-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 991px) {
    .video-hero-section__title,
    .video-hero-section__description { text-align: center; }

    .video-hero-section__description {
        margin-left: auto;
        margin-right: auto;
    }

    .video-hero-section__cta {
        margin-left: auto;
        margin-right: auto;
        display: flex;
    }

    .video-hero-section__play-overlay {
        width: 64px;
        height: 64px;
    }
    .video-hero-section__play-overlay svg {
        width: 22px;
        height: 22px;
    }
}
