/**
 * Blog Gallery Section - Horizontal Scroll with Modern Cards
 * Similar to Industries Gallery and Testimonials Showcase
 */

/* ============================================
   Base Section Styles
   ============================================ */
.blog-gallery {
    position: relative;
    padding: 4rem 0;
    overflow: hidden;
}

/* Light Theme (Default) */
.blog-gallery.bg-light {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Dark Theme */
.blog-gallery.bg-dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Background Effects */
.blog-gallery-bg-effects {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.blog-gallery-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
}

.blog-gallery.bg-light .blog-gallery-orb-1 {
    width: 500px;
    height: 500px;
    background: #a855f7;
    top: -250px;
    right: -150px;
    opacity: 0.08;
}

.blog-gallery.bg-light .blog-gallery-orb-2 {
    width: 400px;
    height: 400px;
    background: #ec4899;
    bottom: -200px;
    left: -100px;
    opacity: 0.06;
}

.blog-gallery.bg-dark .blog-gallery-orb-1 {
    width: 500px;
    height: 500px;
    background: #a855f7;
    top: -250px;
    right: -150px;
    opacity: 0.15;
}

.blog-gallery.bg-dark .blog-gallery-orb-2 {
    width: 400px;
    height: 400px;
    background: #ec4899;
    bottom: -200px;
    left: -100px;
    opacity: 0.1;
}

/* ============================================
   Header - Left aligned
   ============================================ */
.blog-gallery-header {
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 10;
    padding-left: 1rem;
}

.blog-gallery-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
}

.blog-gallery.bg-light .blog-gallery-title {
    color: #0f172a;
}

.blog-gallery.bg-dark .blog-gallery-title {
    color: #ffffff;
}

.blog-gallery-subtitle {
    font-size: 1.125rem;
    font-weight: 300;
    line-height: 1.5;
    max-width: 600px;
    margin: 0;
}

.blog-gallery.bg-light .blog-gallery-subtitle {
    color: #64748b;
}

.blog-gallery.bg-dark .blog-gallery-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   Scroll Container
   ============================================ */
.blog-gallery-scroll-wrapper {
    position: relative;
    z-index: 1;
}

.blog-gallery-track {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 1rem 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    cursor: grab;
}

.blog-gallery-track::-webkit-scrollbar {
    display: none;
}

.blog-gallery-track.grabbing {
    cursor: grabbing;
}

/* ============================================
   Blog Card - Modern Glass Design
   ============================================ */
.blog-gallery-card {
    position: relative;
    width: 400px;
    min-width: 400px;
    flex-shrink: 0;
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s ease,
                border-color 0.4s ease;
}

.blog-gallery.bg-light .blog-gallery-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.blog-gallery.bg-dark .blog-gallery-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.blog-gallery-card:hover {
    transform: translateY(-8px);
}

.blog-gallery.bg-light .blog-gallery-card:hover {
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.2);
}

.blog-gallery.bg-dark .blog-gallery-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Card Image */
.blog-gallery-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.blog-gallery-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-gallery-card:hover .blog-gallery-card-image img {
    transform: scale(1.08);
}

.blog-gallery-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.blog-gallery-card:hover .blog-gallery-card-image::after {
    opacity: 1;
}

/* Card Content */
.blog-gallery-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

/* Meta Info */
.blog-gallery-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.blog-gallery-card-date {
    font-size: 0.8125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.blog-gallery.bg-light .blog-gallery-card-date {
    color: #a855f7;
}

.blog-gallery.bg-dark .blog-gallery-card-date {
    color: #c084fc;
}

.blog-gallery-card-date svg {
    width: 14px;
    height: 14px;
}

.blog-gallery-card-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
}

.blog-gallery.bg-light .blog-gallery-card-tag {
    background: rgba(168, 85, 247, 0.1);
    color: #9333ea;
}

.blog-gallery.bg-dark .blog-gallery-card-tag {
    background: rgba(168, 85, 247, 0.2);
    color: #d8b4fe;
}

/* Card Title */
.blog-gallery-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-gallery-card-title a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-gallery.bg-light .blog-gallery-card-title a {
    color: #0f172a;
}

.blog-gallery.bg-dark .blog-gallery-card-title a {
    color: #ffffff;
}

.blog-gallery.bg-light .blog-gallery-card-title a:hover {
    color: #a855f7;
}

.blog-gallery.bg-dark .blog-gallery-card-title a:hover {
    color: #c084fc;
}

/* Card Excerpt */
.blog-gallery-card-excerpt {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-gallery.bg-light .blog-gallery-card-excerpt {
    color: #64748b;
}

.blog-gallery.bg-dark .blog-gallery-card-excerpt {
    color: rgba(255, 255, 255, 0.6);
}

/* Read More Link */
.blog-gallery-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 0.5rem;
    transition: gap 0.3s ease, color 0.3s ease;
}

.blog-gallery.bg-light .blog-gallery-card-link {
    color: #a855f7;
}

.blog-gallery.bg-dark .blog-gallery-card-link {
    color: #c084fc;
}

.blog-gallery-card-link:hover {
    gap: 0.75rem;
}

.blog-gallery.bg-light .blog-gallery-card-link:hover {
    color: #9333ea;
}

.blog-gallery.bg-dark .blog-gallery-card-link:hover {
    color: #e9d5ff;
}

.blog-gallery-card-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.blog-gallery-card-link:hover svg {
    transform: translateX(4px);
}

/* ============================================
   View All Card
   ============================================ */
.blog-gallery-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    min-width: 200px;
    flex-shrink: 0;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.blog-gallery.bg-light .blog-gallery-view-all {
    background: rgba(168, 85, 247, 0.05);
    border: 2px dashed rgba(168, 85, 247, 0.3);
}

.blog-gallery.bg-dark .blog-gallery-view-all {
    background: rgba(255, 255, 255, 0.03);
    border: 2px dashed rgba(255, 255, 255, 0.15);
}

.blog-gallery.bg-light .blog-gallery-view-all:hover {
    background: rgba(168, 85, 247, 0.1);
    border-color: rgba(168, 85, 247, 0.5);
}

.blog-gallery.bg-dark .blog-gallery-view-all:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
}

.blog-gallery-view-all-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-decoration: none;
    padding: 2rem;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.blog-gallery-view-all-link:hover {
    transform: scale(1.02);
}

.blog-gallery-view-all-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.blog-gallery.bg-light .blog-gallery-view-all-icon {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.blog-gallery.bg-dark .blog-gallery-view-all-icon {
    background: rgba(255, 255, 255, 0.1);
    color: #c084fc;
}

.blog-gallery-view-all-link:hover .blog-gallery-view-all-icon {
    transform: scale(1.1);
}

.blog-gallery.bg-light .blog-gallery-view-all-link:hover .blog-gallery-view-all-icon {
    background: rgba(168, 85, 247, 0.2);
}

.blog-gallery.bg-dark .blog-gallery-view-all-link:hover .blog-gallery-view-all-icon {
    background: rgba(255, 255, 255, 0.2);
}

.blog-gallery-view-all-icon svg {
    width: 24px;
    height: 24px;
}

.blog-gallery-view-all-text {
    font-size: 0.9375rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.4;
}

.blog-gallery.bg-light .blog-gallery-view-all-text {
    color: #0f172a;
}

.blog-gallery.bg-dark .blog-gallery-view-all-text {
    color: #ffffff;
}

/* ============================================
   Slider Controls
   ============================================ */
.blog-gallery-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    position: relative;
    z-index: 5;
}

.blog-gallery-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.blog-gallery.bg-light .blog-gallery-btn {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(168, 85, 247, 0.2);
    color: #64748b;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.blog-gallery.bg-light .blog-gallery-btn:hover {
    background: #a855f7;
    border-color: #a855f7;
    color: #ffffff;
    transform: scale(1.05);
}

.blog-gallery.bg-dark .blog-gallery-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.blog-gallery.bg-dark .blog-gallery-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: scale(1.05);
}

.blog-gallery-btn:active {
    transform: scale(0.95);
}

.blog-gallery-btn svg {
    width: 18px;
    height: 18px;
}

/* Progress Dots */
.blog-gallery-dots {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.blog-gallery-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.blog-gallery.bg-light .blog-gallery-dot {
    background: rgba(0, 0, 0, 0.15);
}

.blog-gallery.bg-dark .blog-gallery-dot {
    background: rgba(255, 255, 255, 0.2);
}

.blog-gallery-dot.active {
    width: 24px;
    border-radius: 4px;
}

.blog-gallery.bg-light .blog-gallery-dot.active {
    background: #a855f7;
}

.blog-gallery.bg-dark .blog-gallery-dot.active {
    background: #c084fc;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
    .blog-gallery-card {
        width: 360px;
        min-width: 360px;
    }
    
    .blog-gallery-card-image {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .blog-gallery {
        padding: 3rem 0;
    }
    
    .blog-gallery-header {
        margin-bottom: 2rem;
    }
    
    .blog-gallery-title {
        font-size: 1.75rem;
    }
    
    .blog-gallery-subtitle {
        font-size: 1rem;
    }
    
    .blog-gallery-track {
        gap: 1rem;
        padding: 0.75rem 1rem 1.5rem;
    }
    
    .blog-gallery-card {
        width: 320px;
        min-width: 320px;
    }
    
    .blog-gallery-card-image {
        height: 180px;
    }
    
    .blog-gallery-card-content {
        padding: 1.25rem;
    }
    
    .blog-gallery-card-title {
        font-size: 1.125rem;
    }
    
    .blog-gallery-card-excerpt {
        font-size: 0.875rem;
        -webkit-line-clamp: 3;
    }
    
    .blog-gallery-view-all {
        width: 160px;
        min-width: 160px;
    }
    
    .blog-gallery-view-all-icon {
        width: 48px;
        height: 48px;
    }
    
    .blog-gallery-view-all-text {
        font-size: 0.875rem;
    }
    
    .blog-gallery-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .blog-gallery {
        padding: 2.5rem 0;
    }
    
    .blog-gallery-header {
        margin-bottom: 1.5rem;
        padding-left: 0.75rem;
    }
    
    .blog-gallery-title {
        font-size: 1.5rem;
    }
    
    .blog-gallery-subtitle {
        font-size: 0.9375rem;
    }
    
    .blog-gallery-track {
        gap: 0.875rem;
        padding: 0.5rem 0.75rem 1.25rem;
    }
    
    .blog-gallery-card {
        width: 300px;
        min-width: 300px;
    }
    
    .blog-gallery-card-image {
        height: 160px;
    }
    
    .blog-gallery-card-content {
        padding: 1rem;
        gap: 0.5rem;
    }
    
    .blog-gallery-card-title {
        font-size: 1rem;
    }
    
    .blog-gallery-card-excerpt {
        font-size: 0.8125rem;
        -webkit-line-clamp: 3;
    }
    
    .blog-gallery-view-all {
        width: 140px;
        min-width: 140px;
    }
    
    .blog-gallery-controls {
        gap: 0.75rem;
    }
    
    .blog-gallery-btn {
        width: 36px;
        height: 36px;
    }
    
    .blog-gallery-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .blog-gallery-dot {
        width: 6px;
        height: 6px;
    }
    
    .blog-gallery-dot.active {
        width: 18px;
    }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .blog-gallery-card,
    .blog-gallery-card-image img,
    .blog-gallery-card-link,
    .blog-gallery-view-all-link,
    .blog-gallery-btn {
        transition: none;
    }
    
    .blog-gallery-card:hover {
        transform: none;
    }
    
    .blog-gallery-card:hover .blog-gallery-card-image img {
        transform: none;
    }
}

.blog-gallery-card:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 4px;
}

.blog-gallery-btn:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}
