/**
 * TMU Elementor Blog Posts Loop Card Widget Styles
 * Exact match to TMU design system (Normal & Hover states)
 */

.tmu-blog-grid {
    display: grid;
    grid-template-columns: repeat(var(--tmu-grid-cols, 3), minmax(0, 1fr));
    gap: var(--tmu-grid-gap, 28px);
    width: 100%;
    box-sizing: border-box;
}

/* Responsive grid columns */
@media (max-width: 1024px) {
    .tmu-blog-grid {
        grid-template-columns: repeat(var(--tmu-grid-cols-tablet, 2), minmax(0, 1fr));
        gap: var(--tmu-grid-gap-tablet, 24px);
    }
}

@media (max-width: 640px) {
    .tmu-blog-grid {
        grid-template-columns: repeat(var(--tmu-grid-cols-mobile, 1), minmax(0, 1fr));
        gap: var(--tmu-grid-gap-mobile, 20px);
    }
}

/* -------------------------------------------------------------
 * Card Container (Normal State - Image 1)
 * ------------------------------------------------------------- */
.tmu-blog-card {
    background-color: #fbf9f5;
    border: 1px solid #eee7dc;
    border-radius: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-sizing: border-box;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.35s ease;
}

/* Card Hover State (Image 2) */
.tmu-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px -8px rgba(7, 39, 105, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
    border-color: #e2dac9;
}

/* -------------------------------------------------------------
 * Featured Thumbnail
 * ------------------------------------------------------------- */
.tmu-blog-card-media {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 18px;
    overflow: hidden;
    position: relative;
    background-color: #f0ece3;
    flex-shrink: 0;
}

.tmu-blog-card-media-link {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.tmu-blog-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 18px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subtle smooth zoom on hover */
.tmu-blog-card:hover .tmu-blog-card-img {
    transform: scale(1.035);
}

/* Fallback placeholder when no featured image exists */
.tmu-blog-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #072769 0%, #192766 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #df9724;
}

.tmu-blog-card-placeholder svg {
    opacity: 0.85;
}

/* -------------------------------------------------------------
 * Content Section
 * ------------------------------------------------------------- */
.tmu-blog-card-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding-top: 24px;
}

/* Post Title */
.tmu-blog-card-title {
    font-family: var(--tmu-font-heading, 'Bricolage Grotesque', sans-serif);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: #072769;
    margin: 0 0 14px 0;
    transition: color 0.2s ease;
}

.tmu-blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.tmu-blog-card-title a:hover {
    color: #072769;
}

/* Post Excerpt */
.tmu-blog-card-excerpt {
    font-family: var(--tmu-font-body, 'Bricolage Grotesque', sans-serif);
    font-size: 15px;
    line-height: 1.55;
    color: #4b5563;
    margin: 0 0 28px 0;
    flex-grow: 1;
}

/* -------------------------------------------------------------
 * Action Button (Normal & Hover States)
 * ------------------------------------------------------------- */
.tmu-blog-card-action {
    margin-top: auto;
}

/* 1st one: Normal State (Image 1) */
.tmu-blog-card-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #fbf9f5;
    color: #072769;
    border: 1.5px solid #072769;
    border-radius: 10px;
    padding: 10px 24px;
    font-family: var(--tmu-font-body, 'Bricolage Grotesque', sans-serif);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.25s ease,
                color 0.25s ease,
                border-color 0.25s ease,
                box-shadow 0.25s ease;
}

.tmu-blog-card-btn-text {
    display: inline-block;
}

.tmu-blog-card-btn-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 2nd one: Hover State (Image 2) */
/* When hovering the entire card OR button directly */
.tmu-blog-card:hover .tmu-blog-card-btn,
.tmu-blog-card-btn:hover {
    background-color: #df9724; /* Signature TMU Golden Ochre */
    color: #072769;
    border-color: #072769;
}

.tmu-blog-card:hover .tmu-blog-card-btn-arrow,
.tmu-blog-card-btn:hover .tmu-blog-card-btn-arrow {
    transform: translateX(4px);
}
