/*
Theme Name: CG News Cards
Description: Child theme of Twenty Twenty-Five — dark navy news-card grid for the ContentGenerator test receivers (test1/2/3.onlyseo.team).
Template: twentytwentyfive
Version: 1.0.0
Author: artemsoldatov
Text Domain: cg-news-cards
*/

/* ---------- global ---------- */

body {
    background: linear-gradient(180deg, #0a1a33 0%, #0c2142 55%, #0a1a33 100%);
    background-attachment: fixed;
}

/* page heading above the grid */
.news-page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.news-page-subtitle {
    color: var(--wp--preset--color--accent-5);
}

/* ---------- card grid ---------- */

ul.news-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem !important;
    padding: 0;
    margin: 2.25rem 0 0;
    list-style: none;
}

ul.news-grid > li {
    margin: 0;
}

/* ---------- card ---------- */

.news-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--wp--preset--color--accent-2);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
    border-color: rgba(88, 166, 255, 0.4);
}

.news-card .wp-block-post-featured-image {
    margin: 0;
}

.news-card .wp-block-post-featured-image img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.news-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.65rem;
    padding: 1.1rem 1.2rem 1.25rem;
}

/* ---------- meta row ---------- */

.news-meta {
    gap: 0.5rem 0.9rem !important;
    align-items: center;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wp--preset--color--accent-5);
}

.news-meta .news-author::before {
    content: "Автор: ";
    opacity: 0.7;
}

.news-meta .news-author,
.news-meta .news-date {
    color: var(--wp--preset--color--accent-5);
}

.news-meta .news-cat a {
    display: inline-block;
    padding: 0.18em 0.7em;
    background: rgba(88, 166, 255, 0.14);
    border-radius: 999px;
    color: var(--wp--preset--color--accent-1);
    text-decoration: none;
}

.news-meta .news-cat a:hover {
    background: rgba(88, 166, 255, 0.28);
}

/* ---------- title / excerpt / tags ---------- */

.news-card .wp-block-post-title {
    margin: 0;
    font-size: 1.18rem;
    font-weight: 650;
    line-height: 1.35;
}

.news-card .wp-block-post-title a {
    color: var(--wp--preset--color--contrast);
    text-decoration: none;
}

.news-card .wp-block-post-title a:hover {
    color: var(--wp--preset--color--accent-1);
}

.news-excerpt .wp-block-post-excerpt__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.55;
    color: #c4d3ea;
}

.news-tags {
    font-size: 0.78rem;
    color: var(--wp--preset--color--accent-5);
}

.news-tags a {
    color: var(--wp--preset--color--accent-5);
    text-decoration: none;
}

.news-tags a:hover {
    color: var(--wp--preset--color--accent-1);
}

/* ---------- read more ---------- */

.news-readmore {
    margin-top: auto;
    align-self: flex-start;
    padding: 0.45em 1.15em;
    border: 1px solid var(--wp--preset--color--accent-1);
    border-radius: 10px;
    color: var(--wp--preset--color--accent-1);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.news-readmore:hover {
    background: var(--wp--preset--color--accent-1);
    color: #07172e;
}

/* ---------- pagination ---------- */

.wp-block-query-pagination {
    margin-top: 2.5rem;
    font-size: 0.95rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
    color: var(--wp--preset--color--accent-5);
    text-decoration: none;
    padding: 0.35em 0.7em;
    border-radius: 8px;
}

.wp-block-query-pagination a:hover {
    color: var(--wp--preset--color--accent-1);
    background: rgba(88, 166, 255, 0.12);
}

.wp-block-query-pagination .page-numbers.current {
    color: var(--wp--preset--color--contrast);
    background: rgba(88, 166, 255, 0.2);
}

/* ---------- single post readability ---------- */

.wp-block-post-content {
    line-height: 1.7;
}

.wp-block-post-content a {
    color: var(--wp--preset--color--accent-1);
}
