/*
 * Story Highlights CSS - Carousel Version
 * Dosya: /modules/storyhighlights/views/css/storyhighlights.css
 */

.story-highlights-container {
    margin: 20px 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.story-header {
    text-align: center;
    margin-bottom: 20px;
}

.story-title {
    font-size: 24px;
    font-weight: 700;
    color: #333 !important;
    margin: 0;
    padding: 0;
}

.story-highlights-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

/* Kaydırma fade efektleri */
.story-highlights-wrapper::before,
.story-highlights-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    width: 30px;
    height: 100%;
    pointer-events: none;
    z-index: 3;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story-highlights-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(255,255,255,1), rgba(255,255,255,0));
}

.story-highlights-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(255,255,255,1), rgba(255,255,255,0));
}

.story-highlights-wrapper.show-fade-left::before {
    opacity: 1;
}

.story-highlights-wrapper.show-fade-right::after {
    opacity: 1;
}

.highlights-scroll-container {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 20px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
    cursor: grab;
}

.highlights-scroll-container:active {
    cursor: grabbing;
}

.highlights-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.highlights-scroll-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 3px;
}

.highlights-scroll-container::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

.highlights-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

.highlights-grid {
    display: flex;
    gap: 15px;
    padding: 10px 0;
    min-width: max-content;
}

.highlight-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 90px;
    max-width: 90px;
    transition: transform 0.3s ease;
}

.highlight-item:hover {
    transform: translateY(-5px);
}

.highlight-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.highlight-circle {
    position: relative;
    width: 80px;
    height: 80px;
    margin-bottom: 8px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.highlight-circle:hover {
    transform: scale(1.1);
}

.highlight-image-container {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
    border-radius: 50%;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.highlight-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.highlight-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #e9ecef, #dee2e6);
    color: #6c757d;
    font-size: 24px;
    border-radius: 50%;
}

.highlight-border {
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b6b, #feca57, #ff9ff3, #54a0ff);
    background-size: 400% 400%;
    animation: gradientRotate 3s linear infinite;
    z-index: 1;
}

@keyframes gradientRotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.highlight-title {
    font-size: 12px;
    font-weight: 500;
    color: #333 !important;
    text-align: center;
    line-height: 1.2;
    max-width: 100%;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.highlight-link:hover .highlight-title {
    color: #007bff;
}

/* Kategori renk temaları */
.highlight-item.electronics .highlight-border {
    background: linear-gradient(45deg, #667eea, #764ba2, #89f7fe, #66a6ff);
}

.highlight-item.fashion .highlight-border {
    background: linear-gradient(45deg, #ff6b6b, #feca57, #ff9ff3, #f093fb);
}

.highlight-item.home .highlight-border {
    background: linear-gradient(45deg, #4ecdc4, #44a08d, #96fbc4, #f9f047);
}

.highlight-item.sports .highlight-border {
    background: linear-gradient(45deg, #43e97b, #38f9d7, #fdbb2d, #22c1c3);
}

.highlight-item.beauty .highlight-border {
    background: linear-gradient(45deg, #fa709a, #fee140, #ff9a9e, #fecfef);
}

.highlight-item.books .highlight-border {
    background: linear-gradient(45deg, #a8edea, #fed6e3, #ffecd2, #fcb69f);
}

.highlight-item.toys .highlight-border {
    background: linear-gradient(45deg, #ff9a9e, #fecfef, #ffecd2, #fcb69f);
}

.highlight-item.food .highlight-border {
    background: linear-gradient(45deg, #fdbb2d, #22c1c3, #ff6b6b, #feca57);
}

.highlight-item.automotive .highlight-border {
    background: linear-gradient(45deg, #2c3e50, #34495e, #bdc3c7, #95a5a6);
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .story-highlights-container {
        margin: 15px 0;
    }

    .story-title {
        font-size: 20px;
        color: #333 !important;
    }

    .highlights-scroll-container {
        padding: 0 15px;
        scrollbar-width: none; /* Firefox'da scrollbar gizle */
        -ms-overflow-style: none; /* IE/Edge'de scrollbar gizle */
    }

    .highlights-scroll-container::-webkit-scrollbar {
        display: none; /* Chrome/Safari'de scrollbar gizle */
    }

    .highlights-grid {
        gap: 15px;
    }

    .highlight-item {
        min-width: 75px;
        max-width: 75px;
    }

    .highlight-circle {
        width: 70px;
        height: 70px;
    }

    .highlight-title {
        font-size: 11px;
        color: #333 !important;
    }

    /* Mobilde kaydırma ipucu */
    .story-highlights-wrapper::before,
    .story-highlights-wrapper::after {
        width: 20px;
    }
}

@media (max-width: 480px) {
    .story-highlights-container {
        margin: 10px 0;
    }

    .story-title {
        font-size: 18px;
        color: #333 !important;
    }

    .highlights-scroll-container {
        padding: 0 10px;
    }

    .highlights-grid {
        gap: 12px;
    }

    .highlight-item {
        min-width: 65px;
        max-width: 65px;
    }

    .highlight-circle {
        width: 60px;
        height: 60px;
        margin-bottom: 6px;
    }

    .highlight-title {
        font-size: 10px;
        color: #333 !important;
    }

    .highlight-placeholder {
        font-size: 20px;
    }

    /* Mobilde daha belirgin fade */
    .story-highlights-wrapper::before,
    .story-highlights-wrapper::after {
        width: 15px;
    }
}

/* Yükleniyor animasyonu */
.highlight-item.loading {
    opacity: 0.5;
}

.highlight-item.loading .highlight-circle {
    animation: pulse 1.5s ease-in-out infinite;
}

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

/* Accessibility */
.highlight-link:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    border-radius: 10px;
}

.highlight-link:focus .highlight-circle {
    transform: scale(1.1);
}

/* Print stil */
@media print {
    .story-highlights-container {
        display: none;
    }
}

/* Dark mode desteği - Mobil için özel */
@media (prefers-color-scheme: dark) {
    .story-title {
        color: #333 !important;
        text-shadow: 0 0 1px rgba(255,255,255,0.1);

        padding: 5px 10px;
        border-radius: 5px;
        display: inline-block;
    }

    .highlight-title {
        color: #333 !important;

        padding: 2px 5px;
        border-radius: 3px;
    }

    .highlight-placeholder {
        background: linear-gradient(45deg, #495057, #6c757d);
        color: #adb5bd;
    }
}

/* Mobil için özel zorlama */
@media screen and (max-width: 768px) {
    .story-title {
        color: #222 !important;
        text-shadow: 0 0 2px rgba(255,255,255,0.8);
    }

    .highlight-title {
        color: #222 !important;
        text-shadow: 0 0 1px rgba(255,255,255,0.8);
    }

    .story-highlights-container .story-title,
    .story-highlights-container .highlight-title {
        color: #222 !important;
    }
}

/* Animasyon performansı için GPU hızlandırması */
.highlight-circle,
.highlight-border {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Smooth scrolling */
.highlights-scroll-container {
    scroll-behavior: smooth;
}

/* Custom scrollbar için alternatif */
.highlights-scroll-container.show-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
}

.highlights-scroll-container.show-scrollbar::-webkit-scrollbar {
    display: block;
    height: 4px;
}

.highlights-scroll-container.show-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.highlights-scroll-container.show-scrollbar::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 2px;
}

.highlights-scroll-container.show-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}