.block_schoolnews,
.block_schoolnews .content,
.block_schoolnews .no-overflow {
    overflow: visible !important;
}

.block_schoolnews {
    margin: 0 auto;
}

.schoolnews-band {
    width: 100%;
    padding: 24px 0 18px;
    background: transparent;
}

.schoolnews-inner {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.schoolnews-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.schoolnews-head-main {
    text-align: center;
    flex: 1 1 auto;
}

.schoolnews-title {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
}

.schoolnews-underline {
    width: 60px;
    height: 4px;
    margin: 12px auto 0;
    border-radius: 999px;
    background: #EA0400;
}

.schoolnews-addbtn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: #EA0400;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
    white-space: nowrap;
}

.schoolnews-empty {
    text-align: center;
    padding: 28px 0;
    color: rgba(0, 0, 0, .6);
}

.schoolnews-carousel {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.schoolnews-arrow {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 50%;
    background: #fff;
    color: #444;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
    display: flex;
    align-items: center;
    justify-content: center;
}

.schoolnews-viewport {
    flex: 1 1 auto;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 18px 18px 28px;
}

.schoolnews-viewport::-webkit-scrollbar {
    display: none;
}

.schoolnews-track {
    display: flex;
    align-items: stretch;
    gap: 22px;
    width: max-content;
    min-width: 100%;
    justify-content: center;
}

.schoolnews-card {
    flex: 0 0 calc((100vw - 280px) / 3);
    width: calc((100vw - 280px) / 3);
    min-width: 290px;
    max-width: 390px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .06);
    position: relative;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
}

.schoolnews-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
}

.schoolnews-card-open {
    position: absolute;
    inset: 0;
    z-index: 1;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.schoolnews-card-media,
.schoolnews-card-body {
    position: relative;
    z-index: 2;
}

.schoolnews-actions,
.schoolnews-linkwrap {
    position: relative;
    z-index: 3;
}

.schoolnews-card-media {
    width: 100%;
    height: 210px;
    background: #f0f2f5;
    overflow: hidden;
}

.schoolnews-card-media img,
.schoolnews-card-placeholder {
    width: 100%;
    height: 100%;
    display: block;
}

.schoolnews-card-media img {
    object-fit: cover;
}

.schoolnews-card-placeholder {
    background: linear-gradient(135deg, #eef1f5 0%, #dde3ea 100%);
}

.schoolnews-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px 18px 20px;
    flex: 1 1 auto;
}

.schoolnews-card-title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #111;
}

.schoolnews-meta,
.schoolnews-location,
.schoolnews-counts {
    font-size: 14px;
    color: rgba(0, 0, 0, .62);
}

.schoolnews-card-desc {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(0, 0, 0, .76);
    min-height: 72px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.schoolnews-card-desc:empty::before {
    content: "";
    display: block;
    min-height: 72px;
}

.schoolnews-linkwrap {
    margin-top: 2px;
}

.schoolnews-link {
    font-weight: 600;
    text-decoration: none;
}

.schoolnews-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
    padding-top: 6px;
}

.schoolnews-pill {
    flex: 1 1 0;
    min-width: 0;
    padding: 11px 14px;
    border: 1px solid rgba(0, 0, 0, .14);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
}

.schoolnews-pill.is-active {
    border-color: #EA0400;
    box-shadow: 0 0 0 3px rgba(234, 4, 0, .12);
}

.schoolnews-counts {
    margin-top: 2px;
}

.schoolnews-count-sep {
    margin: 0 8px;
}

/* Manage modal */
.schoolnews-modal[hidden] {
    display: none !important;
}

.schoolnews-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.schoolnews-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.schoolnews-modal-dialog {
    position: absolute;
    inset: 4vh 6vw;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
}

.schoolnews-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 2;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .08);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.schoolnews-modal-frame {
    width: 100%;
    height: 100%;
    min-height: 92vh;
    border: 0;
    display: block;
}

/* Read modal */
.schoolnews-readmodal[hidden] {
    display: none !important;
}

.schoolnews-readmodal {
    position: fixed;
    inset: 0;
    z-index: 100000;
}

.schoolnews-readmodal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .62);
}

.schoolnews-readmodal-dialog {
    position: absolute;
    inset: 5vh 6vw;
    background: #fff;
    border-radius: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .22);
}

.schoolnews-readmodal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .88);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.schoolnews-readmodal-content {
    display: grid;
    grid-template-columns: 64% 36%;
    height: 100%;
    overflow-y: auto;
}

.schoolnews-readmodal-imagewrap {
    height: 100%;
    min-height: 100%;
    background: #f3f5f7;
    overflow: hidden;
}

.schoolnews-readmodal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.schoolnews-readmodal-body {
    padding: 42px 40px 36px;
}

.schoolnews-readmodal-title {
    margin: 0 0 16px;
    font-size: 32px;
    line-height: 1.15;
    font-weight: 700;
}

.schoolnews-readmodal-meta,
.schoolnews-readmodal-location {
    font-size: 15px;
    color: rgba(0, 0, 0, .62);
    margin-bottom: 10px;
}

.schoolnews-readmodal-desc {
    margin-top: 20px;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(0, 0, 0, .82);
    white-space: pre-line;
}

.schoolnews-readmodal-linkwrap {
    margin-top: 24px;
}

body.schoolnews-modal-open {
    overflow: hidden;
}

@media (max-width: 1200px) {
    .schoolnews-card {
        flex-basis: calc((100vw - 220px) / 2);
        width: calc((100vw - 220px) / 2);
    }
}

@media (max-width: 900px) {
    .schoolnews-readmodal-dialog {
        inset: 2vh 2vw;
        height: calc(100vh - 4vh);
        overflow-y: auto;
    }

    .schoolnews-readmodal-content {
        display: flex;
        flex-direction: column;
        min-height: 100%;
        height: auto;
        overflow: visible;
    }

    .schoolnews-readmodal-imagewrap {
        width: 100%;
        height: 78vh;
        min-height: 260px;
        max-height: none;
        flex: 0 0 auto;
        overflow: hidden;
    }

    .schoolnews-readmodal-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
        display: block;
    }

    .schoolnews-readmodal-body {
        flex: 0 0 auto;
        padding: 28px 24px 30px;
        overflow: visible;
    }

    .schoolnews-readmodal-title {
        font-size: 26px;
    }
}
@media (max-width: 768px) {
    .schoolnews-head {
        flex-direction: column;
        align-items: center;
    }

    .schoolnews-title {
        font-size: 24px;
    }

    .schoolnews-carousel {
        position: relative;
    }

    .schoolnews-arrow {
        display: flex;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 5;
        width: 38px;
        height: 38px;
        font-size: 18px;
        opacity: .92;
        background: rgba(255, 255, 255, .95);
        backdrop-filter: blur(4px);
    }

    .schoolnews-arrow-left {
        left: -6px;
    }

    .schoolnews-arrow-right {
        right: -6px;
    }

    .schoolnews-card {
        flex-basis: 86vw;
        width: 86vw;
        min-width: 86vw;
        max-width: 86vw;
    }

    .schoolnews-card-media {
        height: 240px;
    }

    .schoolnews-actions {
        flex-direction: column;
    }

    .schoolnews-modal-dialog {
        inset: 2vh 2vw;
    }
}

.schoolnews-card-edit {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: #111 !important;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}

.schoolnews-card-edit:hover {
    background: #fff;
}