﻿/* Diabetes Digest Archive Styles - 4 COLUMNS LAYOUT */

/* === DIGEST ARCHIVE SECTION === */
.difference-two {
    background-color: #fff;
}

    /* OVERRIDE BOOTSTRAP'S DEFAULT COLUMN BEHAVIOR */
    .difference-two .row.g-4 {
        display: flex;
        flex-wrap: wrap;
    }

/* Force 4 columns on desktop */
@media (min-width: 992px) {
    .difference-two .row.g-4 > .col {
        width: 25% !important;
        max-width: 25% !important;
        flex: 0 0 25% !important;
    }
}

/* Force 3 columns on tablet */
@media (min-width: 768px) and (max-width: 991px) {
    .difference-two .row.g-4 > .col {
        width: 33.333% !important;
        max-width: 33.333% !important;
        flex: 0 0 33.333% !important;
    }
}

/* Force 2 columns on small tablet */
@media (min-width: 576px) and (max-width: 767px) {
    .difference-two .row.g-4 > .col {
        width: 50% !important;
        max-width: 50% !important;
        flex: 0 0 50% !important;
    }
}

/* Force 1 column on mobile */
@media (max-width: 575px) {
    .difference-two .row.g-4 > .col {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
}

/* === CARD STYLES === */
.difference-two .card {
    border: 0 !important;
    border-radius: 10px;
    height: 100%;
    transition: transform 0.3s ease;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075) !important;
    margin: 0 auto;
    max-width: 280px;
}

    .difference-two .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important;
    }

.difference-two .card-body {
    padding: 1rem !important;
    height: 100%;
    display: flex !important;
    flex-direction: column !important;
    text-align: center !important;
}

/* === IMAGE THUMBNAIL STYLES === */
.digest-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background-color: #f8f9fa;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem !important;
}

.digest-img {
    width: 100%;
    max-width: 225px;
    height: auto;
    transition: transform 0.3s ease;
    display: block;
    margin: 0 auto;
    border-radius: .375rem !important;
}

/* Image overlay effect */
.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 47, 42, 0.85);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 6px;
    font-weight: 500;
    font-size: 1.1rem;
}

.digest-thumb:hover .img-overlay {
    opacity: 1;
}

.digest-thumb:hover .digest-img {
    transform: scale(1.05);
}

/* === BUTTON STYLES === */
.digest-btn {
    background: linear-gradient(135deg, #122f2a 0%, #1a473d 100%);
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 200px;
    margin-top: auto !important;
}

    .digest-btn:hover {
        background: linear-gradient(135deg, #1a473d 0%, #26594d 100%);
        color: white !important;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(26, 71, 61, 0.3);
        text-decoration: none;
    }

/* Responsive adjustments */
@media (max-width: 1199px) {
    .digest-img {
        max-width: 200px;
    }

    .digest-thumb {
        min-height: 260px;
    }

    .difference-two .card {
        max-width: 260px;
    }
}

@media (max-width: 991px) {
    .digest-img {
        max-width: 180px;
    }

    .digest-thumb {
        min-height: 240px;
    }

    .difference-two .card {
        max-width: 240px;
    }
}

@media (max-width: 767px) {
    .digest-img {
        max-width: 200px;
    }

    .digest-thumb {
        min-height: 260px;
    }

    .difference-two .card {
        max-width: 280px;
    }
}

@media (max-width: 575px) {
    .digest-img {
        max-width: 180px;
    }

    .digest-thumb {
        min-height: 240px;
    }

    .difference-two .card {
        max-width: 260px;
    }
}
