/* 服務條款頁面樣式 */

/* Hero Section */
.hero-terms {
    background: var(--primary-gradient);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-terms::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-terms .hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
    color: white;
}

.hero-terms .hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    line-height: 1.6;
    color: white;
}

.hero-terms .terms-meta {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.hero-terms .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    opacity: 0.9;
    color: white;
}

.hero-terms .meta-label {
    font-weight: 500;
}

.hero-terms .meta-value {
    opacity: 0.8;
}

/* Breadcrumb */
.breadcrumb-section {
    background: white;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.breadcrumb-modern {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.breadcrumb-modern .breadcrumb-item {
    color: var(--text-secondary);
}

.breadcrumb-modern .breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

.breadcrumb-modern .breadcrumb-item+.breadcrumb-item::before {
    content: "/";
    color: var(--text-muted);
}

/* Table of Contents */
.toc-section {
    padding: 40px 0;
    background: var(--bg-primary);
}

.toc-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.toc-container h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.toc-list li {
    margin: 0;
}

.toc-list a {
    display: block;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.toc-list a:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Terms Content */
.terms-content-section {
    padding: 60px 0;
    background: white;
}

.terms-content {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.terms-section {
    padding: 40px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.terms-section:hover {
    background: var(--bg-primary);
}

/* 手風琴標題樣式 */
.section-toggle {
    color: var(--primary-color);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding: 16px 0;
    border-bottom: 2px solid var(--border-color);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    user-select: none;
}

.section-toggle:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-color);
}

.section-toggle.active {
    border-bottom-color: var(--primary-color);
}

.section-toggle.active::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent-color);
}

.section-toggle i {
    font-size: 1rem;
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.section-toggle.active i {
    transform: rotate(90deg);
}

/* 手風琴內容樣式 */
.section-content {
    padding-top: 8px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.terms-section h2 {
    color: var(--primary-color);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    position: relative;
}

.terms-section h2::before {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--accent-color);
}

.terms-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 24px 0 12px 0;
}

.terms-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
    font-size: 16px;
}

.terms-section ul {
    margin: 16px 0;
    padding-left: 24px;
}

.terms-section li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 8px;
    font-size: 16px;
}

.terms-section strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Download Section */
.download-section {
    padding: 60px 0;
    background: var(--bg-primary);
}

.download-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    gap: 40px;
}

.download-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.download-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.3);
}

.download-text {
    flex: 1;
}

.download-title {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.download-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

.download-options {
    display: flex;
    gap: 16px;
    flex-shrink: 0;
}

.btn-download {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: white;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    min-width: 140px;
}

.btn-download:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.15);
    color: var(--primary-color);
    text-decoration: none;
}

.download-options .btn-icon {
    width: 32px;
    height: 32px;
    background: var(--primary-gradient);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.download-options .btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.download-options .btn-title {
    font-weight: 600;
    font-size: 0.9rem;
    line-height: 1.2;
}

.download-options .btn-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.2;
}

/* Contact Section */
.contact-section {
    padding: 60px 0;
    background: white;
}

.contact-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 40px;
    gap: 40px;
}

.contact-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.contact-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.3);
}

.contact-text {
    flex: 1;
}

.contact-title {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.contact-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
    line-height: 1.5;
}

.contact-action {
    flex-shrink: 0;
}

.btn-contact-primary {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3);
    font-size: 1rem;
}

.btn-contact-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.4);
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-terms .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-terms .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-terms .terms-meta {
        gap: 20px;
    }
    
    .toc-list {
        grid-template-columns: 1fr;
    }
    
    .terms-section {
        padding: 24px;
    }
    
    .terms-section h2 {
        font-size: 1.5rem;
    }
    
    .terms-section h3 {
        font-size: 1.125rem;
    }
    
    .section-toggle {
        font-size: 1.5rem;
        gap: 8px;
    }
    
    .download-container,
    .contact-container {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .download-options {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-download {
        justify-content: center;
    }
    
    .download-title,
    .contact-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-terms {
        padding: 60px 0;
    }
    
    .hero-terms .hero-title {
        font-size: 2rem;
    }
    
    .hero-terms .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-terms .terms-meta {
        flex-direction: column;
        gap: 12px;
    }
    
    .toc-container {
        padding: 20px;
    }
    
    .terms-section {
        padding: 20px;
    }
    
    .terms-section h2 {
        font-size: 1.25rem;
    }
    
    .terms-section p,
    .terms-section li {
        font-size: 14px;
    }
    
    .section-toggle {
        font-size: 1.25rem;
        padding: 12px 0;
    }
    
    .download-container,
    .contact-container {
        padding: 24px;
        margin: 0 20px;
    }
    
    .download-content,
    .contact-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .download-icon,
    .contact-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .btn-download {
        padding: 14px 20px;
        min-width: auto;
    }
    
    .btn-contact-primary {
        padding: 14px 24px;
        font-size: 0.9rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success/Error Messages */
.alert {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid;
}

.alert-success {
    background: rgba(var(--success-rgb), 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.alert-error {
    background: rgba(var(--danger-rgb), 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.alert-info {
    background: rgba(var(--info-rgb), 0.1);
    border-color: var(--info-color);
    color: var(--info-color);
}
