/* =============================================
   BLOG — Listing & Detail
   ============================================= */
.blog-page,
.blog-detail-page {
    --blog-red: #D32F2F;
    --blog-red-dark: #B71C1C;
    --blog-red-light: #EF5350;
    --blog-bg: #f3f3f3;
    --blog-card: #ffffff;
    --blog-text: #1A1A1A;
    --blog-muted: #666666;
    background: var(--blog-bg);
}

/* ─── LIST PAGE ─── */
.blog-list-section {
    padding: 3.5rem 0 5rem;
}

.blog-page-head {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-page-eyebrow {
    display: inline-block;
    margin-bottom: 0.55rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--blog-red);
    letter-spacing: 0.04em;
}

.blog-page-title {
    margin: 0 0 0.7rem;
    font-size: clamp(1.6rem, 3.8vw, 2.1rem);
    font-weight: 900;
    color: var(--blog-text);
    letter-spacing: -0.025em;
}

.blog-page-title-line {
    display: block;
    width: 52px;
    height: 4px;
    margin: 0 auto 1rem;
    background: var(--blog-red);
    border-radius: 4px;
}

.blog-page-subtitle {
    margin: 0 auto;
    max-width: 520px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--blog-muted);
    line-height: 1.95;
}

/* Grid */
.blog-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem 1.45rem;
    margin-bottom: 3rem;
    width: 100%;
}

/* Card */
.blog-card {
    margin: 0;
    min-width: 0;
}

.blog-card-link {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.blog-card-frame {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0.75rem;
    border-radius: 22px;
    background: var(--blog-card);
    border: 1px solid rgba(0, 0, 0, 0.045);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.95) inset,
        0 14px 42px rgba(0, 0, 0, 0.06);
    transition:
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.38s ease;
}

.blog-card-link:hover .blog-card-frame {
    transform: translateY(-8px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 1) inset,
        0 22px 56px rgba(0, 0, 0, 0.1),
        0 6px 20px rgba(211, 47, 47, 0.1);
}

/* Thumbnail */
.blog-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    min-height: 150px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(160deg, #fafafa 0%, #efefef 100%);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.blog-card-media-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 70% 25%, rgba(211, 47, 47, 0.07) 0%, transparent 48%),
        linear-gradient(160deg, #fcfcfc 0%, #f0f0f0 100%);
    transition: transform 0.5s ease;
}

.blog-card-media-inner i {
    font-size: 2.25rem;
    color: rgba(211, 47, 47, 0.18);
}

.blog-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.blog-card-link:hover .blog-card-img,
.blog-card-link:hover .blog-card-media-inner {
    transform: scale(1.04);
}

/* Red L-corner accent (mockup style) */
.blog-card-corner {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 52%;
    height: 52%;
    border-inline-start: 3px solid var(--blog-red);
    border-top: 3px solid var(--blog-red);
    border-start-start-radius: 16px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.9;
    box-shadow: -4px -4px 18px rgba(211, 47, 47, 0.12);
    transition: opacity 0.3s ease;
}

.blog-card-link:hover .blog-card-corner {
    opacity: 1;
    box-shadow: -6px -6px 22px rgba(211, 47, 47, 0.2);
}

.blog-card-category {
    position: absolute;
    bottom: 10px;
    inset-inline-end: 10px;
    z-index: 3;
    padding: 0.28rem 0.72rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(211, 47, 47, 0.1);
    font-size: 0.66rem;
    font-weight: 700;
    color: var(--blog-red-dark);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

/* Body */
.blog-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1rem 0.35rem 0.25rem;
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 0.85rem;
    margin-bottom: 0.6rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: #999;
}

.blog-card-meta i {
    margin-inline-end: 0.15rem;
    color: var(--blog-red);
    font-size: 0.7rem;
}

.blog-card-title {
    margin: 0 0 0.6rem;
    font-size: 0.94rem;
    font-weight: 800;
    color: var(--blog-text);
    line-height: 1.55;
    transition: color 0.25s ease;
}

.blog-card-link:hover .blog-card-title {
    color: var(--blog-red-dark);
}

.blog-card-excerpt {
    margin: 0 0 1rem;
    flex: 1;
    font-size: 0.79rem;
    font-weight: 500;
    color: var(--blog-muted);
    line-height: 1.9;
    text-align: justify;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    font-size: 0.76rem;
    font-weight: 700;
    color: #333;
    transition: color 0.25s ease, gap 0.25s ease;
}

.blog-card-action i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--blog-red-light), var(--blog-red-dark));
    color: #fff;
    font-size: 0.78rem;
    box-shadow: 0 4px 12px rgba(211, 47, 47, 0.32);
    transition: transform 0.3s ease;
}

.blog-card-link:hover .blog-card-action {
    color: var(--blog-red);
    gap: 0.65rem;
}

.blog-card-link:hover .blog-card-action i {
    transform: translateX(-3px);
}

/* Pagination */
.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    direction: rtl;
}

.blog-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.55rem;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.04);
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--blog-text);
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.blog-page-btn:hover:not(.blog-page-btn--disabled):not(.blog-page-btn--active) {
    border-color: rgba(211, 47, 47, 0.35);
    color: var(--blog-red);
    transform: translateY(-2px);
}

.blog-page-btn--active {
    background: var(--blog-red);
    border-color: var(--blog-red);
    color: #fff;
    box-shadow: 0 5px 16px rgba(211, 47, 47, 0.38);
}

.blog-page-btn--disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* ─── DETAIL PAGE ─── */
.blog-article-hero {
    position: relative;
    min-height: clamp(280px, 42vw, 420px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: #111;
}

.blog-article-hero-bg {
    position: absolute;
    inset: 0;
}

.blog-article-hero-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(211, 47, 47, 0.35) 0%, transparent 45%),
        radial-gradient(circle at 80% 20%, rgba(211, 47, 47, 0.15) 0%, transparent 40%),
        repeating-linear-gradient(-15deg, transparent, transparent 24px, rgba(255, 255, 255, 0.015) 24px, rgba(255, 255, 255, 0.015) 25px);
    z-index: 1;
}

.blog-article-hero-gradient {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.88) 100%);
    z-index: 2;
}

.blog-article-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.blog-article-hero-content {
    position: relative;
    z-index: 3;
    padding: 2.5rem 0 3rem;
    color: #fff;
}

.blog-article-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.25rem;
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
}

.blog-article-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-article-breadcrumb a:hover {
    color: #fff;
}

.blog-article-breadcrumb span {
    color: rgba(255, 255, 255, 0.9);
}

.blog-article-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.15rem;
}

.blog-article-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 0.72rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.blog-article-chip i {
    color: var(--blog-red-light);
    font-size: 0.74rem;
}

.blog-article-hero-title {
    margin: 0;
    max-width: 820px;
    font-size: clamp(1.45rem, 3.5vw, 2.15rem);
    font-weight: 900;
    line-height: 1.45;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

/* Article body */
.blog-article-section {
    position: relative;
    margin-top: -2.5rem;
    padding-bottom: 4.5rem;
    z-index: 4;
}

.blog-article-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.75rem;
    align-items: start;
}

.blog-article-sheet {
    padding: 2rem 2.25rem 2.25rem;
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.98) inset,
        0 24px 64px rgba(0, 0, 0, 0.09);
}

.blog-article-lead {
    position: relative;
    margin: 0 0 1.75rem;
    padding: 1.35rem 1.5rem 1.35rem 1.25rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.06) 0%, rgba(211, 47, 47, 0.02) 100%);
    border: 1px solid rgba(211, 47, 47, 0.1);
    border-inline-start: 4px solid var(--blog-red);
}

.blog-article-lead i {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1.1rem;
    font-size: 1.5rem;
    color: rgba(211, 47, 47, 0.15);
}

.blog-article-lead p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
    line-height: 2;
    text-align: justify;
}

.blog-article-divider {
    display: flex;
    justify-content: center;
    margin-bottom: 1.75rem;
}

.blog-article-divider span {
    display: block;
    width: 48px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--blog-red), var(--blog-red-light), transparent);
}

.blog-article-content p {
    margin: 0 0 1.35rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: #444;
    line-height: 2.15;
    text-align: justify;
}

.blog-article-content p:first-child::first-letter {
    float: right;
    margin-inline-start: 0.08em;
    margin-inline-end: 0.12em;
    font-size: 2.4em;
    font-weight: 900;
    line-height: 0.85;
    color: var(--blog-red);
}

.blog-article-content p:last-child {
    margin-bottom: 0;
}

.blog-article-content ul,
.blog-article-content ol {
    margin: 0 0 1.35rem;
    padding-inline-start: 1.35rem;
    font-size: 0.92rem;
    line-height: 2;
    color: #444;
}

.blog-article-content h2,
.blog-article-content h3 {
    margin: 1.5rem 0 0.85rem;
    font-weight: 800;
    color: var(--blog-text);
}

.blog-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
}

.blog-article-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-top: 2.25rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.blog-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.blog-article-tag {
    padding: 0.35rem 0.85rem;
    border-radius: 50px;
    background: var(--blog-bg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--blog-muted);
}

.blog-article-back {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.55rem 0.55rem 0.55rem 1.15rem;
    border-radius: 50px;
    background: linear-gradient(145deg, var(--blog-red-light), var(--blog-red) 50%, var(--blog-red-dark));
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 24px rgba(211, 47, 47, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-article-back:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(211, 47, 47, 0.45);
    color: #fff;
}

.blog-article-back-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.95rem;
}

.blog-article-back-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.3;
}

.blog-article-back-text strong {
    font-size: 0.82rem;
    font-weight: 800;
}

.blog-article-back-text small {
    font-size: 0.68rem;
    font-weight: 500;
    opacity: 0.85;
}

/* Sidebar */
.blog-article-sidebar {
    position: sticky;
    top: 100px;
}

.blog-sidebar-panel {
    padding: 1.5rem;
    border-radius: 22px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 14px 44px rgba(0, 0, 0, 0.07);
}

.blog-sidebar-title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 900;
    color: var(--blog-text);
}

.blog-sidebar-desc {
    margin: 0 0 1.25rem;
    font-size: 0.76rem;
    font-weight: 500;
    color: #999;
}

.blog-sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.blog-sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 14px;
    background: var(--blog-bg);
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.blog-sidebar-item:hover {
    background: #fff;
    border-color: rgba(211, 47, 47, 0.12);
    transform: translateX(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.blog-sidebar-item-num {
    flex-shrink: 0;
    width: 4px;
    height: 36px;
    border-radius: 4px;
    background: linear-gradient(180deg, var(--blog-red-light), var(--blog-red-dark));
}

.blog-sidebar-item-body {
    flex: 1;
    min-width: 0;
}

.blog-sidebar-item-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--blog-text);
    line-height: 1.5;
    margin-bottom: 0.2rem;
}

.blog-sidebar-item-meta {
    font-size: 0.66rem;
    font-weight: 600;
    color: #999;
}

.blog-sidebar-item-meta i {
    margin-inline-end: 0.15rem;
    color: var(--blog-red);
}

.blog-sidebar-item-arrow {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(211, 47, 47, 0.08);
    color: var(--blog-red);
    font-size: 0.78rem;
    transition: background 0.25s ease, transform 0.25s ease;
}

.blog-sidebar-item:hover .blog-sidebar-item-arrow {
    background: var(--blog-red);
    color: #fff;
    transform: translateX(-2px);
}

/* Responsive */
@media (max-width: 991.98px) {
    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 1.35rem;
    }

    .blog-article-layout {
        grid-template-columns: 1fr;
    }

    .blog-article-sidebar {
        position: static;
    }

    .blog-article-section {
        margin-top: -1.5rem;
    }
}

@media (max-width: 575.98px) {
    .blog-list-section {
        padding: 2.5rem 0 3.5rem;
    }

    .blog-grid {
        grid-template-columns: 1fr !important;
        max-width: 400px;
        margin-inline: auto;
    }

    .blog-article-hero-content {
        padding-bottom: 2.25rem;
    }

    .blog-article-sheet {
        padding: 1.35rem 1.15rem 1.5rem;
        border-radius: 18px;
    }

    .blog-article-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .blog-article-back {
        justify-content: center;
    }
}
