/**
 * Blog Archive Styles
 *
 * First-class blog archive styling including controls, grid, and cards.
 * Header styles are managed by dynamic-css.php for consistency across templates.
 *
 * @package Videohub360_Theme
 * @since 1.4.0
 */

/* ==========================================================================
   Blog Archive Template Wrapper
   ========================================================================== */

.vh360-blog-archive {
    background: var(--bg-color, #f9fafb);
    min-height: 100vh;
    padding-bottom: 4rem;
}

/* Container - matching other templates */
.vh360-blog-archive .vh360-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Ensure spacing when template header is disabled */
.vh360-blog-archive.vh360-template-header-off {
    padding-top: 50px;
}

/* ==========================================================================
   Blog Archive Header - Typography Only
   ========================================================================== */

/* vh360-blog-header background/color/padding are inherited from dynamic-css.php */

.vh360-blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.vh360-blog-title svg {
    flex-shrink: 0;
}

.vh360-blog-description {
    font-size: 1.125rem;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

.vh360-blog-description p {
    margin: 0;
}

/* ==========================================================================
   Blog Controls
   ========================================================================== */

.vh360-blog-controls {
    background: transparent;
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.vh360-blog-controls-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .vh360-blog-controls-row {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        align-items: end;
    }
}

/* Search */
.vh360-blog-search {
    position: relative;
}

.vh360-blog-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s;
}

.vh360-blog-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Filters */
.vh360-blog-filter {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vh360-blog-filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.vh360-blog-select {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s;
}

.vh360-blog-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Results Count */
.vh360-blog-results-count {
    font-size: 0.875rem;
    color: #6b7280;
    padding-top: 0.5rem;
}

/* ==========================================================================
   Blog Results Container
   ========================================================================== */

.vh360-blog-results-container {
    position: relative;
    min-height: 400px;
}

/* Loading State */
.vh360-blog-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.vh360-blog-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e5e7eb;
    border-top-color: #667eea;
    border-radius: 50%;
    animation: vh360-spin 0.8s linear infinite;
}

@keyframes vh360-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Blog Post List
   ========================================================================== */

.vh360-blog-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .vh360-blog-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .vh360-blog-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   Blog Post Card
   ========================================================================== */

.vh360-blog-card {
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.vh360-blog-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

/* Card Image */
.vh360-blog-card-image {
    position: relative;
    overflow: hidden;
    background: #f3f4f6;
    aspect-ratio: 16 / 9;
}

.vh360-blog-card-image a {
    display: block;
    height: 100%;
}

.vh360-blog-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.vh360-blog-card:hover .vh360-blog-thumbnail {
    transform: scale(1.05);
}

/* Card Content */
.vh360-blog-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Categories */
.vh360-blog-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.vh360-blog-category-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.vh360-blog-category-tag:hover {
    background: #c7d2fe;
    color: #3730a3;
}

/* Title */
.vh360-blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 0.75rem;
}

.vh360-blog-card-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.vh360-blog-card-title a:hover {
    color: #667eea;
}

/* Meta */
.vh360-blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.vh360-blog-card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.vh360-blog-card-meta-item svg {
    flex-shrink: 0;
}

.vh360-blog-card-meta-item a {
    color: #6b7280;
    text-decoration: none;
    transition: color 0.2s;
}

.vh360-blog-card-meta-item a:hover {
    color: #111827;
}

/* Excerpt */
.vh360-blog-card-excerpt {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 1.25rem;
    flex: 1;
}

/* Footer */
.vh360-blog-card-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.vh360-blog-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #667eea;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s;
}

.vh360-blog-card-link:hover {
    color: #4c51bf;
    gap: 0.75rem;
}

.vh360-blog-card-link svg {
    transition: transform 0.2s;
}

.vh360-blog-card-link:hover svg {
    transform: translateX(4px);
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.vh360-blog-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vh360-blog-empty-icon {
    margin-bottom: 1.5rem;
    color: #d1d5db;
}

.vh360-blog-empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem;
}

.vh360-blog-empty-text {
    font-size: 1rem;
    color: #6b7280;
    max-width: 500px;
    margin: 0 auto;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.vh360-blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.vh360-blog-pagination .page-numbers {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.vh360-blog-pagination .page-numbers li {
    margin: 0;
}

.vh360-blog-pagination a,
.vh360-blog-pagination .current {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
}

.vh360-blog-pagination a:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.vh360-blog-pagination .current {
    background: #667eea;
    border-color: #667eea;
    color: #fff;
}

.vh360-blog-pagination .dots {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    color: #9ca3af;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 767px) {
    .vh360-blog-header {
        padding: 2rem 0 1.5rem;
    }
    
    .vh360-blog-title {
        font-size: 1.875rem;
    }
    
    .vh360-blog-description {
        font-size: 1rem;
    }
    
    .vh360-blog-list {
        gap: 1.5rem;
    }
}

@media (max-width: 479px) {
    .vh360-blog-title {
        font-size: 1.5rem;
        gap: 0.5rem;
    }
    
    .vh360-blog-title svg {
        width: 24px;
        height: 24px;
    }
}
