/* =========================================================
   SocioEducations - Homepage Article Cards
   Matches front-page.php markup
   ========================================================= */

.se-home-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.se-home-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #E6EAF1;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(16, 38, 75, .025);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.se-home-card:hover {
    transform: translateY(-4px);
    border-color: #D4DFF1;
    box-shadow: 0 12px 28px rgba(16, 38, 75, .09);
}

/* Article image */
.se-home-card-image {
    position: relative;
    display: block;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #E9EEF6;
}

.se-home-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .35s ease;
}

.se-home-card:hover .se-home-card-image img {
    transform: scale(1.045);
}

.se-home-card-image .se-home-image-placeholder {
    min-height: 100%;
    font-size: 15px;
}

/* Content area */
.se-home-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: 17px;
}

/* Category tag */
.se-home-card-content .se-home-tag {
    margin-bottom: 10px;
    padding: 5px 9px;
    color: #2457C5;
    background: #EDF2FF;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: .35px;
    text-transform: uppercase;
}

/* Article title */
.se-home-card-title {
    display: -webkit-box;
    width: 100%;
    margin: 0 0 12px;
    overflow: hidden;
    color: #172033;
    font-size: 17px;
    font-weight: 750;
    line-height: 1.5;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.se-home-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

.se-home-card-title a:hover {
    color: #2457C5;
}

/* Date */
.se-home-card-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    margin-bottom: 10px;
    color: #8993A4;
    font-size: 11px;
    font-weight: 500;
}

.se-home-card-meta span::before {
    content: "◷";
    margin-right: 6px;
    color: #2457C5;
    font-size: 13px;
}

/* Description */
.se-home-card-excerpt {
    display: -webkit-box;
    width: 100%;
    margin: 0;
    overflow: hidden;
    color: #687386;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* Section-specific card styling */
.se-section-news .se-home-card {
    border-radius: 12px;
}

.se-section-news .se-home-card-content {
    padding: 17px;
}

/* Jobs */
.se-section-jobs .se-home-card-content .se-home-tag {
    color: #16845A;
    background: #E8F6EF;
}

/* Schemes */
.se-section-schemes .se-home-card-content .se-home-tag {
    color: #7952B3;
    background: #F1ECFA;
}

/* Results */
.se-section-results .se-home-card-content .se-home-tag {
    color: #2457C5;
    background: #EDF2FF;
}

/* Admit cards */
.se-section-admit .se-home-card-content .se-home-tag {
    color: #B96B08;
    background: #FFF4DF;
}

/* Tablet */
@media (max-width: 1024px) {
    .se-home-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .se-home-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 11px;
    }

    .se-home-card {
        border-radius: 9px;
    }

    .se-home-card-content {
        padding: 11px;
    }

    .se-home-card-content .se-home-tag {
        margin-bottom: 7px;
        padding: 4px 6px;
        font-size: 9px;
    }

    .se-home-card-title {
        margin-bottom: 9px;
        font-size: 13px;
        line-height: 1.45;
        -webkit-line-clamp: 3;
    }

    .se-home-card-meta {
        margin-bottom: 7px;
        font-size: 10px;
    }

    .se-home-card-excerpt {
        font-size: 11px;
        line-height: 1.55;
        -webkit-line-clamp: 2;
    }
}

@media (max-width: 360px) {
    .se-home-card-grid {
        gap: 8px;
    }

    .se-home-card-content {
        padding: 9px;
    }

    .se-home-card-title {
        font-size: 12px;
    }
}