/* Marketing Fundamentals - Clean Stylesheet */

/* CSS Variables */
:root {
    --primary-color: #7C3AED;
    --primary-dark: #6D28D9;
    --primary-light: #8B5CF6;
    --secondary-color: #5B21B6;
    --accent-color: #6366F1;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary-color);
    color: white;
    padding: 12px 20px;
    border-radius: 0 0 var(--radius) 0;
    z-index: 2000;
}

.skip-link:focus {
    left: 0;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 600;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   HEADER - Clean White Background
   ============================================ */
.site-header {
    background: var(--bg-white);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* Logo - Clean Style */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.75rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text .site-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-text .site-tagline {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* Desktop Navigation */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links li a {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 10px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

.nav-links li a.active {
    color: var(--primary-color);
    background: rgba(124, 58, 237, 0.08);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown > a {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown > a::after {
    content: '▾';
    font-size: 10px;
    margin-left: 2px;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    padding: 8px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background: var(--bg-light);
}

/* Mobile Menu Toggle - Clean Simple Icon */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 1001;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
}

.mobile-menu-toggle span:nth-child(2) {
    margin: 4px 0;
}

/* Mobile Navigation - Slide from Right */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1002;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    max-width: 85%;
    height: 100%;
    background: var(--bg-white);
    z-index: 1003;
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
}

body.mobile-menu-open .mobile-nav-overlay {
    display: block;
}

body.mobile-menu-open .mobile-nav {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-nav-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-muted);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-links {
    flex: 1;
    padding: 16px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-content: start;
}

.mobile-nav-link {
    padding: 16px 20px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--bg-light);
    color: var(--primary-color);
}

.mobile-nav-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
}

.mobile-nav-footer .cta-button {
    background: var(--primary-color);
    color: white;
    display: block;
    text-align: center;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
}

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

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 32px;
    position: relative;
}

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    position: relative;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Stats Section */
.stats-section {
    padding: 60px 0;
    background: var(--bg-white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-item p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Featured Section */
.featured-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

.article-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition-slow);
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.article-card-image {
    height: 180px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    position: relative;
    overflow: hidden;
}

.article-card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
}

.article-card-content {
    padding: 24px;
}

.category-tag {
    display: inline-block;
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    line-height: 1.4;
}

.article-card h3:hover {
    color: var(--primary-color);
}

.article-card p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
}

.article-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

.read-more:hover {
    gap: 12px;
}

/* Categories Section */
.categories-section {
    padding: 80px 0;
    background: var(--bg-white);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
}

.category-card {
    background: var(--bg-light);
    padding: 32px 24px;
    border-radius: var(--radius-xl);
    text-align: center;
    transition: var(--transition-slow);
    cursor: pointer;
    border: 2px solid transparent;
}

.category-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.category-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.category-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.category-card strong {
    color: var(--primary-color);
    font-size: 14px;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.page-header p {
    opacity: 0.9;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: white;
    color: var(--primary-color);
}

/* Reading Progress Bar */
.reading-progress-track {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: transparent;
    z-index: 1000;
}

.reading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.1s ease-out;
}

/* Article Detail */
.article-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
}

.article-layout {
    max-width: 1080px;
    margin: 0 auto;
    padding: 60px 24px;
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 48px;
    align-items: start;
}

.article-layout .article-detail {
    max-width: none;
    padding: 0;
}

.article-toc {
    position: sticky;
    top: 24px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    font-size: 14px;
}

.article-toc h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.article-toc ol {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.article-toc a {
    color: var(--text-secondary);
    display: block;
    padding: 4px 0 4px 12px;
    border-left: 2px solid var(--border-color);
    transition: var(--transition);
    line-height: 1.4;
}

.article-toc a:hover {
    color: var(--primary-color);
    border-left-color: var(--primary-light);
}

.article-toc a.active {
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    .article-toc {
        position: static;
        order: -1;
    }
}

.article-header {
    text-align: center;
    margin-bottom: 48px;
}

.article-header .category-tag {
    margin-bottom: 16px;
}

.article-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 24px;
}

.article-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    flex-wrap: wrap;
}

.article-info .view-count::before {
    content: "👁 ";
    opacity: 0.7;
}

/* Next Lesson Module */
.next-lesson {
    margin-top: 48px;
    padding: 32px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(99, 102, 241, 0.08));
    border-radius: var(--radius-xl);
    border: 1px solid rgba(124, 58, 237, 0.15);
}

.next-lesson .eyebrow {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.next-lesson h3 {
    font-size: 1.4rem;
    margin-bottom: 8px;
}

.next-lesson p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.next-lesson-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.category-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 16px;
}

.category-progress-track {
    flex: 1;
    height: 6px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    overflow: hidden;
    max-width: 180px;
}

.category-progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: var(--radius-full);
}

.article-content {
    line-height: 1.8;
    font-size: 17px;
    color: var(--text-primary);
    word-wrap: break-word;
}

.article-content h1 {
    margin: 44px 0 22px;
    color: var(--primary-color);
    font-size: 2.1rem;
    line-height: 1.3;
    font-weight: 700;
}

.article-content h1:first-child {
    margin-top: 0;
}

.article-content h2 {
    margin: 40px 0 20px;
    color: var(--primary-color);
    font-size: 1.75rem;
    line-height: 1.3;
    font-weight: 700;
}

.article-content h2:first-child {
    margin-top: 0;
}

.article-content h3 {
    margin: 32px 0 16px;
    color: var(--primary-color);
    font-size: 1.4rem;
    line-height: 1.35;
    font-weight: 600;
}

.article-content h4,
.article-content h5,
.article-content h6 {
    margin: 28px 0 14px;
    font-size: 1.15rem;
    font-weight: 600;
}

.article-content p {
    margin-bottom: 24px;
}

.article-content ul,
.article-content ol {
    margin-bottom: 24px;
    padding-left: 32px;
}

.article-content li {
    margin-bottom: 12px;
}

.article-content li > ul,
.article-content li > ol {
    margin-top: 12px;
    margin-bottom: 0;
}

.article-content strong,
.article-content b {
    font-weight: 700;
}

.article-content em,
.article-content i {
    font-style: italic;
}

.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-content a:hover {
    opacity: 0.8;
}

.article-content blockquote {
    margin: 28px 0;
    padding: 16px 24px;
    border-left: 4px solid var(--primary-color);
    background: rgba(124, 58, 237, 0.05);
    border-radius: var(--radius-lg);
    font-style: italic;
    color: var(--text-secondary);
}

.article-content blockquote p {
    margin-bottom: 0;
}

.article-content pre {
    margin: 28px 0;
    padding: 20px 24px;
    background: #1e1e2e;
    color: #d4d4dc;
    border-radius: var(--radius-lg);
    overflow-x: auto;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 14px;
    line-height: 1.6;
}

.article-content code {
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9em;
    background: rgba(124, 58, 237, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

.article-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 28px 0;
    display: block;
}

.article-content hr {
    margin: 40px 0;
    border: none;
    border-top: 1px solid var(--border-color);
}

.article-content .ql-align-center {
    text-align: center;
}

.article-content .ql-align-right {
    text-align: right;
}

.article-content .ql-align-justify {
    text-align: justify;
}

.article-content .ql-indent-1 { padding-left: 32px; }
.article-content .ql-indent-2 { padding-left: 64px; }
.article-content .ql-indent-3 { padding-left: 96px; }

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
}

.article-content table th,
.article-content table td {
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    text-align: left;
}

.article-content table th {
    background: rgba(124, 58, 237, 0.06);
    font-weight: 600;
}

.key-point {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.05), rgba(124, 58, 237, 0.1));
    padding: 24px;
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-lg);
    margin: 32px 0;
}

.tip-box {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.1), rgba(139, 92, 246, 0.1));
    padding: 24px;
    border-radius: var(--radius-lg);
    margin: 32px 0;
}

.tip-box strong {
    color: var(--primary-color);
}

/* Footer */
.site-footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 80px 0 32px;
}

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

.footer-section h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.25rem;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.7;
}

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

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    opacity: 0.7;
    color: rgba(255, 255, 255, 0.8);
}

.footer-section ul li a:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
    text-align: center;
    opacity: 0.6;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }