/**
 * Hero Slider - Printables Style
 * Production-ready, accessible, responsive hero slider
 */

/* Hero Slider Container */
.hero-slider {
    position: relative;
    width: 100%;
    max-width: 100%; /* Tam genişlik kullan */
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    margin-bottom: 20px;
    height: 100%; /* Grid yüksekliğine göre ayarlanacak */
    display: flex;
    flex-direction: column;
    visibility: visible;
}

/* Hero slider wrapper */
.hero-slider-wrapper {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px; /* Container ile aynı padding */
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 380px 0.9fr; /* Daily model card genişliği artırıldı */
    gap: 10px; /* Boşluk azaltıldı */
    align-items: stretch; /* Her iki kolon da aynı yükseklikte */
    box-sizing: border-box; /* Padding dahil hesaplama */
}

/* Hero section container - container ile aynı genişlik */
.hero-section {
    width: 100%;
    box-sizing: border-box;
}

/* Günün En Çok İndirilen Modeli Kartı */
.daily-model-card {
    background: var(--bg-secondary, #2A2738);
    border: 1px solid rgba(146, 141, 171, 0.25);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 100px;
    margin-left: -10px; /* Daha sola kaydır */
    height: 500px; /* Hero slider ile aynı sabit yükseklik */
    max-height: 500px; /* Maksimum yükseklik */
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Taşmayı önle */
}

.daily-model-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px; /* Görsel alanına daha fazla yer vermek için azaltıldı */
    padding-bottom: 10px; /* Padding de azaltıldı */
    border-bottom: 1px solid rgba(146, 141, 171, 0.15);
}

.daily-model-header h3 {
    font-size: 0.875rem; /* 1rem'den 0.875rem'e küçültüldü (14px) */
    font-weight: 600;
    color: var(--text-primary, #FFFFFF);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.daily-model-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    margin-left: auto;
}

.daily-model-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px; /* Görsel ile yazı arası boşluk */
    background: var(--bg-tertiary, #1F1C2C);
    min-height: 240px; /* Görsel alanı daha da genişletildi */
    max-height: 240px; /* Maksimum yükseklik */
    flex-shrink: 0; /* Görsel alanının küçülmesini önle */
}

.daily-model-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.daily-model-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #FFFFFF);
    margin-bottom: 0px; /* Alt boşluk minimuma indirildi */
    margin-top: 16px; /* Yazıyı daha aşağıya kaydırmak için artırıldı */
    line-height: 1.6; /* Daha fazla satır arası boşluk */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    padding: 0;
    /* Alt kısmın kesilmesini önlemek için yeterli yükseklik */
    /* font-size (1rem = 16px) * line-height (1.6) * 2 satır = 51.2px */
    min-height: 52px; /* İki satır için yeterli yükseklik */
    max-height: 52px;
    word-break: break-word; /* Uzun kelimeleri kır */
    text-overflow: ellipsis; /* Taşan metin için üç nokta */
}

.daily-model-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 0.875rem; /* Font boyutu artırıldı (13px -> 14px) */
    color: var(--text-primary, #FFFFFF); /* Daha belirgin renk */
    font-weight: 500; /* Biraz daha kalın */
}

/* Favori sayısı yazısı için özel stil */
.daily-model-favorite-count {
    color: #FFFFFF !important; /* Beyaz renk */
    font-size: 14px !important; /* Font boyutu artırıldı (12px -> 14px) */
    font-weight: 600 !important; /* Daha kalın */
    margin-top: 0px !important; /* Üst boşluk minimuma indirildi */
    margin-bottom: 4px !important; /* Alt boşluk azaltıldı (8px -> 4px) */
    line-height: 1.4;
}

.daily-model-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.daily-model-link {
    display: block;
    width: 100%;
    padding: 8px 20px; /* Yükseklik azaltıldı (12px -> 8px) */
    background: var(--accent-color, #928DAB);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700; /* Daha kalın */
    font-size: 1rem; /* Font boyutu artırıldı (14px -> 16px) */
    transition: all 0.3s ease;
    margin-top: 4px; /* Üst boşluk azaltıldı (12px -> 4px) */
    box-shadow: 0 2px 8px rgba(146, 141, 171, 0.2); /* Gölge eklendi */
}

.daily-model-link:hover {
    background: var(--accent-color-hover, #A8A3C1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(146, 141, 171, 0.3);
}

.daily-model-loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted, #928DAB);
}

.daily-model-loading .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(146, 141, 171, 0.2);
    border-top-color: var(--accent-color, #928DAB);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

.daily-model-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted, #928DAB);
    font-size: 0.875rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hero-inner {
    position: relative;
    width: 100%;
    height: 500px; /* Sabit yükseklik - görsel boyutuna göre değişmez */
    max-height: 500px; /* Maksimum yükseklik */
    border-radius: 16px;
    overflow: hidden;
    background: #2A2738;
    border: 1px solid rgba(146, 141, 171, 0.25);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    padding: 0;
    box-sizing: border-box;
}

/* Hero Track */
.hero-track {
    position: relative;
    width: 100%;
    height: 100%; /* Full height since no padding */
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.hero-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.6s ease;
    display: block; /* Ensure slide is displayed */
    visibility: visible; /* Ensure slide is visible */
    min-width: 100%; /* Genişliği garanti et */
    min-height: 100%; /* Yüksekliği garanti et */
}

.hero-slide.active {
    opacity: 1 !important; /* Force visibility for active slide */
    display: block !important;
    visibility: visible !important;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Fotoğrafın tamamı görünsün - kesilmesin */
    object-position: center; /* Görseli ortala */
    display: block;
    user-select: none;
    pointer-events: none;
}

/* Slide Content Overlay - Only show if there's content */
.hero-slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to right,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.15) 50%,
        transparent 100%
    );
    pointer-events: none;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
}

/* Show overlay only when there's content */
.hero-slide:has(.hero-slide-content) .hero-slide-overlay {
    opacity: 1;
}

.hero-slide-content {
    position: absolute;
    left: 60px;
    bottom: 60px;
    max-width: 500px;
    z-index: 2;
    pointer-events: auto;
}

.hero-slide-title {
    font-size: 42px;
    font-weight: 700;
    color: #FFFFFF;
    margin: 0 0 16px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.hero-slide-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 24px 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.5;
}

.hero-slide-cta {
    display: inline-block;
    padding: 14px 32px;
    background: #FFFFFF;
    color: #1F1C2C;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
}

.hero-slide-cta:hover {
    background: #F5F5F5;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.hero-slide-cta:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Navigation Arrows */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #FFFFFF;
    font-size: 16px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.hero-arrow:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.hero-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.hero-arrow:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

.hero-arrow.prev {
    left: 8px;
}

.hero-arrow.next {
    right: 8px;
}

.hero-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* Pagination Dots */
.hero-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 0;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
    position: relative;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.hero-dot.active {
    background: #FFFFFF;
    width: 24px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.hero-dot:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Loading State */
.hero-slider.loading .hero-track {
    opacity: 0.5;
}

.hero-slider.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 20;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Pause Indicator */
.hero-slider.paused .hero-arrow::before {
    content: '⏸';
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 12px;
    opacity: 0.6;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-slider-wrapper {
        padding: 0 20px;
        grid-template-columns: 350px 0.9fr; /* Responsive'de de genişlik artırıldı */
        gap: 10px; /* Boşluk azaltıldı */
    }
    
    .daily-model-card {
        padding: 16px;
        margin-left: -5px;
        height: 450px; /* Responsive sabit yükseklik */
        max-height: 450px; /* Maksimum yükseklik */
    }
    
    .hero-inner {
        height: 450px; /* Responsive sabit yükseklik */
        max-height: 450px; /* Maksimum yükseklik */
        padding: 0;
    }
    
    .hero-track {
        height: 100%; /* Full height since no padding */
    }
    
    .hero-slide-content {
        left: 40px;
        bottom: 40px;
        max-width: 450px;
    }
    
    .hero-slide-title {
        font-size: 36px;
    }
    
    .hero-slide-subtitle {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .hero-slider-wrapper {
        padding: 0 10px;
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .daily-model-card {
        position: relative;
        top: 0;
        order: -1; /* Mobilde üstte göster */
    }
    
    .hero-slider {
        margin-left: auto;
        margin-right: auto; /* Mobilde ortala */
        padding: 0 8px;
    }
    
    .hero-inner {
        height: 300px; /* Responsive yükseklik */
        border-radius: 12px;
        padding: 0; /* Remove padding so image fills entire frame */
    }
    
    .hero-track {
        height: 100%; /* Full height since no padding */
    }
    
    .hero-slide-content {
        left: 20px;
        bottom: 20px;
        max-width: calc(100% - 40px);
    }
    
    .hero-slide-title {
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .hero-slide-subtitle {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .hero-slide-cta {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .hero-arrow {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .hero-arrow.prev {
        left: 6px;
    }
    
    .hero-arrow.next {
        right: 6px;
    }
}

@media (max-width: 480px) {
    .hero-inner {
        height: 220px; /* Responsive yükseklik */
    }
    
    .hero-slide-content {
        left: 15px;
        bottom: 15px;
    }
    
    .hero-slide-title {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .hero-slide-subtitle {
        font-size: 12px;
        margin-bottom: 16px;
    }
    
    .hero-slide-cta {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .hero-arrow {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .hero-arrow.prev {
        left: 4px;
    }
    
    .hero-arrow.next {
        right: 4px;
    }
    
    .hero-dots {
        margin-top: 15px;
        gap: 6px;
    }
    
    .hero-dot {
        width: 8px;
        height: 8px;
    }
    
    .hero-dot.active {
        width: 20px;
    }
}

/* Light Theme Variant (optional) */
@media (prefers-color-scheme: light) {
    .hero-inner {
        background: #F5F5F5;
    }
    
    .hero-slide-overlay {
        background: linear-gradient(
            to right,
            rgba(0, 0, 0, 0.5) 0%,
            rgba(0, 0, 0, 0.2) 50%,
            transparent 100%
        );
    }
    
    .hero-arrow {
        background: rgba(0, 0, 0, 0.1);
        border-color: rgba(0, 0, 0, 0.2);
        color: #1F1C2C;
    }
    
    .hero-arrow:hover {
        background: rgba(0, 0, 0, 0.2);
        border-color: rgba(0, 0, 0, 0.3);
    }
    
    .hero-dot {
        background: rgba(0, 0, 0, 0.2);
    }
    
    .hero-dot:hover {
        background: rgba(0, 0, 0, 0.4);
    }
    
    .hero-dot.active {
        background: #1F1C2C;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .hero-track {
        transition: none;
    }
    
    .hero-slide {
        transition: none;
    }
    
    .hero-arrow,
    .hero-dot {
        transition: none;
    }
}

/* Touch/Drag Support */
.hero-track.dragging {
    transition: none;
    cursor: grabbing;
}

.hero-track.dragging .hero-slide img {
    pointer-events: none;
}

