html,
body {
    height: 100%;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    font-family: 'Noto Sans JP', sans-serif;
    overflow-x: hidden;
}

body {
    background-color: #F0F8FF !important;
}

/* wrapper */
.wrapper {
    max-width: 1200px;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    position: relative;
    margin: 0 auto;
}

.content-sidebar-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* mainコンテンツ */
.main-content {
    background-color: #fff;
    flex: 1;
    padding: 20px;
    box-sizing: border-box;
    min-height: calc(100vh - 529px);
}

@media (max-width: 1024px) {
    .wrapper {
        padding: 0 10px;
    }

    .card {
        margin-bottom: 15px;
    }

    .content-sidebar-wrapper {
        flex-direction: column;
    }

    .sidebar {
        order: 2;
        width: 90%;
        margin: 10px auto;
    }

    .main-content {
        order: 1;
    }
}

.required::after {
    content: " *";
    color: red;
}

/* ページネーション */
.pagination .page-item.active .page-link {
    background-color: #2958eb;
    color: #f4f4f4;
}

.pagination .page-link {
    color: #2958eb;
}

/* sidebar */
.sidebar {
    padding: 20px;
    background-color: #B3D8FF;
    flex: 0 0 auto;
    width: max-content;
    min-width: 200px;
    max-width: 300px;
}

.sns-icons {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.sns-icons a img {
    width: 40px;
    height: 40px;
}

.side-banners {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.side-banners a img {
    width: 100%;
    height: auto;
}

.sns-icons a img:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

.side-banners a img:hover {
    transform: scale(1.05);
    transition: transform 0.3s ease;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
}

.facebook-widget {
    margin-top: 20px;
}

/* header */
.site-header {
    background: linear-gradient(145deg, #6fc3ee, #2958eb);
    color: #f4f4f4;
}

.logo-img {
    height: 40px;
    width: auto;
}

.navbar-collapse form {
    margin-bottom: 0;
}

.navbar-nav .nav-link {
    padding: 8px 15px;
    transition: color 0.3s ease;
    color: #fff;
    text-decoration: none;
}

.navbar-nav .nav-link:hover, .site-name:hover {
    color: #FF9800;
}

.navbar-toggler-icon {
    /* background-color: #fff !important; */
}

.offcanvas {
    background: linear-gradient(145deg, #6fc3ee, #2958eb);
}

.auth-status span {
    font-weight: bold;
    color: #fff;
}

.site-name {
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .site-name {
        font-size: 0.8rem;
    }
}

/* footer */
.site-footer {
    background: linear-gradient(45deg, #2958eb, #1a3c70);
    color: #f4f4f4;
    padding: 20px;
    text-align: left;
    width: 100%;
    bottom: 0;
    left: 0;
    z-index: 100;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer-section {
    margin-right: 20px;
    flex: 1;
}

.footer-section h4 {
    margin-bottom: 10px;
    font-size: 18px;
    color: #f4f4f4;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #f4f4f4;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #FF9800;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid #fff;
    padding-top: 10px;
    font-size: 14px;
}

.contact-section li {
    color: #f4f4f4;
}

.contact-section li:hover {
    color: #FF9800;
}

.footer-bottom p:hover {
    color: #FF9800;
    transition: color 0.3s ease;
}

/* card */
.card {
    /* background-color: #f4f4f4; */
    /* border-radius: 10px; */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    padding: 16px;
    margin: 0 auto 16px auto;
}

@media (min-width: 768px) {
    .card-width-50 {
        width: 50%;
    }
}

.card-body input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .card-body input {
        width: 300px;
    }
}

.card-body div {
    margin-bottom: 8px;
}

.card-header {
    text-align: center;
    font-weight: bold;
    padding: 10px 0;
}

.card-link:hover .card {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
    transition: transform 0.2s, box-shadow 0.2s;
}

.form-control {
    /* width: auto !important */
}

.form-label {
    display: inline-block;
    width: 150px;
    margin-right: 10px;
    font-size: 12px;
}

@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .meta .small {
        font-size: 0.85rem;
    }
}

.winner-badge {
    transition: all 0.3s ease;
}

.status-badge {
    transition: all 0.3s ease;
}

/* table */
.table tbody tr:hover {
    background-color: #E0E0E0;
    transition: background-color 0.3s ease;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background-color: #E0E0E0;
}

/* banner広告 */
.ad-banner-wrapper {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    padding: 20px;
}

.ad-banner {
    flex: 1 1 calc(16.66% - 15px); /* PCでは6列表示 */
    max-width: calc(16.66% - 15px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-banner img {
    width: 100%;
    height: auto;
    border: 2px solid #555;
    border-radius: 10px;
    padding: 5px;
    background-color: #1e1e1e;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ad-banner img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
    border-color: #131bac;
}

@media (max-width: 992px) {
    .ad-banner {
        flex: 1 1 calc(33.33% - 15px);
        max-width: calc(33.33% - 15px);
    }
}

@media (max-width: 576px) {
    .ad-banner {
        flex: 1 1 calc(33.33% - 15px);
        max-width: calc(33.33% - 15px);
    }
}

.banner-wrapper {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.banner img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.banner img:hover {
    transform: scale(1.05);
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);

}
.banner-text:hover {
    transform: scale(1.05);
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* menu-list */
.card .menu-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.card .menu-list li {
    border-bottom: 1px solid #ddd;
    padding: 10px;
}

.card .menu-list li:last-child {
    border-bottom: none;
}

.card .menu-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #000000CB;
    padding: 10px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.card .menu-list a:hover {
    background-color: #E0E0E0;
}

.card .menu-list a::after {
    content: '>';
    font-size: 18px;
    color: #888;
}

.table-bordered td {
    border-bottom: 1px solid #ddd;
    padding: 10px;
}

.error-message {
    color: crimson;
    display: block;
}

.error-message {
    display: block;
    color: #dc3545;
    margin-top: 0.25rem;
}

/* 検索ボタン */
.search-form-5 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 250px;
    overflow: hidden;
    border-radius: 3px;
    background-color: #f2f2f2;
}

.search-form-5 input {
    height: 45px;
    padding: 5px 15px;
    border: none;
    box-sizing: border-box;
    background-color: #f2f2f2;
    font-size: 1em;
    outline: none;
}

.search-form-5 input::placeholder {
    color: #777777;
}

.search-form-5 button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 45px;
    border: none;
    background-color: transparent;
    cursor: pointer;
}

.search-form-5 button::after {
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%3E%20%3Cpath%20d%3D%22M23.7%2020.8%2019%2016.1c-.2-.2-.5-.3-.8-.3h-.8c1.3-1.7%202-3.7%202-6C19.5%204.4%2015.1%200%209.7%200S0%204.4%200%209.7s4.4%209.7%209.7%209.7c2.3%200%204.3-.8%206-2v.8c0%20.3.1.6.3.8l4.7%204.7c.4.4%201.2.4%201.6%200l1.3-1.3c.5-.5.5-1.2.1-1.6zm-14-5.1c-3.3%200-6-2.7-6-6s2.7-6%206-6%206%202.7%206%206-2.6%206-6%206z%22%20fill%3D%22%23777777%22%3E%3C%2Fpath%3E%20%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    content: '';
}

/* カスタムカラー */
.text-custom {
    color: #2958eb;
}

.custom-link,
.custom-link:hover {
    color: #2958eb;
    text-decoration: none;
}

.bg-custom {
    background: linear-gradient(45deg, #6fc3ee, #2958eb);
    color: white !important;
}

.btn-outline-custom {
    color: #f4f4f4 !important;
    border-color: #f4f4f4 !important;
}

.btn-outline-custom:hover {
    color: #fff !important;
    background-color: #2958eb !important;
    border-color: #2958eb !important;
}

.btn-search {
    color: #ffffff !important;
    border-color: #ffffff !important;
    background-color: transparent !important;
}

.btn-search:hover {
    color: #2958eb !important;
    background-color: #ffffff !important;
    border-color: #ffffff !important;
}

.btn-admin {
    color: #ffffff !important;
    border-color: #a0cfff !important;
    background-color: transparent !important;
}

.btn-admin:hover {
    color: #2958eb !important;
    background-color: #a0cfff !important;
    border-color: #a0cfff !important;
}

.btn-member {
    color: #ffffff !important;
    border-color: #4ecdc4 !important;
    background-color: transparent !important;
}

.btn-member:hover {
    color: #2958eb !important;
    background-color: #4ecdc4 !important;
    border-color: #4ecdc4 !important;
}

.btn-new {
    color: #ffffff !important;
    background-color: #1e40af !important;
    border-color: #1e40af !important;
}

.btn-new:hover {
    color: #ffffff !important;
    background-color: #1e3a8a !important;
    border-color: #1e3a8a !important;
}

@media (max-width: 767px) {
    .card-footer .btn {
        width: 100% !important;
    }
}

/* カスタムカード */
.custom-card {
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.custom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.custom-card-header {
    background: linear-gradient(45deg, #6fc3ee, #2958eb);
    color: #f4f4f4;
    padding: 10px;
}

.custom-card-title {
    font-size: 1.25rem;
    margin: 0;
}

.custom-card-body {
    padding: 15px;
}

.custom-card-footer {
    background-color: #f8f9fa;
    padding: 10px;
}

/* 画像選択 */
.custom-file-input,
.custom-file-label {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .custom-file-label::after {
        content: "選択";
    }
}
