.terms-hero {
    position: relative;
    overflow: hidden;
}
.terms-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.terms-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.terms-badge-icon {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #00d4ff, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.terms-badge-icon svg {
    width: 12px;
    height: 12px;
    fill: white;
}

.terms-badge-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 500;
}

.terms-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.terms-hero-title .gradient-text {
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.terms-hero-subtitle {
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto 2rem;
}

.terms-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.terms-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.terms-meta-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Quick Navigation */
.terms-nav {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.terms-nav-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

.terms-nav-label {
    font-weight: 600;
    color: #374151;
    white-space: nowrap;
    font-size: 0.9rem;
}

.terms-nav-links {
    display: flex;
    gap: 0.5rem;
}

.terms-nav-link {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.terms-nav-link:hover {
    background: #f3f4f6;
    color: #4f46e5;
}

.terms-nav-link.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
}

.terms-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1rem;
    align-items: start;
}

/* Sidebar */
.terms-sidebar {
    position: sticky;
    top: 80px;
}

.terms-toc {
    padding: 10px 20px;
    border: 1px solid #d4af37;
}

.terms-toc-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.terms-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.terms-toc-item {
    margin-bottom: 0.25rem;
}

.terms-toc-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
        color: #d4af37;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.2s ease;
    font-weight: 600;
    border-left: 3px solid transparent;
}

.terms-toc-link:hover {
    background: #f3f4f6;
    color: #4f46e5;
}

.terms-toc-link.active {
    background: linear-gradient(90deg, rgba(79, 70, 229, 0.1), transparent);
        color: #ffffff;
    border-left-color: #d4af37;
    font-weight: 600;
}

.terms-toc-number {
    width: 24px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    flex-shrink: 0;
}

.terms-toc-link.active .terms-toc-number {
       background: linear-gradient(135deg, #d4af37, #d4af37);
    color: white;
}

/* Content Sections */
.terms-content {
   max-width: 100%;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    gap: 30px;
}

.terms-section {
    padding: 2%;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.06);
   border: 1px solid #d4af37;
    transition: all 0.3s ease;
}

.terms-section:hover {
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.section-header {
    display: flex;
    align-items:center;
    flex-direction: row;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
}
.section-header::after {
content: '';
    position: absolute;
    width: 94%;
    height: 2px;
    bottom: 0;
    right: 0;
    background-color: #d4af37;
}
.section-icon {
 width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
        background: linear-gradient(135deg, #d4af37, #ffd700);
}
.section-term{
   color: var(--gold);
    font-weight: 900;
    font-size: 20px;
    text-transform: uppercase;
}
.section-icon svg {
    width: 28px;
    height: 28px;
}
.section-title-group {
    flex: 1;
}

.section-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.25rem;
}
.section-body h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-body h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #ffd700, #ffd700);
    border-radius: 2px;
}

/* Lists */
.terms-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0;
}

.terms-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: #ffffff;
    line-height: 1.6;
    border-bottom: 1px solid #f3f4f6;
}

.terms-list li:last-child {
    border-bottom: none;
}

.terms-list li::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #d4af37;
    border-radius: 50%;
    margin-top: 0.5rem;
    flex-shrink: 0;
}

/* Highlight Boxes */
.highlight-box {
    border-radius: 16px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    position: relative;
    overflow: hidden;
}

.highlight-box::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.highlight-box.info {
        border: 1px solid #d4af37;
}
.highlight-box.info::before {
  background: linear-gradient(180deg, #ffd70085, #d4af37);
}

.highlight-box.warning {
background: linear-gradient(135deg, #ffda4563, #ffd22059);
    backdrop-filter: blur(2px);
}
.highlight-box.warning::before {
    background: linear-gradient(180deg, #f59e0b, #d97706);
}

.highlight-box.success {
    background: linear-gradient(135deg, #00ff8738, #01ff7d36);
}
.highlight-box.success::before {
    background: linear-gradient(180deg, #10b981, #059669);
}

.highlight-box.danger {
       background: linear-gradient(135deg, #ff0a0a12, #ff030340);
}
.highlight-box.danger::before {
    background: linear-gradient(180deg, #ef4444, #dc2626);
}

.highlight-box-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.highlight-box-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.highlight-box.info .highlight-box-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.highlight-box.warning .highlight-box-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.highlight-box.success .highlight-box-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

.highlight-box.danger .highlight-box-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.highlight-box-title {
    font-weight: 700;
    font-size: 1rem;
}

.highlight-box p {
    margin: 0;
    line-height: 1.7;
}

.highlight-box ul {
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.highlight-box li {
    margin-bottom: 0.5rem;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.feature-card {
       padding: 3%;
    border: 1px solid #d4af37;
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: #cbd5e1;
}

.feature-card-icon {
  width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #ffd7008c, #ffd70061);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.feature-card-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.feature-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

/* CTA Section */
.terms-cta {
       background: linear-gradient(135deg, #d4af37ba 0%, #ffd70087 50%, #f4d03fd9 100%);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.terms-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.1) 0%, transparent 50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.terms-cta-content {
    position: relative;
    z-index: 1;
}

.terms-cta h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.terms-cta p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.terms-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.btn-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.5);
    color: white;
}

.btn-cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Scroll to top */
.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(79, 70, 229, 0.5);
}

/* Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #4f46e5, #7c3aed, #ec4899);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* Responsive */
@media (max-width: 1024px) {
    .terms-grid {
        grid-template-columns: 1fr;
    }
    
    .terms-sidebar {
        display: none;
    }
    
    .terms-nav {
        display: block;
    }
}

@media (max-width: 768px) {
    .terms-hero {
        padding: 3rem 0;
    }
    
    .terms-hero-title {
        font-size: 2.25rem;
    }
    
    .terms-section {
        padding: 1.5rem;
        border-radius: 16px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .terms-cta {
        padding: 2rem 1.5rem;
    }
    
    .terms-meta {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .terms-hero-title {
        font-size: 1.75rem;
    }
    
    .terms-hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.25rem;
    }
}