/**
 * KTJ Krug UI Safeguards
 * Prevents UI blocking issues and z-index conflicts
 *
 * Created: 2026-01-12
 * Purpose: Enforce maximum z-index limits and prevent viewport blocking
 */

/* Z-INDEX HIERARCHY - NEVER EXCEED THESE VALUES */
:root {
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-notification: 1080;
    --z-max: 9990; /* ABSOLUTE MAXIMUM - DO NOT EXCEED */
}

/* Enforce z-index limits on all conversion elements */
[data-conversion-element] {
    max-height: 10vh !important; /* Never cover more than 10% of viewport */
}

[data-conversion-element][data-type="popup"] {
    max-width: 90vw !important;
    max-height: 90vh !important;
}

[data-conversion-element][data-type="banner"] {
    max-height: 8vh !important;
}

[data-conversion-element][data-type="sticky-footer"] {
    max-height: 10vh !important;
    z-index: var(--z-sticky) !important;
}

[data-conversion-element][data-type="notification"] {
    max-height: 15vh !important;
    max-width: 400px !important;
    z-index: var(--z-notification) !important;
}

/* Prevent full-page overlays */
.conversion-overlay {
    pointer-events: none !important;
}

.conversion-overlay > * {
    pointer-events: auto;
}

/* Force reasonable z-index on legacy elements */
.urgency-bar,
.conversion-popup,
.notification-banner,
.sticky-cta {
    z-index: var(--z-sticky) !important;
}

/* DISABLED: Floating CTA was overlapping footer content on mobile */
/* This overrides the mobile media query in style.css that shows .floating-cta */
.floating-cta {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Mobile-specific safeguards */
@media (max-width: 768px) {
    [data-conversion-element] {
        max-height: 12vh !important; /* Slightly more room on mobile */
    }

    [data-conversion-element][data-type="popup"] {
        max-width: 95vw !important;
        max-height: 85vh !important;
    }
}

/* Accessibility safeguards */
[data-conversion-element]:focus-within {
    outline: 2px solid #4A90E2;
    outline-offset: 2px;
}

/* Prevent auto-play annoyances */
[data-conversion-element] video,
[data-conversion-element] audio {
    pointer-events: auto;
}

[data-conversion-element] video[autoplay],
[data-conversion-element] audio[autoplay] {
    display: none !important; /* Block autoplay media in conversion elements */
}
/* Remote Worker Paradise Section */
.remote-worker-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0f172a 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.remote-worker-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.remote-worker-section .section-header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

.remote-worker-section .section-title {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.remote-worker-section .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

.remote-worker-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    position: relative;
    z-index: 1;
}

@media (max-width: 968px) {
    .remote-worker-grid {
        grid-template-columns: 1fr;
    }
}

.remote-feature-card.highlight {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 20px;
    padding: 40px;
    color: #fff;
    box-shadow: 0 25px 50px -12px rgba(16, 185, 129, 0.4);
}

.remote-feature-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.remote-feature-icon i {
    font-size: 36px;
    color: #fff;
}

.remote-feature-content h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #fff;
}

.speed-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 20px;
}

.speed-item {
    text-align: center;
}

.speed-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.speed-label {
    display: block;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.speed-divider {
    width: 2px;
    height: 50px;
    background: rgba(255, 255, 255, 0.3);
}

.remote-feature-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.6;
}

.remote-features-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .remote-features-list {
        grid-template-columns: 1fr;
    }
}

.remote-mini-feature {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    transition: all 0.3s ease;
}

.remote-mini-feature:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    border-color: rgba(16, 185, 129, 0.5);
}

.remote-mini-feature i {
    font-size: 24px;
    color: #10b981;
    flex-shrink: 0;
    margin-top: 3px;
}

.remote-mini-feature h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 5px;
}

.remote-mini-feature p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.remote-cta {
    text-align: center;
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
}

.remote-cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.remote-cta .btn-primary {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px -5px rgba(245, 158, 11, 0.4);
    transition: all 0.3s ease;
}

.remote-cta .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px -5px rgba(245, 158, 11, 0.5);
}
