/* Blog Page Container */
.blog-page {
    padding-top: 100px;
    padding-bottom: 60px;
}

/* Blog Header */
.blog-header {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeInDown 0.8s ease-in-out;
}

.blog-main-title {
    font-size: 3rem;
    font-weight: 800;
    color: #ff7a42;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
}

.blog-subtitle {
    font-size: 1.2rem;
    color: #5A3E36;
    margin-bottom: 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Category Filter */
.blog-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 0;
    margin-bottom: 50px;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #5A3E36;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
}

.filter-btn:hover {
    border-color: #ff7a42;
    background: rgba(255, 122, 66, 0.05);
    transform: translateY(-2px);
    box-shadow: none;
}

.filter-btn.active {
    background: linear-gradient(135deg, #ff7a42, #ff9966);
    border-color: #ff7a42;
    color: white;
    box-shadow: none;
}

.filter-btn i {
    font-size: 1.1rem;
}

/* Search Bar */
.blog-search {
    max-width: 600px;
    margin: 50px auto 25px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 20px;
    font-size: 1.2rem;
    color: #ff7a42;
}

.search-box input {
    width: 100%;
    padding: 16px 20px 16px 55px;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.search-box input:focus {
    outline: none;
    border-color: #ff7a42;
    box-shadow: 0 4px 20px rgba(255, 122, 66, 0.15);
}

.search-box input::placeholder {
    color: #999;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    text-decoration: none;
    color: inherit;
    border: 2px solid rgba(255, 122, 66, 0.6);   /* 卡片邊框 */
}

.blog-card::after {
    content: none;
}

.blog-card:hover::after {
    opacity: 0;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: none;
    text-decoration: none;
    color: inherit;
    border-color: #ff7a42;  /* 卡片邊框 */
}

/* Blog Card Image */
.blog-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.blog-badge.product {
    background: linear-gradient(135deg, #ff7a42, #ff9966);
}

.blog-badge.cooking {
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
}

.blog-badge.health {
    background: linear-gradient(135deg, #2196F3, #42A5F5);
}

.blog-badge.technology {
    background: linear-gradient(135deg, #9C27B0, #BA68C8);
}

.blog-badge.news {
    background: linear-gradient(135deg, #607D8B, #78909C);
}

/* Blog Card Content */
.blog-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.85rem;
    color: #999;
}

.blog-card-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-card-meta i {
    color: #ff7a42;
}

.blog-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #5A3E36;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Blog Card Footer */
.blog-card-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff7a42, #ff9966);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.author-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #5A3E36;
}

.blog-read-more {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ff7a42;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.blog-read-more:hover {
    gap: 12px;
    color: #ff8c5a;
}

.blog-read-more i {
    transition: transform 0.3s ease;
}

.blog-read-more:hover i {
    transform: translateX(4px);
}

/* No Results */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.no-results i {
    font-size: 4rem;
    color: #e0e0e0;
    margin-bottom: 20px;
}

.no-results h3 {
    font-size: 1.5rem;
    color: #5A3E36;
    margin-bottom: 10px;
}

.no-results p {
    font-size: 1rem;
    color: #999;
}

/* Pagination */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
    margin-bottom: 30px;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
}

.pagination-btn:hover:not(:disabled) {
    background: #ff7a42;
    color: white;
    border-color: #ff7a42;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 122, 66, 0.3);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f5f5;
}

.pagination-btn i {
    font-size: 0.85rem;
}

.pagination-numbers {
    display: flex;
    gap: 8px;
}

.pagination-number {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
}

.pagination-number:hover {
    background: #fff5f2;
    border-color: #ff7a42;
    color: #ff7a42;
    transform: translateY(-2px);
}

.pagination-number.active {
    background: linear-gradient(135deg, #ff7a42, #ff9966);
    color: white;
    border-color: #ff7a42;
    box-shadow: 0 4px 12px rgba(255, 122, 66, 0.3);
}

/* Dark Theme - Blog Page */
body.dark-theme .blog-main-title {
    color: #ff7a42;
}

body.dark-theme .blog-subtitle {
    color: #e0e0e0;
}

body.dark-theme .filter-btn {
    background: #2a2a2a;
    border-color: #505050;
    color: #e0e0e0;
}

body.dark-theme .filter-btn:hover {
    background: rgba(255, 122, 66, 0.15);
    border-color: #ff7a42;
}

body.dark-theme .filter-btn.active {
    background: linear-gradient(135deg, #ff7a42, #ff9966);
    color: white;
}

body.dark-theme .search-box input {
    background: #2a2a2a;
    border-color: #505050;
    color: #e0e0e0;
}

body.dark-theme .search-box input::placeholder {
    color: #777;
}

body.dark-theme .pagination-btn {
    background: #2a2a2a;
    border-color: #505050;
    color: #e0e0e0;
}

body.dark-theme .pagination-btn:hover:not(:disabled) {
    background: #ff7a42;
    color: white;
    border-color: #ff7a42;
}

body.dark-theme .pagination-btn:disabled {
    background: #1a1a1a;
    opacity: 0.3;
}

body.dark-theme .pagination-number {
    background: #2a2a2a;
    border-color: #505050;
    color: #e0e0e0;
}

body.dark-theme .pagination-number:hover {
    background: rgba(255, 122, 66, 0.15);
    border-color: #ff7a42;
    color: #ff7a42;
}

body.dark-theme .pagination-number.active {
    background: linear-gradient(135deg, #ff7a42, #ff9966);
    color: white;
    border-color: #ff7a42;
}

body.dark-theme .blog-card {
    background: #2a2a2a;
    box-shadow: none;
}

body.dark-theme .blog-card::after {
    content: none;
    background: transparent;
}

body.dark-theme .blog-card:hover {
    box-shadow: none;
    border-color: rgba(255, 122, 66, 0.6);
}

body.dark-theme .blog-card-title {
    color: #e0e0e0;
}

body.dark-theme .blog-card-excerpt {
    color: #b0b0b0;
}

body.dark-theme .blog-card-meta {
    color: #777;
}

body.dark-theme .author-name {
    color: #e0e0e0;
}

body.dark-theme .blog-card-footer {
    border-top-color: #404040;
}

body.dark-theme .no-results h3 {
    color: #e0e0e0;
}

body.dark-theme .no-results i {
    color: #505050;
}

/* Responsive - Blog Page */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .blog-page {
        padding-top: 90px;
        padding-bottom: 40px;
    }
    
    .blog-main-title {
        font-size: 2.2rem;
    }
    
    .blog-subtitle {
        font-size: 1rem;
        margin-bottom: 0;
    }
    
    .blog-search {
        margin: 30px auto 20px;
    }
    
    .blog-filter {
        gap: 10px;
        margin-bottom: 30px;
    }
    
    .filter-btn {
        padding: 8px 14px;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .filter-btn i {
        font-size: 1rem;
        margin-right: 4px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-card-image {
        height: 200px;
    }
    
    .blog-card-content {
        padding: 20px;
    }
    
    .blog-card-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .blog-main-title {
        font-size: 1.8rem;
    }
    
    .blog-subtitle {
        font-size: 0.95rem;
    }
    
    .blog-search {
        margin: 25px auto 15px;
    }
    
    .blog-filter {
        margin-bottom: 25px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
    }
    
    .blog-filter::-webkit-scrollbar {
        height: 4px;
    }
    
    .blog-filter::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 2px;
    }
    
    .blog-filter::-webkit-scrollbar-thumb {
        background: rgba(255, 122, 66, 0.5);
        border-radius: 2px;
    }
    
    .blog-filter::-webkit-scrollbar-thumb:hover {
        background: rgba(255, 122, 66, 0.8);
    }
    
    .search-box input {
        padding: 14px 18px 14px 50px;
        font-size: 0.9rem;
    }
    
    .filter-btn {
        padding: 8px 14px;
    }
    
    .blog-card-image {
        height: 180px;
    }
    
    .blog-card-content {
        padding: 18px;
    }
    
    .blog-card-title {
        font-size: 1.1rem;
    }
    
    .blog-card-excerpt {
        font-size: 0.9rem;
    }
    
    .pagination-container {
        gap: 6px;
        margin-top: 40px;
    }
    
    .pagination-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .pagination-btn .btn-text {
        display: none;
    }
    
    .pagination-number {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}
