/* Blogs Page Specific Styles */

.blog-hero {
    margin-bottom: 40px;
    padding: 0 175px;
    /* Add standard site gutter */
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 32px;
    margin-top: 24px;
    grid-auto-rows: min-content;
    /* Maintain "middle" placement by mimicking the 175px gutter */
    padding: 0 175px;
}

/* Featured Article Section */
.blog-featured {
    margin-bottom: 48px;
    padding: 0 175px;
    /* Add standard site gutter */
}

.blog-featured .content-card {
    display: flex;
    flex-direction: row;
    gap: 40px;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #c2e0ff;
    padding: 40px !important;
    /* Restore normal internal padding */
    border-radius: 28px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.blog-featured .content-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--google-blue);
}

.blog-featured .card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%;
}

.blog-featured .card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.blog-featured .card-header .tag {
    color: var(--google-blue);
    font-size: 13px;
    letter-spacing: 0.5px;
}

.blog-featured .arrow {
    font-size: 28px;
    font-weight: bold;
    color: var(--google-blue);
    transition: transform 0.3s ease;
}

.blog-featured .content-card:hover .arrow {
    transform: translateX(10px);
}

.blog-featured .section-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
}

.blog-featured .featured-title {
    font-size: 1.2rem;
}

.blog-featured p {
    font-size: 1.1rem;
    line-height: 1.6;
}

.search-container {
    margin-bottom: 32px;
    position: relative;
    max-width: 600px;
    /* Increased to prevent text cut-off */
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/*increse the width of the search input */
.search-input {
    width: 100%;
    padding: 14px 20px 14px 52px;
    font-size: 16px;
    font-family: var(--font-family-sans);
    color: var(--google-dark-grey);
    background-color: #fff;
    border: 1px solid #dadce0;
    border-radius: 28px;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.1);
}

.search-input:focus {
    border-color: transparent;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.search-icon {
    position: absolute;
    left: 18px;
    color: #5f6368;
    font-size: 24px;
    pointer-events: none;
}

.no-results {
    display: none;
    text-align: center;
    padding: 40px;
    color: #5f6368;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 20px 0;
}

/* Ensure article cards can be hidden */
.content-card.hidden {
    display: none;
}

/* Bento-inspired Card Enhancements */
.blog-hero .content-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #c2e0ff;
    padding: 40px !important;
    /* Restore normal internal padding */
    border-radius: 28px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.blog-grid .card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.blog-grid .content-card .card-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
}

.blog-grid .content-card .meta-info {
    margin-bottom: 0px;
}

.blog-grid .arrow {
    font-size: 24px;
    font-weight: bold;
    color: #5f6368;
    transition: all 0.3s ease;
}

.blog-grid .content-card:hover .arrow {
    transform: translateX(6px);
    color: var(--google-blue);
}

.blog-grid .content-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--google-blue);
}

.blog-grid .content-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto;
    /* Remove fixed 100% height to prevent overlap issues */
    min-height: 300px;
    /* Optional: maintain a consistent minimum size */
    margin-bottom: 0;
    padding: 32px !important;
    border-radius: 20px;
    border: 1px solid #e8eaed;
    /* Subtle border for better definition */
    background: #ffffff;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Reset reading-view margins for listing cards to prevent "double-spacing" squash */
@media (min-width: 768px) {

    .blog-hero .content-card,
    .blog-grid .content-card,
    .blog-featured .content-card,
    #noResults .content-card {
        margin-left: 0;
        margin-right: 0;
    }
}

/* Responsive adjustments to maintain readable grid */
@media (max-width: 1200px) {

    .blog-hero,
    .blog-featured,
    .blog-grid {
        padding: 0 40px;
    }
}

@media (max-width: 900px) {

    .blog-hero,
    .blog-featured,
    .blog-grid {
        padding: 0 20px;
    }

    .blog-featured .content-card {
        flex-direction: column;
        padding: 30px !important;
        gap: 20px;
    }

    .blog-featured .section-title {
        font-size: 1.8rem;
    }

    .featured-title {
        font-size: 1.6rem;
    }
}

/* Mobile adjustments */
@media (max-width: 600px) {
    .blog-grid {
        gap: 20px;
    }

    .blog-featured .content-card {
        padding: 24px !important;
    }

    .search-input {
        padding: 12px 16px 12px 48px;
        font-size: 15px;
    }

    .search-icon {
        left: 14px;
        font-size: 20px;
    }
}