/**
 * Blog Main Page Styles
 * Styling for blog grid layout on archive/main page
 * Hero section uses existing homepage hero styles
 *
 * @package TRDW
 * @since 1.0.0
 */

/* ========================================
   BLOG POSTS SECTION
   ======================================== */

.blog-posts-section {
    background-color: #f8f9fa;
}

.blog-posts-grid {
    margin-bottom: 2rem;
}

/* ========================================
   BLOG GRID CARDS
   ======================================== */

/* Blog Grid Card */
.blog-grid-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blog-grid-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.blog-grid-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Card Image */
.blog-grid-card__image {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: #e9ecef;
}

.blog-grid-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-grid-card:hover .blog-grid-card__image img {
    transform: scale(1.1);
}

/* Image Overlay */
.blog-grid-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.1) 50%,
        rgba(0, 0, 0, 0.4) 100%
    );
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.blog-grid-card:hover .blog-grid-card__overlay {
    opacity: 0.8;
}

/* Card Content */
.blog-grid-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-grid-card__title {
    font-weight: 700;
    color: #212529;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.blog-grid-card:hover .blog-grid-card__title {
    color: #004990;
}

.blog-grid-card__excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6c757d;
    flex: 1;
}

/* ========================================
   BLOG PAGINATION
   ======================================== */

.blog-pagination {
    display: flex;
    justify-content: center;
    padding-top: 2rem;
}

.blog-pagination .pagination {
    margin-bottom: 0;
}

.blog-pagination .page-link {
    color: #004990;
    border-color: #dee2e6;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.blog-pagination .page-item.active .page-link {
    background-color: #fdb913;
    border-color: #fdb913;
}

.blog-pagination .page-link:hover {
    color: #003366;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Tablet Styles */
@media (max-width: 991.98px) {
    .blog-grid-card__image {
        height: 220px;
    }
}

/* Mobile Styles */
@media (max-width: 767.98px) {
    .blog-grid-card__image {
        height: 200px;
    }
    
    .blog-grid-card__title {
        font-size: 1.1rem;
    }
    
    .blog-grid-card__excerpt {
        font-size: 0.9rem;
    }
}

/* Small Mobile */
@media (max-width: 575.98px) {
    .blog-grid-card__image {
        height: 180px;
    }
}

/* ========================================
   NO RESULTS / EMPTY STATE
   ======================================== */

.no-results.not-found {
    padding: 3rem 1rem;
}

.no-results .page-title {
    color: #212529;
    margin-bottom: 1rem;
}

.no-results .page-content {
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.blog-grid-card__link:focus {
    outline: 2px solid #004990;
    outline-offset: 2px;
}

/* Skip to content for screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}