/**
 * Gas Impex Core — Страница записи (тёмная тема)
 * Двухколоночный layout: контент + сайдбар
 */

/* ── Обёртка ───────────────────────────────────────────────── */
.gi-single-post {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px 80px;
    font-family: 'Onest', sans-serif;
    color: #fff;
}

.gi-single-post *,
.gi-single-post *::before,
.gi-single-post *::after {
    box-sizing: border-box;
}

/* ── Layout: контент + сайдбар ─────────────────────────────── */
.gi-spost-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

/* ══════════════════════════════════════════════════════════════
   ОСНОВНОЙ КОНТЕНТ
   ══════════════════════════════════════════════════════════════ */

/* ── Мета-строка ───────────────────────────────────────────── */
.gi-spost-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.gi-spost-date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
}

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

.gi-spost-cat {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(var(--gi-blue-rgb), 0.12);
    border: 1px solid rgba(var(--gi-blue-rgb), 0.25);
    color: var(--gi-blue);
}

/* ── Заголовок ─────────────────────────────────────────────── */
.gi-spost-title {
    font-family: 'Geologica', sans-serif;
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 28px;
}

/* ── Миниатюра ─────────────────────────────────────────────── */
.gi-spost-thumb {
    width: 100%;
    max-height: 460px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 36px;
    border: 1px solid #1e1e1e;
}

.gi-spost-thumb img {
    width: 100%;
    height: 100%;
    max-height: 460px;
    object-fit: cover;
    display: block;
}

/* ── Поделиться ────────────────────────────────────────────── */
.gi-spost-share {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 0;
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
    margin-bottom: 24px;
}

.gi-spost-share-label {
    font-size: 13px;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
}

.gi-spost-share-btns {
    display: flex;
    gap: 8px;
}

.gi-share-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    border: 1px solid #1e1e1e;
    background: #111 !important;
    background-image: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0 !important;
}

.gi-share-btn svg {
    width: 16px;
    height: 16px;
    fill: #666;
    transition: fill 0.2s ease;
}

/* WhatsApp */
.gi-share-wa:hover {
    background: rgba(37, 211, 102, 0.1) !important;
    background-image: none !important;
    border-color: rgba(37, 211, 102, 0.3);
}
.gi-share-wa:hover svg { fill: #25d366; }

/* Telegram */
.gi-share-tg:hover {
    background: rgba(0, 136, 204, 0.1) !important;
    background-image: none !important;
    border-color: rgba(0, 136, 204, 0.3);
}
.gi-share-tg:hover svg { fill: #0088cc; }

/* VK */
.gi-share-vk:hover {
    background: rgba(0, 119, 255, 0.1) !important;
    background-image: none !important;
    border-color: rgba(0, 119, 255, 0.3);
}
.gi-share-vk:hover svg { fill: #0077ff; }

/* Copy */
.gi-share-copy {
    position: relative;
}
.gi-share-copy svg {
    stroke: #666;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.gi-share-copy:hover {
    background: rgba(var(--gi-blue-rgb), 0.1) !important;
    background-image: none !important;
    border-color: rgba(var(--gi-blue-rgb), 0.3);
}
.gi-share-copy:hover svg { stroke: var(--gi-blue); }

.gi-share-copy.gi-copied::after {
    content: 'Скопировано!';
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: #fff;
    background: #222;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    animation: gi-fade-in 0.15s ease;
}

@keyframes gi-fade-in {
    from { opacity: 0; transform: translateX(-50%) translateY(4px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ── Теги ──────────────────────────────────────────────────── */
.gi-spost-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.gi-spost-tag-item {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.gi-spost-tag-item:hover {
    color: var(--gi-blue);
    border-color: rgba(var(--gi-blue-rgb), 0.25);
    background: rgba(var(--gi-blue-rgb), 0.06);
}

/* ── Навигация prev/next ───────────────────────────────────── */
.gi-spost-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
    padding-top: 24px;
    border-top: 1px solid #1a1a1a;
}

.gi-spost-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #111;
    border: 1px solid #1e1e1e;
    text-decoration: none !important;
    transition: border-color 0.2s ease;
}

.gi-spost-nav-link:hover {
    border-color: rgba(var(--gi-blue-rgb), 0.3);
}

.gi-spost-nav-next {
    text-align: right;
    justify-content: flex-end;
}

.gi-spost-nav-link svg {
    width: 18px;
    height: 18px;
    stroke: #555;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    transition: stroke 0.2s ease;
}

.gi-spost-nav-link:hover svg { stroke: var(--gi-blue); }

.gi-spost-nav-label {
    display: block;
    font-size: 11px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 3px;
}

.gi-spost-nav-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #ccc;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.gi-spost-nav-link:hover .gi-spost-nav-title { color: #fff; }


/* ══════════════════════════════════════════════════════════════
   САЙДБАР
   ══════════════════════════════════════════════════════════════ */
.gi-spost-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Блок сайдбара */
.gi-sidebar-block {
    background: #111;
    border: 1px solid #1e1e1e;
    border-radius: 14px;
    padding: 20px;
    overflow: hidden;
}

.gi-sidebar-block-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Geologica', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #1a1a1a;
}

.gi-sidebar-block-title svg {
    width: 16px;
    height: 16px;
    stroke: var(--gi-blue);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

/* ── Полезные ссылки ───────────────────────────────────────── */
.gi-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.gi-sidebar-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #aaa;
    text-decoration: none;
    transition: all 0.2s ease;
}

.gi-sidebar-links a:hover {
    background: rgba(var(--gi-blue-rgb), 0.06);
    color: #fff;
}

.gi-sidebar-links a svg {
    width: 15px;
    height: 15px;
    stroke: #555;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
    transition: stroke 0.2s ease;
}

.gi-sidebar-links a:hover svg {
    stroke: var(--gi-blue);
}

/* ── Последние статьи ──────────────────────────────────────── */
.gi-sidebar-recent {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gi-sidebar-rp {
    display: flex;
    gap: 12px;
    text-decoration: none !important;
    align-items: flex-start;
    transition: opacity 0.2s ease;
}

.gi-sidebar-rp:hover { opacity: 0.85; }

.gi-sidebar-rp-thumb {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: #0a0a0a;
    border: 1px solid #1a1a1a;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gi-sidebar-rp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gi-sidebar-rp-thumb svg {
    width: 20px;
    height: 20px;
    stroke: #333;
    fill: none;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gi-sidebar-rp-info {
    flex: 1;
    min-width: 0;
}

.gi-sidebar-rp-title {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #ccc;
    line-height: 1.35;
    margin-bottom: 4px;
    transition: color 0.2s ease;
}

.gi-sidebar-rp:hover .gi-sidebar-rp-title { color: var(--gi-blue); }

.gi-sidebar-rp-date {
    font-size: 11px;
    color: #444;
}


/* ══════════════════════════════════════════════════════════════
   АДАПТИВ
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .gi-spost-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .gi-spost-sidebar {
        position: static;
    }
}

@media (max-width: 600px) {
    .gi-single-post {
        padding: 40px 16px 60px;
    }

    .gi-spost-nav {
        grid-template-columns: 1fr;
    }

    .gi-spost-share {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}
