/* =================================================================
   TERMS AND CONDITIONS PAGE STYLES - BEAN MERCHANT THEME
   ================================================================= */

:root {
    --terms-primary: #d4a574;
    --terms-secondary: #c09560;
    --terms-dark: #2c1810;
    --terms-light: #f7f3ed;
    --terms-white: #ffffff;
    --terms-gray: #666666;
    --terms-border: rgba(212, 165, 116, 0.15);
}

/* Page Layout */
.terms-page {
    background: linear-gradient(to bottom, var(--terms-light) 0%, var(--terms-white) 100%);
    min-height: 100vh;
}

/* Hero Section */
.terms-hero {
    background: linear-gradient(135deg, var(--terms-dark) 0%, #3a2318 100%);
    color: var(--terms-white);
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.terms-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(212, 165, 116, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

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

.page-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    color: var(--terms-white);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    font-weight: 400;
}

.last-updated {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 165, 116, 0.2);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    border: 1px solid rgba(212, 165, 116, 0.3);
}

.last-updated i {
    color: var(--terms-primary);
}

/* Content Area */
.terms-content {
    padding: 4rem 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    align-items: start;
}

/* Sidebar */
.terms-sidebar {
    position: sticky;
    top: 2rem;
}

.toc-wrapper {
    background: var(--terms-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--terms-border);
}

.toc-wrapper h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--terms-dark);
    font-weight: 600;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--terms-primary);
}

.toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-nav li {
    margin-bottom: 0.5rem;
}

.toc-nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--terms-gray);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
}

.toc-nav a:hover {
    background: var(--terms-light);
    color: var(--terms-primary);
    transform: translateX(5px);
}

.toc-nav a.active {
    background: var(--terms-primary);
    color: var(--terms-white);
}

/* Main Content */
.terms-main {
    max-width: 800px;
}

.terms-section {
    background: var(--terms-white);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--terms-border);
    position: relative;
}

.terms-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--terms-primary) 0%, var(--terms-secondary) 100%);
    border-radius: 16px 16px 0 0;
}

.terms-section h2 {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.8rem;
    color: var(--terms-dark);
    margin-bottom: 1.5rem;
    font-weight: 600;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--terms-border);
}

.terms-section h3 {
    font-size: 1.4rem;
    color: var(--terms-dark);
    margin: 2rem 0 1rem 0;
    font-weight: 600;
}

.terms-section h4 {
    color: var(--terms-primary);
    font-size: 1.1rem;
    margin: 1.5rem 0 0.75rem 0;
    font-weight: 600;
}

.terms-section i {
    color: var(--terms-primary);
    font-size: 1.2rem;
}

.section-content {
    line-height: 1.7;
    color: var(--terms-gray);
}

.section-content p {
    margin-bottom: 1.2rem;
}

.section-content ul,
.section-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--terms-gray);
}

.section-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.section-content a {
    color: var(--terms-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.section-content a:hover {
    color: var(--terms-secondary);
    text-decoration: underline;
}

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

/* Contact Info Card */
.contact-info-card {
    background: var(--terms-light);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--terms-border);
    margin-top: 1rem;
}

.contact-methods {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--terms-gray);
    padding: 0.75rem 1rem;
    background: var(--terms-white);
    border-radius: 8px;
    border: 1px solid var(--terms-border);
    transition: all 0.3s ease;
}

.contact-method:hover {
    background: var(--terms-primary);
    color: white;
    transform: translateY(-2px);
}

.contact-method i {
    color: var(--terms-primary);
    font-size: 1.1rem;
}

.contact-method:hover i {
    color: white;
}

.contact-method a {
    color: var(--terms-primary);
    text-decoration: none;
    font-weight: 600;
}

.contact-method:hover a {
    color: white;
}

/* List Styling */
.terms-section ul li::marker,
.terms-section ol li::marker {
    color: var(--terms-primary);
    font-weight: 600;
}

/* Highlighted Content */
.section-content .highlight {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.1) 0%, var(--terms-white) 100%);
    padding: 1rem;
    border-left: 4px solid var(--terms-primary);
    border-radius: 0 8px 8px 0;
    margin: 1.5rem 0;
}

/* Mobile TOC Toggle */
.toc-mobile-toggle {
    display: none;
    background: var(--terms-primary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-bottom: 1rem;
}

/* Scroll to top functionality */
.terms-section:target {
    background: linear-gradient(135deg, rgba(212, 165, 116, 0.05) 0%, var(--terms-white) 100%);
    border-color: var(--terms-primary);
    box-shadow: 0 8px 32px rgba(212, 165, 116, 0.15);
}

/* Mobile Responsive */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .terms-sidebar {
        position: static;
        order: -1;
    }
    
    .toc-wrapper {
        padding: 1.5rem;
    }
    
    .toc-nav {
        display: none;
    }
    
    .toc-wrapper.expanded .toc-nav {
        display: block;
        margin-top: 1rem;
    }
    
    .toc-wrapper {
        cursor: pointer;
        position: relative;
    }
    
    .toc-wrapper::after {
        content: '▼';
        position: absolute;
        top: 1.5rem;
        right: 1.5rem;
        color: var(--terms-primary);
        transition: transform 0.3s ease;
    }
    
    .toc-wrapper.expanded::after {
        transform: rotate(180deg);
    }
}

@media (max-width: 768px) {
    .terms-hero {
        padding: 4rem 0 3rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .terms-section {
        padding: 2rem 1.5rem;
    }
    
    .contact-methods {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .contact-method {
        justify-content: center;
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .terms-section h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .last-updated {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
}

/* JavaScript enhancement classes */
.js-toc-item.active {
    background: var(--terms-primary) !important;
    color: var(--terms-white) !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Print styles */
@media print {
    .terms-sidebar,
    .toc-wrapper {
        display: none;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .terms-section {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
}