/* Blog Page Specific Styles */

/* Main blog section styling */
.products-section {
    padding: 2rem 1rem;
    background: #f8f9fa;
    min-height: 100vh;
}

.products-section h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 3rem;
    font-weight: 700;
    position: relative;
}

.products-section h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(45deg, #e91e63, #ff5722);
    border-radius: 2px;
}

/* Blog grid container */
.updates-scroll {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Individual blog card styling */
.blog-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    height: fit-content;
}

/* Grid card specific styling for blog page */
.blog-card.grid-card {
    width: 100%;
    padding: 1rem;
}

/* Regular blog card for index page horizontal scroll */
.blog-card:not(.grid-card) {
    min-width: 260px;
    max-width: 260px;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
   
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover::before {
    opacity: 1;
}


/* Blog card image styling */
.blog-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover img {
    transform: scale(1.05);
}

/* Blog content styling */
.blog-content {
    padding: 0rem;
    position: relative;
}

.blog-content h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    line-height: 1.4;
    font-weight: 600;
    min-height: 2.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.8rem;
}

/* Read more link styling */
.read-more-link {
    color: #ff7961;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.read-more-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.read-more-link:hover {
    color: #ff7961;
}

.read-more-link:hover::after {
    transform: translateX(5px);
}

/* Responsive Design */

/* Large screens (1200px and up) - 4 cards per row */
@media (max-width: 1400px) {
    .updates-scroll {
        max-width: 1200px;
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

/* Medium-large screens (992px to 1199px) - 3 cards per row */
@media (max-width: 1199px) {
    .updates-scroll {
        grid-template-columns: repeat(3, 1fr);
        max-width: 900px;
        gap: 1.5rem;
    }
    
    .products-section h2 {
        font-size: 2.2rem;
    }
}

/* Medium screens (768px to 991px) - 2 cards per row */
@media (max-width: 991px) {
    .updates-scroll {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
        gap: 1.2rem;
        padding: 1rem;
    }
    
    .products-section {
        padding: 1.5rem 0.5rem;
    }
    
    .products-section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .blog-content {
        padding: 1.5rem;
    }
    
    .blog-content h3 {
        font-size: 1.2rem;
    }
}

/* Small screens (576px to 767px) - 2 cards per row (smaller) */
@media (max-width: 767px) {
    .updates-scroll {
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .blog-card img {
        height: 180px;
    }
    
    .blog-content {
        padding: 1.2rem;
    }
    
    .blog-content h3 {
        font-size: 1.1rem;
        min-height: 2.2rem;
    }
    
    .blog-content p {
        font-size: 0.9rem;
        min-height: 4rem;
    }
}

/* Extra small screens (575px and below) - 1 card per row */
@media (max-width: 575px) {
    .updates-scroll {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 1.5rem;
        padding: 1rem;
    }
    
    .products-section {
        padding: 1rem 0.5rem;
    }
    
    .products-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .blog-card {
        max-width: 100%;
    }
    
    .blog-card img {
        height: 200px;
    }
    
    .blog-content {
        padding: 1.5rem;
    }
    
    .blog-content h3 {
        font-size: 1.2rem;
        min-height: auto;
        -webkit-line-clamp: unset;
        line-clamp: unset;
    }
    
    .blog-content p {
        font-size: 0.95rem;
        min-height: auto;
        -webkit-line-clamp: unset;
        line-clamp: unset;
    }
}

/* Loading animation for images */
.blog-card img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Focus states for accessibility */
.blog-card:focus {
    outline: 3px solid #ff7961;
    outline-offset: 2px;
}

.read-more-link:focus {
    outline: 2px solid #ff7961;
    outline-offset: 2px;
    border-radius: 3px;
}

/* Print styles */
@media print {
    .blog-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .blog-card:hover {
        transform: none;
    }
}
