/* =====================================================
   ASWU NEWS: 2 columns, 2 news cards stacked in each
   Image on the RIGHT; text/content on the LEFT
   Add this block at the VERY END of news-style.css
   ===================================================== */

/* Grid layout: 2 items down each column */
.aswu-news-wrapper .aswu-news-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-template-rows: repeat(2, minmax(0, auto));
    grid-auto-flow: column;
    gap: 18px 22px !important;
    width: 100%;
    direction: rtl;
    align-items: stretch;
    box-sizing: border-box;
}

/* Each card: content on the left, image on the right */
.aswu-news-wrapper .aswu-news-grid > .aswu-news-card {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 34% !important;
    grid-template-areas: "content image";
    align-items: stretch;
    width: 100%;
    min-width: 0;
    min-height: 165px;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Image area on the right */
.aswu-news-wrapper .aswu-news-grid > .aswu-news-card > .aswu-news-image {
    grid-area: image;
    width: 100%;
    height: 165px;
    min-height: 165px;
    overflow: hidden;
}

.aswu-news-wrapper .aswu-news-grid > .aswu-news-card > .aswu-news-image > a {
    display: block;
    width: 100%;
    height: 100%;
}

.aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-thumbnail {
    display: block;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* Text area on the left */
.aswu-news-wrapper .aswu-news-grid > .aswu-news-card > .aswu-news-content {
    grid-area: content;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    padding: 12px 14px !important;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
}

/* Blue title */
.aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-title {
    min-height: 0;
    margin: 0 0 7px !important;
    font-size: 16px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-title a,
.aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-title a:visited {
    color: #145a9c !important;
    text-decoration: none !important;
}

.aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-title a:hover {
    color: #0d467b !important;
}

/* Compact excerpt */
.aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-excerpt {
    min-height: 0;
    margin: 0 0 9px !important;
    font-size: 12px;
    line-height: 1.65;
    color: #68798a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read-more button: centered and not full width */
.aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    align-self: center !important;
    width: fit-content !important;
    max-width: 100%;
    margin: auto 0 0 !important;
    padding: 6px 11px !important;
    gap: 7px;
    border: 1px solid #145a9c;
    border-radius: 6px;
    background: #145a9c;
    color: #fff !important;
    font-size: 12px;
    line-height: 1.4;
    text-decoration: none !important;
    white-space: normal;
    box-sizing: border-box;
}

.aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-button:hover {
    background: #0d467b;
    border-color: #0d467b;
    color: #fff !important;
}
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read-more button: centered and not full width */
.aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    align-self: center !important;
    width: fit-content !important;
    max-width: 100%;
    margin: auto 0 0 !important;
    padding: 6px 11px !important;
    gap: 7px;
    border: 1px solid #145a9c;
    border-radius: 6px;
    background: #145a9c;
    color: #fff !important;
    font-size: 12px;
    line-height: 1.4;
    text-decoration: none !important;
    white-space: normal;
    box-sizing: border-box;
}

.aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-button:hover {
    background: #0d467b;
    border-color: #0d467b;
    color: #fff !important;
}

/* Keep date badge compact */
.aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-date-badge {
    top: 8px;
    right: 8px;
    min-width: 55px;
    padding: 6px 7px;
    border-radius: 7px;
}

.aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-day {
    font-size: 18px;
}

.aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-month {
    font-size: 10px;
}

/* Tablet */
@media (max-width: 900px) {
    .aswu-news-wrapper .aswu-news-grid {
        gap: 14px !important;
    }

    .aswu-news-wrapper .aswu-news-grid > .aswu-news-card {
        grid-template-columns: minmax(0, 1fr) 32% !important;
        min-height: 150px;
    }

    .aswu-news-wrapper .aswu-news-grid > .aswu-news-card > .aswu-news-image {
        height: 150px;
        min-height: 150px;
    }

    .aswu-news-wrapper .aswu-news-grid > .aswu-news-card > .aswu-news-content {
        padding: 10px !important;
    }

    .aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-title {
        font-size: 14px;
    }
}

/* Mobile: one column, keep image right and text left */
@media (max-width: 650px) {
    .aswu-news-wrapper .aswu-news-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: auto;
        grid-auto-flow: row;
        gap: 15px !important;
    }

    .aswu-news-wrapper .aswu-news-grid > .aswu-news-card {
        grid-template-columns: minmax(0, 1fr) 34% !important;
        min-height: 145px;
    }

    .aswu-news-wrapper .aswu-news-grid > .aswu-news-card > .aswu-news-image {
        height: 145px;
        min-height: 145px;
    }

    .aswu-news-wrapper .aswu-news-grid > .aswu-news-card > .aswu-news-content {
        padding: 9px !important;
    }

    .aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-title {
        font-size: 13px;
    }

    .aswu-news-wrapper .aswu-news-grid > .aswu-news-card .aswu-news-excerpt {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }
}
/* =========================================
   ASWU NEWS PAGINATION
   ========================================= */

.aswu-news-wrapper .aswu-news-pagination {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 28px 0 18px;
    direction: rtl;
}

.aswu-news-wrapper .aswu-news-pagination ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.aswu-news-wrapper .aswu-news-pagination li {
    display: inline-flex !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.aswu-news-wrapper .aswu-news-pagination li::before,
.aswu-news-wrapper .aswu-news-pagination li::after {
    display: none !important;
    content: none !important;
}

.aswu-news-wrapper .aswu-news-pagination a,
.aswu-news-wrapper .aswu-news-pagination span {
    display: inline-flex !important;
    justify-content: center;
    align-items: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #d7e3ef;
    border-radius: 7px;
    background: #fff;
    color: #145a9c;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: all .25s ease;
}

/* Hover */
.aswu-news-wrapper .aswu-news-pagination a:hover {
    background: #0d467b;
    border-color: #0d467b;
    color: #fff !important;
    transform: translateY(-2px);
}

/* الصفحة الحالية */
.aswu-news-wrapper .aswu-news-pagination .current {
    background: #145a9c !important;
    border-color: #145a9c !important;
    color: #fff !important;
    box-shadow: 0 3px 8px rgba(20, 90, 156, .18);
}

/* Mobile */
@media (max-width: 600px) {
    .aswu-news-wrapper .aswu-news-pagination {
        margin: 22px 0 14px;
    }

    .aswu-news-wrapper .aswu-news-pagination ul {
        gap: 5px;
    }

    .aswu-news-wrapper .aswu-news-pagination a,
    .aswu-news-wrapper .aswu-news-pagination span {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
        font-size: 13px;
    }
}
/* =========================================
   ASWU NEWS CARDS SHADOW
   ========================================= */

.aswu-news-wrapper .aswu-news-card {
    box-shadow: 0 4px 16px rgba(20, 60, 100, 0.10) !important;
    border: 1px solid #e7edf3;
    border-radius: 12px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* Shadow on hover */
.aswu-news-wrapper .aswu-news-card:hover {
    box-shadow: 0 10px 26px rgba(20, 60, 100, 0.17) !important;
    transform: translateY(-3px);
}
