/* ===== HERO IŞIN ÇİZGİLERİ ANİMASYONU ===== */

/* Hero container */
.hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--secondary-color) 100%);
}

/* İçeriği animasyonun üstünde tut */
.hero .container {
    position: relative;
    z-index: 2;
}

/* Işın çizgileri container */
.hero-beams {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Işın çizgisi base stili */
.light-beam {
    position: absolute;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-color) 50%, 
        transparent 100%);
    opacity: 0;
    box-shadow: 0 0 20px var(--primary-color), 0 0 40px var(--primary-color);
}

/* Yatay ışınlar (soldan sağa) */
.light-beam.horizontal-right {
    width: 300px;
    height: 2px;
    animation: beamRight 8s linear infinite;
}

.light-beam.horizontal-right:nth-child(1) {
    top: 15%;
    animation-delay: 0s;
}

.light-beam.horizontal-right:nth-child(2) {
    top: 45%;
    animation-delay: 2s;
    animation-duration: 10s;
}

.light-beam.horizontal-right:nth-child(3) {
    top: 75%;
    animation-delay: 4s;
    animation-duration: 9s;
}

/* Yatay ışınlar (sağdan sola) */
.light-beam.horizontal-left {
    width: 300px;
    height: 2px;
    animation: beamLeft 8s linear infinite;
}

.light-beam.horizontal-left:nth-child(4) {
    top: 25%;
    animation-delay: 1s;
}

.light-beam.horizontal-left:nth-child(5) {
    top: 55%;
    animation-delay: 3s;
    animation-duration: 10s;
}

.light-beam.horizontal-left:nth-child(6) {
    top: 85%;
    animation-delay: 5s;
    animation-duration: 9s;
}

/* Dikey ışınlar (yukarıdan aşağıya) */
.light-beam.vertical-down {
    width: 2px;
    height: 300px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        var(--secondary-color) 50%, 
        transparent 100%);
    box-shadow: 0 0 20px var(--secondary-color), 0 0 40px var(--secondary-color);
    animation: beamDown 10s linear infinite;
}

.light-beam.vertical-down:nth-child(7) {
    left: 20%;
    animation-delay: 0.5s;
}

.light-beam.vertical-down:nth-child(8) {
    left: 50%;
    animation-delay: 2.5s;
    animation-duration: 12s;
}

.light-beam.vertical-down:nth-child(9) {
    left: 80%;
    animation-delay: 4.5s;
    animation-duration: 11s;
}

/* Dikey ışınlar (aşağıdan yukarıya) */
.light-beam.vertical-up {
    width: 2px;
    height: 300px;
    background: linear-gradient(180deg, 
        transparent 0%, 
        var(--primary-color) 50%, 
        transparent 100%);
    animation: beamUp 10s linear infinite;
}

.light-beam.vertical-up:nth-child(10) {
    left: 35%;
    animation-delay: 1.5s;
}

.light-beam.vertical-up:nth-child(11) {
    left: 65%;
    animation-delay: 3.5s;
    animation-duration: 12s;
}

/* Çapraz ışınlar (sol üstten sağ alta) */
.light-beam.diagonal-down {
    width: 500px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary-color) 50%, 
        transparent 100%);
    transform-origin: center;
    animation: beamDiagonalDown 12s linear infinite;
}

.light-beam.diagonal-down:nth-child(12) {
    top: 0;
    left: -200px;
    transform: rotate(45deg);
    animation-delay: 0s;
}

.light-beam.diagonal-down:nth-child(13) {
    top: 0;
    left: 50%;
    transform: rotate(45deg);
    animation-delay: 3s;
}

/* Çapraz ışınlar (sağ üstten sol alta) */
.light-beam.diagonal-up {
    width: 500px;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--secondary-color) 50%, 
        transparent 100%);
    box-shadow: 0 0 20px var(--secondary-color), 0 0 40px var(--secondary-color);
    transform-origin: center;
    animation: beamDiagonalUp 12s linear infinite;
}

.light-beam.diagonal-up:nth-child(14) {
    top: 0;
    right: -200px;
    transform: rotate(-45deg);
    animation-delay: 1.5s;
}

.light-beam.diagonal-up:nth-child(15) {
    top: 0;
    right: 50%;
    transform: rotate(-45deg);
    animation-delay: 4.5s;
}

/* ===== ANİMASYONLAR ===== */

/* Soldan sağa */
@keyframes beamRight {
    0% {
        left: -300px;
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

/* Sağdan sola */
@keyframes beamLeft {
    0% {
        right: -300px;
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        right: 100%;
        opacity: 0;
    }
}

/* Yukarıdan aşağıya */
@keyframes beamDown {
    0% {
        top: -300px;
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Aşağıdan yukarıya */
@keyframes beamUp {
    0% {
        bottom: -300px;
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        bottom: 100%;
        opacity: 0;
    }
}

/* Çapraz sol üst → sağ alt */
@keyframes beamDiagonalDown {
    0% {
        top: -200px;
        left: -300px;
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        top: 100%;
        left: 100%;
        opacity: 0;
    }
}

/* Çapraz sağ üst → sol alt */
@keyframes beamDiagonalUp {
    0% {
        top: -200px;
        right: -300px;
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    90% {
        opacity: 0.5;
    }
    100% {
        top: 100%;
        right: 100%;
        opacity: 0;
    }
}

/* Arka plan pulse efekti (opsiyonel) */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, 
        rgba(244, 180, 0, 0.05) 0%, 
        transparent 70%);
    animation: bgPulse 6s ease-in-out infinite;
    z-index: 0;
}

@keyframes bgPulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* ===== MOBİL OPTİMİZASYON ===== */
@media (max-width: 768px) {
    /* Mobilde çapraz ışınları gizle (performans) */
    .light-beam.diagonal-down,
    .light-beam.diagonal-up {
        display: none;
    }
    
    /* Işın boyutlarını küçült */
    .light-beam.horizontal-right,
    .light-beam.horizontal-left {
        width: 200px;
    }
    
    .light-beam.vertical-down,
    .light-beam.vertical-up {
        height: 200px;
    }
    
    /* Opacity azalt */
    .light-beam {
        opacity: 0;
    }
    
    .light-beam:nth-child(-n+6) {
        opacity: 0.3; /* Sadece ilk 6 ışın mobilde */
    }
}

/* Performans optimizasyonu */
.hero-beams * {
    will-change: transform, opacity, left, right, top, bottom;
    backface-visibility: hidden;
}

/* Hareket azaltma tercihi olanlar için */
@media (prefers-reduced-motion: reduce) {
    .light-beam {
        animation: none;
        opacity: 0.2;
    }
}
