/**
 * Hero Background Styles - Full Page Background
 * 
 * @package SIC_Base_Theme
 */

/* Hero Page Background - Wraps entire page content */
.hero-page-background {
    position: relative;
    min-height: 100vh;
    overflow: visible;
}

/* Hero Background Layer - Fixed background image */
.hero-background-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
}

.hero-background-layer picture {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: var(--hero-opacity, 0.7);
}

/* Hero Overlay - subtle overlay on background */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
    pointer-events: none;
}

/* Hero Content Overlay - Makes content appear above background */
.hero-content-overlay {
    position: relative;
    z-index: 1;
    width: 100%;
    background: transparent;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-page-background {
        min-height: auto;
    }
}

/* ========================================
   Animated Overlay Effects
   ======================================== */

.hero-animated-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
    z-index: -2;
}

.overlay-particle {
    position: absolute;
    pointer-events: none;
    will-change: transform;
    visibility: visible !important;
    display: block !important;
}

/* Snow Effect */
.overlay-particle.snow {
    color: var(--particle-color, white);
    text-shadow: 0 0 8px var(--particle-color, white);
    font-size: 20px;
}

.overlay-particle.snow::before {
    content: '❄';
}

/* Particles Effect */
.overlay-particle.particle {
    width: 10px !important;
    height: 10px !important;
    background: white !important;
    border-radius: 50% !important;
    box-shadow: 0 0 20px white, 0 0 10px white !important;
    display: block !important;
    opacity: 1 !important;
    position: absolute !important;
}

/* IT Icons Effect */
.overlay-particle.it-icon {
    color: var(--particle-color, white) !important;
    text-shadow: 0 0 10px var(--particle-color, white), 0 0 20px var(--particle-color, white) !important;
    font-size: 28px !important;
    line-height: 1;
    display: block !important;
    opacity: 0.9 !important;
}

/* Binary Code Effect */
.overlay-particle.binary {
    color: var(--binary-color, #00ff00);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 0 0 10px var(--binary-color, #00ff00);
    font-size: 18px;
}

/* Circuit Board Effect */
.overlay-particle.circuit {
    color: var(--particle-color, white) !important;
    font-family: monospace;
    font-weight: bold;
    text-shadow: 0 0 10px var(--particle-color, white), 0 0 20px var(--particle-color, white) !important;
    font-size: 24px !important;
    line-height: 1;
    display: block !important;
    opacity: 0.9 !important;
}

/* Animation Keyframes */
@keyframes fall {
    0% {
        transform: translateY(-100px) translateX(0);
    }
    100% {
        transform: translateY(calc(100vh + 100px)) translateX(var(--drift, 0));
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) translateX(10px) rotate(5deg);
    }
    50% {
        transform: translateY(-40px) translateX(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-20px) translateX(10px) rotate(5deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

/* Apply animations to particles */
.overlay-particle.snow,
.overlay-particle.binary {
    animation: fall linear infinite;
}

.overlay-particle.particle {
    animation: fall linear infinite, pulse 2s ease-in-out infinite;
}

.overlay-particle.it-icon,
.overlay-particle.circuit {
    animation: fall linear infinite, float 3s ease-in-out infinite;
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    .hero-animated-overlay {
        display: none;
    }
}

/* Reduce particle count on mobile for performance */
@media (max-width: 768px) {
    .overlay-particle:nth-child(n+31) {
        display: none;
    }
}
