/* Blog Slider Section */
.blog-slider-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.blog-slider-section .section-title {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--snitch-blue), var(--snitch-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-slider-section .section-title i {
    color: var(--snitch-cyan);
    font-size: 1.8rem;
    animation: ohanaFloat 3s ease-in-out infinite;
}

.blog-slider-section .view-more-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 0.6rem;
}

/* Blog Card Styling (reusing ohana-product-card for consistency) */
.blog-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border: 2px solid var(--snitch-silver);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.1);
}

.blog-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.05), rgba(79, 70, 229, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(30, 58, 138, 0.2);
    border-color: var(--snitch-cyan);
}

.blog-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9; /* Standard aspect ratio for blog images */
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1) rotate(2deg);
}

.blog-card-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: right;
    direction: rtl;
    position: relative;
    z-index: 2;
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: "Vazir", sans-serif;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--snitch-blue);
}

.blog-card-description {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Optional: limit description to 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.blog-card-meta i {
    color: var(--snitch-indigo);
}

.blog-card-read-more {
    font-weight: 600;
    color: var(--snitch-blue);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-card-read-more:hover {
    color: var(--snitch-cyan);
    transform: translateX(-5px);
}

/* SplideJS Customizations */
.splide__arrow {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--snitch-silver);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--snitch-blue);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    opacity: 1; /* Ensure arrows are always visible */
}

.splide__arrow:hover {
    background: linear-gradient(135deg, var(--snitch-blue), var(--snitch-indigo));
    color: white;
    border-color: transparent;
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.3);
}

.splide__arrow--prev {
    left: -20px; /* Adjust position for RTL */
    right: auto;
}

.splide__arrow--next {
    right: -20px; /* Adjust position for RTL */
    left: auto;
}

/* SplideJS Pagination */
.splide__pagination {
    bottom: -2rem; /* Adjust position */
}

.splide__pagination__page {
    background: var(--snitch-silver);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.splide__pagination__page.is-active {
    background: linear-gradient(135deg, var(--snitch-blue), var(--snitch-cyan));
    transform: scale(1.2);
    opacity: 1;
}

/* Responsive adjustments for Splide */
@media (max-width: 768px) {
    .blog-slider-section .section-title {
        font-size: 1.5rem;
    }
    .blog-slider-section .section-title i {
        font-size: 1.5rem;
    }
    .blog-slider-section .view-more-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
    .blog-card-info {
        padding: 1rem;
    }
    .blog-card-title {
        font-size: 1rem;
    }
    .blog-card-description {
        font-size: 0.85rem;
    }
    .splide__arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    .splide__arrow--prev {
        left: -10px;
    }
    .splide__arrow--next {
        right: -10px;
    }
}

@media (max-width: 576px) {
    .blog-slider-section {
        padding: 1.5rem 0;
    }
    .blog-slider-section .section-title {
        font-size: 1.3rem;
    }
    .blog-slider-section .section-title i {
        font-size: 1.3rem;
    }
    .blog-slider-section .view-more-btn {
        font-size: 0.75rem;
    }
    .blog-card-info {
        padding: 0.75rem;
    }
    .blog-card-title {
        font-size: 0.9rem;
    }
    .blog-card-description {
        font-size: 0.8rem;
    }
    .blog-card-meta {
        font-size: 0.75rem;
    }
    .splide__arrows {
        display: none; /* Hide arrows on very small screens, rely on swipe */
    }
    .splide__pagination {
        bottom: -1.5rem;
    }
}
