#blog {
    margin-top: -8px;
}   

.blog-subtitle {
    font-size: 18px; 
    line-height: 1.5;
    color: #555;
    margin-bottom: 30px; 
}
.blog-subtitle a {
    color: blue;
    text-decoration: none;
}

.blog-grid-index {
    margin-top: -30px;
    margin-bottom: -20px; 
}
.blog-grid {
    margin-bottom: 30px; 
}

/* Mobile: Show 6 cards */
.blog-grid .blog-card:nth-child(n+7) {
    display: none;
}

.blog-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 12px; 
    max-width: 343px;
    width: 100%;
    margin-bottom: 20px;
}

.blog-image {
    width: 100%;
    height: 200px; 
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: -2px;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.blog-content-featured {
    padding: 0;
}
.blog-meta-container {
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.blog-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 10px;
    width: 100%; 
    align-self: stretch;
    flex: none;
}

.blog-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 4px;
    width: 100%; 
    align-self: stretch;
    flex: none;
}

.blog-title {
    font-weight: 700;
    font-size: 18px; 
    line-height: 150%; 
    letter-spacing: -0.01em;
    color: #1C2A38;
    margin: 0;
    width: 100%; 
    align-self: stretch;
    flex: none;
}

.blog-grid-index .blog-title {
    font-size: 16px;
    letter-spacing: 0;
}

.blog-excerpt {
    font-weight: 400;
    font-size: 16px; 
    line-height: 150%;
    letter-spacing: -0.01em;
    color: #1C2A38;
    margin: 0;
    align-self: stretch;
    flex: none;
    white-space: nowrap; 
    overflow: hidden;   
    text-overflow: ellipsis;
}

.blog-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0;
    gap: 16px; 
    width: 100%; 
    align-self: stretch;
    flex: none;
}

.blog-meta-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 8px; 
    margin-top: 0;
    font-size: 14px; 
    font-weight: 400;
    line-height: 150%;
    letter-spacing: -0.01em;
    color: #848484;
    flex: none;
}

.blog-meta-separator {
    width: 4px;
    height: 4px;
    background-color: #848484;
    border-radius: 50%;
    margin: 0;
    flex: none;
}

.blog-read-button {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 4px;
    margin-top: 0;
    cursor: pointer;
    flex: none;
}
.blog-read-button:hover {
    color: black;
}
.blog-read-button:hover .blog-read-text {
    color: black;
}
.blog-read-button:hover .blog-read-icon img {
    filter: brightness(0);
}

.blog-read-text {
    font-weight: 600;
    font-size: 16px; 
    line-height: 150%;
    color: #0000B4;
    display: flex;
    align-items: center;
    text-align: center;
    flex: none;
}

.blog-read-icon {
    display: flex;
    align-items: center;
    width: 20px; 
    height: 20px; 
    flex: none;
}

.blog-read-icon img {
    width: 20px;
    height: 20px;
}


#blog-header {
    padding-top: 122px; 
    padding-bottom: 20px; 
}

.section-title-blog {
    font-weight: 600;
    font-size: 30px; 
    line-height: 140%;
    letter-spacing: -0.01em;
    width: 100%; 
    margin: 0;
    padding: 0;
}

.section-description-blog {
    font-weight: 400;
    font-size: 18px; 
    line-height: 150%;
    letter-spacing: 0;
    color: #1C2A38;
    padding-top: 20px;
}

.section-description-blog a {
    color: blue;
    text-decoration: none;
}

.page-title {
    font-size: 32px; 
    font-weight: 700;
    margin-bottom: 16px;
    color: #000;
}


#featured-post {
    display: none;
}

.featured-post-card {
    display: flex;
    flex-direction: column; 
    align-items: flex-start;
    padding: 0;
    gap: 15px; 
    width: 100%; 
    height: auto; 
}

.featured-post-card .blog-excerpt {
    width: 100%;
    white-space: normal; 
}
.featured-post-card .blog-meta-info {
    font-size: 16px;
    gap: 14px; 
}


/* Shimmer effect styles */
.shimmer-placeholder {
    opacity: 0.7; /* Adjusted opacity for better visibility of shimmer */
}

@keyframes shimmer-animation {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer-placeholder .shimmer {
    animation: shimmer-animation 2s infinite linear;
    background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
    background-size: 2000px 100%; /* Width of gradient, height 100% of element */
    color: transparent !important;
    -webkit-text-fill-color: transparent !important;
    border-radius: 4px; /* General rounding for shimmer blocks */
}

/* Specific dimensions and base background for shimmer elements */
.shimmer-placeholder .blog-image.shimmer {
    height: 200px; /* Adjust based on your actual image aspect ratio/height */
    background-color: #dddddd; /* Base color */
    width: 100%;
    margin-bottom: 15px; /* Spacing similar to actual card */
}

.shimmer-placeholder .blog-title.shimmer {
    height: 1.5em; /* Approx height of a title, relative to font size */
    width: 80%;
    margin-bottom: 10px;
    background-color: #dddddd;
}

.shimmer-placeholder .blog-excerpt.shimmer {
    height: 3.6em; /* Approx 3 lines (1.2em per line * 3) */
    width: 100%;
    margin-bottom: 15px;
    background-color: #dddddd;
}

.shimmer-placeholder .blog-date.shimmer {
    height: 1em;
    width: 40%;
    margin-bottom: 15px; /* Spacing before read button */
    background-color: #dddddd;
}

.shimmer-placeholder .blog-read-button.shimmer {
    height: 40px; /* Adjust to match actual button height */
    width: 150px; /* Adjust to match actual button width */
    background-color: #dddddd;
}

/* Hide text/icon within the shimmered button if they exist and are not part of the shimmer class */
.shimmer-placeholder .blog-read-button.shimmer .blog-read-text,
.shimmer-placeholder .blog-read-button.shimmer .blog-read-icon {
    visibility: hidden;
}

@media (max-width: 743px) {

    #blog-posts {
        margin-top: -20px;
        padding-bottom: 60px;
    }

}

@media (min-width: 744px) and (max-width: 1439px) { /* Modified for tablet */

    #blog {
        margin-top: 0;
        padding-bottom: 10px;
    }    
    #blog .two-column-header {
        display: grid;
        grid-template-columns: 30% 1fr;
        align-items: start;
        gap: 30px;
        margin-bottom: 70px;
    }
    
    #blog .two-column-header .section-title {
        flex: none;
        margin-bottom: 0;
        margin-right: 0;
    }
    
    #blog .two-column-header .section-description {
        flex: none;
        letter-spacing: -0.01em;
    }
    .section-description-blog {
        padding-top: 0;
        letter-spacing: -0.01em;
    }
    
    .blog-subtitle {
        font-size: 18px;
        font-weight: 500;
        margin-bottom: 0;
        margin-left: 30px;
        margin-top: -20px;
    }

    .blog-grid-index,
    .blog-grid {
        display: grid;
        align-items: start;
    }
    .blog-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 columns */
        gap: 20px;
        margin-bottom: -10px;
    }
    .blog-grid-index{
        grid-template-columns: repeat(3, 1fr); /* Desktop: 3 columns */
        gap: 30px;
        margin-bottom: 50px;
    }
    .blog-card {
        gap: 10px;
        width: auto; 
        margin-bottom: 0;
    }

    .blog-content {
        width: auto;
    }
    .blog-text {
        width: auto;
    }
    .blog-grid .blog-title {
        font-size: 18px;
    }
    .blog-image {
        width: 100%;
        margin-bottom: 0;
    }
    .blog-title {
        font-size: 16px;
        line-height: 150%;
        width: auto;
    }
    .blog-excerpt {
        font-size: 16px;
        width: 200px;
    }
    .blog-grid .blog-meta {
        gap: 14px;
    }
    .blog-meta {
        gap: 12px;
        width: auto;
    }
    .blog-meta-info {
        gap: 10px;
        font-size: 14px;
        width: 110%;
    }

    .blog-read-text {
        font-size: 16px;
    }
    .blog-read-icon img {
        width: 28px;
        height: 28px;
    }

    #blog-header {
        padding-top: 92px;
    }

    #blog-header .two-column-header {
        flex-direction: row;
        gap: 18px;
        margin-bottom: 20px;
    }


    .section-title-blog {
        width: 238px; 
        min-width: 238px; 
        font-size: 30px;
    }
    .section-description-blog {
        letter-spacing: 0;
        font-size: 18px;
    }

    .page-title {
        font-size: 40px;
    }

    #featured-post {
        display: block;
        padding-bottom: 20px;
    }

    .featured-post-card {
        flex-direction: row; 
        gap: 20px;
        height: auto; 
    }
    .featured-post-card .blog-image {
        width: 238px; 
        height: 215px; 
        aspect-ratio: 235 / 220; 
    }
    .featured-post-card .blog-content {
        width: auto;
        flex: 1; 
        justify-content: center; 
        gap: 18px;
    }
    .featured-post-card .blog-title {
        font-size: 22px;
    }
    .featured-post-card .blog-excerpt {
        margin-top: 4px;
        font-size: 18px;
        letter-spacing: 0;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .featured-post-card .blog-meta-container {
        gap: 8px; 
    }

    .featured-post-card .blog-read-icon img {
        content: url('/img/icons/right.svg');
    }

}


@media (min-width: 1440px) {

    #blog-header .two-column-header {
        margin-bottom: 4px;
    }

    #featured-post {
        display: block;
        margin-top: 0;
        padding-bottom: 30px;
    }

    /* Desktop: Show 9 cards */
    .blog-grid .blog-card:nth-child(n+7) {
        display: flex; 
    }
    .blog-grid .blog-card:nth-child(n+10) {
        display: none;
    }

    .blog-grid-index,
    .blog-grid {
        display: grid;
        align-items: start;
    }

    .blog-grid-index{
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        margin-bottom: 60px;
        margin-top: -20px;
    }
    .blog-grid {
        grid-template-columns: repeat(3, 1fr); /* Reverted to 400px per column for desktop */
        gap: 30px;
        margin-bottom: 0;
        width: 100%;
        justify-content: center;
    }
    .blog-card {
        gap: 8px;
        width: 400px; 
        margin-bottom: 0;
    }
    .blog-image {
        width: 400px;
        height: 200px;
        margin-bottom: 0;
    }
    .blog-content {
        gap: 10px;
        width: 400px;
    }
    .blog-text {
        gap: 4px;
        width: 400px;
    }
    
    .blog-excerpt {
        width: 400px;
        white-space: nowrap; 
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .blog-meta {
        gap: 16px;
        width: 400px;
    }
    .blog-meta-info {
        gap: 12px;
        
    }

    #blog-header {
        padding-top: 130px;
        padding-bottom: 38px;
    }
    .section-title-blog {
        font-size: 30px;
        width: 400px;
    }

    .section-description-blog {
        font-weight: 400;
        font-size: 20px; 
        line-height: 150%;
        letter-spacing: 0;
        color: #1C2A38;
        padding-top: 0;
        
    }
    .section-description-blog a {
        color: #BD6A08;
    }

    .page-title {
        font-size: 48px;
    }

    .featured-post-card {
        flex-direction: row; 
        gap: 30px;
        width: 1260px;
        height: 361px;
        align-items: flex-start; 
    }
    .featured-post-card .blog-image {
        width: 400px;
        height: 363px;
        aspect-ratio: auto;
    }
    .featured-post-card .blog-content {
        width: auto; 
        justify-content: flex-start; 
        gap: 18px;
    }
    .featured-post-card .blog-title {
        font-size: 32px;
        line-height: 150%;
        letter-spacing: -0.01em;
        width: auto;
    }
    .featured-post-card .blog-excerpt {
        font-size: 20px;
        line-height: 150%;
        letter-spacing: -0.01em;
        width: auto;
        white-space: normal;
        margin-bottom: 10px;
    }

    .featured-post-card .blog-read-button {
        padding-top: 6px;
    }
    .featured-post-card .blog-read-button .blog-read-text {
        color: #BD6A08;
        font-weight: 700;
    }
    .featured-post-card .blog-read-button:hover .blog-read-text {
        color: #000000;
    }

    .featured-post-card .blog-meta-container {
        gap: 8px; 
    }

    #blog-posts {
        padding-bottom: 90px;
    }
}