/**
 * Gas Impex Core — Новости: сетка карточек + пагинация (тёмная тема)
 */

.gi-news-wrap *,
.gi-news-wrap *::before,
.gi-news-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }

.gi-news-wrap {
    width: 100%;
    font-family: 'Onest', sans-serif;
    color: #fff;
}

/* ── Заголовок секции ──────────────────────────────────────── */
.gi-news-header {
    text-align: center;
    margin-bottom: 48px;
}

.gi-news-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--gi-red);
    margin-bottom: 14px;
}

.gi-news-title {
    font-family: 'Geologica', sans-serif;
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 600;
    color: #fff;
    line-height: 1.15;
}

.gi-news-title span { color: var(--gi-blue); }

/* ── Сетка ─────────────────────────────────────────────────── */
.gi-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* ── Карточка ──────────────────────────────────────────────── */
.gi-news-card {
    display: flex;
    flex-direction: column;
    background: #111;
    border: 1px solid #1e1e1e;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none !important;
    color: inherit !important;
    transition: border-color 0.3s ease, transform 0.3s ease;
}

.gi-news-card:hover {
    border-color: rgba(var(--gi-blue-rgb), 0.3);
    transform: translateY(-4px);
}

/* Миниатюра */
.gi-news-card-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0a0a0a;
}

.gi-news-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gi-news-card:hover .gi-news-card-thumb img {
    transform: scale(1.05);
}

.gi-news-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(var(--gi-blue-rgb), 0.06), rgba(var(--gi-red-rgb), 0.06));
}

.gi-news-card-placeholder svg {
    width: 40px;
    height: 40px;
    stroke: #333;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Категория */
.gi-news-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(var(--gi-blue-rgb), 0.15);
    border: 1px solid rgba(var(--gi-blue-rgb), 0.3);
    color: var(--gi-blue);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Тело карточки */
.gi-news-card-body {
    padding: 22px 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gi-news-card-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #555;
    margin-bottom: 10px;
}

.gi-news-card-date svg {
    width: 13px;
    height: 13px;
    stroke: #444;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.gi-news-card-title {
    font-family: 'Geologica', sans-serif;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    line-height: 1.35;
    margin-bottom: 10px;
    transition: color 0.2s ease;
}

.gi-news-card:hover .gi-news-card-title {
    color: var(--gi-blue);
}

.gi-news-card-excerpt {
    font-size: 13.5px;
    color: #777;
    line-height: 1.55;
    flex: 1;
    margin-bottom: 16px;
}

.gi-news-card-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gi-red);
    transition: gap 0.2s ease;
    align-self: flex-start;
}

.gi-news-card:hover .gi-news-card-more {
    gap: 10px;
}

.gi-news-card-more svg {
    width: 14px;
    height: 14px;
    stroke: var(--gi-red);
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ── Пустое состояние ──────────────────────────────────────── */
.gi-news-empty {
    text-align: center;
    padding: 60px 20px;
    background: #111;
    border: 1px solid #1e1e1e;
    border-radius: 16px;
}

.gi-news-empty svg {
    width: 48px;
    height: 48px;
    stroke: #333;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    margin-bottom: 16px;
}

.gi-news-empty p {
    color: #555;
    font-size: 15px;
}

/* ── Пагинация ─────────────────────────────────────────────── */
.gi-news-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.gi-news-pagination ul {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.gi-news-pagination li {
    margin: 0;
    padding: 0;
}

.gi-news-pagination a,
.gi-news-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #1e1e1e;
    background: #111;
    color: #888;
}

.gi-news-pagination a:hover {
    border-color: rgba(var(--gi-blue-rgb), 0.3);
    color: #fff;
    background: #151515;
}

/* Текущая страница */
.gi-news-pagination .current {
    background: var(--gi-blue);
    border-color: var(--gi-blue);
    color: #fff;
    font-weight: 600;
}

/* Стрелки */
.gi-news-pagination .prev,
.gi-news-pagination .next {
    padding: 0;
}

.gi-news-pagination .prev svg,
.gi-news-pagination .next svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Точки */
.gi-news-pagination .dots {
    border: none;
    background: none;
    color: #444;
    min-width: 30px;
}

/* ── Адаптив ───────────────────────────────────────────────── */
@media (max-width: 480px) {
    .gi-news-grid {
        grid-template-columns: 1fr;
    }

    .gi-news-card-body {
        padding: 16px 18px 20px;
    }

    .gi-news-pagination a,
    .gi-news-pagination span {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
}
