/* ===========================
   LEGAL PAGES SPECIFIC STYLES
   (Terms & Conditions, Privacy Policy)
   =========================== */

/* Legal Hero Section */
.legal-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 60px 20px;
}

.legal-hero .hero-title {
    font-size: 36px;
}

.legal-hero .hero-subtitle {
    font-size: 18px;
}

/* Legal Content Section */
.legal-content {
    padding: 4rem 0;
    background: white;
}

.legal-container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.last-updated {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #666;
}

.last-updated strong {
    color: #333;
}

/* Table of Contents */
.table-of-contents {
    background: #f8f9ff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.toc-title {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

.toc-list a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid transparent;
}

.toc-list a:hover {
    color: #5a6fd8;
    border-bottom-color: #5a6fd8;
}

/* Legal Sections */
.legal-section {
    margin-bottom: 3rem;
    scroll-margin-top: 100px; /* Account for sticky header */
}

.legal-section h2 {
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 700;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
    position: relative;
}

.legal-section h2::before {
    content: attr(data-section);
    position: absolute;
    left: -2rem;
    top: 0;
    background: #667eea;
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.legal-section h3 {
    font-size: 1.4rem;
    color: #333;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

.legal-section h4 {
    font-size: 1.2rem;
    color: #333;
    margin: 1.5rem 0 1rem;
    font-weight: 600;
}

.legal-section p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.legal-section ul,
.legal-section ol {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
}

/* Policy Grid and Cards */
.policy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.policy-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.policy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.policy-title {
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.policy-content {
    color: #555;
    line-height: 1.6;
}

.policy-content ul {
    list-style: none;
    padding: 0;
}

.policy-content li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
}

.policy-content li::before {
    content: '•';
    color: #667eea;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Privacy Sections */
.privacy-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.privacy-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.privacy-section h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #667eea;
    display: inline-block;
}

.privacy-section p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.privacy-section ul {
    list-style: none;
    padding: 0;
    margin-left: 1rem;
}

.privacy-section li {
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    position: relative;
    color: #555;
}

.privacy-section li::before {
    content: '✓';
    color: #28a745;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Refund Section */
.refund-section {
    background: #f8f9fa;
}

.refund-section .section-title {
    color: #dc3545;
}

/* Contact Section */
.contact-section {
    background: #f8f9fa;
    padding: 4rem 0;
    border-top: 1px solid #e9ecef;
}

.contact-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 1rem;
}

.contact-content > p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.contact-card h4 {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-card p {
    color: #555;
    margin: 0;
    line-height: 1.5;
}

.contact-card a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-card a:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Important Notes */
.important-note {
    background: #fff9c4;
    border: 2px solid #ffd700;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.important-note::before {
    content: '⚠️';
    font-size: 1.5rem;
    position: absolute;
    top: -10px;
    left: 15px;
    background: white;
    padding: 0 0.5rem;
}

.important-note h4 {
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.important-note p {
    color: #666;
    margin-bottom: 0;
}

/* Contact Information Box */
.contact-box {
    background: #f8f9ff;
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
}

.contact-box h4 {
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

.contact-box p {
    color: #666;
    margin-bottom: 0.5rem;
}

.contact-box a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

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

/* Data Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.data-table th {
    background: #667eea;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    color: #666;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:nth-child(even) {
    background: #f8f9fa;
}

/* Legal Definition Lists */
.definition-list {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
}

.definition-list dt {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

.definition-list dt:first-child {
    margin-top: 0;
}

.definition-list dd {
    color: #666;
    line-height: 1.6;
    margin-left: 1rem;
    margin-bottom: 1rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #667eea;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #5a6fd8;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Print Styles */
@media print {
    .table-of-contents,
    .back-to-top,
    header,
    footer,
    .cta-section {
        display: none;
    }
    
    .legal-container {
        box-shadow: none;
        padding: 0;
    }
    
    .legal-section {
        break-inside: avoid;
    }
    
    .legal-section h2 {
        break-after: avoid;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .legal-container {
        margin: 0 1rem;
        padding: 2rem;
    }
    
    .legal-hero .hero-title {
        font-size: 28px;
    }
    
    .table-of-contents {
        padding: 1.5rem;
    }
    
    .legal-section h2::before {
        display: none;
    }
    
    .legal-section h2 {
        font-size: 1.5rem;
    }
    
    .legal-section h3 {
        font-size: 1.3rem;
    }
    
    .legal-section h4 {
        font-size: 1.1rem;
    }
    
    .policy-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .policy-card {
        padding: 1.5rem;
    }
    
    .privacy-section h2 {
        font-size: 1.3rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-title {
        font-size: 1.5rem;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .legal-container {
        padding: 1.5rem;
    }
    
    .legal-hero .hero-title {
        font-size: 24px;
    }
    
    .legal-hero .hero-subtitle {
        font-size: 16px;
    }
    
    .policy-card {
        padding: 1rem;
    }
    
    .policy-title {
        font-size: 1.1rem;
    }
    
    .privacy-section {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .privacy-section h2 {
        font-size: 1.2rem;
    }
    
    .contact-section {
        padding: 3rem 0;
    }
    
    .contact-card {
        padding: 1rem;
    }
    
    .contact-title {
        font-size: 1.3rem;
    }
    
    .important-note,
    .contact-box,
    .definition-list {
        padding: 1.5rem;
    }
    
    .data-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}