/**
 * All Pages Template Styles
 * Modern, responsive grid layout for displaying all pages
 */

/* Page Header */
.all-pages-header {
    padding: 4rem 0 3rem;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.all-pages-header .section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.all-pages-header .badge-icon {
    font-size: 1.25rem;
}

.all-pages-header .page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.all-pages-header .page-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.all-pages-header .page-description {
    max-width: 700px;
    margin: 1rem auto 0;
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Pages Content Section */
.all-pages-content {
    padding: 3rem 0 4rem;
}

/* Pages Grid */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Page Card */
.page-card {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.page-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

/* Page Card Image */
.page-card-image {
    position: relative;
    width: 100%;
    padding-top: 60%; /* 5:3 aspect ratio */
    overflow: hidden;
    background: var(--background-light);
}

.page-card-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.page-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.page-card:hover .page-card-image img {
    transform: scale(1.05);
}

.page-card-image .page-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 100%);
}

.page-card-image .placeholder-icon {
    font-size: 3rem;
    opacity: 0.5;
}

/* Template Badge */
.page-template-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(37, 99, 235, 0.9);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
}

/* Page Card Content */
.page-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.page-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.page-card-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.page-card-title a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Page Meta */
.page-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.page-card-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.page-card-meta .meta-item svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Page Excerpt */
.page-card-excerpt {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 1.25rem;
    flex: 1;
}

/* Page Card Link */
.page-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: var(--transition);
    margin-top: auto;
}

.page-card-link:hover {
    gap: 0.75rem;
    text-decoration: none;
}

.page-card-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.page-card-link:hover svg {
    transform: translateX(4px);
}

/* No Pages Found */
.no-pages-found {
    text-align: center;
    padding: 4rem 2rem;
}

.no-content-icon {
    font-size: 5rem;
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.no-pages-found h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.no-pages-found p {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* Pagination */
.pagination-wrapper {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    background: var(--background);
}

.pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    text-decoration: none;
}

.pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination svg {
    width: 20px;
    height: 20px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .all-pages-header {
        padding: 3rem 0 2rem;
    }
    
    .all-pages-header .page-title {
        font-size: 2rem;
    }
    
    .all-pages-header .page-subtitle {
        font-size: 1rem;
    }
    
    .pages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .all-pages-content {
        padding: 2rem 0 3rem;
    }
    
    .page-card-content {
        padding: 1.25rem;
    }
}

@media (max-width: 480px) {
    .all-pages-header .page-title {
        font-size: 1.75rem;
    }
    
    .pagination a,
    .pagination span {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .page-card-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}
