/* Homepage - bsgiadinh.vn */

/* === Layout === */
.vertical-section { width: 100%; margin: 40px 0; padding: 30px 0; display: block; clear: both }
.vertical-section:nth-child(even) { background: #f5f9fc }
.section-wrapper { max-width: 1200px; margin: 0 auto; padding: 0 20px }
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; padding-bottom: 15px; border-bottom: 3px solid #0d6eaf }
.section-head h2 { font-size: 24px; font-weight: 700; color: #0d6eaf; margin: 0 }
.section-head a { font-size: 13px; color: #e67e22; text-decoration: none; font-weight: 600; transition: color 0.2s }
.section-head a:hover { color: #d35400; text-decoration: underline }

/* === Grid === */
.posts-row {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 25px !important;
    min-height: 280px;
}
@media (max-width: 1024px) { .posts-row { grid-template-columns: repeat(3, 1fr) !important } }
@media (max-width: 768px) { .posts-row { grid-template-columns: repeat(2, 1fr) !important; gap: 15px !important } .section-head h2 { font-size: 20px } }
@media (max-width: 480px) { .posts-row { grid-template-columns: 1fr !important; gap: 15px !important } }

/* === Cards === */
.post-card {
    background: #fff; border-radius: 10px; overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: opacity .5s ease, transform .5s ease, box-shadow .3s ease;
}
.post-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); transform: translateY(-4px) !important }
.post-card-img { width: 100%; height: 200px; object-fit: cover; display: block; transition: transform .4s ease }
.post-card:hover .post-card-img { transform: scale(1.03) }
.post-card-content { padding: 15px }
.post-card-title {
    font-size: 15px; font-weight: 600; margin: 0 0 8px; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-title a { color: #333; text-decoration: none; transition: color .2s }
.post-card-title a:hover { color: #0d6eaf }
.post-card-excerpt {
    font-size: 13px; color: #666; margin: 0 0 10px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #999 }
.post-card-badge { background: #0d6eaf; color: #fff; padding: 3px 8px; border-radius: 3px; font-size: 11px; white-space: nowrap }

/* === Pagination === */
.pagination { display: flex; gap: 6px; margin-top: 25px; justify-content: center; flex-wrap: wrap; align-items: center }
.pagination button {
    padding: 8px 14px; border: 2px solid #0d6eaf; background: #eef5fb; color: #0d6eaf;
    cursor: pointer; border-radius: 6px; font-size: 14px; font-weight: 600;
    transition: all .25s ease; user-select: none; min-width: 38px;
}
.pagination button.active { background: #0d6eaf; color: #fff; border-color: #0d6eaf; transform: scale(1.08); box-shadow: 0 2px 8px rgba(13,110,175,.3) }
.pagination button:hover:not(:disabled):not(.active) { background: #e67e22; color: #fff; border-color: #e67e22; transform: scale(1.05) }
.pagination button:disabled { opacity: .5; cursor: default; border-color: #aaa; color: #aaa; background: #f5f5f5 }
.pagination button:active:not(:disabled) { transform: scale(.95) }

/* === Loading === */
.loading-section { min-height: 300px; display: flex; align-items: center; justify-content: center; color: #999; font-size: 16px; transition: opacity .3s ease }

/* === Mobile === */
@media (max-width: 768px) { .post-card-img { height: 160px } .pagination button { padding: 6px 10px; font-size: 13px; min-width: 32px } }
@media (max-width: 480px) { .post-card-img { height: 200px } .vertical-section { margin: 25px 0; padding: 20px 0 } }

/* === GeneratePress Layout Override === */
.page-template-template-homepage .site-content,
.page-template-template-homepage .content-area,
.page-template-template-homepage .site-main,
.page-template-template-homepage #primary,
.page-template-template-homepage .inside-article,
.page-template-template-homepage .entry-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
}
.page-template-template-homepage .sidebar,
.page-template-template-homepage aside,
.page-template-template-homepage #secondary,
.page-template-template-homepage .widget-area {
    display: none !important;
}
.page-template-template-homepage .article-holder,
.page-template-template-homepage article.page {
    width: 100% !important;
    max-width: 100% !important;
}
.page-template-template-homepage .grid-container {
    max-width: 100% !important;
    padding: 0 !important;
}
