/* Styles extracted from pages/html/blogs.html <style> block */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}
.blog-header {
    background: linear-gradient(135deg, #00BCD4 0%, #0097A7 100%);
    color: white;
    padding: 4rem 1rem 3rem;
    text-align: center;
}
.blog-title {
    font-size: 3rem;
    font-weight: 700;
    margin: 0 0 1rem;
}
.blog-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    padding: 3rem 0;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center; /* Căn giữa các cards */
}
.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    max-width: 380px; /* Giảm để fit 3 cards trên 1 hàng */
    margin: 0 auto; /* Căn giữa khi chỉ có 1 card */
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}
.blog-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #00BCD4 0%, #0097A7 100%);
    position: relative;
    overflow: hidden;
}
.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}
.blog-category {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 188, 212, 0.95);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.blog-content {
    padding: 2rem;
}
.blog-card-title {
    color: #263238;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
}
.blog-excerpt {
    color: #546E7A;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.blog-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}
.author-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00BCD4 0%, #0097A7 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
}
.author-name {
    font-weight: 600;
    color: #263238;
    font-size: 0.9375rem;
}
.author-role {
    color: #78909C;
    font-size: 0.8125rem;
}
.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #ECEFF1;
    font-size: 0.875rem;
    color: #78909C;
}
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: #00BCD4;
    border: 2px solid #00BCD4;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    margin: 2rem auto;
    display: block;
    width: fit-content;
}
.back-button:hover {
    background: #00BCD4;
    color: white;
}
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}
.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}
.modal-header {
    padding: 2rem;
    border-bottom: 1px solid #ECEFF1;
    position: relative;
}
.modal-title {
    margin: 0;
    color: #263238;
    font-size: 1.75rem;
    font-weight: 700;
}
.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #78909C;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-close:hover {
    background: #f5f5f5;
}
.modal-body {
    padding: 2rem;
}
.story-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #263238;
}
.story-content p {
    margin-bottom: 1.5rem;
}
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0 2rem;
}
.pagination-btn {
    padding: 0.75rem 1rem;
    border: 2px solid #E0E6EA;
    background: white;
    color: #607D8B;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 44px;
    text-align: center;
}
.pagination-btn:hover {
    border-color: #00BCD4;
    color: #00BCD4;
}
.pagination-btn.active {
    background: #00BCD4;
    border-color: #00BCD4;
    color: white;
}
.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.pagination-info {
    margin: 0 1rem;
    color: #78909C;
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 2rem 0;
    }
    .blog-card {
        max-width: 100%;
        margin: 0;
    }
    .blog-title {
        font-size: 2rem;
    }
    .blog-subtitle {
        font-size: 1.125rem;
    }
    .pagination-container {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .pagination-btn {
        padding: 0.5rem 0.75rem;
        min-width: 36px;
        font-size: 0.875rem;
    }
    .pagination-info {
        width: 100%;
        text-align: center;
        margin: 0.5rem 0 0 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    .blog-header {
        padding: 3rem 1rem 2rem;
    }
    .blog-title {
        font-size: 1.75rem;
    }
}
