/* Blogs Page Styling */
:root {
    --primary-color: #D32F2F;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

body {
    background-color: #f9f9f9;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
}

/* Hero Section */
.blog-hero {
    height: 50vh;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-bottom: 3rem;
    position: relative;
    padding-top: 80px;
    /* Space for fixed header */
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content .highlight {
    color: #ff5252;
    /* Lighter red for contrast on dark bg */
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
    font-weight: 300;
}

/* Blog Container */
.blogs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 80px;
}

/* Controls (Search & Filter) */
.blog-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    gap: 20px;
}

.search-bar {
    position: relative;
    flex: 1;
    max-width: 350px;
}

.search-bar i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-bar input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    outline: none;
    transition: var(--transition);
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.search-bar input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 4px 20px rgba(211, 47, 47, 0.1);
}

.categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cat-btn {
    padding: 8px 20px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: var(--transition);
}

.cat-btn:hover,
.cat-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.2);
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

.card-image {
    position: relative;
    height: 300px;
    /* Increased height for better visibility */
    overflow: hidden;
    background-color: #fff;
    /* White bg for better contained look */
    border-bottom: 1px solid #eee;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensure clear, full image */
    transition: transform 0.6s ease;
}

.blog-card:hover .card-image img {
    transform: scale(1.02);
    /* Reduced scale to avoid clip issues with contain */
}

.category-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.meta-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 15px;
}

.meta-info i {
    margin-right: 5px;
}

.card-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 12px;
    line-height: 1.3;
    color: var(--text-dark);
    font-weight: 700;
}

.card-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
    margin-top: auto;
}

.read-more i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: #b71c1c;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: white;
    color: var(--text-dark);
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
}

.pagination button.active,
.pagination button:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

.delay-600 {
    animation-delay: 0.6s;
}

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

/* Responsive */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .blog-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-bar {
        max-width: 100%;
    }

    .categories {
        justify-content: center;
    }
}

@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .blogs-container {
        padding: 0 15px 60px;
    }
}