/* ================================================================
   AHNAF.KZ — POST SINGLE PAGE
   public/assets/site/css/posts_show.css
================================================================ */

/* ── Breadcrumb ─────────────────────────────────────────────── */
.post-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    padding: 14px 0 18px;
}
.post-breadcrumb a { color: var(--muted); transition: color var(--tr); }
.post-breadcrumb a:hover { color: var(--teal); }
.post-breadcrumb span:last-child { color: var(--ink-2); font-weight: 500; }

/* ── Page ────────────────────────────────────────────────────── */
.post-page { padding: 0 0 64px; }

/* ── Layout: 60 / 40 ─────────────────────────────────────────── */
.post-layout {
    display: grid;
    grid-template-columns: 7fr 3fr;
    gap: 28px;
    align-items: start;
}
@media (max-width: 960px) {
    .post-layout { grid-template-columns: 1fr; gap: 32px; }
}

/* ── Post header ─────────────────────────────────────────────── */
.post-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.post-cat-badge {
    display: inline-flex; align-items: center;
    font-size: 10.5px; font-weight: 600;
    letter-spacing: .08em; text-transform: uppercase;
    color: var(--teal);
    background: var(--mint);
    padding: 4px 12px;
    border-radius: 20px;
    transition: background var(--tr);
}
.post-cat-badge:hover { background: var(--teal-light); }
.post-date { font-size: 13px; color: var(--muted); }

.post-title {
    font-family: var(--font-body);
    font-size: clamp(20px, 3vw, 34px);
    font-weight: 600;
    line-height: 1.24;
    color: var(--ink);
    margin-bottom: 24px;
}

/* ── Cover image ─────────────────────────────────────────────── */
.post-cover {
    margin-bottom: 28px;
    border-radius: var(--r-lg);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--cream-2);
}
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Content typography ─────────────────────────────────────── */
.post-content {
    font-size: 15px;
    line-height: 1.75;
    color: var(--ink);
}
.post-content p       { margin-bottom: 1.2em; }
.post-content p:last-child { margin-bottom: 0; }

.post-content h2 {
    font-family: var(--font-display);
    font-size: clamp(18px, 2.2vw, 24px);
    font-weight: 400; line-height: 1.25;
    margin: 1.8em 0 .55em; color: var(--ink);
}
.post-content h3 {
    font-size: clamp(16px, 1.8vw, 20px);
    font-weight: 600; margin: 1.6em 0 .5em; color: var(--ink);
}
.post-content h4 {
    font-size: 16px; font-weight: 600;
    margin: 1.4em 0 .4em; color: var(--ink);
}
.post-content a {
    color: var(--teal); text-decoration: underline;
    text-underline-offset: 3px; transition: color var(--tr);
}
.post-content a:hover { color: var(--teal-dark); }

.post-content ul, .post-content ol { padding-left: 24px; margin-bottom: 1.1em; }
.post-content li  { margin-bottom: .45em; }
.post-content ul li { list-style: disc; }
.post-content ol li { list-style: decimal; }

.post-content blockquote {
    border-left: 3px solid var(--teal);
    padding: 12px 18px;
    background: var(--mint-soft);
    border-radius: 0 var(--r-sm) var(--r-sm) 0;
    margin: 1.4em 0; font-style: italic; color: var(--ink-2);
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content img { max-width: 100%; border-radius: var(--r-md); margin: 1em 0; display: block; }
.post-content strong { font-weight: 700; }
.post-content em     { font-style: italic; }

/* YouTube и другие iframe embeds */
.post-content iframe {
    max-width: 100%;
    border-radius: var(--r-md);
}
.post-content .instagram-media,
.post-content .tiktok-embed {
    margin: 1.2em auto !important;
}

/* ── Gallery ─────────────────────────────────────────────────── */
.post-gallery-section { margin: 32px 0 8px; }

.post-gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
@media (max-width: 640px)  { .post-gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 641px) and (max-width: 900px) {
    .post-gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

.gallery-thumb {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--r-sm);
    cursor: zoom-in;
    padding: 0; background: var(--cream-2); border: none;
    position: relative;
}
.gallery-thumb::after {
    content: ''; position: absolute; inset: 0;
    background: rgba(0,0,0,0);
    transition: background var(--tr); border-radius: var(--r-sm);
}
.gallery-thumb:hover::after { background: rgba(0,0,0,.2); }
.gallery-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s ease; display: block;
}
.gallery-thumb:hover img { transform: scale(1.06); }

/* ── Lightbox ─────────────────────────────────────────────────── */
.lightbox {
    position: fixed; inset: 0; z-index: 9900;
    background: rgba(5, 5, 8, .94);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
}
.lightbox.is-open { opacity: 1; visibility: visible; }

.lightbox__close {
    position: absolute; top: 18px; right: 18px;
    width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%; color: #fff; cursor: pointer;
    transition: background .2s; z-index: 2;
}
.lightbox__close:hover { background: rgba(255,255,255,.28); }

.lightbox__nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 46px; height: 46px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 50%; color: #fff; cursor: pointer;
    transition: background .2s; z-index: 2;
}
.lightbox__nav:hover { background: rgba(255,255,255,.24); }
.lightbox__prev { left: 18px; }
.lightbox__next { right: 18px; }
@media (max-width: 480px) {
    .lightbox__prev { left: 8px; }
    .lightbox__next { right: 8px; }
}

.lightbox__img-wrap {
    max-width: calc(100vw - 120px);
    max-height: calc(100vh - 80px);
    display: flex; align-items: center; justify-content: center;
}
@media (max-width: 480px) { .lightbox__img-wrap { max-width: calc(100vw - 20px); } }

.lightbox__img {
    max-width: 100%; max-height: calc(100vh - 80px);
    object-fit: contain; border-radius: var(--r-sm);
    user-select: none; display: block;
}

.lightbox__counter {
    position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,.5); font-size: 12.5px;
    letter-spacing: .06em; pointer-events: none;
}

/* ── Like + Share: space-between ────────────────────────────── */
.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 32px 0 28px;
    flex-wrap: wrap;
    gap: 10px;
}

.like-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 20px;
    border: 1.5px solid var(--cream-2);
    border-radius: 24px;
    background: transparent; color: var(--ink-2);
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: border-color var(--tr), color var(--tr), background var(--tr);
    font-family: var(--font-body);
}
.like-btn:hover  { border-color: var(--teal); color: var(--teal); }
.like-btn.is-liked {
    border-color: var(--teal); background: var(--mint); color: var(--teal);
}
.like-btn.is-liked svg { fill: var(--teal); stroke: var(--teal); }
.like-count { font-size: 13px; font-weight: 600; }

.share-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border: none; border-radius: 24px;
    background: var(--teal); color: #fff;
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: background var(--tr); font-family: var(--font-body);
}
.share-btn:hover { background: var(--teal-dark); }

/* ── Divider (как на главной) ─────────────────────────────────── */
.post-divider {
    position: relative; height: 1px;
    background: var(--teal-light); margin: 8px 0 32px;
}
.divider__diamond {
    position: absolute; left: 50%; top: 50%;
    width: 10px; height: 10px;
    background: var(--bg);
    border: 1.5px solid var(--teal);
    transform: translate(-50%, -50%) rotate(45deg);
}

/* ── Post navigation ─────────────────────────────────────────── */
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 540px) {
    .post-nav { grid-template-columns: 1fr; }

    /* Оба блока — левое выравнивание на мобиле */
    .post-nav__item--next {
        text-align: left !important;
    }
    .post-nav__item--next .nav-card {
        flex-direction: row !important; /* убираем row-reverse */
    }
}


.post-nav__item {
    display: flex; flex-direction: column; gap: 7px;
    padding: 13px 15px;
    border: 1px solid var(--cream-2); border-radius: var(--r-md);
    transition: border-color var(--tr), box-shadow var(--tr); color: inherit;
}
.post-nav__item:hover { border-color: var(--teal-light); box-shadow: var(--sh-sm); }
.post-nav__item--next  { text-align: right; }

.nav-label {
    font-size: 10.5px; font-weight: 600;
    letter-spacing: .07em; text-transform: uppercase; color: var(--teal);
}
.nav-card { display: flex; align-items: center; gap: 9px; }
.post-nav__item--next .nav-card { flex-direction: row-reverse; }
.nav-card img {
    width: 50px; height: 34px; object-fit: cover;
    border-radius: 6px; flex-shrink: 0;
}
.nav-card__title {
    font-size: 13px; font-weight: 500; color: var(--ink-2);
    line-height: 1.38;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
    position: fixed; bottom: 28px; left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--ink); color: #fff;
    font-size: 13.5px; font-weight: 500;
    padding: 10px 24px; border-radius: 24px;
    z-index: 9999; opacity: 0; pointer-events: none;
    transition: opacity .3s ease, transform .3s ease;
    white-space: nowrap;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Sidebar (не sticky) ─────────────────────────────────────── */
.post-sidebar {
    padding-left: 28px;
    border-left: 2px solid var(--cream-2);
}
@media (max-width: 960px) {
    .post-sidebar {
        padding-left: 0; border-left: none;
        /* border-top: 2px solid var(--cream-2); */
        padding-top: 6px; margin-top: 4px;
    }
}

.sidebar-title {
    font-size: 11px; font-weight: 600;
    letter-spacing: .12em; text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 12px; margin-bottom: 2px;
    border-bottom: 1.5px solid var(--cream-2);

}

.sidebar-item {
    display: flex; gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--cream-2);
    transition: opacity var(--tr); color: inherit;
}
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item:hover { opacity: .72; }

/* На мобиле — 2 колонки */
@media (max-width: 640px) {
    .sidebar-list {
        display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
    }
    .sidebar-item { flex-direction: column; padding: 0; border-bottom: none; }
    .sidebar-title {
      margin-bottom: 14px;
    }
}

.sidebar-item__img {
    width: 126px; height: 80px; /* чуть больше чем было */
    flex-shrink: 0;
    border-radius: var(--r-sm);
    overflow: hidden; background: var(--cream-2);
}
@media (max-width: 640px) { .sidebar-item__img { width: 100%; height: 86px; } }
.sidebar-item__img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.sidebar-item__body {
    display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0;
}
.sidebar-item__cat {
    font-size: 9.5px; font-weight: 600;
    letter-spacing: .09em; text-transform: uppercase; color: var(--teal);
}
.sidebar-item__title {
    font-size: 13px; font-weight: 500; color: var(--ink); line-height: 1.38;
    display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
}
.sidebar-item__date { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ── Reduced motion ────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .gallery-thumb img, .lightbox, .toast { transition: none !important; }
}






/* ── Share dropdown ──────────────────────────────────────────── */
.share-wrap {
    position: relative;
}
.share-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--cream-2);
    border-radius: var(--r-md);
    box-shadow: var(--sh-md);
    padding: 6px;
    min-width: 190px;
    z-index: 200;
    opacity: 0; visibility: hidden;
    transform: translateY(6px);
    transition: opacity .22s ease, visibility .22s ease, transform .22s ease;
}
.share-dropdown.is-open {
    opacity: 1; visibility: visible;
    transform: translateY(0);
}
.share-option {
    display: flex; align-items: center; gap: 11px;
    width: 100%;
    padding: 10px 13px;
    font-size: 13.5px; font-weight: 500;
    color: var(--ink);
    border-radius: var(--r-sm);
    border: none; background: none; cursor: pointer;
    text-align: left; font-family: var(--font-body);
    transition: background var(--tr), color var(--tr);
    text-decoration: none;
}
.share-option:hover { background: var(--mint); }
.share-option--wa  svg { color: #25D366; }
.share-option--tg  svg { color: #229ED9; }
.share-option--copy svg { color: var(--teal); }




.post-date--under {
    display: block;
    margin: -16px 0 22px; /* чуть прижимаем к заголовку */
}



