/**
 * TCM Heritage - Homepage Styles
 * Mobile-first responsive design following Google Mobile Standards
 */

/* CSS Variables */
:root {
    --color-primary: #38761D;
    --color-secondary: #D2B48C;
    --color-background: #F8F4E3;
    --color-text: #333333;
    --color-muted: #666666;
    --font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --font-size-base: 16px;
    --font-size-sm: 14px;
    --font-size-xs: 13px;
    --font-size-lg: 18px;
}

/* Heading Fonts */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 20px;
    margin: 0;
    padding: 0;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
}

h2 {
    text-align: center;
    margin: 30px 0 20px;
    color: var(--color-primary);
    font-size: 22px;
    border-bottom: 2px solid var(--color-secondary);
    padding-bottom: 10px;
    letter-spacing: 0.5px;
}

/* Header */
.site-header {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    min-height: 56px;
}

.logo a {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
}

.logo-icon {
    font-size: 24px;
    margin-right: 6px;
}

.logo-text {
    font-size: 18px;
    font-weight: bold;
    font-family: var(--font-heading);
}

/* Navigation */
.main-nav {
    display: none;
}

.nav-level-1 {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-level-1 > li {
    position: relative;
}

.nav-level-1 > li > a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.2s;
}

.nav-level-1 > li > a:hover {
    background-color: rgba(255,255,255,0.15);
}

.nav-level-1 > li.has-submenu > a::after {
    content: ' ▾';
    font-size: 10px;
    opacity: 0.7;
}

.nav-level-2 {
    list-style: none;
    padding: 8px 0;
    margin: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    min-width: 180px;
    z-index: 101;
    display: none;
}

.nav-level-1 > li:hover > .nav-level-2 {
    display: block;
}

.nav-level-2 a {
    color: var(--color-text);
    padding: 10px 16px;
    display: block;
    font-size: 13px;
    transition: background 0.2s;
}

.nav-level-2 a:hover {
    background-color: #f5f5f5;
    color: var(--color-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-search {
    display: none;
    align-items: center;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    padding: 4px;
}

.header-search-input {
    background: transparent;
    border: none;
    color: white;
    padding: 6px 12px;
    font-size: 13px;
    width: 140px;
    outline: none;
}

.header-search-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.header-search-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 6px 10px;
    font-size: 14px;
}

.login-btn {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid rgba(255,255,255,0.6);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.login-btn:hover {
    background-color: white;
    color: var(--color-primary);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: block;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.6);
    color: white;
    font-size: 20px;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    z-index: 1001;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: var(--color-primary);
    color: white;
    font-weight: 600;
}

.mobile-menu-close {
    margin-left: auto;
    background: transparent;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav > li > a {
    display: block;
    padding: 14px 20px;
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.mobile-nav > li > a:hover {
    background: #f5f5f5;
    color: var(--color-primary);
}

.mobile-nav-divider {
    height: 1px;
    background: #ddd;
    margin: 10px 0;
}

.mobile-subnav {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f9f9f9;
}

.mobile-subnav a {
    display: block;
    padding: 12px 20px 12px 36px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    border-bottom: 1px solid #eee;
}

.mobile-subnav a:hover {
    color: var(--color-primary);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

body.menu-open {
    overflow: hidden;
}

/* Hero Banner */
.hero-banner {
    position: relative;
    min-height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('/upload/bj.jpg') center center / cover no-repeat;
    padding: 30px 15px;
}

.hero-banner .content-wrapper {
    position: relative;
    z-index: 3;
    color: white;
    max-width: 600px;
}

.hero-banner h1 {
    font-size: 24px;
    margin: 0 0 12px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.hero-banner p {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 20px;
    line-height: 1.5;
}

.banner-search {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.banner-search-input {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    outline: none;
}

.banner-search-btn {
    padding: 14px 24px;
    background: var(--color-secondary);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
}


/* Featured Section - TCM Fixes */
.featured-section {
    margin: 20px 0;
    padding: 20px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9f5e9 100%);
    border-radius: 12px;
}

.featured-section h3 {
    margin: 0 0 20px;
    color: var(--color-primary);
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

.featured-section h3 span {
    color: var(--color-secondary);
}

.tcm-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.tcm-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: block;
    transition: box-shadow 0.2s, transform 0.2s;
}

.tcm-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.tcm-card:active {
    transform: scale(0.98);
}

.tcm-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.tcm-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f9ed;
    border-radius: var(--border-radius-sm);
    margin-right: 12px;
    color: var(--color-primary);
    font-size: 18px;
}

.tcm-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.tcm-tags {
    font-size: 13px;
    color: var(--color-primary);
    margin-bottom: 6px;
}

.tcm-desc {
    font-size: 14px;
    color: var(--color-muted);
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tcm-fix {
    font-size: 13px;
    color: var(--color-primary);
    font-weight: 600;
    padding: 6px 12px;
    background: #e8f5e0;
    border-radius: var(--border-radius-sm);
    display: inline-block;
}

/* TCM Toggle for Mobile */
.tcm-toggle {
    cursor: pointer;
    position: relative;
    padding-right: 30px;
}

.toggle-icon {
    display: none;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: transform 0.3s;
}

.tcm-toggle.expanded .toggle-icon {
    transform: translateY(-50%) rotate(180deg);
}

.tcm-grid.collapsed {
    display: none;
}

@media (max-width: 767px) {
    .toggle-icon {
        display: inline-block;
    }
    
    .tcm-toggle {
        user-select: none;
        -webkit-tap-highlight-color: transparent;
    }
}

/* Article Section */
.article-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.article-item {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}

.article-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.article-item:active {
    background-color: #f8f8f8;
}

.article-image {
    width: 110px;
    min-width: 110px;
    margin-right: 12px;
    overflow: hidden;
    border-radius: 8px;
}

.article-image img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}

.article-content {
    flex: 1;
    min-width: 0;
}

.article-content h3 {
    margin: 0 0 8px;
    color: var(--color-primary);
    font-size: 20px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-content p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 18px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 8px;
}

.article-meta {
    font-size: 15px;
    color: #999;
}

.article-meta span {
    margin-right: 8px;
}

.more-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    font-size: 16px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 10px;
}

/* Book Grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    text-align: center;
}

.book-item a {
    text-decoration: none;
    color: inherit;
}

.book-cover {
    aspect-ratio: 3 / 4;
    width: 100%;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f5f5f5;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-item h4 {
    margin: 8px 0 4px;
    font-size: 16px;
    color: var(--color-primary);
}

.book-item p {
    margin: 0;
    font-size: 15px;
    color: #888;
}

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    text-align: center;
}

.course-item a {
    text-decoration: none;
    color: inherit;
}

.course-thumbnail {
    aspect-ratio: 16 / 9;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    background: #eee;
}

.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.course-item h4 {
    margin: 8px 0 4px;
    font-size: 16px;
    color: var(--color-primary);
}

.course-item p {
    margin: 0;
    font-size: 15px;
    color: #888;
}

/* Stats Section */
.stats-section {
    background: #4a8f2a;
    padding: 4px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
}

.stat-item {
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 2px 4px;
}

.stat-icon {
    font-size: 16px;
    flex-shrink: 0;
}

.stat-number {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    opacity: 0.85;
    display: block;
}

.stat-item.stat-link {
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s;
}

.stat-item.stat-link:hover {
    background: rgba(255,255,255,0.15);
}

.stat-info {
    text-align: left;
}

/* Team Section */
.team-section {
    padding: 30px 0 20px;
}

.team-section h2 {
    margin: 0 0 8px;
    font-size: 22px;
    text-align: center;
    color: var(--color-primary);
}

.team-subtitle {
    text-align: center;
    color: var(--color-muted);
    font-size: 18px;
    margin: 0 0 20px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
}

.team-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}

.team-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

.team-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    margin: 0 auto 10px;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    background: #f0f0f0;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card h4 {
    margin: 0 0 4px;
    font-size: 17px;
    color: var(--color-text);
}

.team-title {
    margin: 0 0 4px;
    font-size: 15px;
    color: var(--color-primary);
    font-weight: 500;
}

.team-exp {
    margin: 0;
    font-size: 14px;
    color: #999;
}

/* Team Section Responsive */
@media (max-width: 991px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 575px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .team-card {
        padding: 10px;
    }
    
    .team-card h4 {
        font-size: 13px;
    }
}

/* VIP Membership */
.vip-membership {
    text-align: center;
    padding: 25px 0;
    margin-top: 10px;
}

/* VIP Toggle */
.vip-toggle {
    cursor: pointer;
    position: relative;
    display: inline-block;
    padding-right: 30px;
    user-select: none;
    transition: color 0.2s;
}

.vip-toggle:hover {
    color: #2d5f17;
}

.vip-toggle-icon {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    transition: transform 0.3s ease;
    color: var(--color-primary);
}

.vip-toggle.expanded .vip-toggle-icon {
    transform: translateY(-50%) rotate(180deg);
}

.vip-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

.vip-content.expanded {
    max-height: 1000px;
    opacity: 1;
}

.vip-subtitle {
    color: #666;
    font-size: 18px;
    margin: -5px 0 20px;
}

.vip-cards {
    display: flex;
    flex-direction: column;
    gap: 25px;
    align-items: center;
}

.vip-card {
    background: white;
    border-radius: 12px;
    padding: 28px 24px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
    text-align: center;
    transition: box-shadow 0.3s, transform 0.3s;
}

.vip-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    transform: translateY(-4px);
}

.vip-card.featured {
    border: 2px solid var(--color-primary);
    background: linear-gradient(180deg, #f0f9ed 0%, #fff 100%);
}

.vip-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-secondary);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
}

.vip-badge.best {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2d5f17 100%);
}

.vip-card h3 {
    margin: 8px 0 12px;
    color: var(--color-primary);
    font-size: 18px;
}

.vip-price {
    margin-bottom: 15px;
}

.vip-price .original-price {
    display: block;
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 3px;
}

.vip-price .currency {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    vertical-align: top;
}

.vip-price .amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.vip-price .period {
    font-size: 12px;
    color: #888;
    display: block;
    margin-top: 3px;
}

.vip-features {
    list-style: none;
    padding: 0;
    margin: 0 0 15px;
    text-align: left;
}

.vip-features li {
    padding: 8px 0;
    font-size: 16px;
    color: #555;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
}

.vip-features li:last-child {
    border-bottom: none;
}

.vip-features .check {
    color: var(--color-primary);
    margin-right: 10px;
    font-weight: bold;
}

.vip-features li.highlight {
    color: var(--color-primary);
    font-weight: 500;
}

.vip-btn {
    display: block;
    padding: 16px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    min-height: 54px;
    background: #f5f5f5;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    transition: all 0.3s;
}

.vip-btn:hover {
    background: var(--color-primary);
    color: white;
}

.vip-btn.primary {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.vip-btn.primary:hover {
    background: #2d5f17;
    border-color: #2d5f17;
}

/* Ranking Section */
.ranking-section {
    background: #fff;
    padding: 25px 0;
    margin-top: 30px;
    border-top: 1px solid #eee;
}

.ranking-section h3 {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 15px;
    font-size: 22px;
}

.ranking-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.ranking-link {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    text-decoration: none;
    color: var(--color-text);
    font-size: 16px;
    border-bottom: 1px dashed #eee;
    line-height: 1.5;
}

.ranking-link:active {
    background-color: #f5f5f5;
}

.rank-no {
    color: #999;
    font-weight: 600;
    margin-right: 10px;
    min-width: 24px;
    font-size: 16px;
    flex-shrink: 0;
}

.ranking-link:nth-child(-n+3) .rank-no {
    color: #e74c3c;
}

.rank-text {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Tags Section */
.tags-section {
    background: linear-gradient(135deg, #f0f4f0 0%, #e8f0e8 100%);
    padding: 15px 0;
    margin-top: 15px;
}

.tags-section h3 {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 12px;
    font-size: 18px;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
}

.tag-item {
    display: inline-block;
    padding: 8px 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 18px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 13px;
}

.tag-item:active {
    background: var(--color-primary);
    color: white;
}

/* Footer */
.site-footer {
    background-color: #2a2a2a;
    color: #a0a0a0;
    padding-top: 50px;
    font-size: 16px;
    margin-top: 50px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 0 20px 40px;
}

.footer-col h3 {
    color: var(--color-secondary);
    margin: 0 0 20px;
    font-size: 18px;
}

.footer-col a {
    color: #a0a0a0;
    text-decoration: none;
    line-height: 2.2;
    display: block;
    font-size: 16px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    background-color: #1f1f1f;
    text-align: center;
    padding: 20px;
    color: #777;
    font-size: 14px;
}

.footer-bottom a {
    color: #a0a0a0;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: #fff;
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 20px 0;
}


/* ========================================
   Tablet Styles (min-width: 768px)
   ======================================== */
@media (min-width: 768px) {
    .container {
        padding: 20px;
    }

    h2 {
        font-size: 26px;
        margin: 35px 0 25px;
    }

    .header-inner {
        padding: 0 20px;
        height: 65px;
    }

    .logo-icon {
        font-size: 26px;
    }

    .logo-text {
        font-size: 20px;
    }

    .main-nav {
        display: flex;
    }

    .mobile-menu-btn {
        display: none;
    }

    .header-search {
        display: flex;
    }

    .header-search-input {
        width: 180px;
    }

    .hero-banner {
        min-height: 350px;
        padding: 40px 20px;
    }

    .hero-banner h1 {
        font-size: 32px;
    }

    .hero-banner p {
        font-size: 16px;
    }

    .banner-search {
        flex-direction: row;
        gap: 0;
    }

    .banner-search-input {
        border-radius: 30px 0 0 30px;
    }

    .banner-search-btn {
        border-radius: 0 30px 30px 0;
    }

    .stats-section {
        padding: 15px 0;
    }

    .stats-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .stat-item {
        padding: 10px;
    }

    .stat-icon {
        font-size: 24px;
    }

    .stat-number {
        font-size: 22px;
    }

    .stat-label {
        font-size: 11px;
    }

    .testimonial-card {
        min-width: 300px;
        max-width: 300px;
    }

    .tcm-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-image {
        width: 130px;
        min-width: 130px;
    }

    .article-image img {
        height: 90px;
    }

    .article-content h3 {
        font-size: 15px;
    }

    .article-content p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        color: #666;
        margin: 0 0 8px;
        font-size: 13px;
        line-height: 1.5;
    }

    .book-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .course-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ranking-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   Desktop Styles (min-width: 992px)
   ======================================== */
@media (min-width: 992px) {
    h2 {
        font-size: 28px;
        margin: 40px 0 30px;
    }

    .header-inner {
        height: 70px;
    }

    .logo-icon {
        font-size: 28px;
        margin-right: 8px;
    }

    .logo-text {
        font-size: 22px;
    }

    .nav-level-1 > li > a {
        padding: 10px 16px;
    }

    .hero-banner {
        min-height: 400px;
    }

    .hero-banner h1 {
        font-size: 40px;
    }

    .hero-banner p {
        font-size: 18px;
    }

    .banner-search {
        max-width: 500px;
    }

    .tcm-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
    }

    .tcm-card {
        padding: 18px;
    }

    .tcm-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    }

    .article-item {
        padding: 15px;
    }

    .article-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .article-image {
        width: 140px;
        min-width: 140px;
        margin-right: 15px;
    }

    .article-image img {
        height: 100px;
    }

    .book-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }

    .course-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    .vip-cards {
        flex-direction: row;
        justify-content: center;
        gap: 30px;
    }

    .vip-card {
        max-width: 320px;
        padding: 25px 20px;
    }

    .vip-card.featured {
        transform: scale(1.03);
    }

    .vip-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    }

    .vip-card.featured:hover {
        transform: scale(1.03) translateY(-5px);
    }

    .tag-item:hover {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: white;
        transform: translateY(-2px);
    }

    .ranking-link:hover {
        color: var(--color-primary);
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 30px;
    }
}

/* ========================================
   Large Desktop (min-width: 1200px)
   ======================================== */
@media (min-width: 1200px) {
    .hero-banner h1 {
        font-size: 42px;
    }
}

/* ========================================
   Touch Device Optimizations
   ======================================== */
@media (hover: none) {
    .tcm-card:hover,
    .article-item:hover,
    .tag-item:hover,
    .card.featured {
        transform: none;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .site-header,
    .hero-banner,
    .banner-search,
    .site-footer {
        display: none;
    }
}


/* Floating Sidebar */
.floating-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99;
    display: flex;
    align-items: center;
}

.sidebar-toggle {
    width: 20px;
    height: 50px;
    background: rgba(56, 118, 29, 0.6);
    border-radius: 8px 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    color: white;
    box-shadow: -1px 0 5px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background: var(--color-primary);
    width: 24px;
}

.toggle-arrow {
    transition: transform 0.3s;
}

.floating-sidebar.active .toggle-arrow {
    transform: rotate(180deg);
}

.sidebar-menu {
    background: white;
    border-radius: 8px 0 0 8px;
    box-shadow: -2px 0 15px rgba(0,0,0,0.1);
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.floating-sidebar.active .sidebar-menu {
    max-width: 170px;
    opacity: 1;
}

.floating-sidebar.active .sidebar-toggle {
    border-radius: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--color-text);
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
    white-space: nowrap;
}

.sidebar-item:last-child {
    border-bottom: none;
}

.sidebar-item:hover {
    background: #f8f8f8;
    color: var(--color-primary);
}

.sidebar-icon {
    font-size: 16px;
    margin-right: 8px;
}

.sidebar-text {
    font-size: 13px;
}

/* Hide on mobile */
@media (max-width: 767px) {
    .floating-sidebar {
        display: none;
    }
}


/* ========================================
   Page Styles - Search, About, Contact, Tag
   ======================================== */

/* Page Header */
.page-header {
    text-align: center;
    padding: 30px 0 20px;
    margin-bottom: 20px;
}

.page-header h1 {
    font-size: 24px;
    color: var(--color-primary);
    margin: 0 0 10px;
}

.page-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.page-header .highlight {
    color: var(--color-primary);
    font-weight: 600;
}

/* Search Box */
.search-box {
    max-width: 600px;
    margin: 0 auto 30px;
}

.search-form {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.search-form .search-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.search-form .search-input:focus {
    border-color: var(--color-primary);
}

.search-form .search-btn {
    padding: 14px 24px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
}

.search-form .search-btn:hover {
    background: #2d5f17;
}

/* Search Results */
.search-results {
    margin-bottom: 30px;
}

.search-results h2 {
    text-align: left;
    font-size: 18px;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-secondary);
}

/* Course Price */
.course-price {
    color: #C0392B;
    font-weight: 600;
    font-size: 14px;
    margin-top: 5px;
}

.course-price.free {
    color: var(--color-primary);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    margin: 30px 0;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--color-text);
    font-size: 20px;
    margin: 0 0 10px;
}

.empty-state p {
    color: #888;
    font-size: 14px;
    margin: 0 0 20px;
}

/* Primary Button */
.btn-primary {
    display: inline-block;
    padding: 16px 28px;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 15px;
    min-height: 52px;
    transition: background 0.2s, transform 0.2s;
}

.btn-primary:hover {
    background: #2d5f17;
    color: white;
    transform: translateY(-1px);
}

/* ========================================
   About Page
   ======================================== */
.about-hero {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f0f9ed 0%, #e8f5e0 100%);
    border-radius: 12px;
    margin-bottom: 30px;
}

.about-hero-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.about-hero h1 {
    font-size: 28px;
    color: var(--color-primary);
    margin: 0 0 10px;
}

.about-hero p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

.about-section {
    background: white;
    border-radius: 12px;
    padding: 25px 20px;
    margin-bottom: 20px;
}

.about-section h2 {
    text-align: left;
    font-size: 20px;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-secondary);
}

.about-highlight {
    font-size: 18px;
    color: var(--color-primary);
    font-weight: 600;
    text-align: center;
    margin-bottom: 15px;
}

.about-section p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 12px;
}

.about-section p:last-child {
    margin-bottom: 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.about-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.about-card-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.about-card h3 {
    font-size: 16px;
    color: var(--color-primary);
    margin: 0 0 8px;
}

.about-card p {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

.about-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-features li {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #555;
}

.about-features li:last-child {
    border-bottom: none;
}

.about-features li span {
    margin-right: 12px;
    font-size: 18px;
}

.about-cta {
    text-align: center;
}

.about-cta h2 {
    text-align: center;
}

.about-cta p {
    text-align: center;
    margin-bottom: 20px;
}

/* ========================================
   Contact Page
   ======================================== */
.contact-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 40px 0;
}

.contact-card {
    background: white;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.contact-icon {
    font-size: 56px;
    margin-bottom: 15px;
}

.contact-card h1 {
    font-size: 26px;
    color: var(--color-primary);
    margin: 0 0 8px;
}

.contact-site-name {
    font-size: 14px;
    color: var(--color-secondary);
    font-weight: 500;
    margin-bottom: 20px;
}

.contact-divider {
    width: 60px;
    height: 2px;
    background: var(--color-secondary);
    margin: 20px auto;
}

.contact-intro {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.contact-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
}

.contact-item {
    margin-bottom: 12px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-label {
    display: block;
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
}

.contact-item a,
.contact-item span {
    font-size: 16px;
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-response {
    font-size: 12px;
    color: #888;
    margin-bottom: 0;
}

.back-link {
    display: inline-block;
    padding: 10px 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--color-primary);
}

/* ========================================
   Tags Page
   ======================================== */
.tags-cloud-page {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    padding: 20px 0;
}

.tag-cloud-item {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 25px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 14px;
    transition: all 0.2s;
}

.tag-cloud-item:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.tag-cloud-item .tag-count {
    background: #f0f0f0;
    color: #666;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 8px;
}

.tag-cloud-item:hover .tag-count {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* Tags Filter */
.tags-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.tag-filter-item {
    padding: 8px 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 13px;
    transition: all 0.2s;
}

.tag-filter-item:hover,
.tag-filter-item.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Pagination Wrapper */
.pagination-wrapper {
    text-align: center;
    padding: 20px 0;
}

.pagination-wrapper a,
.pagination-wrapper span {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 13px;
}

.pagination-wrapper a:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.pagination-wrapper .current,
.pagination-wrapper span.current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* ========================================
   Article Detail Page
   ======================================== */
.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.article-main {
    background: white;
    border-radius: 12px;
    padding: 20px;
}

.article-header h1 {
    font-size: 22px;
    color: var(--color-text);
    margin: 0 0 15px;
    line-height: 1.4;
}

.article-header .article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: #888;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.article-body {
    font-size: 18px;
    line-height: 1.8;
    color: #444;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 15px 0;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    color: var(--color-primary);
    margin: 25px 0 15px;
}

.article-body p {
    margin-bottom: 15px;
}

.article-body ul,
.article-body ol {
    margin-bottom: 15px;
    padding-left: 25px;
}

.article-body li {
    margin-bottom: 8px;
}

/* Article Actions - Vote & Donate */
.article-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.vote-buttons {
    display: flex;
    gap: 10px;
}

.vote-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.vote-btn:hover {
    border-color: var(--color-primary);
}

.vote-btn.vote-up:hover,
.vote-btn.vote-up.voted {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.vote-btn.vote-down:hover,
.vote-btn.vote-down.voted {
    background: #ffebee;
    border-color: #f44336;
    color: #c62828;
}

.vote-btn.voted {
    pointer-events: none;
}

.vote-icon {
    font-size: 18px;
}

.vote-count {
    background: #eee;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

.donate-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 90, 90, 0.3);
}

.donate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 90, 0.4);
    color: white;
}

.donate-icon {
    font-size: 18px;
}

@media (max-width: 480px) {
    .article-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .vote-buttons {
        justify-content: center;
    }
    
    .donate-btn {
        justify-content: center;
    }
    
    .vote-text {
        display: none;
    }
}

.article-tags {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.article-tags span {
    color: #888;
    font-size: 13px;
    margin-right: 10px;
}

.tag-link {
    display: inline-block;
    padding: 5px 12px;
    background: #f5f5f5;
    border-radius: 15px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 12px;
    margin: 3px;
    transition: all 0.2s;
}

.tag-link:hover {
    background: var(--color-primary);
    color: white;
}

.article-share {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-share span {
    color: #888;
    font-size: 13px;
}

.share-btn {
    padding: 6px 14px;
    background: #f5f5f5;
    border-radius: 5px;
    text-decoration: none;
    color: var(--color-text);
    font-size: 12px;
    transition: all 0.2s;
}

.share-btn:hover {
    background: var(--color-primary);
    color: white;
}

/* Article Sidebar */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-box {
    background: white;
    border-radius: 12px;
    padding: 18px;
}

.sidebar-box h3 {
    font-size: 16px;
    color: var(--color-primary);
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-secondary);
}

.sidebar-courses {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-course {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.sidebar-course img {
    width: 80px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.sidebar-course .course-info h4 {
    font-size: 13px;
    color: var(--color-text);
    margin: 0 0 5px;
    line-height: 1.3;
}

.sidebar-course .price {
    font-size: 12px;
    color: #C0392B;
    font-weight: 600;
}

/* Breadcrumb */
.breadcrumb {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
    padding: 10px 0;
}

.breadcrumb a {
    color: var(--color-primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    margin: 0 5px;
}

.breadcrumb .current {
    color: #666;
}

/* ========================================
   Responsive - Tablet & Desktop
   ======================================== */
@media (min-width: 768px) {
    .page-header {
        padding: 40px 0 25px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .search-form {
        flex-direction: row;
    }

    .about-hero h1 {
        font-size: 32px;
    }

    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-layout {
        grid-template-columns: 1fr 280px;
    }

    .article-header h1 {
        font-size: 26px;
    }
}

@media (min-width: 992px) {
    .page-header h1 {
        font-size: 32px;
    }

    .about-hero {
        padding: 60px 40px;
    }

    .about-hero h1 {
        font-size: 36px;
    }

    .about-section {
        padding: 30px;
    }

    .about-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .article-layout {
        grid-template-columns: 1fr 320px;
    }

    .article-main {
        padding: 30px;
    }

    .article-header h1 {
        font-size: 30px;
    }

    .tag-cloud-item:hover {
        transform: translateY(-2px);
    }
}


/* ========================================
   Book & Course Page Styles
   ======================================== */

/* Book Carousel */
.book-carousel {
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
}

.carousel-banner {
    display: block;
    position: relative;
}

.carousel-banner img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.carousel-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 30px 20px 20px;
}

.carousel-caption h3 {
    font-size: 18px;
    margin: 0 0 5px;
}

.carousel-caption p {
    font-size: 13px;
    margin: 0;
    opacity: 0.9;
}

/* Notice Card */
.notice-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.notice-content h3 {
    font-size: 16px;
    color: var(--color-primary);
    margin: 0 0 5px;
}

.notice-content p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.notice-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #f5f5f5;
    color: var(--color-text);
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    transition: all 0.2s;
}

.notice-btn:hover {
    background: var(--color-primary);
    color: white;
}

/* Book Section */
.book-section {
    margin-bottom: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.section-header h2 {
    margin: 0;
    font-size: 18px;
    padding-bottom: 0;
    border-bottom: none;
    text-align: left;
}

.view-all {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.view-all:hover {
    text-decoration: underline;
}

/* Book Badge */
.book-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.book-badge.hot {
    background: #e74c3c;
}

.book-badge.sale {
    background: var(--color-primary);
}

.book-cover {
    position: relative;
}

.book-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: #888;
    margin-top: 5px;
}

.book-meta .price {
    color: #C0392B;
    font-weight: 600;
}

.book-meta .downloads,
.book-meta .sales {
    color: var(--color-primary);
}

/* Course Hero */
.course-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2d5f17 100%);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.course-hero h1 {
    font-size: 24px;
    margin: 0 0 10px;
}

.course-hero p {
    font-size: 16px;
    margin: 0 0 5px;
    opacity: 0.95;
}

.course-hero .hero-sub {
    font-size: 13px;
    opacity: 0.8;
}

/* Course Section */
.course-section {
    margin-bottom: 30px;
}

.course-section h2 {
    text-align: left;
    font-size: 18px;
    margin: 0 0 15px;
}

/* Course Badge */
.course-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 10px;
    background: #e74c3c;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

/* Read More Link */
.read-more {
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 500;
}

/* ========================================
   Responsive - Book & Course Pages
   ======================================== */
@media (min-width: 768px) {
    .carousel-banner img {
        height: 280px;
    }

    .carousel-caption h3 {
        font-size: 22px;
    }

    .notice-card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .notice-btn {
        flex-shrink: 0;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .course-hero {
        padding: 60px 30px;
    }

    .course-hero h1 {
        font-size: 32px;
    }

    .course-hero p {
        font-size: 18px;
    }
}

@media (min-width: 992px) {
    .carousel-banner img {
        height: 320px;
    }

    .carousel-caption {
        padding: 40px 30px 25px;
    }

    .carousel-caption h3 {
        font-size: 26px;
    }

    .carousel-caption p {
        font-size: 15px;
    }

    .course-hero h1 {
        font-size: 36px;
    }
}


/* ========================================
   Search Filter & Sort Styles
   ======================================== */

/* Search Filter Box */
.search-filter-box {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filter-form {
    width: 100%;
}

.filter-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.filter-input:focus {
    border-color: var(--color-primary);
}

.filter-select {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    outline: none;
}

.filter-select:focus {
    border-color: var(--color-primary);
}

.filter-btn {
    padding: 12px 24px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    min-height: 48px;
}

.filter-btn:hover {
    background: #2d5f17;
}

/* Sort Tabs */
.sort-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
}

.sort-tab {
    padding: 8px 16px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.2s;
}

.sort-tab:hover {
    background: #f5f5f5;
    color: var(--color-text);
}

.sort-tab.active {
    background: var(--color-primary);
    color: white;
}

.results-count {
    color: #666;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Category Hero */
.category-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2d5f17 100%);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    margin-bottom: 25px;
    color: white;
}

.category-hero h1 {
    font-size: 24px;
    margin: 0 0 10px;
}

.category-hero p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* ========================================
   Download Page Styles
   ======================================== */
.download-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 50vh;
    padding: 40px 0;
}

.download-card {
    background: white;
    border-radius: 12px;
    padding: 40px 30px;
    text-align: center;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.download-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

.download-card h1 {
    font-size: 24px;
    color: var(--color-primary);
    margin: 0 0 20px;
}

.download-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.download-info h2 {
    font-size: 16px;
    color: var(--color-text);
    margin: 0;
    text-align: center;
    border-bottom: none;
}

.download-links h3 {
    font-size: 14px;
    color: #666;
    margin: 0 0 15px;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-btn {
    display: block;
    padding: 14px 24px;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.2s;
}

.download-btn:hover {
    background: #2d5f17;
    color: white;
}

.download-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.download-help {
    margin-top: 20px;
    font-size: 13px;
    color: #888;
}

.download-help a {
    color: var(--color-primary);
}

/* ========================================
   Query Page Styles
   ======================================== */
.query-page {
    max-width: 600px;
    margin: 0 auto;
}

.query-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.query-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.query-tab {
    flex: 1;
    padding: 12px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.query-tab:hover {
    background: #eee;
}

.query-tab.active {
    background: var(--color-primary);
    color: white;
}

.query-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--color-text);
}

.form-input {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--color-primary);
}

.input-with-btn {
    display: flex;
    gap: 10px;
}

.input-with-btn .form-input {
    flex: 1;
}

.btn-secondary {
    padding: 12px 16px;
    background: #f5f5f5;
    color: var(--color-text);
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #eee;
}

.btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Orders Result */
.orders-result {
    margin-top: 30px;
}

.orders-result h3 {
    font-size: 18px;
    color: var(--color-primary);
    margin: 0 0 15px;
}

.order-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.order-info h4 {
    font-size: 16px;
    color: var(--color-text);
    margin: 0 0 8px;
}

.order-info p {
    font-size: 13px;
    color: #888;
    margin: 0 0 4px;
}

.order-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.status-paid {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-pending {
    background: #fff3e0;
    color: #e65100;
}

/* ========================================
   Responsive - Filter & Query
   ======================================== */
@media (min-width: 768px) {
    .filter-row {
        flex-direction: row;
        align-items: center;
    }

    .filter-input {
        flex: 2;
    }

    .filter-select {
        flex: 1;
    }

    .filter-btn {
        flex: 0 0 auto;
    }

    .category-hero {
        padding: 60px 30px;
    }

    .category-hero h1 {
        font-size: 32px;
    }

    .download-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .download-btn {
        flex: 0 0 auto;
    }
}

@media (min-width: 992px) {
    .category-hero h1 {
        font-size: 36px;
    }
}

/* ========================================
   Error Page Styles
   ======================================== */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    padding: 40px 0;
}

.error-card {
    background: white;
    border-radius: 12px;
    padding: 50px 40px;
    text-align: center;
    max-width: 450px;
    width: 100%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.error-icon {
    font-size: 72px;
    margin-bottom: 20px;
}

.error-card h1 {
    font-size: 28px;
    color: #dc3545;
    margin: 0 0 15px;
}

.error-message {
    font-size: 16px;
    color: #666;
    margin: 0 0 30px;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Report Page Styles
   ======================================== */
.page-header {
    text-align: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 28px;
    color: var(--color-primary);
    margin: 0 0 10px;
}

.page-header p {
    font-size: 15px;
    color: #666;
    margin: 0;
}

.form-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    margin: 0 auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
}

.form-label .required {
    color: #dc3545;
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: border-color 0.2s;
}

.form-textarea:focus {
    border-color: var(--color-primary);
}

.captcha-group {
    max-width: 300px;
}

.captcha-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-question {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

.captcha-answer {
    width: 80px;
}

.form-actions {
    margin-top: 25px;
}

/* ========================================
   Download Page Extended Styles
   ======================================== */
.download-warning {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 25px;
    text-align: left;
}

.warning-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.warning-content {
    font-size: 14px;
    color: #856404;
}

.warning-content small {
    color: #997a00;
}

.download-info .order-no {
    font-size: 13px;
    color: #888;
    margin-top: 10px;
}

.download-footer .divider {
    margin: 0 10px;
    color: #ddd;
}

.back-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--color-primary);
}

/* Course Download Styles */
.success-card .download-icon.success {
    width: 80px;
    height: 80px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
}

.success-card .subtitle {
    font-size: 15px;
    color: #666;
    margin: 0 0 25px;
}

.course-info {
    display: flex;
    gap: 15px;
    align-items: center;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
    text-align: left;
}

.course-thumb {
    width: 100px;
    height: 70px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.course-details h2 {
    font-size: 16px;
    color: var(--color-text);
    margin: 0 0 5px;
    text-align: left;
    border-bottom: none;
}

.course-details .instructor {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.download-instructions {
    background: #e3f2fd;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.download-instructions h3 {
    font-size: 15px;
    color: #1565c0;
    margin: 0 0 12px;
}

.download-instructions ul {
    margin: 0;
    padding-left: 20px;
}

.download-instructions li {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    line-height: 1.5;
}

.course-links {
    text-align: left;
}

.link-group {
    margin-bottom: 15px;
}

.link-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.copy-input {
    display: flex;
    gap: 10px;
}

.copy-input input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9fa;
}

.copy-input.small {
    max-width: 250px;
}

.copy-btn {
    padding: 12px 16px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #2d5f17;
}

.download-actions {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.notice-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    max-width: 500px;
    width: 100%;
}

.notice-card h3 {
    font-size: 16px;
    color: #e65100;
    margin: 0 0 15px;
}

.notice-card ul {
    margin: 0;
    padding-left: 20px;
}

.notice-card li {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* ========================================
   Responsive - Error & Report Pages
   ======================================== */
@media (max-width: 480px) {
    .error-card {
        padding: 40px 25px;
    }

    .error-icon {
        font-size: 56px;
    }

    .error-card h1 {
        font-size: 24px;
    }

    .error-actions {
        flex-direction: column;
    }

    .form-card {
        padding: 20px;
    }

    .course-info {
        flex-direction: column;
        text-align: center;
    }

    .course-details h2 {
        text-align: center;
    }

    .download-actions {
        flex-direction: column;
    }

    .copy-input {
        flex-direction: column;
    }

    .copy-input.small {
        max-width: 100%;
    }
}


/* ========================================
   Blog List Page Styles
   ======================================== */
.category-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2d5f17 100%);
    color: white;
    text-align: center;
    padding: 50px 20px;
    margin-bottom: 30px;
}

.category-hero h1 {
    font-size: 32px;
    margin: 0 0 10px;
    font-weight: 700;
}

.category-hero p {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
}

.sub-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.sub-cat-link {
    padding: 8px 16px;
    background: white;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.sub-cat-link:hover {
    background: var(--color-primary);
    color: white;
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.list-header h2 {
    margin: 0;
    text-align: left;
    border-bottom: none;
    padding-bottom: 0;
}

.article-count {
    font-size: 14px;
    color: #888;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 15px;
}

.empty-state p {
    color: #888;
    margin-bottom: 20px;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pagination-wrapper .pagination {
    display: flex;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-wrapper .pagination li a,
.pagination-wrapper .pagination li span {
    display: block;
    padding: 10px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.pagination-wrapper .pagination li a:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.pagination-wrapper .pagination li.active span {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.pagination-wrapper .pagination li.disabled span {
    opacity: 0.5;
    cursor: not-allowed;
}

.related-categories {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.related-categories h3 {
    font-size: 18px;
    color: var(--color-primary);
    margin: 0 0 15px;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-chip {
    padding: 8px 16px;
    background: #f5f5f5;
    color: var(--color-text);
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.category-chip:hover {
    background: var(--color-secondary);
    color: var(--color-primary);
}

/* ========================================
   Blog Article Detail Styles
   ======================================== */
.article-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 20px;
}

.article-main {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.article-header h1 {
    font-size: 28px;
    color: var(--color-text);
    margin: 0 0 15px;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #888;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    margin-bottom: 25px;
}

.article-meta a {
    color: var(--color-primary);
    text-decoration: none;
}

.article-featured-image {
    margin-bottom: 25px;
    border-radius: 10px;
    overflow: hidden;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-body {
    font-size: 18px;
    line-height: 1.8;
    color: #444;
}

.article-body h2,
.article-body h3,
.article-body h4 {
    color: var(--color-primary);
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-body p {
    margin-bottom: 18px;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.article-body ul,
.article-body ol {
    margin-bottom: 18px;
    padding-left: 25px;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 20px;
    margin: 25px 0;
    color: #666;
    font-style: italic;
}

/* Medical Disclaimer / Notice Box */
.article-body .medical-disclaimer,
.article-body .disclaimer-box,
.article-body .notice-box {
    background: #f8f9fa;
    border: none;
    border-radius: var(--border-radius);
    padding: 20px 20px 20px 60px;
    margin: 25px 0;
    position: relative;
    font-style: normal;
    color: #555;
    line-height: 1.6;
}

.article-body .medical-disclaimer::before,
.article-body .disclaimer-box::before,
.article-body .notice-box::before {
    content: "⚠️";
    position: absolute;
    left: 18px;
    top: 18px;
    font-size: 24px;
    font-style: normal;
}

.article-body .medical-disclaimer strong,
.article-body .disclaimer-box strong,
.article-body .notice-box strong {
    color: #333;
    display: block;
    margin-bottom: 8px;
    font-size: 15px;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tags-label {
    font-size: 14px;
    color: #666;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    padding: 5px 12px;
    background: #f5f5f5;
    color: var(--color-text);
    border-radius: 15px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.tag-link:hover {
    background: var(--color-primary);
    color: white;
}

.article-share {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.article-share > span {
    font-size: 14px;
    color: #666;
}

.share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.85;
}

.share-btn.twitter {
    background: #1da1f2;
    color: white;
}

.share-btn.facebook {
    background: #4267b2;
    color: white;
}

.share-btn.copy {
    background: #f5f5f5;
    color: var(--color-text);
}

.article-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.nav-prev,
.nav-next {
    flex: 1;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.nav-prev:hover,
.nav-next:hover {
    background: #eee;
}

.nav-prev.disabled {
    visibility: hidden;
}

.nav-next {
    text-align: right;
}

.nav-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.nav-title {
    display: block;
    font-size: 14px;
    color: var(--color-text);
    font-weight: 500;
}

/* Sidebar */
.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.sidebar-box h3 {
    font-size: 16px;
    color: var(--color-primary);
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-secondary);
}

.sidebar-courses {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-course {
    display: flex;
    gap: 12px;
    text-decoration: none;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s;
}

.sidebar-course:hover {
    background: #eee;
}

.sidebar-course img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.sidebar-course .course-info h4 {
    font-size: 13px;
    color: var(--color-text);
    margin: 0 0 5px;
    line-height: 1.4;
}

.sidebar-course .price {
    font-size: 12px;
    color: var(--color-primary);
    font-weight: 600;
}

.sidebar-articles {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-article {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
}

.sidebar-article:last-child {
    border-bottom: none;
}

.sidebar-article .title {
    font-size: 14px;
    color: var(--color-text);
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sidebar-article:hover .title {
    color: var(--color-primary);
}

.sidebar-article .date {
    font-size: 12px;
    color: #999;
}

.sidebar-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-category {
    padding: 6px 12px;
    background: #f5f5f5;
    color: var(--color-text);
    border-radius: 15px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.sidebar-category:hover {
    background: var(--color-primary);
    color: white;
}

.vip-promo {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    text-align: center;
}

.vip-promo h3 {
    border-bottom-color: #ffc107;
}

.vip-promo p {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.vip-promo .vip-btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.vip-promo .vip-btn:hover {
    background: #2d5f17;
}

/* ========================================
   Responsive - Blog Pages
   ======================================== */
@media (min-width: 768px) {
    .category-hero {
        padding: 70px 30px;
    }

    .category-hero h1 {
        font-size: 40px;
    }

    .article-layout {
        grid-template-columns: 1fr 300px;
    }

    .article-header h1 {
        font-size: 32px;
    }
}

@media (min-width: 992px) {
    .article-layout {
        grid-template-columns: 1fr 320px;
    }

    .article-main {
        padding: 40px;
    }
}

@media (max-width: 767px) {
    .article-main {
        padding: 20px;
    }

    .article-header h1 {
        font-size: 22px;
    }

    .article-nav {
        flex-direction: column;
    }

    .nav-prev.disabled {
        display: none;
    }

    .article-share {
        flex-direction: column;
        align-items: flex-start;
    }

    .category-hero {
        padding: 40px 15px;
    }

    .category-hero h1 {
        font-size: 26px;
    }
}


/* ========================================
   List Page Search Bar
   ======================================== */
.list-search-bar {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.list-search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: #f5f5f5;
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.list-search-input {
    flex: 1;
    padding: 14px 24px;
    border: none;
    background: transparent;
    color: var(--color-text);
    font-size: 15px;
    outline: none;
}

.list-search-input::placeholder {
    color: #999;
}

.list-search-btn {
    padding: 14px 28px;
    background: var(--color-primary);
    border: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.list-search-btn:hover {
    background: #2d5f17;
}

@media (max-width: 480px) {
    .list-search-bar {
        padding: 15px;
    }
    
    .list-search-input {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .list-search-btn {
        padding: 12px 20px;
    }
}


/* ========================================
   List Page Layout with Sidebar
   ======================================== */
.list-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 20px;
}

.list-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ranking-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.ranking-box h3 {
    font-size: 16px;
    color: var(--color-primary);
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-secondary);
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ranking-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.ranking-item:hover {
    background: #eee;
}

.rank-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ddd;
    color: #666;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
}


.rank-num.top {
    background: var(--color-primary);
    color: white;
}

.rank-title {
    flex: 1;
    font-size: 13px;
    color: var(--color-text);
    line-height: 1.4;
}

.rank-hits {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

@media (min-width: 992px) {
    .list-layout {
        grid-template-columns: 1fr 300px;
    }
}

@media (max-width: 991px) {
    .list-sidebar {
        order: -1;
    }
    
    .ranking-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .ranking-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .rank-hits {
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .ranking-list {
        grid-template-columns: 1fr;
    }
    
    .ranking-item {
        flex-direction: row;
        align-items: center;
    }
}


/* ========================================
   Article List Rows (One per line)
   ======================================== */
.article-list-rows {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.article-row {
    display: flex;
    gap: 20px;
    background: white;
    border-radius: 12px;
    padding: 15px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
}

.article-row:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.article-row-thumb {
    width: 180px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.article-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-row-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.article-row-content h3 {
    font-size: 18px;
    color: var(--color-text);
    margin: 0 0 10px;
    line-height: 1.4;
}

.article-row:hover h3 {
    color: var(--color-primary);
}


.article-row-content p {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-row-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #999;
}

@media (max-width: 600px) {
    .article-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .article-row-thumb {
        width: 100%;
        height: 180px;
    }
    
    .article-row-content h3 {
        font-size: 16px;
    }
}


/* ========================================
   Sidebar Sub Categories
   ======================================== */
.sidebar-subcats {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-subcat {
    display: block;
    padding: 10px 14px;
    background: #f8f9fa;
    color: var(--color-text);
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-subcat:hover {
    background: #eee;
    border-left-color: var(--color-secondary);
}

.sidebar-subcat.active {
    background: var(--color-primary);
    color: white;
    border-left-color: var(--color-primary);
}


/* ========================================
   Tag Page Multi-Module Sections
   ======================================== */
.tag-section {
    background: white;
    border-radius: 12px;
    padding: 25px 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.tag-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-secondary);
}

.tag-section .section-header h2 {
    margin: 0;
    padding: 0;
    border: none;
    text-align: left;
    font-size: 20px;
}

.tag-section .section-count {
    background: var(--color-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 500;
}

/* Tags Filter Bar */
.tags-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    padding: 15px;
    background: white;
    border-radius: 10px;
}

.tag-filter-item {
    padding: 8px 14px;
    background: #f5f5f5;
    color: var(--color-text);
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s;
}

.tag-filter-item:hover,
.tag-filter-item.active {
    background: var(--color-primary);
    color: white;
}

/* Article Row List for Tag Page */
.tag-section .article-list-rows {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tag-section .article-row {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.tag-section .article-row:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.tag-section .article-row-thumb {
    width: 120px;
    min-width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
}

.tag-section .article-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tag-section .article-row-content {
    flex: 1;
    min-width: 0;
}

.tag-section .article-row-content h3 {
    margin: 0 0 8px;
    font-size: 15px;
    color: var(--color-primary);
    line-height: 1.4;
}

.tag-section .article-row-content p {
    margin: 0 0 8px;
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-section .article-row-meta {
    font-size: 12px;
    color: #999;
}

.tag-section .article-row-meta span {
    margin-right: 12px;
}

/* Course Grid in Tag Page */
.tag-section .course-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.tag-section .course-item {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
}

.tag-section .course-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tag-section .course-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 12px;
}

.tag-section .course-thumbnail {
    aspect-ratio: 16/9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 10px;
}

/* Book Grid in Tag Page */
.tag-section .book-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.tag-section .book-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 12px;
    text-align: center;
    transition: all 0.2s;
}

.tag-section .book-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tag-section .book-item a {
    text-decoration: none;
    color: inherit;
}

.tag-section .book-cover {
    aspect-ratio: 3/4;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid #ddd;
}

.tag-section .book-item h4 {
    margin: 8px 0 4px;
    font-size: 13px;
    color: var(--color-primary);
}

.tag-section .book-item p {
    margin: 0;
    font-size: 13px;
    color: #C0392B;
    font-weight: 600;
}

/* Responsive for Tag Page */
@media (min-width: 768px) {
    .tag-section {
        padding: 30px;
    }
    
    .tag-section .article-row-thumb {
        width: 150px;
        min-width: 150px;
        height: 100px;
    }
    
    .tag-section .course-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tag-section .book-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 992px) {
    .tag-section .section-header h2 {
        font-size: 22px;
    }
    
    .tag-section .course-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .tag-section .book-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}


/* ========================================
   Book Detail Page Styles
   ======================================== */
.book-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 20px 0;
}

.book-detail-main {
    flex: 1;
}

.book-detail-sidebar {
    width: 100%;
}

.book-detail-header h1 {
    font-size: 24px;
    color: var(--color-primary);
    margin: 0 0 15px;
    line-height: 1.4;
}

.book-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

.book-summary-box,
.book-info-box,
.book-tags-box,
.book-download-box,
.book-faq-box,
.book-reviews-box {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.book-summary-box {
    background: linear-gradient(135deg, #f0f9ed 0%, #e8f5e0 100%);
    border-left: 4px solid var(--color-primary);
}

.book-summary-box h3,
.book-info-box h3,
.book-tags-box h3,
.book-download-box h3,
.book-faq-box h3,
.book-reviews-box h3 {
    font-size: 18px;
    color: var(--color-primary);
    margin: 0 0 15px;
    border: none;
    text-align: left;
    padding: 0;
}

.book-summary-box p {
    color: #555;
    line-height: 1.8;
    margin: 0;
}

.book-content {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    line-height: 1.8;
    color: #333;
}

.book-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.book-info-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.book-info-box li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.book-info-box li:last-child {
    border-bottom: none;
}

/* FAQ Styles */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.faq-item {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    cursor: pointer;
    font-weight: 500;
}

.faq-icon {
    font-size: 20px;
    color: var(--color-primary);
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s;
    color: #666;
    line-height: 1.6;
}

.faq-item.active .faq-answer {
    padding: 15px;
    max-height: 200px;
}

/* Reviews */
.rating-summary {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.rating-score .score {
    font-size: 48px;
    font-weight: bold;
    color: #ffc107;
}

.rating-score .stars {
    color: #ffc107;
    font-size: 20px;
}

.rating-score .count {
    color: #888;
    font-size: 14px;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.review-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.review-author {
    font-weight: 600;
}

.verified-badge {
    background: var(--color-primary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.review-stars {
    color: #ffc107;
    margin-left: auto;
}

.review-content {
    color: #555;
    line-height: 1.6;
    margin: 0 0 10px;
}

.review-date {
    font-size: 12px;
    color: #999;
}

/* Book Navigation */
.book-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 20px 0;
}

.book-nav-item {
    display: block;
    padding: 15px;
    background: white;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.book-nav-item:hover {
    background: #f8f9fa;
}

.nav-label {
    font-size: 12px;
    color: var(--color-primary);
}

.nav-title {
    font-size: 14px;
    color: #333;
    display: block;
    margin-top: 5px;
}

/* Purchase Card */
.purchase-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.offer-banner {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    text-align: center;
    padding: 12px;
}

.offer-banner span {
    font-size: 13px;
}

.countdown {
    font-size: 20px;
    font-weight: bold;
    margin-top: 5px;
}

.price-box {
    text-align: center;
    padding: 20px;
}

.price-box .currency {
    font-size: 24px;
    color: #333;
    vertical-align: top;
}

.price-box .amount {
    font-size: 48px;
    font-weight: bold;
    color: #C0392B;
}

.purchase-count {
    text-align: center;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 8px;
    font-size: 13px;
}

.buy-btn {
    display: block;
    width: calc(100% - 30px);
    margin: 15px;
    padding: 15px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.buy-btn:hover {
    background: #2d5f17;
}

.security-info {
    text-align: center;
    padding: 15px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #666;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 10px 0;
}

.pay-icon {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    color: white;
}

.pay-icon.paypal { background: #003087; }
.pay-icon.wechat { background: #07c160; }
.pay-icon.alipay { background: #1677ff; }

.ssl-text {
    color: #999;
    margin: 5px 0;
}

.trust-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    color: #28a745;
    font-size: 11px;
}

.how-to-buy {
    padding: 15px;
    border-top: 1px solid #eee;
}

.how-to-buy h4 {
    font-size: 14px;
    color: var(--color-primary);
    margin: 0 0 10px;
}

.how-to-buy ol {
    padding-left: 20px;
    margin: 0;
    font-size: 13px;
    color: #555;
}

.how-to-buy li {
    margin-bottom: 5px;
}

.guest-note {
    color: #28a745;
    font-size: 12px;
    margin: 10px 0 0;
}

.share-box {
    padding: 15px;
    border-top: 1px solid #eee;
}

.share-box p {
    font-size: 13px;
    color: #666;
    margin: 0 0 10px;
}

.share-btns {
    display: flex;
    gap: 8px;
}

.share-btn {
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    color: white;
    border: none;
    cursor: pointer;
}

.share-btn.twitter { background: #1da1f2; }
.share-btn.facebook { background: #4267b2; }
.share-btn.copy { background: #6c757d; }

/* Sidebar VIP Card */
.sidebar-vip-card {
    background: linear-gradient(135deg, #f0f9ed 0%, #e8f5e0 100%);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.sidebar-vip-card h4 {
    color: var(--color-primary);
    margin: 0 0 10px;
}

.sidebar-vip-card p {
    color: #666;
    font-size: 14px;
    margin: 0 0 15px;
}

.sidebar-vip-card ul {
    list-style: none;
    padding: 0;
    margin: 0 0 15px;
    text-align: left;
}

.sidebar-vip-card li {
    padding: 5px 0;
    font-size: 13px;
    color: #555;
}

.vip-link {
    display: inline-block;
    padding: 10px 20px;
    background: var(--color-primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
}

/* Related Books */
.related-books {
    margin: 30px 0;
}

.related-books h2 {
    text-align: left;
    margin-bottom: 20px;
}

/* Payment Modal */
.pay-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.pay-modal.active {
    display: flex;
}

.pay-modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.pay-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.pay-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--color-primary);
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.pay-modal-body {
    padding: 20px;
}

.purchase-type-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.toggle-option {
    flex: 1;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
}

.toggle-option.active {
    border-color: var(--color-primary);
    background: #f0f9ed;
}

.toggle-option input {
    display: none;
}

.info-alert {
    background: #e3f2fd;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #1565c0;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    font-size: 14px;
}

.form-group .required {
    color: #C0392B;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
}

.form-group small {
    color: #888;
    font-size: 12px;
}

.member-login-prompt {
    text-align: center;
    padding: 20px;
}

.member-login-prompt a {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    border-radius: 8px;
    text-decoration: none;
}

.login-link {
    background: var(--color-primary);
    color: white;
}

.register-link {
    background: #f5f5f5;
    color: #333;
}

.order-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 10px;
}

.order-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.total-price {
    color: #C0392B;
    font-size: 18px;
}

.payment-methods label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
}

.payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: block;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
}

.payment-option.active {
    border-color: var(--color-primary);
}

.payment-option input {
    display: none;
}

.pay-logo {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 13px;
    color: white;
}

.pay-logo.paypal { background: #003087; }
.pay-logo.wechat { background: #07c160; }
.pay-logo.alipay { background: #1677ff; }

.submit-order-btn {
    width: 100%;
    padding: 15px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
}

.submit-order-btn:hover {
    background: #2d5f17;
}

/* Desktop Layout */
@media (min-width: 768px) {
    .book-detail-layout {
        flex-direction: row;
    }
    
    .book-detail-sidebar {
        width: 320px;
        flex-shrink: 0;
    }
    
    .book-nav {
        flex-direction: row;
    }
    
    .book-nav-item {
        flex: 1;
    }
    
    .book-nav-item.next {
        text-align: right;
    }
}


/* ========================================
   Book Detail Page - Enhanced Styles
   ======================================== */

/* Book Cover Preview in Sidebar */
.book-cover-preview {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
}

.book-cover-preview img {
    max-width: 180px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Price Box Large */
.price-box-large {
    text-align: center;
    padding: 25px 20px;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    border-radius: 12px;
    margin: 15px;
    position: relative;
    overflow: hidden;
}

.price-box-large::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    animation: priceShine 3s ease-in-out infinite;
}

@keyframes priceShine {
    0%, 100% { transform: translate(-30%, -30%); }
    50% { transform: translate(30%, 30%); }
}

.price-box-large .price-label {
    display: inline-block;
    font-size: 12px;
    color: #fff;
    background: #e74c3c;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

.price-box-large .price-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.price-box-large .currency {
    font-size: 28px;
    color: #c0392b;
    font-weight: 700;
}

.price-box-large .amount {
    font-size: 52px;
    font-weight: 800;
    color: #c0392b;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    line-height: 1;
}

.price-box-large .price-amount.free {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 10px 20px;
    border-radius: 8px;
}

.price-box-large .price-amount.free .amount {
    color: #2e7d32;
    font-size: 36px;
    text-shadow: none;
}

/* VIP Notice */
.vip-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    font-size: 13px;
    color: #856404;
}

/* Free Download Button */
.buy-btn.free-btn {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2d5a16 100%);
    display: block;
    text-align: center;
    text-decoration: none;
}

/* Book Nav Disabled State */
.book-nav-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* You May Like Section */
.you-may-like-section {
    margin: 40px 0;
    padding: 30px 0;
    border-top: 2px solid #eee;
}

.you-may-like-section h2 {
    font-size: 22px;
    color: var(--color-primary);
    margin: 0 0 10px;
}

.you-may-like-section .section-desc {
    color: #888;
    font-size: 14px;
    margin-bottom: 25px;
}

.you-may-like-section .inline-tag {
    display: inline-block;
    background: #e8f5e0;
    color: var(--color-primary);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    margin: 0 4px;
}

.you-may-like-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.like-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s;
}

.like-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.like-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.like-thumb {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.like-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
}

.blog-type .type-badge { background: rgba(52, 152, 219, 0.9); }
.course-type .type-badge { background: rgba(155, 89, 182, 0.9); }
.book-type .type-badge { background: rgba(46, 204, 113, 0.9); }

.like-item h4 {
    font-size: 14px;
    margin: 12px 12px 8px;
    color: #333;
    line-height: 1.4;
}

.like-item .like-meta {
    font-size: 12px;
    color: #888;
    margin: 0 12px 12px;
}

/* Order Book Info in Modal */
.order-book-info {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 20px;
}

.order-book-thumb {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.order-book-detail h4 {
    font-size: 14px;
    margin: 0 0 8px;
    color: #333;
    line-height: 1.4;
}

.order-book-detail .order-price {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    margin: 0;
}

.modal-note {
    text-align: center;
    font-size: 12px;
    color: #888;
    margin-top: 15px;
}

/* Book Price in Grid */
.book-item .book-price {
    font-size: 14px;
    color: #e74c3c;
    font-weight: 600;
    margin: 5px 0 0;
}

/* Desktop Styles */
@media (min-width: 768px) {
    .you-may-like-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
    
    .like-item h4 {
        font-size: 15px;
    }
    
    .book-nav {
        flex-direction: row;
    }
    
    .book-nav-item {
        flex: 1;
    }
    
    .book-nav-item.next {
        text-align: right;
    }
    
    .price-box-large .amount {
        font-size: 48px;
    }
}

@media (min-width: 1024px) {
    .book-cover-preview img {
        max-width: 200px;
    }
}


/* VIP Download Button */
.buy-btn.vip-download-btn {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    display: block;
    text-align: center;
    text-decoration: none;
}

.buy-btn.vip-download-btn:hover {
    background: linear-gradient(135deg, #e67e22 0%, #d35400 100%);
}

/* VIP Notice States */
.vip-notice.vip-active {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.vip-notice.purchased {
    background: linear-gradient(135deg, #cce5ff 0%, #b8daff 100%);
    color: #004085;
}


/* ========================================
   User Center Styles
   ======================================== */
.user-center-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
    min-height: 60vh;
}

/* User Sidebar */
.user-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.user-sidebar-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2d5f17 100%);
    color: white;
    padding: 24px 20px;
    text-align: center;
}

.user-avatar {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 10px;
}

.user-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.user-level {
    font-size: 12px;
    opacity: 0.9;
    padding: 4px 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: inline-block;
}

.user-level.vip {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.user-menu {
    padding: 10px 0;
}

.user-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.user-menu-item:hover {
    background: #f5f5f5;
    color: var(--color-primary);
}

.user-menu-item.active {
    background: #e8f5e0;
    color: var(--color-primary);
    border-left-color: var(--color-primary);
    font-weight: 500;
}

.user-menu-item.logout:hover {
    color: #dc3545;
}

.menu-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.user-menu-divider {
    height: 1px;
    background: #eee;
    margin: 10px 20px;
}

/* User Main Content */
.user-main {
    flex: 1;
}

/* User Page Card */
.user-page-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 20px;
}

.user-page-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.user-page-header h2 {
    margin: 0;
    font-size: 18px;
    color: var(--color-text);
    text-align: left;
    border: none;
    padding: 0;
}

.user-page-body {
    padding: 24px;
}

/* User Info Grid */
.user-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.user-info-item {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
}

.info-label {
    font-size: 12px;
    color: #888;
    margin-bottom: 6px;
}

.info-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
}

.info-value.highlight {
    color: var(--color-primary);
}

.info-value.success {
    color: #28a745;
}

/* Upgrade Tip */
.user-upgrade-tip {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.user-upgrade-tip p {
    margin: 0;
    font-size: 14px;
    color: #856404;
}

.btn-upgrade {
    background: var(--color-primary);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.btn-upgrade:hover {
    background: #2d5f17;
}

/* User Table */
.user-table {
    width: 100%;
    border-collapse: collapse;
}

.user-table th,
.user-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

.user-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #666;
}

.user-table tr:hover {
    background: #fafafa;
}

/* User Form */
.user-form .form-group {
    margin-bottom: 20px;
}

.user-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text);
}

.user-form input,
.user-form select,
.user-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.user-form input:focus,
.user-form select:focus,
.user-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.user-form .btn-save {
    background: var(--color-primary);
    color: white;
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.user-form .btn-save:hover {
    background: #2d5f17;
}

/* VIP Plans */
.vip-plans-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.vip-plan-card {
    background: white;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s;
}

.vip-plan-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.vip-plan-card.popular {
    border-color: var(--color-primary);
    position: relative;
}

.vip-plan-card.popular::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.plan-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.plan-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.plan-period {
    font-size: 14px;
    color: #888;
    margin-bottom: 16px;
}

.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    text-align: left;
}

.plan-features li {
    padding: 8px 0;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.plan-features li:last-child {
    border-bottom: none;
}

.btn-plan {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

.btn-plan:hover {
    background: #2d5f17;
}

/* Empty State */
.user-empty {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.user-empty .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.user-empty h3 {
    font-size: 18px;
    color: var(--color-text);
    margin-bottom: 8px;
}

/* Desktop Layout */
@media (min-width: 768px) {
    .user-center-layout {
        flex-direction: row;
        gap: 30px;
    }
    
    .user-sidebar {
        width: 260px;
        flex-shrink: 0;
        position: sticky;
        top: 80px;
        height: fit-content;
    }
    
    .user-info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .vip-plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .vip-plans-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Plans Page Styles */
.plans-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.plan-card {
    background: white;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    position: relative;
    transition: all 0.3s;
}

.plan-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.plan-card.featured {
    border-color: var(--color-primary);
}

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.plan-card .plan-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.plan-card .plan-price {
    font-size: 36px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.plan-card .plan-period {
    font-size: 14px;
    color: #888;
    margin-bottom: 16px;
}

.plan-card .plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
    text-align: left;
}

.plan-card .plan-features li {
    padding: 8px 0;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.plan-card .plan-original {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
    margin-bottom: 12px;
}

.plan-card .plan-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #f0f0f0;
    color: var(--color-text);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.plan-card .plan-btn:hover,
.plan-card .plan-btn.primary {
    background: var(--color-primary);
    color: white;
}

/* Payment Modal */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.payment-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
    overflow: hidden;
}

.payment-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.payment-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.payment-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

.payment-modal-body {
    padding: 20px;
}

.payment-plan-info {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.payment-method-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.2s;
}

.payment-method-btn:hover {
    border-color: var(--color-primary);
    background: #f8f9fa;
}

.payment-icon {
    font-size: 24px;
}

.payment-name {
    font-weight: 500;
}

.payment-desc {
    font-size: 12px;
    color: #888;
}

/* Profile Form */
.profile-form {
    max-width: 500px;
}

.profile-item {
    margin-bottom: 20px;
}

.profile-item label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text);
}

.profile-item input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #f8f9fa;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 50px;
}

.btn-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
}

/* User Table Responsive */
.user-table-wrap {
    overflow-x: auto;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.success {
    background: #d4edda;
    color: #155724;
}

.btn-small {
    display: inline-block;
    padding: 6px 12px;
    background: var(--color-primary);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
}

.btn-browse {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 24px;
    background: var(--color-primary);
    color: white;
    border-radius: 8px;
    text-decoration: none;
}

.user-pagination {
    margin-top: 20px;
    text-align: center;
}

@media (min-width: 768px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .plans-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* Sidebar Donor Ranking */
.sidebar-donors {
    margin-bottom: 12px;
}

.donor-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.donor-row:last-child {
    border-bottom: none;
}

.donor-row .donor-rank {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    background: #f0f0f0;
    color: #666;
}

.donor-row .donor-rank.gold {
    background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
    color: white;
}

.donor-row .donor-rank.silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #a0a0a0 100%);
    color: white;
}

.donor-row .donor-rank.bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #b87333 100%);
    color: white;
}

.donor-row .donor-name {
    flex: 1;
    font-size: 13px;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.donor-row .donor-amt {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-primary);
}

.sidebar-link {
    display: block;
    text-align: center;
    color: var(--color-primary);
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 12px;
}

.donate-sidebar-btn {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
    padding: 10px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.donate-sidebar-btn:hover {
    opacity: 0.9;
}


/* =====================================================
   Table of Contents (TOC) Styles
   ===================================================== */
.toc-container {
    background: #F7FAF7;
    border: none;
    border-left: 4px solid var(--color-primary);
    border-radius: var(--border-radius);
    margin: 20px 0;
    padding: 0;
    box-shadow: none;
}

.toc-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: transparent;
    border-bottom: 1px solid rgba(56, 118, 29, 0.15);
    border-radius: 0;
}

.toc-icon {
    font-size: 18px;
    margin-right: 8px;
}

.toc-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--color-primary);
    flex: 1;
}

.toc-toggle {
    background: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.toc-toggle:hover {
    background: #e9ecef;
}

.toggle-icon {
    font-size: 16px;
    font-weight: bold;
    color: #666;
}

.toc-nav {
    padding: 10px 15px 15px;
}

.toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: toc-counter;
}

.toc-item {
    margin: 0;
    padding: 0;
}

.toc-link {
    display: block;
    padding: 6px 0;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    border-left: 2px solid transparent;
    padding-left: 10px;
    margin-left: -10px;
    transition: all 0.2s;
}

.toc-link:hover {
    color: var(--color-primary);
    background: #f0f9ed;
    border-left-color: var(--color-primary);
}

.toc-link.active {
    color: var(--color-primary);
    font-weight: 600;
    border-left-color: var(--color-primary);
    background: #f0f9ed;
}

/* Indentation for different heading levels */
.toc-level-2 .toc-link {
    padding-left: 10px;
}

.toc-level-3 .toc-link {
    padding-left: 25px;
    font-size: 13px;
}

.toc-level-4 .toc-link {
    padding-left: 40px;
    font-size: 12px;
    color: #777;
}

/* Numbering (optional) */
.toc-item.toc-level-2 {
    counter-increment: toc-counter;
}

.toc-level-2 .toc-link::before {
    content: counter(toc-counter) ". ";
    color: var(--color-primary);
    font-weight: 600;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .toc-container {
        margin: 15px 0;
    }
    
    .toc-header {
        padding: 10px 12px;
    }
    
    .toc-title {
        font-size: 14px;
    }
    
    .toc-nav {
        padding: 8px 12px 12px;
    }
    
    .toc-link {
        font-size: 13px;
        padding: 5px 0;
    }
    
    .toc-level-3 .toc-link {
        font-size: 12px;
        padding-left: 20px;
    }
    
    .toc-level-4 .toc-link {
        padding-left: 30px;
    }
    
    /* Footer mobile - hide extra columns */
    .footer-hide-mobile {
        display: none !important;
    }
    
    .footer-grid {
        grid-template-columns: 1fr !important;
    }
    
    .footer-main {
        text-align: center;
        padding: 20px 15px;
    }
    
    .footer-main h3 {
        margin-bottom: 10px;
    }
    
    .footer-main p {
        margin-bottom: 8px;
        font-size: 14px;
    }
}

/* Smooth scroll target highlight */
.article-body h2:target,
.article-body h3:target,
.article-body h4:target {
    animation: highlight-flash 1s ease;
}

@keyframes highlight-flash {
    0% { background-color: #fff3cd; }
    100% { background-color: transparent; }
}


/* =====================================================
   Newsletter Subscription Styles
   ===================================================== */
.newsletter-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2d5f17 100%);
    padding: 20px 0;
    margin-top: 20px;
}

.newsletter-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.newsletter-text h3 {
    color: white;
    font-size: 22px;
    margin: 0 0 8px;
    border: none;
    text-align: center;
}

.newsletter-text p {
    color: rgba(255,255,255,0.9);
    font-size: 14px;
    margin: 0;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 450px;
}

.newsletter-form input[type="email"] {
    padding: 14px 18px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    width: 100%;
}

.newsletter-form input[type="email"]:focus {
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

.newsletter-form button {
    padding: 14px 30px;
    background: var(--color-secondary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 48px;
}

.newsletter-form button:hover {
    background: #c4a57b;
    transform: translateY(-1px);
}

.newsletter-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.newsletter-msg {
    text-align: center;
    margin-top: 10px;
    min-height: 24px;
}

.newsletter-msg .success {
    color: #90EE90;
    font-weight: 500;
}

.newsletter-msg .error {
    color: #FFB6C1;
    font-weight: 500;
}

/* Tablet and Desktop */
@media (min-width: 768px) {
    .newsletter-section {
        padding: 40px 0;
    }
    
    .newsletter-content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    
    .newsletter-text {
        flex: 1;
    }
    
    .newsletter-text h3 {
        text-align: left;
        font-size: 24px;
    }
    
    .newsletter-text p {
        font-size: 15px;
    }
    
    .newsletter-form {
        flex-direction: row;
        gap: 0;
        max-width: 400px;
    }
    
    .newsletter-form input[type="email"] {
        border-radius: 8px 0 0 8px;
    }
    
    .newsletter-form button {
        border-radius: 0 8px 8px 0;
        white-space: nowrap;
    }
}
