/* グローバルスタイル */
:root {
    --theme-color: rgb(14, 13, 106);
    --navbar-bg-color: rgb(243, 238, 229);
    --navbar-text-color: #333;
    --navbar-highlight-bg-color: #f9f9f9;
    --navbar-hover-color: rgb(14, 13, 106);
    --navbar-active-color: #fff;
    --navbar-active-bg-color: rgb(14, 13, 106);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    margin: 0;
    padding: 0;
}

/* メインコンテンツの余白 */
main {
    margin-top: 90px;
}

@media (max-width: 991.98px) {
    main {
        margin-top: 98px;
    }
}

@media (max-width: 600px) {
    main {
        margin-top: 88px;
    }
}

.main-view {
    background-color: var(--navbar-highlight-bg-color);
    color: var(--navbar-text-color);
    padding: 10px;
    text-align: left;
}

.navbar-custom {
    background-color: var(--navbar-highlight-bg-color);
    color: var(--navbar-text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
    padding: 5px 10px;
    z-index: 1040;
}

@media (max-width: 991.98px) {
    .navbar-custom {
        min-height: 56px;
    }
}

@media (max-width: 600px) {
    .navbar-custom {
        min-height: 48px;
    }
}

.navbar-custom .navbar-nav {
    flex-direction: row;
    flex-wrap: nowrap;
}

.navbar-custom .navbar-brand,
.navbar-custom .nav-link {
    background-color: var(--navbar-bg-color);
    color: var(--navbar-text-color);
    border-radius: 20px;
    padding: 5px 10px;
    margin: 2px 5px;
    font-size: 16px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.navbar-custom .nav-link.active {
    background-color: var(--navbar-active-bg-color);
    color: var(--navbar-active-color);
    font-weight: bold;
}

.navbar-custom .nav-link:hover {
    color: var(--navbar-hover-color);
    background-color: var(--navbar-bg-color);
}

.fixed-top {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
}

.header-title {
    color: var(--theme-color);
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    width: 100%;
}

/* 2段目アンカーリンク */
.navbar-secondary {
    background-color: var(--navbar-highlight-bg-color);
    padding: 5px 0;
    border-top: 1px solid #ddd;
    top: 50px;
    width: 100%;
    z-index: 1039;
    min-height: 40px;
}

@media (max-width: 991.98px) {
    .navbar-secondary {
        top: 56px;
        min-height: 42px;
    }
}

@media (max-width: 600px) {
    .navbar-secondary {
        top: 48px;
        min-height: 40px;
    }
}

.navbar-secondary-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    background: inherit;
}

.header-link,
.header-divider {
    display: inline-block;
    font-size: 14px;
    white-space: nowrap;
}

.header-divider {
    color: #666;
    padding: 0 4px;
    user-select: none;
}

@media (max-width: 600px) {
    .header-link,
    .header-divider {
        font-size: 12px;
        padding-left: 1px;
        padding-right: 1px;
    }
    .navbar-secondary-links {
        gap: 4px;
    }
}

.header-link {
    color: var(--theme-color);
    text-decoration: none;
    padding: 2px 10px;
    transition: background 0.2s, color 0.2s;
}

.header-link:hover {
    text-decoration: underline;
}

.sc-summary-short,
.sc-summary-full {
    display: block;
}

@media (min-width: 601px) {
    .sc-summary-short,
    .show-more,
    .show-less {
        display: none !important;
    }
    .sc-summary-full {
        display: inline !important;
    }
}
/* 赤字のスタイル */
.red-text {
    color: red;
    font-weight: bold;
    margin-top: 0px; /* 必要に応じて余白を調整 */
    white-space: pre-line; /* 改行を保持 */
    text-align: left; /* センタリングを解除して左寄せ */
    display: block; /* ブロック要素として表示し、行全体を占有 */
    margin-bottom: 5px; /* 下に余白を追加 */
    width: 100%; /* 幅を100%にして親要素に合わせる */
}

/* テーブル */
.content-table {
    width: 100%;
    margin-top: 5px;
}

.content-table thead {
    background-color: var(--theme-color);
    color: white;
}

.content-table th,
.content-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.content-table tbody tr:nth-child(odd) {
    background-color: var(--navbar-highlight-bg-color);
}

@media (max-width: 768px) {
    .content-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .content-table thead,
    .content-table tbody,
    .content-table th,
    .content-table td,
    .content-table tr {
        display: block;
        width: 100%;
    }
    .content-table tr {
        margin-bottom: 10px;
    }
    .content-table th,
    .content-table td {
        padding: 8px 5px;
        text-align: left;
        border: none;
    }
    .content-table thead {
        display: none;
    }
    .content-table td:before {
        content: attr(data-label);
        font-weight: bold;
        display: block;
        margin-bottom: 4px;
        color: #555;
    }
}

@media (max-width: 768px) {
    div.dataTables_wrapper {
        width: 100%;
        overflow-x: auto;
    }
    table.dataTable {
        width: 100% !important;
        min-width: 400px;
    }
}

/* ロゴ */
.carrier-list {
    text-align: center;
    margin: 10px 0;
}

.logo-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logo-item {
    width: 180px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    position: relative;
}

.carrier-label {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 11px;
    color: #666;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: bold;
    opacity: 0.9;
    z-index: 2;
    pointer-events: none;
}

.logo-img-area {
    height: 100px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img-area img {
    max-height: 50px;
    max-width: 140px;
    object-fit: contain;
    display: block;
}

.company-name {
    height: 30px;
    line-height: 20px;
    margin: 0;
    font-size: 15px;
    text-align: center;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 992px) {
    .logo-item img {
        max-width: 80%;
    }
}

@media (max-width: 900px) {
    .logo-container {
        flex-wrap: wrap;
        justify-content: center;
    }
    .logo-item {
        width: 45vw;
        max-width: 180px;
        margin: 8px 0;
    }
}

@media (max-width: 600px) {
    .logo-item {
        width: 90vw;
        max-width: 100%;
    }
    .logo-item img {
        max-width: 100%;
    }
}

/* その他 */
.responsive-img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
}

h2 {
    text-align: left;
    margin-top: 25px;
    margin-bottom: 25px;
}

.what-is-sc {
    text-align: left;
    margin: 40px 0;
}

.related-links {
    margin: 20px 0;
}

.related-links h2 {
    margin-bottom: 15px;
}

.link-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.link-title {
    margin-right: 10px;
    font-weight: bold;
    flex: 0 0 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-url {
    color: var(--theme-color);
    text-decoration: none;
    transition: color 0.3s ease;
    flex-grow: 1;
}

.link-url:hover {
    color: #555;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .link-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .link-title {
        margin-bottom: 4px;
        flex: none;
    }
    .link-url {
        width: 100%;
        word-break: break-all;
    }
}

/* フッター */
.footer {
    background: linear-gradient(to top, rgb(14, 13, 106), rgba(14, 13, 106, 0));
    color: white;
    padding: 50px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer-logo {
    height: 50px;
    width: auto;
    margin-left: 20px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-content div {
    height: 50px;
    display: flex;
    align-items: center;
    color: var(--theme-color);
}

.footer-content a,
.footer-content p {
    margin: 0;
    color: var(--theme-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 100%;
}

@media (max-width: 600px) {
    .footer-content {
        flex-direction: column !important;
        align-items: flex-start !important;
        text-align: left;
        gap: 8px;
    }
    .footer-logo {
        margin-left: 0;
        margin-bottom: 10px;
    }
    .footer-content div {
        height: auto;
        margin-bottom: 8px;
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

/* トップへ戻るボタン */
.scroll-to-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    background-color: var(--theme-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 50px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.scroll-to-top:hover {
    background-color: #333;
}

/* セクションの余白とリスト調整 */
@media (max-width: 600px) {
    .main-view,
    .what-is-sc,
    .related-links,
    section {
        padding-left: 5px !important;
        padding-right: 5px !important;
    }
    h4 {
        font-size: 18px;
    }
    section ul {
        padding-left: 1em;
    }
    section li {
        margin-bottom: 18px;
    }
}

@media (max-width: 600px) {
    .logo-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .logo-item {
        width: 100%;
        max-width: none;
    }
}
