@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&family=Prata&family=Quicksand:wght@300..700&display=swap");

body {
    background-color: #d9f2fd;
    font-family: "Montserrat", sans-serif;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3em 0;
    padding-bottom: 1em;
}

.blog-subtitle {
    text-align: center;
    color: #2e4c8c;
    margin-bottom: 2em;
    font-family: "Prata";
    text-align: left;
    font-size: 40px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.22);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 30px;
}

.blog-card {
    background-color: #fff;
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    transition: transform 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    max-height: 550px;
    height: 100%;
}

.blog-grid .blog-card:nth-child(3n + 2) {
    transform: translateY(-81px);
    transition: transform 0.3s ease;
}

.blog-grid .blog-card:nth-child(3n + 2):hover {
    transform: translateY(-81px) scale(1.05);
    transition: transform 0.3s ease;
}

.blog-grid .blog-card:hover {
    transform: scale(1.05);
}

.blog-grid .blog-card:nth-child(2) {
    height: auto;
    max-height: 470px;
    transform: none;
    margin-bottom: 80px;
}

.blog-grid .blog-card:nth-child(2):hover {
    transform: scale(1.05);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-card-content {
    padding: 36px;
    overflow: hidden;
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
}

.blog-card-content h3 {
    color: #2e4c8c;
    font-size: 30px;
    font-weight: 500;
    margin: 0 0 12px;
    font-family: "Prata";
    transition: color 0.3s;
}

.blog-card-content h3:hover {
    color: #5c9dff;
    transition: color 0.3s;
}

.blog-card-content p {
    color: #333;
    font-size: 18px;
    line-height: 1.5;
    margin: 0;
    font-weight: 300;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
}

.blog-grid .blog-card:nth-child(1) .margin-p,
.blog-grid .blog-card:nth-child(3) .margin-p {
    margin-bottom: 28px;
}

.final-blog-img {
    text-align: center;
    padding: 3em 0;
}

@media (max-width: 1024px) {
    .blog-grid .blog-card:nth-child(2) {
        height: auto;
        max-height: 550px;
        margin-bottom: 0;
    }

    .blog-grid .blog-card:nth-child(3n + 2),
    .blog-grid .blog-card:nth-child(3n + 2):hover,
    .blog-card,
    .blog-grid .blog-card:hover {
        transform: none;
        transition: none;
    }
}

@media (max-width: 600px) {
    .blog-subtitle {
        font-size: 30px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .final-blog-img img {
        width: 150px;
    }
}

@supports not (-webkit-line-clamp: 5) {
    .blog-card-content p {
        max-height: 150px;
        overflow: hidden;
        display: block;
        white-space: nowrap;
    }
}
