.recent-posts {
    /* Main container for the recent posts section */
    width: 100%;
    position: relative;
    background-color: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 48px 0px; /* reduced and consistent padding */
    box-sizing: border-box;
    gap: 48px; /* Gap between header and post grid */
    text-align: left;
    font-size: 16px;
    color: #1e3a8a; /* Default color for subheading/links */
    font-family: Inter;
}

.recent-post-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recent-post-card-link:hover {
    transform: translateY(-4px);
}

.recent-post-card-link:hover .recent-post-card {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.recent-posts .container {
    /* Inner container for max-width and padding control on the header area */
    width: 100%;
    max-width: 1280px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px 32px; 
    box-sizing: border-box;
    margin: 0 auto;
}
.recent-posts .content {
    /* Wrapper for the header row: Title/Text area + Button area */
    align-self: stretch;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 32px 20px;
}

@media (max-width: 1024px) {
    .recent-posts .content {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .recent-posts .heading-and-supporting-text {
        min-width: unset;
        width: 100%;
        text-align: center;
        align-items: center;
    }

    .recent-posts .actions {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .recent-posts .buttonsbutton {
        width: 100%;
        max-width: 100%;
    }
}

/* =================================================================================================== */
/* 2. HEADER TEXTS (Title, Subheading, Supporting Text) */
/* =================================================================================================== */

.recent-posts .heading-and-supporting-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    min-width: 480px;
    max-width: 768px;
    margin-bottom: 32px;
}
.recent-posts .subheading {
    /* "Our blog" */
    align-self: stretch;
    position: relative;
    line-height: 24px;
    font-weight: 600;
}
.recent-posts .heading {
    /* "Latest blog posts" */
    align-self: stretch;
    position: relative;
    font-size: 36px;
    letter-spacing: -0.02em;
    line-height: 44px;
    font-weight: 600;
    color: #171717;
}
.recent-posts .supporting-text {
    /* Descriptive text below the main heading */
    align-self: stretch;
    position: relative;
    font-size: 20px;
    line-height: 30px;
    color: #6b7280;
}

/* =================================================================================================== */
/* 3. BUTTON STYLES (View all posts) */
/* =================================================================================================== */

.recent-posts .buttonsbutton {
    /* Primary button styling */
    box-shadow: 0px 0px 0px 1px rgba(10, 13, 18, 0.18) inset, 0px -2px 0px rgba(10, 13, 18, 0.05) inset, 0px 1px 2px rgba(10, 13, 18, 0.05);
    border-radius: 8px;
    background-color: #2563eb;
    border: 2px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    text-decoration: none;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.recent-posts .buttonsbutton:hover {
    background-color: #1D4ED8;
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}
.recent-posts .text {
    /* Text inside the button */
    position: relative;
    line-height: 24px;
    font-weight: 600;
}

/* =================================================================================================== */
/* 4. BLOG POST CARDS & GRID STYLES */
/* =================================================================================================== */

.recent-posts-container {
    /* Wrapper for the grid of posts (max-width/padding) */
    width: 100%;
    max-width: 1280px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px 32px;
    margin: 0 auto; /* center the container within the recent-posts */
    box-sizing: border-box;
    font-size: 14px;
}
.recent-posts-content {
    /* The grid container for the 3 posts */
    align-self: stretch;
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 48px 32px; 
    align-items: start;
}
/* image sizing variables (easy to tweak) */
:root {
    --recent-post-image-desktop: 240px;
    --recent-post-image-mobile: 180px;
}
.recent-post-image {
    /* Post image styling */
    align-self: stretch;
    position: relative;
    border-radius: 16px;
    width: 100%;
    /* Use an aspect ratio so images stay consistent and responsive */
    aspect-ratio: 16/9;
    height: auto;
    max-width: 100%;
    overflow: hidden;
    display: block;
    object-fit: cover;
}
.recent-post-content {
    /* Content wrapper for text details of the card */
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-top: 20px;
    flex: 1; /* Allow content to grow and fill available space */
    padding-left: 12px;
    padding-right: 12px;
}

/* =================================================================================================== */
/* 5. POST CARD TEXT ELEMENTS */
/* =================================================================================================== */

.recent-post-subheading {
    /* Category (e.g., Design, Product) */
    align-self: stretch;
    position: relative;
    line-height: 20px;
    font-weight: 600;
    color: #1e3a8a; 
}
.recent-post-heading-wrap {
    /* Wrapper for Post Title and Summary */
    align-self: stretch;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    font-size: 18px;
    color: #171717;
}
.recent-post-heading {
    /* Post Title */
    flex: 1;
    position: relative;
    line-height: 28px;
    font-weight: 600;
    color: #2563eb;
    margin: 0;
}
.recent-post-supporting-text {
    /* Post Summary/Snippet */
    align-self: stretch;
    position: relative;
    font-size: 16px;
    line-height: 24px;
    color: #6b7280;
    /* Truncate text to 3 lines */
    display: -webkit-inline-box;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* =================================================================================================== */
/* 6. AUTHOR/AVATAR STYLES */
/* =================================================================================================== */

.recent-post-avatar-group {
    /* Container for Avatar, Author Name, and Date */
    display: flex;
    align-items: center;
    gap: 8px;
    color: #171717;
}

/* Hide author avatar and name as requested */
.recent-post-avatar-group {
    display: none !important;
}
.recent-post-avatar {
    /* Avatar Image */
    width: 40px;
    height: 40px; 
    position: relative;
    border-radius: 9999px; 
    object-fit: cover;
}
.recent-post-author {
    /* Author Name */
    position: relative;
    line-height: 20px;
    font-weight: 600;
}
.recent-post-date {
    /* Post Date */
    position: relative;
    line-height: 20px;
    color: #6b7280;
}

/* =================================================================================================== */
/* 7. RESPONSIVE DESIGN (Media Query) */
/* =================================================================================================== */

@media (max-width: 1024px) {
    /* Single column layout for mobile/tablet */
    .recent-posts-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .recent-post-image {
        height: var(--recent-post-image-mobile);
    }
    .recent-posts {
        padding: 48px 0px;
        gap: 32px;
    }
    .recent-posts .heading-and-supporting-text {
        min-width: unset;
        max-width: 100%;
    }
    .recent-posts .container,
    .recent-posts-container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Small utility: ensure the card link and headings don't add external margins */
.recent-post-heading-link {
    text-decoration: none;
    color: inherit;
}

/* Hover animation for post cards (like pricing cards, without border) */
.recent-post-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}
.recent-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1), 0 10px 10px rgba(0, 0, 0, 0.04);
}

@media (max-width: 1024px) {
    .recent-post-card {
        padding: 20px;
    }
}

/* Hide any icon placeholders that might render after titles in this section */
.recent-posts .icon-wrap { display: none !important; }

/* keep the original heading class for the header area */
.recent-posts .heading {
    margin: 0;
}

/* Constrain the recent posts section to a centered max-width of 1280px */
.recent-posts-container {
    max-width: 1280px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 32px;
    padding-right: 32px;
    box-sizing: border-box;
}

/* Recent Posts Animation Styles */
.recent-posts .heading-and-supporting-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.recent-posts .heading-and-supporting-text.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.recent-posts .actions {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out 0.15s, transform 0.5s ease-out 0.15s;
}

.recent-posts .heading-and-supporting-text.animate-in ~ .actions,
.recent-posts .actions.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.recent-post-card-link {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.recent-post-card-link.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.recent-post-card-link:nth-child(1).animate-in {
    transition-delay: 0s;
}

.recent-post-card-link:nth-child(2).animate-in {
    transition-delay: 0.1s;
}

.recent-post-card-link:nth-child(3).animate-in {
    transition-delay: 0.2s;
}