/*
 * Vivir de Freelance - Modern Design System 2026
 * Professional, clean, reader-friendly
 * Optimized for SEO, Performance & Accessibility
 */

/* Font loading optimization - use font-display: swap */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ============================================================
   Variables
   ============================================================ */
:root {
    /* Colors */
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-800: #1e40af;

    --green-50: #f0fdf4;
    --green-500: #22c55e;
    --green-600: #16a34a;

    --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;

    --white: #ffffff;

    /* Semantic */
    --primary: var(--blue-600);
    --primary-hover: var(--blue-700);
    --text: var(--gray-800);
    --text-secondary: var(--gray-500);
    --text-muted: var(--gray-400);
    --bg: var(--white);
    --bg-alt: var(--gray-50);
    --border: var(--gray-200);

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Radius */
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Layout */
    --max-w: 1200px;
    --content-w: 680px;
    --header-h: 60px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    content-visibility: auto;
}

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

a:hover { color: var(--primary-hover); }

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

h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.375rem, 3vw, 1.75rem); letter-spacing: -0.02em; }
h3 { font-size: 1.125rem; }

p { margin-bottom: 1rem; }

strong { font-weight: 600; }

/* ============================================================
   Layout
   ============================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

@media (min-width: 768px) {
    .container { padding: 0 2rem; }
}

.site-main {
    min-height: calc(100vh - var(--header-h) - 200px);
    padding-top: 32px;
    padding-bottom: 48px;
}

/* Content widths - aligned with container */
.article-content,
.page-content,
main > .content {
    max-width: 100%;
    width: 100%;
}

.article-list,
.category-content,
.articles-list {
    max-width: 100%;
    width: 100%;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -50px;
    left: 1rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 1000;
}

.skip-link:focus {
    top: 1rem;
    color: var(--white);
}

/* ============================================================
   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);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

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

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

.nav-links {
    display: none;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.15s;
}

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

.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var(--radius);
}

.nav-toggle:hover { background: var(--gray-100); }

.hamburger {
    position: relative;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.hamburger::before { top: -5px; }
.hamburger::after { top: 5px; }

.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
}

@media (min-width: 768px) {
    .nav-toggle { display: none; }
    .nav-links { display: flex; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-800) 100%);
    color: var(--white);
    padding: 3.5rem 0 4rem;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-subtitle {
    font-size: 1.0625rem;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 540px;
    margin: 0 auto 2rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 2.5rem;
}

@media (min-width: 480px) {
    .hero-buttons {
        flex-direction: row;
        gap: 1rem;
    }
}

@media (min-width: 768px) {
    .hero {
        padding: 5rem 0 5.5rem;
    }
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

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

.hero-stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.hero-stat-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
    margin-top: 0.375rem;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--white);
    color: var(--blue-600);
}

.btn-primary:hover {
    background: var(--blue-50);
    color: var(--blue-700);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: var(--white);
}

.btn-outline {
    background: var(--white);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-dark {
    background: var(--gray-900);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--gray-800);
    color: var(--white);
}

/* ============================================================
   Sections
   ============================================================ */
.section {
    padding: 3rem 0;
}

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

.section-header {
    text-align: center;
    max-width: 500px;
    margin: 0 auto 2.5rem;
}

.section-header h2 {
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-secondary);
    margin: 0;
}

@media (min-width: 768px) {
    .section { padding: 4.5rem 0; }
    .section-header { margin-bottom: 3rem; }
}

/* ============================================================
   Article Cards
   ============================================================ */
.articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 960px) {
    .articles-grid { grid-template-columns: repeat(3, 1fr); }
}

.article-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.article-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.15);
    transform: translateY(-4px);
}

.article-card .badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
    margin-bottom: 0.75rem;
    width: fit-content;
}

.article-card .badge.pillar {
    background: var(--blue-50);
    color: var(--blue-600);
}

.article-card .badge.hub {
    background: var(--green-50);
    color: var(--green-600);
}

.article-card h3 {
    font-size: 0.9375rem;
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.article-card h3 a {
    color: var(--text);
}

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

.article-card .excerpt {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.article-card .meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 0.75rem;
}

/* ============================================================
   Category Cards
   ============================================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .categories-grid { grid-template-columns: repeat(4, 1fr); }
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    transition: all 0.2s;
}

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

.category-card h3 {
    font-size: 1rem;
    color: var(--text);
    margin: 0 0 0.375rem;
}

.category-card p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.category-card .count {
    display: inline-block;
    background: var(--blue-50);
    color: var(--blue-600);
    padding: 0.25rem 0.625rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================================
   Author Section
   ============================================================ */
.author-section {
    padding: 3rem 0;
    background: var(--bg-alt);
}

@media (min-width: 768px) {
    .author-section { padding: 4rem 0; }
}

.author-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

.author-box img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
}

.author-box h2 {
    font-size: 1.125rem;
    margin: 0 0 0.375rem;
}

.author-box p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

@media (min-width: 640px) {
    .author-box {
        flex-direction: row;
        text-align: left;
        padding: 2rem;
        gap: 1.5rem;
    }
    .author-box img {
        width: 88px;
        height: 88px;
        flex-shrink: 0;
    }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: var(--gray-900);
    color: var(--gray-400);
    padding: 2.5rem 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.site-footer p {
    margin: 0;
    font-size: 0.875rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
}

.footer-nav a {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.footer-nav a:hover { color: var(--white); }

.disclaimer {
    font-size: 0.75rem;
    color: var(--gray-500);
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ============================================================
   Breadcrumbs
   ============================================================ */
.breadcrumbs {
    background: var(--bg-alt);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.breadcrumbs ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    font-size: 0.8125rem;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    color: var(--text-muted);
}

.breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin-left: 0.5rem;
    color: var(--gray-300);
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.breadcrumbs a:hover {
    color: var(--primary);
}

.breadcrumbs li:last-child {
    color: var(--text-secondary);
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   Article Page
   ============================================================ */
.article-page {
    max-width: 100%;
    padding: 0;
}

.article-page .article-content {
    max-width: 100%;
}

/* Article Content - Reader Friendly */
.article-content {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--gray-700);
}

.article-content > p:first-child {
    font-size: 1.125rem;
    color: var(--text);
    line-height: 1.7;
}

.article-content h2 {
    font-size: 1.375rem;
    color: var(--text);
    margin: 1.75rem 0 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.article-content h2:first-of-type {
    margin-top: 1.25rem;
    padding-top: 0;
    border-top: none;
}

.article-content h3 {
    font-size: 1.125rem;
    color: var(--text);
    margin: 1.25rem 0 0.5rem;
}

.article-content p {
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }

.article-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.25rem;
}

.article-content li::marker {
    color: var(--primary);
}

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

.article-content a:hover {
    text-decoration-color: var(--primary);
}

.article-content strong {
    color: var(--text);
    font-weight: 600;
}

/* Tables */
.article-content table,
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.article-content th,
.article-content td,
.comparison-table th,
.comparison-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.article-content th,
.comparison-table th {
    background: var(--bg-alt);
    font-weight: 600;
    color: var(--text);
}

.article-content tbody tr:last-child td,
.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

/* Related Articles */
.related-articles,
.related-section {
    background: var(--bg-alt);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-top: 2rem;
}

.related-articles h2,
.related-section h2 {
    font-size: 1rem;
    margin: 0 0 1rem;
    padding: 0;
    border: none;
}

.related-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-list li {
    margin: 0;
    padding: 0;
}

.related-list a,
.related-list li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text);
    text-decoration: none;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    transition: all 0.15s;
}

.related-list a:hover,
.related-list li a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* ============================================================
   Category Page
   ============================================================ */
.category-count {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.articles-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.article-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.article-item:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.15);
    transform: translateY(-4px);
}

.article-item h2 {
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
}

.article-item h2 a {
    color: var(--text);
}

.article-item h2 a:hover {
    color: var(--primary);
}

.article-item .article-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0.375rem 0 0;
    padding: 0;
    border: none;
}

/* ============================================================
   Calculator
   ============================================================ */
.calculator-hero {
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-800) 100%);
    color: var(--white);
    padding: 2.5rem 0;
    text-align: center;
}

.calculator-hero h1 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.calculator-hero p {
    opacity: 0.9;
    margin: 0;
}

.calculator-section {
    padding: 2.5rem 0;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .calculator-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.calculator-form,
.calculator-results {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    font-family: inherit;
    transition: border-color 0.15s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.result-card {
    padding: 1rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
}

.result-card:last-child {
    margin-bottom: 0;
}

.result-card.highlight {
    background: linear-gradient(135deg, var(--green-500), var(--green-600));
    color: var(--white);
}

.result-label {
    display: block;
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
}

.result-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
}

.result-card.highlight .result-label {
    opacity: 0.9;
}

/* ============================================================
   Author Page
   ============================================================ */
.author-hero {
    background: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-800) 100%);
    color: var(--white);
    padding: 2.5rem 0;
}

.author-hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    max-width: 540px;
    margin: 0 auto;
}

.author-hero img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--white);
}

.author-hero h1 {
    color: var(--white);
    font-size: 1.625rem;
    margin-bottom: 0.375rem;
}

.author-hero p {
    opacity: 0.92;
    line-height: 1.6;
    margin: 0;
}

.author-articles {
    padding: 2.5rem 0;
}

.author-articles .section-header {
    margin-bottom: 2rem;
}

/* ============================================================
   404 Page
   ============================================================ */
.error-page {
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 0;
}

.error-content h1 {
    font-size: 4rem;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-content h2 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.error-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2.5rem;
}

/* ============================================================
   Contact Page
   ============================================================ */
.contact-page {
    max-width: 540px;
    margin: 0 auto;
    padding: 3rem 1.25rem;
    text-align: center;
}

.contact-page h1 {
    margin-bottom: 0.75rem;
}

.contact-page > p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    font-weight: 600;
    color: var(--text);
}

/* ============================================================
   Contact Page
   ============================================================ */
.contact-page {
    max-width: 100%;
    margin: 0 auto;
}

.contact-page h1 {
    margin-bottom: 0.75rem;
}

.contact-page .contact-intro {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.contact-card {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.contact-card h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.contact-card .email-link {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}

.contact-card .email-link:hover {
    text-decoration: underline;
}

.contact-card .response-time {
    color: var(--text-muted);
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-size: 0.9375rem;
}

.contact-page h2 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.contact-page ul {
    margin: 0 0 1.5rem 0;
    padding-left: 1.25rem;
}

.contact-page li {
    margin-bottom: 0.5rem;
}

.contact-note {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 2rem;
}

.contact-note h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #92400e;
    font-size: 1rem;
}

.contact-note p {
    margin-bottom: 0;
    color: #78350f;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--primary);
}

/* ============================================================
   Legal Pages
   ============================================================ */
.legal-page {
    max-width: 100%;
}

.legal-page h1 {
    margin-bottom: 1.5rem;
}

.legal-page h2 {
    font-size: 1.25rem;
    margin: 2.5rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.legal-page h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.legal-page h3 {
    font-size: 1rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--gray-700);
}

.legal-page p,
.legal-page ul,
.legal-page ol {
    margin-bottom: 1rem;
}

.legal-page ul,
.legal-page ol {
    padding-left: 1.25rem;
}

.legal-page ul { list-style: disc; }
.legal-page ol { list-style: decimal; }

.legal-page li {
    margin-bottom: 0.5rem;
}

/* Info boxes for legal pages */
.info-box {
    display: flex;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 12px;
    margin: 24px 0;
    border-left: 4px solid;
}

.info-box-blue {
    background: #eff6ff;
    border-color: #3b82f6;
}

.info-box-green {
    background: #ecfdf5;
    border-color: #10b981;
}

.info-box-yellow {
    background: #fffbeb;
    border-color: #f59e0b;
}

.info-box-red {
    background: #fef2f2;
    border-color: #ef4444;
}

.info-box-icon {
    font-size: 24px;
    flex-shrink: 0;
    line-height: 1;
}

.info-box-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
}

.info-box-content p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.info-box-content p:last-child {
    margin-bottom: 0;
}

/* ============================================================
   Utilities
   ============================================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* ============================================================
   Print
   ============================================================ */
@media print {
    .site-header,
    .site-footer,
    .related-articles,
    .related-section,
    .breadcrumbs {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
    .article-page {
        padding: 0;
        max-width: 100%;
    }
}

/* ============================================================
   Tip/Warning/Success Boxes for Articles
   ============================================================ */
.tip-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border: 1px solid #fcd34d;
    border-radius: 12px;
    padding: 20px;
    margin: 32px 0;
}

.tip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #92400e;
}

.tip-icon {
    font-size: 20px;
}

.tip-box p {
    margin: 0;
    color: #78350f;
}

.warning-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: 12px;
    padding: 20px;
    margin: 32px 0;
}

.warning-box .warning-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #991b1b;
}

.warning-box p {
    margin: 0;
    color: #7f1d1d;
}

.success-box {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-left: 4px solid #10b981;
    border-radius: 12px;
    padding: 20px;
    margin: 32px 0;
}

.success-box .success-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #065f46;
}

.success-box p {
    margin: 0;
    color: #047857;
}

.quote-box {
    background: #f8fafc;
    border-left: 4px solid #3b82f6;
    padding: 24px;
    margin: 32px 0;
    border-radius: 0 12px 12px 0;
    font-size: 18px;
    font-style: italic;
    color: #475569;
}

/* ============================================================
   Enhanced Lists with Checkmarks
   ============================================================ */
.article-content ul.check-list,
ul.check-list {
    list-style: none;
    padding-left: 0;
}

.article-content ul.check-list li,
ul.check-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px;
}

.article-content ul.check-list li::before,
ul.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* ============================================================
   Author Box at End of Articles
   ============================================================ */
.author-box-article {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 16px;
    margin-top: 48px;
    border: 1px solid var(--border);
}

.author-box-article img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.author-box-article .author-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    margin-bottom: 4px;
}

.author-box-article .author-name {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.author-box-article .author-bio {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 12px;
}

.author-box-article .author-link {
    font-size: 14px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
}

.author-box-article .author-link:hover {
    text-decoration: underline;
}

.author-box-article .author-info {
    flex: 1;
}

@media (max-width: 640px) {
    .author-box-article {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .author-box-article .author-info {
        width: 100%;
    }
}

/* ============================================================
   Article Card Title Hover
   ============================================================ */
.article-card:hover h3 a,
.article-item:hover h2 a {
    color: #2563eb;
}

/* ============================================================
   Enhanced Focus States for Accessibility
   ============================================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Focus state for cards */
.article-card:focus-within,
.article-item:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

/* ============================================================
   Selection Styling
   ============================================================ */
::selection {
    background: rgba(37, 99, 235, 0.2);
    color: var(--text);
}

/* ============================================================
   Better Reading Experience
   ============================================================ */
.article-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.article-content p {
    text-wrap: pretty;
}

/* Better link visibility in articles */
.article-content a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.article-content a:hover {
    text-decoration-thickness: 2px;
}

/* ============================================================
   Improved Table Styling
   ============================================================ */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    font-size: 0.9375rem;
    overflow-x: auto;
    display: block;
}

.article-content th,
.article-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.article-content th {
    background: var(--gray-50);
    font-weight: 600;
    white-space: nowrap;
}

.article-content tr:hover {
    background: var(--gray-50);
}

/* ============================================================
   Code Blocks
   ============================================================ */
.article-content code {
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.875em;
    font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
}

.article-content pre {
    background: var(--gray-900);
    color: var(--gray-100);
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 24px 0;
}

.article-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ============================================================
   Smooth Scrollbar
   ============================================================ */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 6px;
    border: 3px solid var(--gray-100);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) var(--gray-100);
}

/* ============================================================
   Loading States
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   Print Optimizations
   ============================================================ */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    .article-content a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: var(--gray-500);
    }

    .article-content a[href^="#"]::after,
    .article-content a[href^="javascript"]::after {
        content: "";
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    img, table, figure {
        page-break-inside: avoid;
    }
}

/* ============================================================
   High Contrast Mode Support
   ============================================================ */
@media (prefers-contrast: high) {
    :root {
        --border: var(--gray-400);
    }

    .article-card,
    .article-item {
        border-width: 2px;
    }
}

/* ============================================================
   Dark Mode Ready (future)
   ============================================================ */
@media (prefers-color-scheme: dark) {
    /* Placeholder for future dark mode support */
}
