/* ============================================
   UZMIX — Blog Detail Page CSS
   ============================================ */

/* ============================================
   LAYOUT — Article + Sidebar (blog list bilan bir xil)
   ============================================ */
.blog-layout--detail {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 3rem;
    align-items: start;
}

/* ============================================
   ASOSIY MAQOLA
   ============================================ */
.blog-article {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    min-width: 0;
}

/* Featured rasm */
.blog-article__hero-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.blog-article__hero-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* ============================================
   ULASHISH TUGMALARI
   ============================================ */
.blog-article__share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.blog-article__share--bottom {
    border-top: 1px solid #f1f5f9;
    border-bottom: none;
    background: #f8fafc;
}

.blog-article__share-label {
    font-size: 0.82rem;
    color: var(--gray-600);
    font-weight: 600;
    margin-right: 0.25rem;
}

.blog-article__share-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Ulashish tugmalari */
.blog-share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}

.blog-share:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.blog-share--telegram { background: #0088cc; }
.blog-share--facebook { background: #1877f2; }
.blog-share--twitter  { background: #000000; }
.blog-share--whatsapp { background: #25d366; }
.blog-share--copy     { background: #64748b; }

.blog-share--copy.is-copied {
    background: #22c55e;
}

/* ============================================
   MAQOLA KONTENTI
   ============================================ */
.blog-article__content {
    padding: 1.5rem 1.75rem;
    font-size: 0.95rem;
    line-height: 1.8;
    color: #334155;
}

.blog-article__content p {
    margin-bottom: 1.1rem;
}

.blog-article__content h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin: 1.75rem 0 0.85rem;
    letter-spacing: -0.01em;
}

.blog-article__content h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 1.5rem 0 0.75rem;
}

.blog-article__content ul,
.blog-article__content ol {
    margin: 0 0 1.1rem 1.5rem;
}

.blog-article__content li {
    margin-bottom: 0.4rem;
}

.blog-article__content a {
    color: #0056b3;
    text-decoration: underline;
    text-decoration-color: rgba(0, 86, 179, 0.3);
    text-underline-offset: 3px;
    transition: all 0.2s;
}

.blog-article__content a:hover {
    color: #1B4BF5;
    text-decoration-color: #1B4BF5;
}

.blog-article__content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
    display: block;
}

.blog-article__content blockquote {
    border-left: 4px solid #0056b3;
    padding: 0.75rem 1.25rem;
    margin: 1.25rem 0;
    background: #f8fafc;
    border-radius: 0 8px 8px 0;
    color: #475569;
    font-style: italic;
}

.blog-article__content code {
    background: #f1f5f9;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: #0f172a;
}

.blog-article__content pre {
    background: #0f172a;
    color: #f1f5f9;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 1.25rem 0;
    font-size: 0.85rem;
}

.blog-article__content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* ============================================
   ORQAGA QAYTISH
   ============================================ */
.blog-article__back {
    padding: 1.25rem 1.75rem 1.5rem;
    border-top: 1px solid #f1f5f9;
}

.blog-article__back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.blog-article__back-link:hover {
    background: #0056b3;
    border-color: #0056b3;
    color: #fff;
    transform: translateX(-3px);
}

.blog-article__back-link i {
    font-size: 0.8rem;
}

/* ============================================
   SIDEBAR — blog list bilan bir xil
   ============================================ */
.blog-sidebar {
    position: sticky;
    top: 90px;
    align-self: flex-start;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.blog-sidebar__section {
    background: #ffffff;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.blog-sidebar__title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 1rem;
    padding-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px solid #0056b3;
    letter-spacing: -0.01em;
}

.blog-sidebar__title-icon {
    color: #0056b3;
    font-size: 0.9rem;
}

.blog-sidebar__title-icon--fire {
    color: #f59e0b;
}

.blog-sidebar__list {
    display: flex;
    flex-direction: column;
}

/* Sidebar item (o'xshash maqolalar) */
.blog-side-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.blog-side-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.blog-side-item:first-child {
    padding-top: 0;
}

.blog-side-item__title {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    color: #0f172a;
    margin: 0 0 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-side-item__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-side-item__title a:hover {
    color: #0056b3;
}

.blog-side-item__meta {
    font-size: 0.7rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-side-item__meta i {
    font-size: 0.68rem;
}

/* ============================================
   MASHHUR MAQOLALAR (raqamli)
   ============================================ */
.blog-side-item--popular {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 0.75rem;
    align-items: start;
    padding: 0.75rem 0;
}

.blog-side-item--popular:first-child {
    padding-top: 0;
}

.blog-side-item__rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 800;
    flex-shrink: 0;
}

/* 1-raqam — oltin */
.blog-side-item--popular:first-child .blog-side-item__rank {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #fff;
}

/* 2-raqam — kumush */
.blog-side-item--popular:nth-child(2) .blog-side-item__rank {
    background: linear-gradient(135deg, #94a3b8 0%, #64748b 100%);
    color: #fff;
}

/* 3-raqam — bronza */
.blog-side-item--popular:nth-child(3) .blog-side-item__rank {
    background: linear-gradient(135deg, #b45309 0%, #92400e 100%);
    color: #fff;
}

.blog-side-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

/* ============================================
   KATEGORIYALAR (sidebar)
   ============================================ */
.blog-sidebar__categories {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.blog-sidebar__cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: #f8fafc;
    color: #334155;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.2s;
}

.blog-sidebar__cat-link:hover {
    background: #eff6ff;
    color: #0056b3;
}

.blog-sidebar__cat-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-sidebar__cat-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 0.4rem;
    border-radius: 6px;
    background: #fff;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    border: 1px solid #e2e8f0;
}

.blog-sidebar__cat-link:hover .blog-sidebar__cat-count {
    background: #0056b3;
    color: #fff;
    border-color: #0056b3;
}

/* ============================================
   TEGISHLI MAQOLALAR (pastda)
   ============================================ */
.related-posts {
    padding: 2rem 0 4rem;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
}

.related-posts__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.related-posts__title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.01em;
}

.related-posts__title-line {
    display: inline-block;
    width: 4px;
    height: 22px;
    background: #0056b3;
    border-radius: 2px;
}

.related-posts__more {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0056b3;
    text-decoration: none;
    transition: gap 0.2s;
}

.related-posts__more:hover {
    gap: 0.65rem;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

/* ============================================
   RESPONSIVE — Planshet (1024px)
   ============================================ */
@media (max-width: 1024px) {
    .blog-layout--detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.25rem;
    }

    .related-posts__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   RESPONSIVE — Mobil (768px)
   ============================================ */
@media (max-width: 768px) {
    .blog-article__content {
        padding: 1.25rem 1.25rem;
        font-size: 0.9rem;
    }

    .blog-article__hero-img {
        padding: 0.75rem;
    }

    .blog-article__share {
        padding: 0.85rem 1.25rem;
        gap: 0.5rem;
    }

    .blog-article__share-label {
        font-size: 0.75rem;
        width: 100%;
        margin-bottom: 0.25rem;
    }

    .blog-share {
        width: 34px;
        height: 34px;
        font-size: 0.85rem;
    }

    .blog-article__back {
        padding: 1rem 1.25rem 1.25rem;
    }

    .related-posts__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .related-posts__title {
        font-size: 1.15rem;
    }

    .blog-sidebar {
        grid-template-columns: 1fr;
    }

    .blog-sidebar__section {
        padding: 1rem;
    }
}

/* ============================================
   RESPONSIVE — Kichik telefon (480px)
   ============================================ */
@media (max-width: 480px) {
    .blog-article__content {
        padding: 1rem 1rem;
        font-size: 0.85rem;
    }

    .blog-article__content h2 {
        font-size: 1.2rem;
    }

    .blog-article__content h3 {
        font-size: 1rem;
    }

    .blog-article__back-link {
        font-size: 0.8rem;
        padding: 0.55rem 1rem;
    }

    .blog-sidebar__title {
        font-size: 0.95rem;
    }

    .related-posts {
        padding: 1.5rem 0 3rem;
    }
}