/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Main Container */
div[data-custom-class="body"] {
    max-width: 900px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px 50px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: -0.5px;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 40px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #667eea;
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #34495e;
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Subtitle */
span[data-custom-class="subtitle"] {
    display: block;
    text-align: center;
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-bottom: 30px;
}

/* Body Text */
span[data-custom-class="body_text"],
div[data-custom-class="body_text"] {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
}

/* Links */
a[data-custom-class="link"] {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

a[data-custom-class="link"]:hover {
    color: #764ba2;
    border-bottom: 1px solid #764ba2;
}

/* Table of Contents */
div#toc {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin: 30px 0;
    border-left: 4px solid #667eea;
}

div#toc a {
    display: block;
    padding: 8px 0;
    color: #495057;
    transition: all 0.2s ease;
}

div#toc a:hover {
    padding-left: 10px;
    color: #667eea;
}

/* Lists */
ul {
    margin: 15px 0 15px 30px;
}

li[data-custom-class="body_text"] {
    margin: 10px 0;
    padding-left: 5px;
    color: #555;
}

ul li::marker {
    color: #667eea;
}

/* Strong/Bold Text */
strong {
    color: #2c3e50;
    font-weight: 600;
}

/* Emphasis */
em {
    color: #7f8c8d;
    font-style: italic;
}

/* Line Height Utility */
div[style*="line-height: 1.5"] {
    margin-bottom: 15px;
}

/* Section Spacing */
div[id] {
    scroll-margin-top: 20px;
}

/* Headings inside content */
span[data-custom-class="heading_1"] h2 {
    margin-top: 50px;
}

span[data-custom-class="heading_2"] h3 {
    margin-top: 35px;
}

/* BDT Elements (dynamic content) */
bdt.question {
    font-weight: 600;
    color: #667eea;
}

/* Contact Email */
a[href^="mailto:"] {
    background: #f0f4ff;
    padding: 4px 10px;
    border-radius: 4px;
    color: #667eea;
    font-weight: 500;
}

a[href^="mailto:"]:hover {
    background: #e0e9ff;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    div[data-custom-class="body"] {
        padding: 25px 20px;
        border-radius: 8px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    ul {
        margin-left: 20px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    div[data-custom-class="body"] {
        box-shadow: none;
        max-width: 100%;
    }
    
    a[data-custom-class="link"] {
        color: #000;
        text-decoration: underline;
    }
}

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

/* Selection Color */
::selection {
    background: #667eea;
    color: white;
}

::-moz-selection {
    background: #667eea;
    color: white;
}
