/* ===== CSS Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #0f172a;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --border: #e2e8f0;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--secondary);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); margin: 2rem 0 1rem; }
h4 { font-size: 1.125rem; margin: 1.5rem 0 0.75rem; }

p {
    margin-bottom: 1.25rem;
    color: var(--text);
}

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

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

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--secondary);
}

.logo:hover {
    text-decoration: none;
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
}

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--secondary);
    transition: 0.3s;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--secondary) 0%, #1e3a5f 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    color: white;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255,255,255,0.85);
    max-width: 700px;
    margin: 0 auto 2rem;
}

.cta-button {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.2s;
    text-decoration: none;
}

.cta-button:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-button.large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* ===== Content Sections ===== */
.content-section {
    padding: 4rem 0;
}

.content-section.alt-bg {
    background: var(--bg-alt);
}

/* ===== Highlight Box ===== */
.highlight-box {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 2rem 0;
}

.highlight-box h3 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.highlight-box p {
    margin: 0;
    color: var(--text);
}

/* ===== Two Column Layout ===== */
.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.column {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.column h3 {
    margin-top: 0;
    color: var(--primary);
}

.column ul {
    list-style: none;
}

.column li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.column li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* ===== Formula Box ===== */
.formula-box {
    background: var(--secondary);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin: 2rem 0;
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: white;
}

/* ===== Styled List ===== */
.styled-list {
    list-style: none;
    margin: 1.5rem 0;
}

.styled-list li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.styled-list li:last-child {
    border-bottom: none;
}

.styled-list li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* ===== Calculation Example ===== */
.calculation-example {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid var(--success);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 2rem 0;
}

.calculation-example p {
    margin-bottom: 0.5rem;
}

.calculation-example .highlight {
    color: var(--success);
    font-weight: 700;
    font-size: 1.25rem;
}

.result-note {
    font-style: italic;
    color: var(--text-light);
}

/* ===== Tools Grid ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.tool-card {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: box-shadow 0.2s;
}

.tool-card:hover {
    box-shadow: var(--shadow-lg);
}

.tool-card h4 {
    margin: 0 0 0.5rem;
    color: var(--primary);
}

.tool-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ===== Benchmark Table ===== */
.benchmark-table {
    margin: 2rem 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.benchmark-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 1rem 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.benchmark-row:last-child {
    border-bottom: none;
}

.benchmark-row.header {
    background: var(--secondary);
    color: white;
    font-weight: 600;
}

.benchmark-row:not(.header):hover {
    background: var(--bg-alt);
}

/* ===== Factors Grid ===== */
.factors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.factor-card {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.factor-card h4 {
    margin: 0 0 0.75rem;
    font-size: 1.1rem;
}

.factor-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* ===== Timeline ===== */
.timeline {
    margin: 2rem 0;
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary), var(--accent));
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -2rem;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.timeline-content {
    background: var(--bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-left: 1rem;
}

.timeline-content h4 {
    margin: 0 0 0.5rem;
    color: var(--primary);
}

.timeline-content p {
    margin: 0;
    font-size: 0.95rem;
}

/* ===== Example Box ===== */
.example-box {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 2rem 0;
}

.example-box h4 {
    margin: 0 0 1rem;
    color: var(--secondary);
}

.example-box ul {
    margin: 1rem 0 0;
    padding-left: 1.5rem;
}

.example-box li {
    margin-bottom: 0.5rem;
}

/* ===== Case Studies ===== */
.case-study {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
}

.case-header {
    background: var(--bg-alt);
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.case-tag {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.case-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.case-content {
    padding: 1.5rem;
}

.case-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.case-content > p {
    margin: 0;
}

/* ===== Mistakes List ===== */
.mistakes-list {
    margin: 2rem 0;
}

.mistake-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.mistake-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.mistake-content h4 {
    margin: 0 0 0.5rem;
}

.mistake-content p {
    margin: 0;
    color: var(--text-light);
}

/* ===== FAQ ===== */
.faq-list {
    margin: 2rem 0;
}

.faq-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-item summary {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--border);
}

.faq-answer p {
    margin-top: 1rem;
    margin-bottom: 0;
}

/* ===== CTA Section ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.cta-section .cta-button {
    background: white;
    color: var(--primary);
}

.cta-section .cta-button:hover {
    background: var(--bg-alt);
    transform: translateY(-2px);
}

/* ===== Footer ===== */
.site-footer {
    background: var(--secondary);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand .logo {
    color: white;
    font-size: 1.5rem;
    display: block;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
}

.footer-links h4,
.footer-cta h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    display: block;
    padding: 0.25rem 0;
}

.footer-links a:hover {
    color: white;
}

.footer-button {
    display: inline-block;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
}

.footer-button:hover {
    background: var(--primary-dark);
    color: white;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    margin: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        gap: 0;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        border-bottom: 1px solid var(--border);
    }
    
    .nav-links a {
        display: block;
        padding: 0.75rem 0;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .content-section {
        padding: 3rem 0;
    }
    
    .benchmark-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .benchmark-row.header {
        display: none;
    }
    
    .benchmark-row span:first-child {
        font-weight: 600;
    }
    
    .case-stats {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline-marker {
        position: relative;
        left: 0;
        transform: none;
        display: inline-block;
        margin-bottom: 0.5rem;
    }
    
    .timeline-content {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .cta-button {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}
