/**
 * Blog Template - CSS Grid Layout (MBA NUS Style)
 * Clean, minimal blog layout matching MBA NUS design
 *
 * @package MSC_Biz
 * @since 1.2.14
 */

/* ==========================================================================
   Blog Posts Grid Container
   ========================================================================== */

.blog-posts {
    margin-bottom: 3rem;
    padding-top: 2rem;
}

@media (min-width: 992px) {
    .blog-posts {
        margin-bottom: 4rem;
    }
}

.blog-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Blog Grid - CSS Grid Layout */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    justify-items: center;
}

/* Tablet: 2 columns */
@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.875rem;
        justify-items: stretch;
    }
}

/* Desktop: 3 columns */
@media (min-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.875rem;
    }
}

/* ==========================================================================
   Blog Card Component
   ========================================================================== */

.blog-card {
    display: block;
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    border: none;
    overflow: hidden;
    transition: transform 0.2s ease;
    height: 100%;
    max-width: 400px;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

@media (min-width: 768px) {
    .blog-card {
        max-width: 100%;
    }
}

.blog-card:hover {
    transform: translateY(-3px);
    text-decoration: none;
}

.blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.blog-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Card Date (positioned below image) */
.blog-card-date {
    padding: 1rem 0 0.5rem;
    font-size: 0.813rem;
    color: #999;
    font-weight: 400;
}

/* Card Image */
.blog-card-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.02);
}

/* Card Body */
.blog-card-body {
    padding: 0 0 1.5rem;
    flex-grow: 1;
}

.blog-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 0.75rem;
    color: #000000;
}

.blog-card-excerpt {
    color: #333333;
    font-size: 0.938rem;
    line-height: 1.6;
    margin: 0;
}

/* Hide metadata elements (not used in MBA design) */
.blog-card-meta,
.blog-card-footer,
.blog-card-button {
    display: none;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.blog-pagination {
    margin-top: 3rem;
    padding-bottom: 2rem;
}

.blog-pagination nav {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

/* Target the UL container specifically */
.blog-pagination ul.page-numbers {
    display: flex;
    gap: 0.75rem;
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.blog-pagination ul.page-numbers li {
    list-style: none !important;
    list-style-type: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.blog-pagination ul.page-numbers li::before,
.blog-pagination ul.page-numbers li::after {
    display: none !important;
    content: none !important;
}

/* Override any WordPress or theme pagination styles */
.blog-pagination nav ul li,
nav[aria-label="Blog pagination"] ul li {
    list-style: none !important;
    list-style-type: none !important;
}

nav[aria-label="Blog pagination"] ul li::before,
nav[aria-label="Blog pagination"] ul li::after {
    display: none !important;
    content: none !important;
}

/* Target individual pagination links and current page */
.blog-pagination a.page-numbers,
.blog-pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    height: auto;
    padding: 0;
    background-color: transparent;
    color: #666666;
    text-decoration: none;
    border: none;
    border-radius: 0;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.blog-pagination a.page-numbers:hover {
    background-color: transparent;
    color: #000000;
    text-decoration: underline;
}

.blog-pagination span.page-numbers.current {
    background-color: transparent;
    color: #000000;
    font-weight: 700;
}

.blog-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    color: #999;
    cursor: default;
}

.blog-pagination .page-numbers.dots:hover {
    background: transparent;
    color: #999;
    text-decoration: none;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.blog-empty {
    text-align: center;
    padding: 4rem 1rem;
}

.blog-empty h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 1rem;
}

.blog-empty p {
    font-size: 1rem;
    color: #666;
}

/* ==========================================================================
   Responsive Typography
   ========================================================================== */

@media (max-width: 767px) {
    .blog-card-title {
        font-size: 1.063rem;
    }

    .blog-card-excerpt {
        font-size: 0.875rem;
    }

    .blog-card-date {
        font-size: 0.75rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .blog-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .blog-pagination {
        display: none;
    }
}
