/* ============================================================
   GoRecruit Lazy Video Section — Stylesheet
   Version: 2.0.0  (viewport autoplay)
   ============================================================ */

/* ── Section ── */
.gr-agency-isolate.gr-video-section {
    padding-top: 6rem;
    padding-bottom: 6rem;
    background-color: var(--gr-gray-50, #f9fafb);
    text-align: center;
}

.gr-agency-isolate .gr-container-broad {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Header ── */
.gr-agency-isolate .gr-video-header { margin-bottom: 3rem; }

.gr-agency-isolate .gr-video-header h2 {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--gr-gray-900, #111827);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

.gr-agency-isolate .gr-video-header p {
    color: var(--gr-gray-500, #6b7280);
    font-size: 1.125rem;
}

/* ── Card shell ── */
.gr-agency-isolate .gr-video-card {
    position: relative;
    border-radius: 3rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    height: 480px;
    background: var(--gr-brand-gradient, linear-gradient(135deg, #6366f1, #8b5cf6));
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Stripe overlay — fades away once video plays ── */
.gr-agency-isolate .gr-video-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.2;
    background-image: linear-gradient(
        135deg,
        #ffffff 25%, transparent 25%,
        transparent 50%, #ffffff 50%,
        #ffffff 75%, transparent 75%, transparent 100%
    );
    background-size: 100px 100px;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 1;
}
.gr-agency-isolate .gr-video-card.gr-playing .gr-video-pattern { opacity: 0; }

/* ── Static poster image ── */
.gr-agency-isolate .gr-video-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 2;
}
.gr-agency-isolate .gr-video-card.gr-playing .gr-video-poster { opacity: 0; }

/* ── Pre-load placeholder (play icon + label) ── */
.gr-agency-isolate .gr-video-placeholder {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}
.gr-agency-isolate .gr-video-card.gr-playing .gr-video-placeholder {
    opacity: 0;
    transform: scale(0.85);
}

.gr-agency-isolate .gr-video-play-icon {
    width: 6rem;
    height: 6rem;
    background-color: #ffffff;
    color: var(--gr-primary, #6366f1);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.875rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    padding-left: 0.25rem;
}

.gr-agency-isolate .gr-video-play-label {
    color: #ffffff;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 0.025em;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    margin: 0;
}

/* ── Inline <video> element ── */
.gr-agency-isolate .gr-video-embed {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gr-agency-isolate .gr-video-embed video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 0.6s ease;
    border-radius: 3rem;
}
.gr-agency-isolate .gr-video-card.gr-playing .gr-video-embed video { opacity: 1; }

/* ── Unmute pill button ── */
.gr-agency-isolate .gr-video-unmute {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 9999px;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.gr-agency-isolate .gr-video-unmute:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: translateX(-50%) scale(1.04);
}

.gr-agency-isolate .gr-video-unmute.gr-unmuted span { display: none; }

/* ── Buffering spinner ── */
.gr-agency-isolate .gr-video-loading {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    z-index: 6;
    pointer-events: none;
}
.gr-agency-isolate .gr-video-loading.active { display: flex; }

.gr-spinner {
    width: 3rem;
    height: 3rem;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: gr-spin 0.8s linear infinite;
}
@keyframes gr-spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 768px) {
    .gr-agency-isolate .gr-video-card {
        height: 320px;
        border-radius: 1.5rem;
    }
    .gr-agency-isolate .gr-video-embed video { border-radius: 1.5rem; }
    .gr-agency-isolate .gr-video-header h2 { font-size: 1.6rem; }
    .gr-agency-isolate .gr-video-play-icon { width: 4.5rem; height: 4.5rem; font-size: 1.4rem; }
    .gr-agency-isolate .gr-video-play-label { font-size: 1.1rem; }
    .gr-agency-isolate .gr-video-unmute { font-size: 0.8rem; padding: 0.4rem 1rem; bottom: 1rem; }
}
