/* archive-styles.css - Category, Archive, Search Styling */

/* Archive Containers */
.category-container,
.archive-container,
.search-container {
    margin-top: 100px;
    margin-bottom: 4rem;
}

/* Archive Headers */
.category-header,
.archive-header,
.search-header {
    margin-bottom: 3rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.category-title,
.archive-title,
.search-title {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1rem;
}

.search-title span {
    color: #00A676;
}

.category-description,
.archive-description {
    color: #bbb;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 800px;
}

.category-meta,
.search-info {
    color: #888;
    font-size: 0.95rem;
}

/* Grid Layouts */
.category-grid,
.archive-grid,
.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Post Cards */
.category-post,
.archive-post,
.search-result {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 166, 118, 0.1);
}

.category-post:hover,
.archive-post:hover,
.search-result:hover {
    transform: translateY(-5px);
    border-color: #00A676;
    box-shadow: 0 15px 40px rgba(0, 166, 118, 0.2);
}

/* Post Images */
.post-image,
.result-image {
    height: 200px;
    overflow: hidden;
}

.post-image img,
.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-post:hover .post-image img,
.archive-post:hover .post-image img,
.search-result:hover .result-image img {
    transform: scale(1.05);
}

/* Post Content */
.post-content,
.result-content {
    padding: 1.5rem;
}

.post-meta,
.result-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.post-category,
.result-category {
    background: rgba(0, 166, 118, 0.15);
    color: #00A676;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.post-category:hover,
.result-category:hover {
    background: #00A676;
    color: white;
}

.post-date,
.result-date {
    color: #888;
}

.post-title,
.result-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-title a,
.result-title a {
    color: white;
    text-decoration: none;
}

.post-title a:hover,
.result-title a:hover {
    color: #00A676;
}

.post-excerpt,
.result-excerpt {
    color: #bbb;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Post Footer */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.read-more-btn {
    background: rgba(0, 166, 118, 0.15);
    color: #00A676;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    background: #00A676;
    color: white;
    transform: translateY(-2px);
}

.post-views {
    color: #ffd700;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Search Specific */
.search-result {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.result-image {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    border-radius: 8px;
}

.result-content {
    flex: 1;
    padding: 0;
}

/* No Results */
.no-posts-found,
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.no-posts-found h2,
.no-results h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.no-posts-found p,
.no-results p {
    color: #bbb;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.search-form-container {
    max-width: 500px;
    margin: 0 auto;
}

.search-form-container form {
    display: flex;
    gap: 0.5rem;
}

.search-form-container input[type="search"] {
    flex: 1;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 166, 118, 0.3);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

.search-form-container input[type="submit"] {
    background: #00A676;
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-form-container input[type="submit"]:hover {
    background: #008f63;
    transform: translateY(-2px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.page-numbers {
    display: inline-block;
    padding: 0.6rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: #ddd;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    transition: all 0.3s ease;
}

.page-numbers:hover {
    background: rgba(0, 166, 118, 0.2);
    color: white;
}

.page-numbers.current {
    background: #00A676;
    color: white;
}

/* Connection Error */
.connection-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.connection-error h3 {
    color: #ff6b6b;
    margin-bottom: 1rem;
}

.connection-error p {
    color: #ddd;
    margin-bottom: 1rem;
}

.connection-error ol {
    margin-left: 1.5rem;
    color: #bbb;
}

.connection-error li {
    margin-bottom: 0.5rem;
}

.connection-error code {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    color: #ffd700;
}

/* Responsive */
@media (max-width: 992px) {
    .category-title,
    .archive-title,
    .search-title {
        font-size: 2.2rem;
    }
    
    .category-grid,
    .archive-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .category-container,
    .archive-container,
    .search-container {
        margin-top: 80px;
        padding: 0 1rem;
    }
    
    .category-title,
    .archive-title,
    .search-title {
        font-size: 2rem;
    }
    
    .category-grid,
    .archive-grid,
    .search-results {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .search-result {
        flex-direction: column;
    }
    
    .result-image {
        width: 100%;
        height: 180px;
    }
    
    .post-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .read-more-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .category-title,
    .archive-title,
    .search-title {
        font-size: 1.7rem;
    }
    
    .post-meta,
    .result-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .pagination {
        flex-wrap: wrap;
    }
    
    .search-form-container form {
        flex-direction: column;
    }
    
    .search-form-container input[type="submit"] {
        width: 100%;
    }
}