/* ================ Global Styles ================ */
:root {
    --primary-color: #2A2B2A;
    --secondary-color: #5E4955;
    --accent-color: #28b6e9;
}

body {
    font-family: 'Vazirmatn', sans-serif;
    background: #fff;
    min-height: 100vh;
}

/* ================ Container Styles ================ */
.blog-container {
    max-width: 1200px;
    margin: 7rem auto 4rem;
    padding: 0 1.5rem;
}

.page-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 4rem;
    position: relative;
    padding-bottom: 1rem;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 120px;
    height: 4px;
    background: linear-gradient(to right, var(--accent-color), var(--secondary-color));
    border-radius: 2px;
}

/* ================ Blog Grid Layout ================ */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

/* ================ Card Styles ================ */
.blog-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.12);
}

/* ================ Image Container ================ */
.card-image-container {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

/* ================ Content Styles ================ */
.card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
}

.card-title {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    line-height: 1.4;
}

.card-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* ================ Button Styles ================ */
.card-button {
    display: block;
    text-align: center;
    padding: 12px 30px;
    border-radius: 50px;
    background: #28b6e9;
    color: white !important;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: auto;
    width: 100%;
}

.card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.3),
            transparent);
    transition: 0.5s;
}

.card-button:hover::before {
    left: 100%;
}

/* ================ Animations ================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.blog-card {
    animation: fadeInUp 0.8s ease backwards;
}

/* ================ Responsive Design ================ */
@media (max-width: 768px) {
    .blog-container {
        margin: 9rem auto 4rem;
        padding: 0 1rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .card-title {
        font-size: 1.2rem;
    }

    .card-button {
        padding: 10px 25px;
    }
}