/* FXKRW - paracevirici.com 스타일 환율 계산기 */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-color: #1f2937;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --bg-color: #f3f4f6;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-lg: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.logo a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary-color);
}

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

.logo-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: all 0.2s;
}

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

.main-nav a.active {
    background: var(--primary-color);
    color: white;
}

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

.mobile-menu-btn span {
    width: 22px;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 160px);
    padding: 24px 0;
}

/* Main Wrapper - 2 Column Layout */
.main-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: start;
}

.main-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Exchange Rates Search */
.exchange-rates-search {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow);
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    padding: 14px 48px 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-box .search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: var(--text-muted);
}

/* Favorites Button */
.exchange-rates-favorites {
    display: flex;
    justify-content: flex-end;
}

.favorites-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}

.favorites-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.favorites-btn .star {
    color: var(--warning-color);
    font-size: 16px;
}

/* Rate Type Toggle */
.exchange-rates-convert {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    box-shadow: var(--shadow);
}

.rate-type-toggle {
    display: flex;
    gap: 8px;
}

.rate-type-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

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

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

/* Amount Input */
.exchange-rates-amount {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow);
}

.amount-input-group {
    display: flex;
    gap: 12px;
}

.base-amount {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius);
    font-size: 24px;
    font-weight: 600;
    font-family: inherit;
    text-align: right;
}

.base-amount:focus {
    outline: none;
    border-color: var(--primary-dark);
}

.base-currency {
    width: 200px;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    background: var(--bg-white);
    cursor: pointer;
}

.base-currency:focus {
    outline: none;
    border-color: var(--primary-color);
}

.amount-hint {
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

/* Exchange Rates Table */
.exchange-rates-table {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.exchange-rates-table table {
    width: 100%;
    border-collapse: collapse;
}

.exchange-rates-table th {
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.exchange-rates-table th.th-fav {
    width: 50px;
    text-align: center;
}

.exchange-rates-table th.th-currency {
    width: 200px;
}

.exchange-rates-table th.th-rate {
    width: 140px;
}

.exchange-rates-table th.th-change {
    width: 100px;
}

.exchange-rates-table th.th-calc {
    min-width: 200px;
}

/* Currency Row */
.currency-row {
    transition: background 0.15s;
}

.currency-row:hover {
    background: var(--primary-light);
}

.currency-row td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

/* Favorite Button in Table */
.td-fav {
    text-align: center;
}

.fav-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 18px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 50%;
}

.fav-btn:hover {
    background: var(--warning-color);
    color: white;
}

.fav-btn.active {
    color: var(--warning-color);
}

/* Currency Info */
.currency-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.currency-flag {
    width: 36px;
    height: 24px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.currency-details {
    display: flex;
    flex-direction: column;
}

.currency-code {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-color);
}

.currency-name {
    font-size: 12px;
    color: var(--text-muted);
}

/* Rate Value */
.rate-value {
    font-weight: 700;
    font-size: 16px;
    color: var(--text-color);
}

/* Change Value */
.change-value {
    font-weight: 600;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
}

.change-value.up {
    color: var(--danger-color);
    background: #fef2f2;
}

.change-value.up::before {
    content: '▲ ';
    font-size: 10px;
}

.change-value.down {
    color: var(--secondary-color);
    background: #ecfdf5;
}

.change-value.down::before {
    content: '▼ ';
    font-size: 10px;
}

.change-value.neutral {
    color: var(--text-muted);
    background: var(--bg-color);
}

/* Calculator Input in Table */
.calc-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.calc-input {
    width: 90px;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    text-align: right;
}

.calc-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.calc-result {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary-color);
    white-space: nowrap;
}

/* Load More Button */
.load-more-wrapper {
    text-align: center;
    padding: 16px;
}

.load-more-btn {
    padding: 14px 40px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s;
}

.load-more-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 80px;
}

.sidebar-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

.sidebar-box h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

/* Parity List */
.parity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.parity-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-color);
    border-radius: var(--radius);
    transition: background 0.2s;
}

.parity-item:hover {
    background: var(--primary-light);
}

.parity-pair {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}

.parity-flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
}

.parity-rate {
    font-weight: 700;
    font-size: 14px;
    color: var(--text-color);
}

.parity-change {
    font-size: 12px;
    font-weight: 600;
}

.parity-change.up {
    color: var(--danger-color);
}

.parity-change.down {
    color: var(--secondary-color);
}

/* Quick Calculator */
.quick-calc {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quick-calc-row {
    display: flex;
    gap: 8px;
}

.quick-amount,
.quick-result {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    text-align: right;
}

.quick-result {
    background: var(--bg-color);
    color: var(--primary-color);
}

.quick-select {
    width: 80px;
    padding: 12px 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    background: var(--bg-white);
    cursor: pointer;
}

.quick-calc-arrow {
    text-align: center;
    font-size: 20px;
    color: var(--text-muted);
}

/* Popular Tags */
.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.popular-tag {
    padding: 8px 14px;
    background: var(--bg-color);
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.2s;
}

.popular-tag:hover {
    background: var(--primary-color);
    color: white;
}

/* Update Box */
.update-box {
    text-align: center;
}

.update-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.update-label {
    font-size: 12px;
    color: var(--text-muted);
}

.update-time {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-color);
}

.auto-update {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: var(--secondary-color);
}

.pulse {
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-color);
    border-radius: 50%;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--danger-color);
    color: white;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.modal-desc {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

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

.favorites-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-color);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: grab;
}

.favorites-list li:hover {
    background: var(--primary-light);
}

.favorites-list .drag-handle {
    color: var(--text-muted);
    font-size: 16px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.btn {
    flex: 1;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

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

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

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

.btn-secondary:hover {
    background: var(--bg-color);
}

/* SEO Content */
.seo-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-top: 32px;
    box-shadow: var(--shadow);
}

.seo-content h2 {
    font-size: 22px;
    margin-bottom: 16px;
    color: var(--text-color);
}

.seo-content h3 {
    font-size: 18px;
    margin: 24px 0 12px;
    color: var(--text-color);
}

.seo-content p {
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.8;
}

.seo-content ul {
    padding-left: 20px;
    margin-bottom: 16px;
}

.seo-content li {
    color: var(--text-muted);
    margin-bottom: 8px;
    line-height: 1.7;
}

/* Footer */
.site-footer {
    background: #1f2937;
    color: #d1d5db;
    padding: 48px 0 24px;
    margin-top: 48px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.footer-section h4 {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.footer-section p {
    font-size: 13px;
    line-height: 1.7;
}

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

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

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

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

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 24px;
    text-align: center;
    font-size: 13px;
}

/* Page Title */
.page-title {
    text-align: center;
    margin-bottom: 24px;
}

.page-title h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 8px;
}

.page-title p {
    color: var(--text-muted);
    font-size: 15px;
}

/* Converter Box for other pages */
.converter-box {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }

/* Responsive */
@media (max-width: 1024px) {
    .main-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        box-shadow: var(--shadow-lg);
        padding: 16px;
    }

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

    .main-nav ul {
        flex-direction: column;
        gap: 4px;
    }

    .main-nav a {
        display: block;
        padding: 12px 16px;
    }

    .mobile-menu-btn {
        display: flex;
    }

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

    .amount-input-group {
        flex-direction: column;
    }

    .base-currency {
        width: 100%;
    }

    .rate-type-toggle {
        flex-direction: column;
    }

    .exchange-rates-table th.th-change,
    .exchange-rates-table td.td-change {
        display: none;
    }

    .calc-input-group {
        flex-direction: column;
        align-items: flex-start;
    }

    .calc-input {
        width: 100%;
    }

    .currency-name {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 22px;
    }

    .base-amount {
        font-size: 20px;
    }

    .exchange-rates-table th.th-calc,
    .exchange-rates-table td.td-calc {
        display: none;
    }

    .seo-content {
        padding: 24px 16px;
    }
}

/* ===== BLOG STYLES ===== */

/* Blog Wrapper */
.blog-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

.blog-main {
    min-width: 0;
}

/* Blog Categories */
.blog-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.category-tag {
    padding: 8px 16px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.2s;
}

.category-tag:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.category-tag.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Blog Card */
.blog-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card-image {
    height: 180px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #e0e7ff 100%);
    overflow: hidden;
}

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

.blog-card-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--primary-color);
    opacity: 0.5;
}

.blog-card-content {
    padding: 20px;
}

.blog-card-category {
    display: inline-block;
    padding: 4px 10px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.blog-card-content h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    color: var(--text-color);
}

.blog-card-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Blog Pagination */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.blog-pagination a {
    padding: 10px 20px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.2s;
}

.blog-pagination a:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.blog-pagination .page-info {
    font-weight: 600;
    color: var(--text-muted);
}

/* Blog Sidebar */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 80px;
}

.blog-sidebar .search-form {
    display: flex;
    gap: 8px;
}

.blog-sidebar .search-form input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
}

.blog-sidebar .search-form button {
    padding: 10px 14px;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

.sidebar-categories {
    list-style: none;
}

.sidebar-categories li {
    margin-bottom: 8px;
}

.sidebar-categories a {
    display: block;
    padding: 8px 12px;
    background: var(--bg-color);
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.2s;
}

.sidebar-categories a:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.sidebar-posts {
    list-style: none;
}

.sidebar-posts li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-posts li:last-child {
    border-bottom: none;
}

.sidebar-posts a {
    text-decoration: none;
    font-size: 14px;
    color: var(--text-color);
    line-height: 1.5;
    display: block;
}

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

.sidebar-posts .empty {
    color: var(--text-muted);
    font-style: italic;
}

.sidebar-calc-link {
    display: block;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
    transition: transform 0.2s;
}

.sidebar-calc-link:hover {
    transform: scale(1.02);
}

/* Blog Post Single */
.blog-post {
    max-width: 1100px;
    margin: 0 auto;
}

.blog-post-header {
    text-align: center;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.blog-post-header .post-category {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 12px;
}

.blog-post-header h1 {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    color: var(--text-muted);
}

.blog-post-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    align-items: start;
}

.blog-post-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow);
    line-height: 1.8;
}

.blog-post-content h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 32px 0 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.blog-post-content h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 24px 0 12px;
}

.blog-post-content p {
    margin-bottom: 16px;
    color: var(--text-color);
}

.blog-post-content ul, .blog-post-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.blog-post-content li {
    margin-bottom: 8px;
}

.blog-post-content blockquote {
    margin: 24px 0;
    padding: 20px 24px;
    background: var(--primary-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
}

.blog-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

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

.blog-post-content th {
    background: var(--bg-color);
    font-weight: 600;
}

.blog-post-sidebar {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.toc-box ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.toc-box li {
    margin-bottom: 8px;
}

.toc-box li.sub {
    padding-left: 16px;
}

.toc-box a {
    text-decoration: none;
    font-size: 14px;
    color: var(--text-color);
}

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

/* Share Buttons */
.blog-post-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    padding: 20px;
    background: var(--bg-color);
    border-radius: var(--radius);
}

.blog-post-share span {
    font-weight: 600;
    color: var(--text-muted);
}

.share-btn {
    padding: 8px 16px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.facebook {
    background: #4267b2;
    color: white;
}

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

.blog-post-nav {
    margin-top: 24px;
    text-align: center;
}

.back-to-list {
    display: inline-block;
    padding: 12px 24px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.2s;
}

.back-to-list:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.no-posts {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
}

/* Blog Responsive */
@media (max-width: 1024px) {
    .blog-wrapper {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: static;
    }

    .blog-post-wrapper {
        grid-template-columns: 1fr;
    }

    .blog-post-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .blog-post-content {
        padding: 24px;
    }

    .blog-post-header h1 {
        font-size: 24px;
    }

    .blog-post-sidebar {
        grid-template-columns: 1fr;
    }

    .blog-post-share {
        flex-wrap: wrap;
    }
}
