* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f5f5f5;
    color: #333;
}

/* Header */
.header-blog {
    background: #121212;
    padding: 2rem;
    text-align: center;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-top: 80px;
}

.header-blog h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}


.header-blog p {
    color: #fff;
}

/* Filter Section */
.filter-section {
    max-width: 1200px;
    margin: 1rem auto;
    padding: 0 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-section select {
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 1rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-section select:focus {
    outline: none;
    border-color: #3498db;
}

/* Blog List */
.blog-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: #181616;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    opacity: 1;
    order: 0;
}

.blog-card.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    position: absolute;
    /* Remove from grid flow */
    visibility: hidden;
    /* Ensure it doesn't affect layout */
}

.blog-card a {
    color: #fff;
    font-family: 'DM sans', sans-serif;
}

.blog-card p a {
    color: #fff;
}

.blog-card a:hover {
    color: #fff;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-content h2 {
    font-size: 22px;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-size: 700;
}

.blog-card-content p {
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;
    padding-top: 8px;
}

.btn-read-more {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.btn-read-more:hover {
    background: #2980b9;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.8);
    }
}

.blog-card.show {
    animation: fadeIn 0.3s ease forwards;
    position: relative;
    /* Ensure it stays in grid flow */
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-container {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 2rem;
    }
}

.blog {
    background: #121212;
}

/* Blog Details */



/* Blog Details */
.blog-details {
    max-width: 1000px;
    margin: 2rem auto;
    border-radius: 10px;
}

.blog-details img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.blog-details-content {
    padding: 2rem 0;
}

.blog-details-content h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.blog-details-content .meta {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.blog-details-content p {
    line-height: 1.8;
    color: #fff;
    margin-bottom: 1.5rem;
}

.back-button {
    display: inline-block;
    margin: 0 2rem 2rem;
    padding: 0.5rem 1rem;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: #2980b9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-details img {
        height: 300px;
    }

    header h1 {
        font-size: 2rem;
    }
}

.blog-detail {
    margin-top: 80px;
    background: #181616;
}


.related-blogs {
    background: #121212;
    padding: 40px 0;
}

.relaed-title {
    text-align: center;
    font-family: 'Outfit', sans-serif;
    font-size: 52px;
    text-transform: capitalize;
    font-weight: 600;
    border-bottom: 3px solid #0058ff;
    width: fit-content;
    margin: auto;
    padding-bottom: 10px;
    border-radius: 4px;
    margin-bottom: 50px;
}


.back-to-blog {
    font-size: 21px;
    color: #3498db;
    font-weight: 300;
}

.back-to-blog:hover {
    color: #3498db;
    opacity: 0.6;
}


.blog-card:hover .blog-thumbnail img {
    scale: 1.1;
}

.blog-thumbnail {
    height: 200px;
    display: block;
    overflow: hidden;
}

.blog-thumbnail img {
    transition: .4s;
}