.img_news {
    margin: 5px;
    width: 310px;
}

/* ニュースコンテナのスタイル */
.news-tab {
    height: 13030vh;
}

/* ニュースコンテナのスタイル */
.news {
    width: 70%;
    margin: 50px 0;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}

/* ヘッダーのスタイル */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #4f4f4f;
}

.news-title {
    background: #4f4f4f;
    color: #ffffff;
    width: 165px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 2px;
    font-size: 18px;
    font-weight: 700;
}

.news-sort {
    display: flex;
    justify-content: flex-end;
    border: none;
    font-size: 15px;
    color: #9a9a9a;
}

/* ニュースセクションのスタイル */
.news-section {
    max-height: 400px;
    overflow-y: auto;
    margin-top: 20px; /* 上部のマージンを調整 */
    flex: 1;
}

.news-item {
    display: flex;
    align-items: center;
    height: 65px;
    border-bottom: 1px solid #d9d9d9;
    padding: 2px;
}

.news-date {
    color: #9a9a9a;
    font-weight: 900;
    font-size: 14px;
}

.news-tag {
    margin: 0 10px;
    color: #ffffff;
    border-radius: 5px;
    font-size: 11px;
    text-align: center;
    padding: 2px 5px;
    width: 140px;
    min-width: 0;
    max-width: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    word-break: keep-all;
    letter-spacing: 0.05em;
}

.category-maintenance {
    background: #ff5b5b;
    border: 1px solid #ff5b5b;
}

.category-important {
    background: #817ff6;
    border: 1px solid #817ff6;
}

.category-notice {
    background: #ffa95b;
    border: 1px solid #ffa95b;
}

.category-4 {
    background: #5b7fff;
    border: 1px solid #5b7fff;
}

.category-5 {
    background: #b5eb7b;
    border: 1px solid #b5eb7b;
}

.category-6 {
    background: #7bc8ef;
    border: 1px solid #7bc8ef;
}

.category-7 {
    background: #4eb482;
    border: 1px solid #4eb482;
}

.category-8 {
    background: #e86caa;
    border: 1px solid #e86caa;
}

.category-9 {
    background: #ebed6f;
    border: 1px solid #ebed6f;
}
.category-10 {
    background: #cea2e2;
    border: 1px solid #cea2e2;
}

.background-photo {
    width: 150px;
}

/* ニュースリンクのスタイル */
.news-link {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.edit-link img {
    display: block;
    width: 20px;
    margin-right: 10px;
}

.delete-link img {
    display: block;
}

/* お知らせセクションのスタイル */
.news-notice {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
}

.news-notice a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.news-notice img {
    margin-right: 8px;
}

.news .main-news-notice {
    position: static !important;
    bottom: 20px;
    right: 20px;
}

.main-news-notice .notice-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #000;
}

.main-news-notice img {
    margin-right: 8px;
}

.main-news-notice .notice-list {
    font-size: 13px;
    font-weight: 500;
}

.news-item-container {
    position: relative;
    z-index: 1;
}

.notice-list {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 1px;
    height: 20px;
    display: flex;
    align-items: center;
    color: #000;
}

.school-tag {
    display: inline-block;
    padding: 2px 8px;
    background-color: #808080;
    color: #ffffff;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 8px;
}

.news-details-title-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
    width: 100%;
}

.news-details-title {
    font-size: 18px;
    font-weight: bold;
    padding-bottom: 4px;
}

.modal-news-tag {
    margin: 0 25px;
    color: #ffffff;
    border-radius: 5px;
    font-size: 11px;
    text-align: center;
    width: 140px;
    padding: 2px;
}

.modal-school-tag {
    display: inline-flex;
    align-items: center;
    background-color: #808080;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    height: 24px;
    margin: 20px 0;
}

.news-table-container {
    width: 100%;
    margin-top: 20px;
    overflow-x: auto;
}

.news-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
}

.news-table th,
.news-table td {
    padding: 12px !important;
    text-align: left;
    border-bottom: 1px solid #d9d9d9 !important;
}

.news-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #4f4f4f;
}

.news-title-link {
    color: #4f4f4f;
    text-decoration: none;
    cursor: pointer;
}

.news-title-link:hover {
    text-decoration: underline;
}

.edit-link {
    gap: 10px;
    align-items: center;
}

.news-table td.edit-link {
    text-align: right;
}

.edit-link a {
    text-decoration: none !important;
}

.edit-link img,
.delete-link img {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.delete-form {
    margin: 0;
    padding: 0;
}

/* モーダル内のスタイル */
.news-details-header {
    margin-bottom: 20px;
}

.news-details-title-container {
    display: block;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.news-details-title-container h2 {
    font-size: 18px;
    font-weight: bold;
    color: #4f4f4f;
    margin: 0;
}

.news-details-date {
    color: #9a9a9a;
    font-size: 14px;
}

.news-details-content {
    line-height: 1.6;
    color: #4f4f4f;
}

.news-table .news-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #ffffff;
    text-align: center;
    min-width: 80px;
}

@media screen and (max-width: 768px) {
    .news-section {
        max-height: 300px;
    }

    .news-item {
        height: auto;
        padding: 10px 5px;
    }

    .news-tag {
        margin: 5px 10px;
        width: 120px;
        font-size: 10px;
    }

    .school-tag {
        margin: 5px 10px;
        width: 120px;
        font-size: 10px;
    }

    .news-date {
        font-size: 12px;
    }

    .news-tag {
        padding: 2px 10px;
        font-size: 10px;
    }
}
