/**
 * 웨딩센스 - 이용약관 페이지 스타일
 * style-terms.css
 * WCAG 2.1 AA 준수
 */

/* ===============================================
   Page Header
=============================================== */
.page-header {
    background: linear-gradient(135deg, rgba(245, 224, 227, 0.95) 0%, rgba(252, 243, 244, 0.95) 100%);
    padding: 120px 0 60px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(184, 64, 106, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(232, 180, 184, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 1rem;
    font-family: 'Pretendard', sans-serif;
    position: relative;
    z-index: 1;
}

.page-title i {
    color: #b8406a;
    font-size: 2rem;
    vertical-align: middle;
}

.page-description {
    font-size: 1.125rem;
    color: #6c6c6c;
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* ===============================================
   Terms Content Section
=============================================== */
.terms-section {
    background: #fafafa;
    min-height: 600px;
}

.terms-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    position: relative;
}

/* 좌측 장식 라인 */
.terms-content::before {
    content: '';
    position: absolute;
    left: 0;
    top: 60px;
    bottom: 60px;
    width: 4px;
    background: linear-gradient(180deg, #b8406a 0%, #e8b4b8 50%, #b8406a 100%);
    border-radius: 2px;
}

/* ===============================================
   Terms Items
=============================================== */
.terms-item {
    margin-bottom: 3rem;
    padding-left: 2rem;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
}

.terms-item:last-child {
    margin-bottom: 2rem;
}

/* 조항 번호 장식 */
.terms-item h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #2d2d2d;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.terms-item h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #b8406a 0%, transparent 100%);
    border-radius: 2px;
}

/* 조항 내용 */
.terms-item p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #4a4a4a;
    margin-bottom: 1rem;
}

/* 순서 있는 목록 스타일 */
.terms-item ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
    counter-reset: terms-counter;
}

.terms-item ol li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    line-height: 1.7;
    color: #5a5a5a;
    list-style: none;
    counter-increment: terms-counter;
}

.terms-item ol li::before {
    content: counter(terms-counter);
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #b8406a 0%, #e8b4b8 100%);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    line-height: 24px;
    border-radius: 50%;
}

/* ===============================================
   Terms Update Info
=============================================== */
.terms-update {
    margin-top: 3rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(245, 224, 227, 0.3) 0%, rgba(252, 243, 244, 0.3) 100%);
    border-radius: 12px;
    border-left: 4px solid #b8406a;
    text-align: center;
}

.terms-update p {
    margin: 0;
    font-size: 1rem;
    color: #6c6c6c;
    font-weight: 500;
}

.terms-update p::before {
    content: '📅';
    margin-right: 0.5rem;
}

/* ===============================================
   Scroll Indicator
=============================================== */
.terms-content {
    position: relative;
}

.terms-content::after {
    content: '⬇ 스크롤하여 전체 약관을 확인하세요';
    position: sticky;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(184, 64, 106, 0.9);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 30px;
    font-size: 0.875rem;
    z-index: 10;
    opacity: 0;
    animation: scrollHint 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes scrollHint {
    0%, 100% { opacity: 0; transform: translateX(-50%) translateY(0); }
    50% { opacity: 1; transform: translateX(-50%) translateY(-5px); }
}

/* ===============================================
   Hover Effects
=============================================== */
.terms-item {
    transition: all 0.3s ease;
}

.terms-item:hover {
    padding-left: 2.5rem;
}

.terms-item:hover h3 {
    color: #b8406a;
}

/* ===============================================
   Animation
=============================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terms-item:nth-child(1) { animation-delay: 0.1s; }
.terms-item:nth-child(2) { animation-delay: 0.2s; }
.terms-item:nth-child(3) { animation-delay: 0.3s; }
.terms-item:nth-child(4) { animation-delay: 0.4s; }
.terms-item:nth-child(5) { animation-delay: 0.5s; }
.terms-item:nth-child(6) { animation-delay: 0.6s; }
.terms-item:nth-child(7) { animation-delay: 0.7s; }
.terms-item:nth-child(8) { animation-delay: 0.8s; }
.terms-item:nth-child(9) { animation-delay: 0.9s; }
.terms-item:nth-child(10) { animation-delay: 1.0s; }

/* ===============================================
   Responsive Design
=============================================== */
@media (max-width: 768px) {
    .page-header {
        padding: 100px 0 40px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-title i {
        font-size: 1.5rem;
    }
    
    .page-description {
        font-size: 1rem;
    }
    
    .terms-content {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }
    
    .terms-content::before {
        left: -2px;
        top: 40px;
        bottom: 40px;
    }
    
    .terms-item {
        margin-bottom: 2rem;
        padding-left: 1.5rem;
    }
    
    .terms-item h3 {
        font-size: 1.25rem;
    }
    
    .terms-item p {
        font-size: 1rem;
    }
    
    .terms-item ol li {
        font-size: 0.9375rem;
        padding-left: 1.75rem;
    }
    
    .terms-update {
        padding: 1.25rem;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.75rem;
    }
    
    .terms-content {
        padding: 1.5rem 1rem;
        border-radius: 12px;
    }
    
    .terms-item {
        padding-left: 1rem;
    }
    
    .terms-item:hover {
        padding-left: 1rem;
    }
    
    .terms-item h3 {
        font-size: 1.125rem;
    }
    
    .terms-item h3::after {
        width: 40px;
    }
}

/* ===============================================
   Accessibility
=============================================== */
/* Focus styles */
.terms-item h3:focus-visible {
    outline: 3px solid #b8406a;
    outline-offset: 4px;
    border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .terms-item h3 {
        color: #1a1a1a;
        font-weight: 700;
    }
    
    .terms-item p,
    .terms-item ol li {
        color: #2d2d2d;
    }
    
    .terms-content::before {
        background: #b8406a;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .page-header::before,
    .page-header::after {
        animation: none;
    }
    
    .terms-item {
        animation: none;
    }
    
    .terms-content::after {
        animation: none;
        opacity: 1;
    }
}

/* Print styles */
@media print {
    .page-header {
        background: none;
        padding: 20px 0;
    }
    
    .page-header::before,
    .page-header::after {
        display: none;
    }
    
    .terms-content {
        box-shadow: none;
        padding: 0;
    }
    
    .terms-content::before,
    .terms-content::after {
        display: none;
    }
    
    .terms-item {
        page-break-inside: avoid;
        padding-left: 0;
    }
    
    .terms-item h3::after {
        display: none;
    }
}