/**
 * HowTo Frontend - Base CSS
 * 
 * This file contains all base styles that are shared across all themes.
 * Theme-specific colors are defined via CSS variables in theme files.
 */

/* ===========================================
   CSS Variables (Defaults)
   =========================================== */
:root {
    /* Theme Colors (can be overridden by theme CSS) */
    --theme-primary: #2563EB;
    --theme-primary-dark: #1D4ED8;
    --theme-primary-light: #EFF6FF;
    --theme-accent: #3B82F6;
    
    /* Neutral Colors */
    --color-bg: #F5F5F5;
    --color-surface: #FFFFFF;
    --color-border: #E8E8E8;
    --color-border-light: #F0F0F0;
    --color-text: #222222;
    --color-text-secondary: #666666;
    --color-text-muted: #999999;
    
    /* Status Colors */
    --color-info: #1890FF;
    --color-info-bg: #E6F7FF;
    --color-warning: #FA8C16;
    --color-warning-bg: #FFF7E6;
    --color-success: #52C41A;
    --color-success-bg: #F6FFED;
    --color-error: #FF4D4F;
    --color-error-bg: #FFF2F0;
    
    /* Typography */
    --font-main: 'IBM Plex Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 1px 4px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-hover: 0 8px 24px rgba(0,0,0,0.15);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    
    /* Layout */
    --header-height: 60px;
    --container-max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
}

/* ===========================================
   Container
   =========================================== */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

/* ===========================================
   Header
   =========================================== */
.header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-accent, var(--theme-primary)) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
}

.logo-text {
    font-weight: 600;
    font-size: 17px;
    color: var(--color-text);
}

.logo-text span {
    color: var(--color-text-muted);
    font-weight: 400;
}

/* Header Search */
.header-search {
    flex: 1;
    max-width: 400px;
    margin: 0 32px;
}

.search-box {
    position: relative;
}

.search-box .search-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: 14px;
    font-family: inherit;
    background: var(--color-bg);
    transition: all var(--transition-fast);
}

.search-box .search-input:focus {
    outline: none;
    border-color: var(--theme-primary);
    background: var(--color-surface);
    box-shadow: 0 0 0 3px var(--theme-primary-light);
}

.search-box .search-input::placeholder {
    color: var(--color-text-muted);
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--color-text-muted);
    pointer-events: none;
}

/* Header Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-nav a {
    font-size: 14px;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.header-nav a:hover,
.header-nav a.active {
    color: var(--theme-primary);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--color-text);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
}

.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
}

.mobile-nav.active {
    display: block;
}

.mobile-nav-inner {
    padding: 16px;
}

.mobile-search {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.mobile-search input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
}

.mobile-search button {
    padding: 12px 16px;
    background: var(--theme-primary);
    color: white;
    border: none;
    border-radius: var(--radius-md);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-nav-links a {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--color-text-secondary);
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    background: var(--theme-primary-light);
    color: var(--theme-primary);
}

@media (max-width: 768px) {
    .header-search,
    .header-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ===========================================
   Breadcrumb
   =========================================== */
.breadcrumb-bar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border-light);
}

.breadcrumb-inner {
    padding: 14px 24px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    list-style: none;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

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

.breadcrumb-sep {
    color: var(--color-border);
    display: flex;
    align-items: center;
}

.breadcrumb-current {
    color: var(--color-text-secondary);
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===========================================
   Hero Section
   =========================================== */
.hero-section {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-accent, var(--theme-primary)) 100%);
    padding: 48px 24px 72px;
    text-align: center;
    color: white;
}

.hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.hero-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 15px;
    opacity: 0.9;
    margin-bottom: 24px;
}

.hero-search-form .search-container {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.hero-search-form .search-input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hero-search-form .search-input:focus {
    outline: none;
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

.hero-search-form .search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: var(--color-text-muted);
}

.hero-search-form .search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 20px;
    background: var(--theme-primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    transition: background var(--transition-fast);
}

.hero-search-form .search-btn:hover {
    background: var(--theme-primary-dark);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 22px;
    }
    
    .hero-search-form .search-btn {
        display: none;
    }
    
    .hero-search-form .search-input {
        padding-right: 20px;
    }
}

/* ===========================================
   Categories
   =========================================== */
.categories-section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
}

.section-link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: var(--theme-primary);
    font-weight: 500;
}

.section-link svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.section-link:hover svg {
    transform: translateX(4px);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.category-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

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

.category-icon {
    width: 48px;
    height: 48px;
    background: var(--theme-primary-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.category-icon svg {
    width: 24px;
    height: 24px;
    color: var(--theme-primary);
}

.category-name {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-desc {
    font-size: 13px;
    color: var(--color-text-muted);
}

/* Category Pills */
.category-pills {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 12px;
    overflow-x: auto;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.category-label {
    font-size: 14px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: 13px;
    color: var(--color-text-secondary);
    white-space: nowrap;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.pill:hover {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

.pill.active {
    background: var(--theme-primary-light);
    border-color: var(--theme-primary);
    color: var(--theme-primary);
    font-weight: 500;
}

.pill svg {
    width: 16px;
    height: 16px;
}

.pill-count {
    background: var(--color-border);
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 500;
}

.pill.active .pill-count {
    background: var(--theme-primary);
    color: white;
}

/* ===========================================
   Posts Grid
   =========================================== */
.home-content {
    margin-top: -30px;
    position: relative;
    z-index: 10;
    padding-bottom: 60px;
}

.posts-section {
    margin-bottom: 48px;
}

.posts-list-container {
    padding: 32px 24px 60px;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}

.results-count {
    font-size: 15px;
    color: var(--color-text-secondary);
}

.results-count strong {
    color: var(--color-text);
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-dropdown label {
    font-size: 13px;
    color: var(--color-text-secondary);
}

.sort-dropdown select {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    background: var(--color-surface);
    cursor: pointer;
}

.sort-dropdown select:focus {
    outline: none;
    border-color: var(--theme-primary);
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

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

/* Post Card */
.post-card {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.post-card-image {
    height: 140px;
    background: linear-gradient(135deg, var(--theme-primary-light) 0%, #FFF0ED 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-icon {
    width: 56px;
    height: 56px;
    background: white;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-card-icon svg {
    width: 28px;
    height: 28px;
    color: var(--theme-primary);
}

.post-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--theme-primary);
    margin-bottom: 8px;
}

.post-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--color-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--transition-fast);
}

.post-card:hover .post-card-title {
    color: var(--theme-primary);
}

.post-card-excerpt {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.post-card-date {
    font-size: 12px;
    color: var(--color-text-muted);
}

.post-card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
    color: var(--theme-primary);
}

.post-card-link svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.post-card:hover .post-card-link svg {
    transform: translateX(4px);
}

/* ===========================================
   Post Detail
   =========================================== */
.post-detail-container {
    padding: 32px 24px 80px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 1024px) {
    .post-detail-container {
        grid-template-columns: 1fr;
    }
}

/* Article */
.article {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.article-header {
    padding: 40px 40px 32px;
    border-bottom: 1px solid var(--color-border);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.article-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--theme-primary-light);
    color: var(--theme-primary);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.article-category svg {
    width: 14px;
    height: 14px;
}

.article-date {
    font-size: 13px;
    color: var(--color-text-muted);
}

.article-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
    color: var(--color-text);
}

.article-intro {
    font-size: 16px;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

/* Key Takeaways */
.key-takeaways {
    margin: 0 40px;
    padding: 24px;
    background: linear-gradient(135deg, var(--theme-primary-light) 0%, #FFF9F7 100%);
    border-left: 4px solid var(--theme-primary);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.key-takeaways-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--theme-primary-dark);
    margin-bottom: 14px;
}

.key-takeaways-title svg {
    width: 18px;
    height: 18px;
}

.key-takeaways ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.key-takeaways li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.key-takeaways li:last-child {
    margin-bottom: 0;
}

.key-takeaways li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--theme-primary);
    border-radius: 50%;
}

/* Article Body */
.article-body {
    padding: 40px;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 600;
    margin: 32px 0 16px;
    color: var(--color-text);
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.article-body h3:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.article-body p {
    margin-bottom: 16px;
    font-size: 15px;
    color: var(--color-text-secondary);
}

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

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

.article-body a:hover {
    text-decoration: none;
}

.article-body ul,
.article-body ol {
    margin: 16px 0 16px 24px;
    color: var(--color-text-secondary);
    font-size: 15px;
}

.article-body li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.article-body li ul,
.article-body li ol {
    margin: 8px 0 8px 20px;
}

/* Article Footer */
.article-footer {
    padding: 32px 40px;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
}

.article-cta {
    padding: 24px;
    background: linear-gradient(135deg, var(--theme-primary-light) 0%, #FFF0ED 100%);
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 24px;
}

.article-cta p {
    font-size: 15px;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.feedback-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.feedback-question {
    font-size: 14px;
    color: var(--color-text-secondary);
}

.feedback-buttons {
    display: flex;
    gap: 10px;
}

.feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    background: var(--color-surface);
    font-size: 13px;
    font-family: inherit;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.feedback-btn.success {
    border-color: var(--color-success);
    background: var(--color-success-bg);
    color: var(--color-success);
}

.feedback-btn svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    .article-header,
    .article-body,
    .article-footer {
        padding: 24px;
    }
    
    .key-takeaways {
        margin: 0 24px;
    }
    
    .article-title {
        font-size: 22px;
    }
    
    .feedback-section {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===========================================
   Sidebar
   =========================================== */
.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 32px);
}

@media (max-width: 1024px) {
    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

/* TOC Card */
.toc-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 20px;
}

.toc-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.toc-list {
    list-style: none;
}

.toc-list li {
    margin-bottom: 4px;
}

.toc-list a {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    color: var(--color-text-secondary);
    border-radius: var(--radius-sm);
    border-left: 3px solid transparent;
    transition: all var(--transition-fast);
    line-height: 1.4;
}

.toc-list a:hover {
    background: var(--color-bg);
    color: var(--color-text);
}

.toc-list a.active {
    background: var(--theme-primary-light);
    color: var(--theme-primary);
    border-left-color: var(--theme-primary);
    font-weight: 500;
}

/* Related Card */
.related-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px;
    margin-bottom: 20px;
}

.related-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.related-list {
    list-style: none;
}

.related-list li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}

.related-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.related-list a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.related-list a svg {
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
    flex-shrink: 0;
    margin-top: 3px;
}

.related-list a span {
    font-size: 13px;
    color: var(--color-text-secondary);
    line-height: 1.5;
    transition: color var(--transition-fast);
}

.related-list a:hover span {
    color: var(--theme-primary);
}

/* Contact Card */
.contact-card {
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-accent, var(--theme-primary)) 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: white;
    text-align: center;
}

.contact-card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.contact-card-icon svg {
    width: 24px;
    height: 24px;
}

.contact-card h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.contact-card p {
    font-size: 13px;
    opacity: 0.9;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ===========================================
   Buttons
   =========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    border: none;
}

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

.btn-primary:hover {
    background: var(--theme-primary-dark);
}

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

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

.btn-light {
    background: white;
    color: var(--theme-primary);
}

.btn-light:hover {
    background: rgba(255,255,255,0.9);
}

/* ===========================================
   Pagination
   =========================================== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

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

.pagination-btn.active {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn svg {
    width: 18px;
    height: 18px;
}

/* ===========================================
   Empty State
   =========================================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.empty-state svg {
    width: 80px;
    height: 80px;
    color: var(--color-text-muted);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--color-text-secondary);
    font-size: 14px;
    margin-bottom: 24px;
}

/* ===========================================
   Error Page
   =========================================== */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.error-content {
    text-align: center;
    max-width: 480px;
}

.error-code {
    font-size: 120px;
    font-weight: 700;
    color: var(--color-border);
    line-height: 1;
    margin-bottom: 16px;
}

.error-title {
    font-size: 24px;
    margin-bottom: 12px;
}

.error-message {
    color: var(--color-text-secondary);
    margin-bottom: 32px;
}

.error-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===========================================
   Static Page
   =========================================== */
.static-page {
    padding: 48px 24px 80px;
}

.static-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 48px;
}

.static-title {
    font-size: 28px;
    margin-bottom: 24px;
}

.static-body {
    color: var(--color-text-secondary);
    line-height: 1.8;
}

.static-body p {
    margin-bottom: 16px;
}

/* ===========================================
   Footer
   =========================================== */
.footer {
    background: var(--color-text);
    color: rgba(255,255,255,0.7);
    padding: 40px 24px;
    margin-top: auto;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.footer-logo-icon {
    font-size: 20px;
}

.footer-logo-text {
    font-size: 18px;
    font-weight: 600;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 13px;
    transition: color var(--transition-fast);
}

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

.footer-copyright {
    width: 100%;
    text-align: center;
    font-size: 13px;
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 768px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* ===========================================
   Animations
   =========================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.article {
    animation: fadeIn 0.4s ease-out;
}

.post-card {
    animation: fadeInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.post-card:nth-child(1) { animation-delay: 0.05s; }
.post-card:nth-child(2) { animation-delay: 0.1s; }
.post-card:nth-child(3) { animation-delay: 0.15s; }
.post-card:nth-child(4) { animation-delay: 0.2s; }
.post-card:nth-child(5) { animation-delay: 0.25s; }
.post-card:nth-child(6) { animation-delay: 0.3s; }

/* ===========================================
   Utilities
   =========================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

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