/* Hero Slider Styles - Optimized for Performance 
 * Only loaded on homepage for better performance
 * Uses GPU acceleration and optimized animations
 */
.hero-slider {
    position: relative;
    height: 720px;
    min-height: 720px;
    max-height: 720px;
    margin-top: 0; /* remove gap between header and slider */
    overflow: hidden;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    will-change: transform;
}

.slider-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    /* Görselin tam alanı kaplaması için cover kullanıyoruz */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    /* Sabit arkaplan bazı cihazlarda taşma/yırtılma yapabilir, kaldırıyoruz */
    background-attachment: scroll;
    /* Fotoğraf yanlarında boşluk kalırsa siyah arka plan */
    background-color: #000000;
    display: flex;
    align-items: center;
    will-change: opacity;
}

/* Default gradient backgrounds for slides */
.slide:nth-child(1) {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.slide:nth-child(2) {
    background: linear-gradient(135deg, #2d1b69 0%, #11998e 50%, #38ef7d 100%);
}

.slide:nth-child(3) {
    background: linear-gradient(135deg, #667db6 0%, #0082c8 50%, #667db6 100%);
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(26,26,26,0.5) 100%);
    z-index: 1;
}

/* Inline image fills the slide area */
.slide .slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* fill area completely */
    object-position: center center; /* center the image properly */
    z-index: 0; /* behind overlay and content */
    pointer-events: none;
}

.slide-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    color: #ffffff;
    transform: translateX(-50px);
    opacity: 0;
    transition: all 0.8s ease-out 0.3s;
    margin-top: 80px; /* push content below header */
}

.slide.active .slide-content {
    transform: translateX(0);
    opacity: 1;
}

.slide-content h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(45deg, #ffffff, #dc143c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.slide-content p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    color: #cccccc;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-buttons .btn-primary {
    background: linear-gradient(45deg, #dc143c, #ff1744);
    color: #ffffff;
    border: none;
}

.hero-buttons .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 20, 60, 0.4);
}

.hero-buttons .btn-secondary {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.hero-buttons .btn-secondary:hover {
    background: #ffffff;
    color: #000000;
    transform: translateY(-3px);
}

/* Person Image */
.hero-person {
    position: absolute;
    right: 2%;
    bottom: 0;
    z-index: 3;
    /* Uniform visual box for profile image */
    width: 32%;
    max-width: 420px;
    aspect-ratio: 3 / 4; /* consistent portrait box */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    pointer-events: none;
}

.person-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* fill the 3:4 box uniformly */
    object-position: center top;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.3));
    animation: floatAnimation 3s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

/* Placeholder for person image */
.hero-person::before {
    content: '';
    position: absolute;
    bottom: 6%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 95%;
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.35) 0%, rgba(255, 255, 255, 0.12) 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    z-index: 0;
    animation: floatAnimation 3s ease-in-out infinite;
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    top: calc(50% + 40px); /* offset for header space */
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 4;
}

.nav-btn {
    background: rgba(220, 20, 60, 0.8);
    border: none;
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.nav-btn:hover {
    background: #dc143c;
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(220, 20, 60, 0.4);
}

/* Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 4;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
    background: #dc143c;
    transform: scale(1.2);
}

/* Optimized Animations with GPU acceleration */
@keyframes floatAnimation {
    0%, 100% {
        transform: translate3d(0, 0, 0);
    }
    50% {
        transform: translate3d(0, -20px, 0);
    }
}

/* Preload optimization */
.hero-slider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
    will-change: transform;
}

/* Lazy loading optimization */
.slide:not(.active) {
    pointer-events: none;
}

.slide.active {
    pointer-events: auto;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .slide,
    .slide-content,
    .person-image,
    .nav-btn,
    .dot {
        transition: none !important;
        animation: none !important;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-person {
        right: 2%;
    }
    
    .hero-person { max-width: 360px; }
    
    .slide-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-slider {
        height: 560px;
        min-height: 560px;
        max-height: 560px;
    }
    
    .slide {
        background-attachment: scroll; /* Fix mobile parallax issues */
    }
    
    /* Sadece statik fallback kişi görselini gizle */
    .hero-person.static-hero { display: none; }
}

/* Dinamik slayt içindeki kişi görseli her boyutta görünür kalsın */
.slide .hero-person { display: flex; }

@media (max-width: 768px) {
    .slide-content {
        text-align: center;
        max-width: 100%;
        padding: 0 1rem;
        margin-top: 60px; /* smaller margin for mobile header */
    }
    .slide-content h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    .slide-content p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }
    .hero-buttons {
        justify-content: center;
        gap: 1rem;
    }
    .hero-buttons .btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    .slider-nav {
        padding: 0 1rem;
    }
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .slide-content h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }
}
