/* ============================================================
   LEGAL PAGES — 땡피싱
   공통 스타일: 이용약관, 개인정보처리방침, 청소년보호정책, 운영정책
   ============================================================ */

/* ── Container ── */
.legal-container {
    max-width: 860px;
    margin: 0 auto;
    padding: var(--space-10) var(--space-6);
    min-height: calc(100vh - var(--header-height) - 200px);
}

.legal-content {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--space-10) var(--space-8);
}

/* ── Header ── */
.legal-header {
    text-align: center;
    padding-bottom: var(--space-8);
    margin-bottom: var(--space-8);
    border-bottom: 2px solid var(--gray-100);
}

.legal-header h1 {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--gray-900);
    margin-bottom: var(--space-3);
    letter-spacing: -0.02em;
}

.legal-description {
    font-size: var(--text-base);
    color: var(--gray-500);
    margin-bottom: var(--space-4);
}

.legal-meta {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
}

.legal-date {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--gray-500);
    background: var(--gray-50);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
}

.legal-company-info {
    margin-top: var(--space-6);
    padding: var(--space-4) var(--space-6);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.8;
}

.legal-company-info a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}

.legal-company-info a:hover {
    text-decoration: underline;
}

/* ── Section ── */
.legal-section {
    padding: var(--space-6) 0;
    border-bottom: 1px solid var(--gray-100);
}

.legal-section:last-of-type,
.legal-section-final {
    border-bottom: none;
}

.legal-section h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--space-4);
    padding-left: var(--space-3);
    border-left: 3px solid var(--brand-primary);
    line-height: 1.4;
}

.legal-section h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--gray-700);
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
}

.legal-section p {
    font-size: var(--text-base);
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: var(--space-4);
    word-break: keep-all;
}

.legal-section p:last-child {
    margin-bottom: 0;
}

/* ── Lists ── */
.legal-list {
    list-style: none;
    counter-reset: legal-counter;
    padding-left: 0;
    margin-bottom: var(--space-4);
}

.legal-list > li {
    counter-increment: legal-counter;
    position: relative;
    padding-left: var(--space-8);
    margin-bottom: var(--space-4);
    font-size: var(--text-base);
    color: var(--gray-600);
    line-height: 1.8;
}

.legal-list > li::before {
    content: counter(legal-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.legal-list > li:last-child {
    margin-bottom: 0;
}

.legal-list > li strong {
    color: var(--gray-800);
}

.legal-sublist {
    list-style: none;
    padding-left: var(--space-4);
    margin-top: var(--space-2);
}

.legal-sublist > li {
    position: relative;
    padding-left: var(--space-5);
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    color: var(--gray-600);
    line-height: 1.7;
}

.legal-sublist > li::before {
    content: '';
    position: absolute;
    left: var(--space-2);
    top: 10px;
    width: 5px;
    height: 5px;
    background: var(--gray-400);
    border-radius: var(--radius-full);
}

.legal-sublist > li:last-child {
    margin-bottom: 0;
}

/* ── Legal Footer (문의처) ── */
.legal-footer {
    margin-top: var(--space-10);
    padding-top: var(--space-8);
    border-top: 2px solid var(--gray-100);
}

.legal-contact {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.legal-contact h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: var(--space-3);
}

.legal-contact > p {
    font-size: var(--text-sm);
    color: var(--gray-500);
    margin-bottom: var(--space-4);
}

.contact-info {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.contact-info li {
    font-size: var(--text-sm);
    color: var(--gray-600);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--gray-200);
    line-height: 1.6;
}

.contact-info li:last-child {
    border-bottom: none;
}

.contact-info li strong {
    color: var(--gray-700);
    min-width: 80px;
    display: inline-block;
}

.contact-info a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* ── Section 내부 legal-contact (개인정보보호책임자 등) ── */
.legal-section .legal-contact {
    margin-top: var(--space-4);
}

/* ── Footer 사업자확인 링크 ── */
.layout-footer-business-check {
    color: var(--brand-primary);
    text-decoration: none;
    font-size: var(--text-xs);
    font-weight: 500;
}

.layout-footer-business-check:hover {
    text-decoration: underline;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── Tablet (≤ 1024px) ── */
@media (max-width: 1024px) {
    .legal-container {
        padding: var(--space-8) var(--space-4);
    }

    .legal-content {
        padding: var(--space-8) var(--space-6);
    }
}

/* ── Mobile (≤ 768px) ── */
@media (max-width: 768px) {
    .legal-container {
        padding: var(--space-6) var(--space-3);
    }

    .legal-content {
        padding: var(--space-6) var(--space-4);
        border-radius: var(--radius-md);
    }

    .legal-header {
        padding-bottom: var(--space-6);
        margin-bottom: var(--space-6);
    }

    .legal-header h1 {
        font-size: var(--text-2xl);
    }

    .legal-description {
        font-size: var(--text-sm);
    }

    .legal-section {
        padding: var(--space-5) 0;
    }

    .legal-section h2 {
        font-size: var(--text-lg);
    }

    .legal-section h3 {
        font-size: var(--text-base);
    }

    .legal-section p {
        font-size: var(--text-sm);
    }

    .legal-list > li {
        padding-left: var(--space-8);
        font-size: var(--text-sm);
    }

    .legal-sublist > li {
        font-size: var(--text-xs);
    }

    .legal-company-info {
        padding: var(--space-3) var(--space-4);
        font-size: var(--text-xs);
    }

    .legal-contact {
        padding: var(--space-4);
    }

    .legal-footer {
        margin-top: var(--space-8);
        padding-top: var(--space-6);
    }
}

/* ── Small Mobile (≤ 480px) ── */
@media (max-width: 480px) {
    .legal-container {
        padding: var(--space-4) var(--space-2);
    }

    .legal-content {
        padding: var(--space-5) var(--space-3);
        box-shadow: none;
        border: 1px solid var(--gray-100);
    }

    .legal-header h1 {
        font-size: 1.375rem;
    }

    .legal-meta {
        flex-direction: column;
        align-items: center;
    }

    .legal-section h2 {
        font-size: var(--text-base);
        padding-left: var(--space-2);
    }

    .legal-list > li {
        padding-left: 28px;
    }

    .legal-list > li::before {
        width: 20px;
        height: 20px;
        font-size: var(--text-xs);
    }

    .contact-info li strong {
        min-width: auto;
        display: block;
        margin-bottom: 2px;
    }
}
