/**
 * Archive Page Styles
 * Sustainable Practice Website - Article Archive
 * 
 * @version 0.1.0 - Initial archive page styles
 * 
 * CHANGELOG:
 * 0.1.0 - Extracted archive-specific styles from suspra.css
 *         - Archive header section styling
 *         - Search and filter controls
 *         - Article grid layout
 *         - Responsive design
 */

/* ========================================
   ARCHIVE PAGE STYLES
   ======================================== */

/* Archive Header Section */
.archive-header-section {
    padding: 15px 0 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(139, 69, 19, 0.1);
}

.archive-header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

/* Archive navigation styling */
.archive-navigation {
    text-align: left;
    margin-bottom: 0.75rem;
}

.back-to-library-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--forest-green) !important;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0;
}

.back-to-library-link:hover {
    color: var(--earth-brown) !important;
    text-decoration: none;
}

.back-to-library-link i {
    font-size: 1rem;
}

.archive-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--forest-green);
    margin-bottom: 0.25rem;
    line-height: 1.2;
}

.archive-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    display: inline;
}

.archive-header-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.archive-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--forest-green);
    line-height: 1;
}

.stat-label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Articles Section */
.articles-section {
    padding: 1.5rem 0;
    min-height: 60vh;
}

.articles-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Archive Controls */
.archive-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius-large);
    border: 1px solid rgba(139, 69, 19, 0.1);
}

.search-container {
    width: 100%;
}

.search-input-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 2px solid rgba(139, 69, 19, 0.2);
    border-radius: var(--border-radius-medium);
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--forest-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.clear-search-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: rgba(139, 69, 19, 0.1);
    color: var(--forest-green);
}

/* Filter Controls */
.filter-container {
    display: flex;
    justify-content: center;
}

.pathway-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid rgba(139, 69, 19, 0.2);
    background: white;
    color: var(--text-primary);
    border-radius: var(--border-radius-medium);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--forest-green);
    background: rgba(46, 125, 50, 0.05);
}

.filter-btn.active {
    background: var(--forest-green);
    color: white;
    border-color: var(--forest-green);
}

/* Results Summary */
.results-summary {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Articles List (for static archive index) */
.articles-list {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
}

.archive-entry {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(139, 69, 19, 0.1);
    border-radius: var(--border-radius-medium);
    padding: 0;
    margin-bottom: 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.archive-entry:hover {
    border-color: var(--forest-green);
}

.archive-entry-inner {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 140px;
}

/* Article Image */
.article-image-wrapper {
    flex-shrink: 0;
    width: 180px;
    min-height: 140px;
    overflow: hidden;
    background: rgba(139, 69, 19, 0.05);
    position: relative;
}

.article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Article Content */
.article-content {
    flex: 1;
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.archive-entry .article-header {
    margin-bottom: 0.5rem;
}

.archive-entry .article-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.archive-entry .article-title-link {
    color: inherit;
    text-decoration: none;
}

.archive-entry .article-title-link:hover {
    color: var(--forest-green);
    text-decoration: none;
}

.archive-entry .article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.archive-entry .article-pathways {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.archive-entry .article-excerpt {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 0.25rem;
    flex-grow: 1;
    font-size: 0.875rem;
}

/* Articles Grid */
.articles-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.article-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 69, 19, 0.1);
    border-radius: var(--border-radius-large);
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-color: var(--forest-green);
}

.article-card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-header {
    margin-bottom: 1rem;
}

.article-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.article-title-link {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
}

.article-title-link:hover {
    color: var(--forest-green);
    text-decoration: none;
}

.article-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.75rem;
}

.pathway-badge {
    background: var(--forest-green);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-small);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-date,
.article-read-time {
    color: var(--text-secondary);
}

.article-excerpt {
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.article-actions {
    margin-top: auto;
    text-align: center;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-results svg {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.no-results p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 2rem;
}

.load-more-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
}

/* Responsive Design */
@media (min-width: 1024px) {
    .archive-header-meta {
        gap: 1.5rem;
    }
    
    .archive-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .archive-title {
        font-size: 1.5rem;
    }
    
    .archive-header-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .archive-subtitle {
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .archive-stats {
        gap: 2rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .archive-controls {
        padding: 1.5rem;
    }
    
    .articles-grid-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .pathway-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    /* Mobile: Stack image above content */
    .archive-entry-inner {
        flex-direction: column;
        min-height: auto;
    }
    
    .article-image-wrapper {
        width: 100%;
        height: 160px;
        min-height: 160px;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    .archive-entry .article-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .archive-header-container,
    .articles-container {
        padding: 0 1rem;
    }
    
    .archive-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .search-input-wrapper {
        max-width: 100%;
    }
    
    .pathway-filters {
        justify-content: flex-start;
    }
    
    .article-image-wrapper {
        height: 140px;
        min-height: 140px;
    }
    
    .article-content {
        padding: 0.875rem;
    }
    
    .archive-entry {
        margin-bottom: 0;
    }
}

/* ========================================
   BUTTON STYLING OVERRIDES
   ======================================== */

/* Article page button styling overrides */
.article-page .btn-secondary {
    background-color: var(--forest-green);
    color: #FFFFFF;
    border-color: var(--forest-green);
    border: 2px solid var(--forest-green);
}

.article-page .btn-secondary:hover {
    background-color: var(--earth-brown);
    color: #FFFFFF;
    border-color: var(--earth-brown);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}

/* Archive page button styling overrides */
.archive-page .btn-secondary {
    background-color: var(--forest-green);
    color: #FFFFFF;
    border-color: var(--forest-green);
    border: 2px solid var(--forest-green);
}

.archive-page .btn-secondary:hover {
    background-color: var(--earth-brown);
    color: #FFFFFF;
    border-color: var(--earth-brown);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 69, 19, 0.3);
}
