/* ========================================
   GLOBAL STYLES & VARIABLES
======================================== */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --dark-gray: #1f2937;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--white);
    overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHY
======================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.5rem;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* ========================================
   HEADER & NAVIGATION
======================================== */
.navbar {
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* ========================================
   HERO SECTION
======================================== */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,197.3C1248,203,1344,149,1392,122.7L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    animation: fadeInUp 1s ease;
}

.hero-section p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   TABLE OF CONTENTS
======================================== */
.toc-sidebar {
    position: sticky;
    top: 100px;
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.toc-sidebar h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--dark-gray);
}

.toc-sidebar ul {
    list-style: none;
    padding-left: 0;
}

.toc-sidebar li {
    margin-bottom: 0.75rem;
}

.toc-sidebar a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: block;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
}

.toc-sidebar a:hover {
    background-color: var(--light-gray);
    color: var(--primary-color);
    text-decoration: none;
    padding-left: 1rem;
}

/* ========================================
   CONTENT SECTIONS
======================================== */
.content-section {
    padding: 4rem 0;
}

.article-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.section-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.section-card:hover {
    box-shadow: var(--box-shadow-lg);
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ========================================
   COMPARISON TABLE
======================================== */
.comparison-table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.comparison-table th {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover {
    background-color: var(--light-gray);
}

/* ========================================
   FAQ SECTION
======================================== */
.faq-item {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--box-shadow);
    cursor: pointer;
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--box-shadow-lg);
}

.faq-question {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.faq-question::before {
    content: "Q:";
    background: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    margin-right: 1rem;
    font-weight: 700;
}

.faq-answer {
    color: var(--text-secondary);
    padding-left: 3rem;
}

/* ========================================
   AUTHOR BOX
======================================== */
.author-box {
    background: linear-gradient(135deg, var(--light-gray), var(--white));
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 3rem 0;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.author-info h4 {
    margin-bottom: 0.5rem;
    color: var(--dark-gray);
}

.author-info p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* ========================================
   FOOTER
======================================== */
footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

footer h5 {
    color: var(--white);
    margin-bottom: 1rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-bottom: 0.5rem;
}

footer a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   UTILITIES
======================================== */
.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.badge-industry {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
    margin-right: 0.5rem;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    .toc-sidebar {
        position: relative;
        top: 0;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .comparison-table {
        font-size: 0.9rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem;
    }
}

/* ========================================
   LAZY LOADING
======================================== */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ========================================
   ANIMATIONS
======================================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}