/* =========================================================
   SANKALP ALLOYS - BLOG LISTING GRID
   Compact 3-column design + uncropped cover images
   ========================================================= */

.blog-content {
    max-width: 1240px;
    margin: 0 auto;
    padding: 64px 24px 80px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

.blog-content h2.section-title {
    grid-column: 1 / -1;
    margin: 0 0 12px;
    text-align: center;
    color: #24323d;
    font-size: 32px;
    font-weight: 750;
}

/* Card */
.blog-card {
    min-width: 0;
    min-height: 100%;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden;
    border: 1px solid #e2e9ed;
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(14, 57, 80, 0.07);
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    border-color: #cbdce5;
    box-shadow: 0 16px 34px rgba(14, 57, 80, 0.13);
}

/* Override the many inline width/height wrappers in the old HTML */
.blog-card > div:first-child:not(.blog-card-content) {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    overflow: hidden !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f6f8;
}

/* Direct images and wrapped images both use the same safe treatment */
.blog-card .blog-card-image {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    flex-shrink: 0;
    padding: 0;
    background: #f3f6f8;
    transition: transform .35s ease;
}

/* Images inside old inline wrappers need to fill the wrapper, but still not crop */
.blog-card > div:first-child:not(.blog-card-content) .blog-card-image {
    height: 100% !important;
    aspect-ratio: auto;
}

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

/* Content */
.blog-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 21px 21px 22px !important;
}

.blog-card-content h2 {
    margin: 0 0 12px !important;
    color: #13709a !important;
    font-size: 20px !important;
    line-height: 1.38 !important;
    font-weight: 750 !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.blog-card-content p {
    margin: 0 0 18px !important;
    color: #65717a !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.blog-card-link {
    position: relative;
    margin-top: auto;
    padding-right: 18px;
    align-self: flex-start;
    color: #13709a !important;
    font-size: 13px !important;
    font-weight: 750 !important;
    letter-spacing: .35px;
    text-transform: uppercase;
}

.blog-card-link::after {
    content: "→";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform .25s ease;
}

.blog-card:hover .blog-card-link::after {
    transform: translate(3px, -50%);
}

/* Ensure any accidental <strong> inside excerpts does not visually overpower cards */
.blog-card-content p strong {
    font-weight: 650;
    color: inherit;
}

@media (max-width: 1024px) {
    .blog-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
        padding: 54px 20px 70px;
    }
}

@media (max-width: 640px) {
    .blog-content {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 42px 16px 58px;
    }

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

    .blog-card-content h2 {
        font-size: 19px !important;
    }
}
