/* terms.twig用カスタムCSS - order.cssのトンマナに完全に合わせて作成 */

/* カスタム利用規約ページ用スタイル - EC-CUBEのデフォルトスタイルと競合しません */
.terms-container {
    padding: 40px 80px;
    background: #fff;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
}

/* ヘッダー部分 */
.terms-header {
    background: #ffffff;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out;
}

/* 前文（タイトル部分） */
.terms-preamble {
    padding: 24px 32px;
    background: #8f7a37;
    color: white;
    margin: 0;
}

.terms-preamble p {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    /* justify-content: center; */
}

/* 説明文 */
.terms-header > div:not(.terms-preamble):not(.terms-section) {
    padding: 20px 0 10px;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
    background-color: #ffffff;
}

/* セクション */
.terms-section {
    font-size: 16px;
}

.terms-section:last-child {
    border-bottom: none;
}

.terms-section-title {
    color: #333;
    padding:  20px;
    font-weight: 600;
    font-size: 1.4rem;
}





.terms-article-title {
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
    padding: 0 20px;
}

.terms-article p,
.terms-article ol {
    padding: 16px 20px;
    margin: 0;
    line-height: 1.7;
    color: #333;
}

.terms-article ol {
    padding-left: 90px;
}

/* リスト */
.terms-list {
    margin: 0;
    /* padding-left: 20px; */
    counter-reset: list-counter;
}

.terms-list li {
    margin-bottom: 12px;
    text-align: justify;
    list-style: decimal;
    line-height: 1.7;
}



.terms-list li::before {
    display: none;
}

/* サブリスト */
.terms-sublist {
    margin: 8px 0 8px 20px;
    padding-left: 20px;
    counter-reset: sublist-counter;
}

.terms-sublist > li {
    margin-bottom: 8px;
    padding-left: 8px;
    text-align: justify;
    position: relative;
    list-style: none;
    counter-increment: sublist-counter;
    line-height: 1.6;
}

.terms-sublist > li::before {
    content: "(" counter(sublist-counter) ")";
    position: absolute;
    left: -24px;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.9rem;
    min-width: 20px;
}



.terms-contact p {
    margin:  0;
    line-height: 1.7;
    color: #333;
    text-align: left!important;
    padding: 0px 40px;
}

.terms-contact2{
    padding: 0 0 20px 0px;

}


.terms-article a:hover,
.terms-contact a:hover {
    color: #c82333;
    text-decoration: underline;
}

/* レスポンシブデザイン */
@media (max-width: 767px) {
    .terms-container {
        padding: 1rem 0.5rem;
    }
    
    .terms-preamble {
        padding: 1rem 1.5rem;
    }
    
    .terms-preamble p {
        font-size: 1.2rem;
    }
    
    .terms-header > div:not(.terms-preamble):not(.terms-section) {
        padding: 1.5rem;
        font-size: 14px;
    }
    
    .terms-section {
        padding: 1.5rem;
    }
    
    .terms-section-title {
        font-size: 1.2rem;
        padding: 12px 15px;
    }
    
    .terms-article-title {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .terms-article p,
    .terms-article ol {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .terms-contact {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .terms-container {
        margin: 1rem auto;
        padding: 0.5rem;
    }
    
    .terms-preamble {
        padding: 1rem;
    }
    
    .terms-preamble p {
        font-size: 1.1rem;
    }
    
    .terms-header > div:not(.terms-preamble):not(.terms-section) {
        padding: 1rem;
        font-size: 12px;
    }
    
    /* .terms-section {
        padding: 1rem;
    } */
    
    .terms-section-title {
        font-size: 1.1rem;
        padding: 10px 12px;
    }
    
    .terms-article-title {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .terms-article p,
    .terms-article ol {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .terms-list {
        padding-left: 15px;
    }
    
    .terms-sublist {
        margin-left: 15px;
        padding-left: 15px;
    }
    
    .terms-contact {
        padding: 10px 12px;
    }
}

/* アニメーション効果 */
/* @keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
} */



/* スクロールバーのスタイリング（Webkit系ブラウザ） */
.terms-header::-webkit-scrollbar {
    height: 8px;
}

.terms-header::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.terms-header::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.terms-header::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 印刷用スタイル */
@media print {
    .terms-container {
        background: white;
        padding: 0;
        box-shadow: none;
    }
    
    .terms-header {
        box-shadow: none;
        border: none;
    }
    
    .terms-section {
        break-inside: avoid;
        border-bottom: 1px solid #ccc;
    }
    
    .terms-article {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .terms-preamble {
        background: #f0f0f0 !important;
        color: black !important;
    }
    
    .terms-section-title {
        background: #f0f0f0 !important;
        color: black !important;
    }
}

/* アクセシビリティ対応 */
.terms-article:focus-within {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* スクロール時のスムーズな動作 */
html {
    scroll-behavior: smooth;
}

/* 選択時のハイライト */
::selection {
    background-color: #495057;
    color: white;
}

::-moz-selection {
    background-color: #495057;
    color: white;
}