/**
 * terms.css - 약관 및 정책 페이지 전용 스타일
 *
 * 이 파일은 terms.html 페이지에서만 사용되는 스타일을 정의합니다.
 * 공통 스타일은 index.css 및 컴포넌트 CSS 파일에서 관리됩니다.
 */

/* ===================================== */
/*   약관 페이지 레이아웃                   */
/* ===================================== */

.terms-page-header {
    margin-bottom: 48px;
}

.terms-page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #101828;
    margin: 0 0 12px 0;
}

.terms-page-header p {
    font-size: 16px;
    color: #667085;
    line-height: 1.6;
    margin: 0;
}

/* ===================================== */
/*   탭 네비게이션                         */
/* ===================================== */

.terms-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #EAECF0;
    margin-bottom: 40px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.terms-tabs::-webkit-scrollbar {
    display: none;
}

.terms-tab-button {
    padding: 14px 24px;
    background: none;
    border: none;
    font-size: 15px;
    font-weight: 500;
    color: #667085;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: 'Pretendard', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.terms-tab-button:hover {
    color: #344054;
}

.terms-tab-button:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.terms-tab-button:focus:not(:focus-visible) {
    outline: none;
}

.terms-tab-button.active,
.terms-tab-button[aria-selected="true"] {
    color: #101828;
    font-weight: 600;
    border-bottom-color: #101828;
}

/* ===================================== */
/*   탭 콘텐츠 영역                        */
/* ===================================== */

.terms-tab-content {
    display: none;
}

.terms-tab-content.active,
.terms-tab-content[aria-hidden="false"] {
    display: block;
}

.terms-content-wrapper {
    padding: 0 48px 48px 48px;
    background: white;
    border-radius: 12px;
    max-width: 900px;
}

/* ===================================== */
/*   약관 본문 스타일                       */
/* ===================================== */

.terms-article {
    margin-bottom: 40px;
}

.terms-article:first-child {
    padding-top: 0;
}

.terms-article h2 {
    font-size: 20px;
    font-weight: 700;
    color: #101828;
    margin: 0 0 16px 0;
}

.terms-article p {
    font-size: 15px;
    color: #344054;
    line-height: 1.8;
    margin: 0 0 12px 0;
}

.terms-article p:last-child {
    margin-bottom: 0;
}

.terms-article ul {
    font-size: 15px;
    color: #344054;
    line-height: 1.8;
    padding-left: 20px;
    list-style: none;
    margin: 0;
}

.terms-article li {
    margin-bottom: 8px;
}

.terms-article li:last-child {
    margin-bottom: 0;
}

/* 들여쓰기된 하위 항목 */
.terms-article li.indent {
    padding-left: 20px;
}

/* 개인정보처리방침 테이블 스타일 */
.terms-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 14px;
}

.terms-table th,
.terms-table td {
    border: 1px solid #EAECF0;
    padding: 12px 16px;
    text-align: left;
    vertical-align: top;
}

.terms-table th {
    background: #F9FAFB;
    font-weight: 600;
    color: #344054;
}

.terms-table td {
    color: #344054;
    line-height: 1.6;
}

/* ===================================== */
/*   특수 섹션 스타일                       */
/* ===================================== */

/* 연락처/문의처 박스 */
.terms-contact-box {
    background: #F9FAFB;
    border: 1px solid #EAECF0;
    border-radius: 8px;
    padding: 20px;
    margin: 16px 0;
}

.terms-contact-box p {
    margin: 0 0 8px 0;
}

.terms-contact-box p:last-child {
    margin-bottom: 0;
}

/* 시행일 표시 */
.terms-effective-date {
    font-size: 14px;
    color: #667085;
    padding-top: 24px;
    border-top: 1px solid #EAECF0;
    margin-top: 40px;
}

/* ===================================== */
/*   반응형 - 태블릿 (1024px 이하)          */
/* ===================================== */

@media (max-width: 1024px) {
    .terms-page-header {
        margin-bottom: 32px;
    }

    .terms-page-header h1 {
        font-size: 28px;
    }

    .terms-tabs {
        margin-bottom: 32px;
    }

    .terms-tab-button {
        padding: 12px 16px;
        font-size: 14px;
    }

    .terms-content-wrapper {
        padding: 0 24px 32px 24px;
    }
}

/* ===================================== */
/*   반응형 - 모바일 (768px 이하)           */
/* ===================================== */

@media (max-width: 768px) {
    .terms-page-header {
        margin-bottom: 24px;
    }

    .terms-page-header h1 {
        font-size: 24px;
    }

    .terms-page-header p {
        font-size: 14px;
    }

    .terms-tabs {
        margin-bottom: 24px;
        gap: 4px;
    }

    .terms-tab-button {
        padding: 10px 12px;
        font-size: 13px;
    }

    .terms-content-wrapper {
        padding: 0 12px 24px 12px;
    }

    .terms-article {
        margin-bottom: 32px;
    }

    .terms-article h2 {
        font-size: 18px;
    }

    .terms-article p,
    .terms-article ul {
        font-size: 14px;
    }

    .terms-table {
        font-size: 13px;
    }

    .terms-table th,
    .terms-table td {
        padding: 8px 12px;
    }
}

/* ===================================== */
/*   반응형 - 소형 모바일 (640px 이하)      */
/* ===================================== */

@media (max-width: 640px) {
    .content-section.terms-section {
        padding: 24px 16px !important;
    }

    .terms-content-wrapper {
        padding: 0 10px 24px 10px !important;
    }

    .terms-tab-button {
        font-size: 13px !important;
        padding: 10px 12px !important;
    }
}

/* ===================================== */
/*   접근성 및 포커스 스타일                 */
/* ===================================== */

/* 키보드 포커스 시 탭패널 강조 */
.terms-tab-content:focus {
    outline: 2px solid #2563eb;
    outline-offset: 4px;
}

.terms-tab-content:focus:not(:focus-visible) {
    outline: none;
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .terms-tab-button.active {
        border-bottom-width: 3px;
    }

    .terms-article h2 {
        border-bottom: 2px solid currentColor;
        padding-bottom: 8px;
    }
}

/* 모션 감소 선호 지원 */
@media (prefers-reduced-motion: reduce) {
    .terms-tab-button {
        transition: none;
    }
}
