/* ==========================================================================
   Algebra 2 Solver — Design System
   Google Fonts: Inter (body) + Poppins (headings)
   Color: Blue primary #2563EB / Accent #7C3AED
   ========================================================================== */

/* --- CSS Variables --- */
:root {
    --primary: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #3B82F6;
    --primary-50: #EFF6FF;
    --primary-100: #DBEAFE;
    --accent: #7C3AED;
    --accent-dark: #6D28D9;
    --accent-light: #8B5CF6;
    
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #06B6D4;
    
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    --bg: #FFFFFF;
    --bg-alt: #F8FAFC;
    --text: #1F2937;
    --text-light: #6B7280;
    --text-muted: #9CA3AF;
    
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);
    
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Poppins', 'Inter', sans-serif;
    --font-mono: 'Fira Code', 'Consolas', monospace;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    
    --container-max: 1200px;
    --nav-height: 72px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-900);
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.5rem; }

p { margin-bottom: 1rem; }

/* --- Container --- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    border-color: var(--accent);
}

.btn-accent:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #DC2626);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius);
}

/* --- Navigation --- */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--gray-100);
    height: var(--nav-height);
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
}

.nav-brand i {
    font-size: 1.5rem;
    color: var(--primary);
    background: var(--primary-50);
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
}

.nav-brand:hover {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.5rem 1rem;
    font-weight: 500;
    color: var(--gray-600);
    border-radius: var(--radius);
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--primary-50);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: var(--transition-fast);
    border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
    padding: 5rem 0 4rem;
    background: linear-gradient(135deg, var(--primary-50) 0%, #F0F7FF 50%, #F5F3FF 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(124,58,237,0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: white;
    border: 1px solid var(--primary-100);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.6s ease;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.6s ease;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray-600);
    max-width: 650px;
    margin: 0 auto 2rem;
    animation: fadeInUp 0.6s ease 0.15s both;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 3rem;
    animation: fadeInUp 0.6s ease 0.45s both;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.hero-stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

/* --- Sections --- */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.section-title p {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Cards --- */
.card {
    background: var(--bg);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

.card:hover {
    border-color: var(--primary-100);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
}

.feature-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg);
    font-size: 1.75rem;
}

.feature-icon.blue {
    background: var(--primary-50);
    color: var(--primary);
}

.feature-icon.purple {
    background: #F5F3FF;
    color: var(--accent);
}

.feature-icon.green {
    background: #ECFDF5;
    color: var(--success);
}

.feature-icon.orange {
    background: #FFF7ED;
    color: #EA580C;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- How It Works --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    position: relative;
}

.steps-grid::before {
    content: '';
    position: absolute;
    top: 45px;
    left: 20%;
    right: 20%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-100), var(--accent-light), var(--primary-100));
    border-radius: 2px;
}

.step-card {
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    position: relative;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(37,99,235,0.3);
}

.step-card h3 {
    margin-bottom: 0.5rem;
}

.step-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- Solver Section --- */
.solver-section {
    padding: 5rem 0;
}

.solver-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.solver-header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.solver-header h2 {
    color: white;
    margin: 0;
    font-size: 1.35rem;
}

.solver-header i {
    font-size: 1.5rem;
    opacity: 0.9;
}

.solver-body {
    padding: 2rem;
}

.solver-input-group {
    margin-bottom: 1.5rem;
}

.solver-input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.solver-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
    font-family: var(--font-mono);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: var(--transition-fast);
    background: var(--gray-50);
}

.solver-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

.solver-select {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    font-family: var(--font-body);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--gray-50);
    cursor: pointer;
    transition: var(--transition-fast);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%236B7280' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.solver-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

.solver-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.solver-examples {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--primary-50);
    border-radius: var(--radius);
}

.solver-examples h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.example-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.example-chip {
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    background: white;
    border: 1px solid var(--primary-100);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--gray-700);
}

.example-chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Solver Result */
.solver-result {
    display: none;
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    animation: fadeInUp 0.4s ease;
}

.solver-result.visible {
    display: block;
}

.solver-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.solver-result-header h3 {
    color: var(--success);
    font-size: 1.15rem;
}

.solver-answer {
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid var(--success);
    border-radius: var(--radius);
    font-size: 1.25rem;
    font-family: var(--font-mono);
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    text-align: center;
}

.solver-steps {
    counter-reset: step;
}

.solver-steps h4 {
    margin-bottom: 0.75rem;
    color: var(--gray-700);
}

.solver-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    animation: fadeInUp 0.3s ease;
}

.solver-step::before {
    counter-increment: step;
    content: counter(step);
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-50);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 50%;
    font-family: var(--font-body);
}

.solver-error {
    display: none;
    padding: 1rem;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: var(--radius);
    color: var(--danger);
    margin-top: 1rem;
    animation: shake 0.4s ease;
}

.solver-error.visible {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.solver-loading {
    display: none;
    text-align: center;
    padding: 2rem;
    margin-top: 1.5rem;
}

.solver-loading.visible {
    display: block;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1rem;
}

/* --- Blog Cards --- */
.blog-card {
    overflow: hidden;
    padding: 0;
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-50), #F5F3FF);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 3rem;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card-body {
    padding: 1.5rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.825rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.blog-card-meta i {
    margin-right: 0.25rem;
}

.blog-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-card h3 a {
    color: var(--gray-900);
}

.blog-card h3 a:hover {
    color: var(--primary);
}

.blog-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card .read-more {
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card .read-more:hover i {
    transform: translateX(4px);
}

.blog-card .read-more i {
    transition: var(--transition-fast);
}

/* --- Blog Post Page --- */
.post-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: var(--text-light);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs .separator {
    color: var(--gray-300);
}

.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.post-meta i {
    margin-right: 0.35rem;
    color: var(--primary);
}

.post-featured-image {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
}

/* Table of Contents */
.toc {
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.toc h4 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc ol {
    list-style: none;
    counter-reset: toc;
    padding-left: 0;
}

.toc li {
    counter-increment: toc;
    margin-bottom: 0.35rem;
}

.toc li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    color: var(--gray-700);
    font-size: 0.925rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.toc li a::before {
    content: counter(toc) ".";
    color: var(--primary);
    font-weight: 600;
    min-width: 20px;
}

.toc li a:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

/* Post Content Styles */
.post-content {
    font-size: 1.05rem;
    line-height: 1.85;
}

.post-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-100);
}

.post-content h3 {
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content ul, .post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 1rem 1.5rem;
    background: var(--primary-50);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--gray-700);
}

.post-content code {
    font-family: var(--font-mono);
    background: var(--gray-100);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-content pre {
    background: var(--gray-800);
    color: #E5E7EB;
    padding: 1.25rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-content img {
    border-radius: var(--radius);
    margin: 1.5rem 0;
}

.post-content .math-block {
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin: 1.5rem 0;
    overflow-x: auto;
    text-align: center;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.share-buttons span {
    font-weight: 600;
    color: var(--gray-700);
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    color: white;
    font-size: 1rem;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    color: white;
}

.share-btn.facebook { background: #1877F2; }
.share-btn.twitter { background: #1DA1F2; }
.share-btn.linkedin { background: #0A66C2; }
.share-btn.whatsapp { background: #25D366; }

/* Related Posts */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--gray-100);
}

.related-posts h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* --- Blog Index --- */
.blog-header {
    padding: 3rem 0;
    background: var(--bg-alt);
    text-align: center;
}

.blog-header h1 {
    font-size: 2.5rem;
}

.blog-list {
    padding: 3rem 0;
}

/* --- Pagination --- */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 0.75rem;
    font-weight: 500;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-700);
    transition: var(--transition-fast);
}

.page-link:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-50);
}

.page-link.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- Static Pages --- */
.page-container {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.page-container h1 {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-100);
}

.page-container .content {
    font-size: 1.05rem;
    line-height: 1.85;
}

.page-container .content h2 {
    margin-top: 2rem;
    font-size: 1.5rem;
}

.page-container .content p {
    margin-bottom: 1rem;
}

.page-container .content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* --- Contact Form --- */
.contact-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-family: var(--font-body);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: var(--transition-fast);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

/* --- Alerts --- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    animation: fadeInDown 0.3s ease;
}

.alert-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.alert-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.alert-warning {
    background: #FFFBEB;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.alert-info {
    background: #EFF6FF;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 0 0.5rem;
}

.alert-close:hover {
    opacity: 1;
}

/* --- Cookie Consent Banner --- */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: white;
    border-top: 1px solid var(--gray-200);
    box-shadow: 0 -8px 30px rgba(0,0,0,0.1);
    padding: 1.25rem 0;
    animation: slideUp 0.4s ease;
}

.cookie-banner.hidden {
    display: none;
}

.cookie-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-text {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.cookie-text i {
    font-size: 1.5rem;
    color: var(--warning);
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
}

.cookie-text a {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* --- Ad Container --- */
.ad-container {
    text-align: center;
    padding: 1rem 0;
    min-height: 50px;
}

.ad-container[data-slot="post-middle"] {
    margin: 2rem 0;
}

/* --- Sitemap Page --- */
.sitemap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.sitemap-section h3 {
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.sitemap-section ul {
    list-style: none;
    padding: 0;
}

.sitemap-section li {
    margin-bottom: 0.35rem;
}

.sitemap-section a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.sitemap-section a i {
    color: var(--primary);
    font-size: 0.75rem;
}

.sitemap-section a:hover {
    color: var(--primary);
    padding-left: 0.5rem;
}

/* --- Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Animate elements on scroll */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    
    .hero { padding: 3rem 0 2.5rem; }
    .hero h1 { font-size: 2.25rem; }
    .hero-subtitle { font-size: 1rem; }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        gap: 1.5rem;
    }
    
    .hero-stat-value {
        font-size: 1.5rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: white;
        padding: 1rem;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-md);
    }
    
    .nav-menu.open {
        display: flex;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        width: 100%;
    }
    
    .section { padding: 3rem 0; }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid::before {
        display: none;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }
    
    .solver-body {
        padding: 1.25rem;
    }
    
    .solver-actions {
        flex-direction: column;
    }
    
    .solver-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-text {
        flex-direction: column;
        align-items: center;
    }
    
    .post-header h1 {
        font-size: 1.75rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.75rem; }
    .hero-stats { flex-direction: column; gap: 1rem; }
    .btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
    .post-header h1 { font-size: 1.5rem; }
}

/* --- Footer --- */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
}

.footer h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer h3 i {
    color: var(--primary-light);
}

.footer h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer p {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--gray-400);
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer li {
    margin-bottom: 0.5rem;
}

.footer li a {
    color: var(--gray-400);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.footer li a:hover {
    color: white;
    padding-left: 0.25rem;
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-800);
    border-radius: var(--radius);
    color: var(--gray-400);
    font-size: 1rem;
    transition: var(--transition);
}

.footer-socials a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding: 1.75rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--gray-800);
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.d-flex { display: flex; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
