/**
 * Featured Build Guides Horizontal Scrolling Styles
 * Responsive horizontal scrolling strip with navigation arrows
 */

.pcp-featured-build-guides {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Section Heading */
.pcp-featured-heading {
    text-align: center;
    margin-bottom: 30px;
}

.pcp-featured-heading h2 {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.pcp-featured-heading p {
    font-size: 16px;
    color: #666;
    margin: 0;
    font-weight: 400;
}

/* Scroll Container */
.pcp-scroll-container {
    position: relative;
    overflow: hidden;
    margin: 0 60px; /* Space for arrows */
}

.pcp-scroll-content {
    display: flex;
    gap: 20px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.pcp-scroll-item {
    flex: 0 0 auto;
    width: 300px; /* Fixed width for consistent card sizing */
    min-width: 300px;
}

/* Navigation Arrows */
.pcp-scroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    color: #007cba;
}

.pcp-scroll-arrow:hover {
    background: #007cba;
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 124, 186, 0.3);
}

.pcp-scroll-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.pcp-scroll-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
    color: #6c757d;
}

.pcp-scroll-arrow:disabled:hover {
    transform: translateY(-50%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pcp-scroll-left {
    left: 0;
}

.pcp-scroll-right {
    right: 0;
}

/* Scroll Indicators (Mobile only) */
.pcp-scroll-indicators {
    display: none; /* Hidden by default on desktop */
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.pcp-scroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pcp-scroll-dot:hover {
    background: #adb5bd;
}

.pcp-scroll-dot.active {
    background: #007cba;
    transform: scale(1.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .pcp-scroll-container {
        margin: 0 50px;
    }
    
    .pcp-scroll-arrow {
        width: 44px;
        height: 44px;
    }
    
    .pcp-scroll-item {
        width: 280px;
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .pcp-featured-build-guides {
        padding: 15px 0;
    }
    
    .pcp-featured-heading {
        margin-bottom: 25px;
    }
    
    .pcp-featured-heading h2 {
        font-size: 28px;
    }
    
    .pcp-featured-heading p {
        font-size: 15px;
    }
    
    .pcp-scroll-container {
        margin: 0 40px;
    }
    
    .pcp-scroll-arrow {
        width: 40px;
        height: 40px;
    }
    
    .pcp-scroll-item {
        width: 260px;
        min-width: 260px;
    }
    
    .pcp-scroll-content {
        gap: 15px;
    }
    
    /* Show scroll indicators on mobile */
    .pcp-scroll-indicators {
        display: flex;
    }
}

@media (max-width: 480px) {
    .pcp-featured-heading {
        margin-bottom: 20px;
    }
    
    .pcp-featured-heading h2 {
        font-size: 24px;
    }
    
    .pcp-featured-heading p {
        font-size: 14px;
    }
    
    .pcp-scroll-container {
        margin: 0 35px;
    }
    
    .pcp-scroll-arrow {
        width: 36px;
        height: 36px;
    }
    
    .pcp-scroll-item {
        width: 240px;
        min-width: 240px;
    }
    
    .pcp-scroll-content {
        gap: 12px;
    }
    
    .pcp-scroll-indicators {
        margin-top: 15px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .pcp-scroll-arrow {
        background: rgba(255, 255, 255, 0.98);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .pcp-scroll-arrow:hover {
        background: rgba(255, 255, 255, 0.98);
        color: #007cba;
        transform: translateY(-50%);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    /* Ensure touch events work properly on mobile */
    .pcp-scroll-container {
        touch-action: pan-y pinch-zoom;
    }
    
    .pcp-scroll-content {
        touch-action: pan-y pinch-zoom;
    }
    
    .pcp-scroll-item {
        touch-action: pan-y pinch-zoom;
    }
}

/* Smooth Scrolling for Webkit Browsers */
.pcp-scroll-content {
    -webkit-overflow-scrolling: touch;
}

/* Focus States for Accessibility */
.pcp-scroll-arrow:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

.pcp-scroll-dot:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Likes System - Styling provided by build-guide-archive.css */

/* Loading State */
.pcp-featured-build-guides.loading .pcp-scroll-content {
    opacity: 0.7;
}

.pcp-featured-build-guides.loading .pcp-scroll-arrow {
    pointer-events: none;
}

/* Animation for new content */
.pcp-scroll-item {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects for cards */
.pcp-scroll-item:hover .pcp-build-guide-card {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

/* Custom scrollbar for webkit browsers */
.pcp-scroll-container::-webkit-scrollbar {
    height: 6px;
}

.pcp-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

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

.pcp-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .pcp-scroll-arrow {
        border: 2px solid #000;
        background: #fff;
        color: #000;
    }
    
    .pcp-scroll-arrow:hover {
        background: #000;
        color: #fff;
    }
    
    .pcp-scroll-dot {
        border: 1px solid #000;
    }
    
    .pcp-scroll-dot.active {
        background: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .pcp-scroll-content {
        transition: transform 0.2s ease;
    }
    
    .pcp-scroll-arrow {
        transition: background-color 0.2s ease, color 0.2s ease;
    }
    
    .pcp-scroll-item {
        animation: none;
    }
    
    .pcp-scroll-item:hover .pcp-build-guide-card {
        transform: none;
    }
}
