/* Global Styles */
:root {
    --primary-color: #e63946; /* Vibrant Red */
    --secondary-color: #1d3557; /* Deep Blue */
    --accent-color: #457b9d; /* Steel Blue */
    --background-color: #f8f9fa; /* Light Gray */
    --surface-color: #ffffff;
    --text-color: #333333;
    --text-light: #666666;
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --font-heading: 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin-bottom: 0.75em;
    font-weight: 700;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--surface-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-transform: uppercase;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
}

nav ul li a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 30px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #d62828;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
    color: white;
}

/* Main Content Layout */
.main-content {
    padding: 40px 0;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

/* Table of Contents */
.toc-container {
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
}

.toc-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

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

.toc-list li {
    margin-bottom: 10px;
}

.toc-list a {
    color: var(--text-color);
    font-size: 0.95rem;
    display: block;
    padding: 5px 0;
}

.toc-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
    text-decoration: none;
}

/* Article Styles */
article section {
    background-color: var(--surface-color);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

article h2 {
    font-size: 1.8rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--background-color);
    margin-top: 0;
}

article h3 {
    font-size: 1.4rem;
    margin-top: 25px;
}

.highlight-box {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 20px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    margin: 20px 0;
}

.highlight-box.warning {
    background-color: #fff3e0;
    border-left-color: #ff9800;
}

.highlight-box.success {
    background-color: #e8f5e9;
    border-left-color: #4caf50;
}

/* FAQ Section */
.faq-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.faq-question {
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--primary-color);
}

.faq-item.active .faq-question::after {
    content: '-';
}

.faq-answer {
    display: none;
    padding-top: 15px;
    color: var(--text-light);
}

.faq-item.active .faq-answer {
    display: block;
    animation: fadeIn 0.3s;
}

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

/* Sidebar */
aside .widget {
    background-color: var(--surface-color);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.widget-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.related-posts li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #eee;
}

.related-posts li:last-child {
    border-bottom: none;
}

.sticky-sidebar {
    position: sticky;
    top: 90px;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3 {
    color: white;
    margin-bottom: 20px;
}

.footer a {
    color: #cbd5e1;
}

.footer a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
    }
    
    nav ul {
        margin-top: 15px;
        gap: 15px;
        font-size: 0.9rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
}
