/* Modern styling for Pages List template */

body.page-template-page-pages {
    background: radial-gradient(circle at top left, #0f172a 0, #020617 40%, #020617 100%);
}

/* Container */
.pages-container {
    max-width: 1120px;
    margin: 2.5rem auto;
    padding: clamp(1.75rem, 4vw, 2.5rem);
    background-color: #ffffff;
    border-radius: 18px;
    box-shadow:
        0 24px 55px rgba(15, 23, 42, 0.40),
        0 0 0 1px rgba(15, 23, 42, 0.32);
    font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0f172a;
}

/* Title */
.pages-title {
    font-size: clamp(2rem, 3vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 1.75rem;
}

/* Grid */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.4rem;
}

/* Individual page card */
.page-card {
    position: relative;
    padding: 1.15rem 1.2rem 1.3rem;
    border-radius: 16px;
    background: radial-gradient(circle at top left, #ffffff 0, #f9fafb 50%, #ffffff 100%);
    border: 1px solid rgba(148, 163, 184, 0.55);
    box-shadow:
        0 18px 38px rgba(15, 23, 42, 0.16),
        0 0 0 1px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition:
        transform 0.18s ease-out,
        box-shadow 0.18s ease-out,
        border-color 0.18s ease-out;
}

.page-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow:
        0 26px 55px rgba(15, 23, 42, 0.26),
        0 0 0 1px rgba(37, 99, 235, 0.4);
}

/* Page title link */
.page-title.page-link {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.4rem;
}

.page-title.page-link a {
    color: #0f172a;
    text-decoration: none;
    position: relative;
    padding-bottom: 0.1rem;
}

.page-title.page-link a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.12rem;
    width: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e, #3b82f6);
    transition: width 0.2s ease-out;
}

.page-card:hover .page-title.page-link a::after {
    width: 100%;
}

/* Excerpt */
.page-excerpt {
    margin: 0.2rem 0 0.4rem;
    font-size: 0.9rem;
    color: #4b5563;
}

/* Page meta (if any) */
.page-meta {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    height: 2.1rem;
    margin: 0 0.15rem;
    border-radius: 999px;
    font-size: 0.85rem;
    text-decoration: none;
    border: 1px solid rgba(148, 163, 184, 0.7);
    color: #0f172a;
    background-color: #f9fafb;
    transition:
        background-color 0.16s ease-out,
        color 0.16s ease-out,
        border-color 0.16s ease-out,
        transform 0.16s ease-out;
}

.pagination .page-numbers:hover {
    background-color: #2563eb;
    color: #f9fafb;
    border-color: #2563eb;
    transform: translateY(-1px);
}

.pagination .page-numbers.pages-pagination .page-numbers.current {
    background: linear-gradient(135deg, #22c55e, #3b82f6);
    color: #f9fafb;
    border-color: transparent;
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.45);
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .pages-container {
        margin: 1.75rem auto;
        padding: 1.4rem 1.1rem 1.55rem;
        border-radius: 16px;
    }

    .pages-grid {
        gap: 1rem;
    }

    .page-card {
        padding: 1rem 1.05rem 1.1rem;
    }
}
