/* ──────────────────────────────────────────────────
   Blog-page styling (News List + News Details).
   Design language matches product-pages.css.
   ────────────────────────────────────────────────── */

/* ===================== LIST PAGE ===================== */

.blog-list {
    max-width: 1140px;
    margin: 0 auto;
    padding: 50px 20px 60px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

@media (max-width: 991px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .blog-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* --- Blog card --- */
.blog-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,.1);
}

.blog-card__img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #f5f5f0;
}

.blog-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}

.blog-card:hover .blog-card__img img {
    transform: scale(1.05);
}

.blog-card__body {
    padding: 22px 24px 26px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card__date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #999;
    margin-bottom: 10px;
    font-weight: 500;
}

.blog-card__date svg {
    width: 14px;
    height: 14px;
    fill: #d6a146;
    flex-shrink: 0;
}

.blog-card__title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px;
    line-height: 1.4;
    flex: 1;
}

.blog-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color .2s;
}

.blog-card__title a:hover {
    color: #d6a146;
}

.blog-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #d6a146;
    text-decoration: none;
    transition: gap .25s ease;
    margin-top: auto;
}

.blog-card__link:hover {
    gap: 10px;
}

.blog-card__link svg {
    width: 14px;
    height: 14px;
    transition: transform .25s ease;
}

.blog-card__link:hover svg {
    transform: translateX(3px);
}

[dir="rtl"] .blog-card__link:hover svg {
    transform: translateX(-3px);
}

/* --- No posts state --- */
.blog-list__empty {
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* --- Pagination --- */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.blog-pagination a,
.blog-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s, box-shadow .2s;
    padding: 0 6px;
}

.blog-pagination a {
    color: #555;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.blog-pagination a:hover {
    background: #f5f0e6;
    border-color: #d6a146;
    color: #d6a146;
}

.blog-pagination .bp-active {
    background: #d6a146;
    color: #fff;
    border: 1px solid #d6a146;
    box-shadow: 0 2px 8px rgba(214,161,70,.3);
    pointer-events: none;
}

.blog-pagination .bp-disabled {
    color: #ccc;
    background: #fafafa;
    border: 1px solid #eee;
    pointer-events: none;
}

.blog-pagination .bp-arrow svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}


/* ===================== DETAILS PAGE ===================== */

.blog-detail {
    max-width: 860px;
    margin: 0 auto;
    padding: 50px 20px 60px;
}

.blog-detail__hero-img {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    margin-bottom: 36px;
}

.blog-detail__hero-img img {
    width: 100%;
    display: block;
    max-height: 480px;
    object-fit: cover;
}

.blog-detail__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #999;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.blog-detail__meta svg {
    width: 16px;
    height: 16px;
    fill: #d6a146;
    flex-shrink: 0;
}

.blog-detail__meta time {
    font-weight: 500;
}

/* Article content */
.blog-detail__content {
    font-size: 16px;
    line-height: 1.85;
    color: #333;
}

/* CMS HTML is often <div> blocks, not just <p>; dir/lang set in Details + these rules keep Arabic body RTL. */
.blog-detail__content[dir="rtl"] {
    direction: rtl;
    text-align: right;
    unicode-bidi: embed;
}

.blog-detail__content[dir="rtl"] p,
.blog-detail__content[dir="rtl"] div,
.blog-detail__content[dir="rtl"] li,
.blog-detail__content[dir="rtl"] h2,
.blog-detail__content[dir="rtl"] h3 {
    text-align: right;
}

.blog-detail__content h2 {
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 700;
    color: #1a1a1a;
    margin: 32px 0 14px;
    line-height: 1.3;
}

.blog-detail__content h3 {
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 700;
    color: #1a1a1a;
    margin: 28px 0 12px;
    line-height: 1.35;
}

.blog-detail__content p {
    margin: 0 0 18px;
}

.blog-detail__content img {
    max-width: 100%;
    border-radius: 10px;
    height: auto;
    margin: 20px 0;
    display: block;
}

.blog-detail__content blockquote {
    margin: 28px 0;
    padding: 24px 28px;
    background: #f9f6f0;
    border-left: 4px solid #d6a146;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #444;
}

[dir="rtl"] .blog-detail__content blockquote {
    border-left: none;
    border-right: 4px solid #d6a146;
    border-radius: 10px 0 0 10px;
}

.blog-detail__content ul,
.blog-detail__content ol {
    padding-left: 24px;
    margin: 16px 0 18px;
}

[dir="rtl"] .blog-detail__content ul,
[dir="rtl"] .blog-detail__content ol {
    padding-left: 0;
    padding-right: 24px;
}

.blog-detail__content li {
    margin-bottom: 8px;
}

.blog-detail__content a {
    color: #d6a146;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-detail__content a:hover {
    color: #b8862e;
}

/* Back to blog link */
.blog-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    color: #d6a146;
    border: 2px solid #d6a146;
    border-radius: 10px;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.blog-detail__back:hover {
    background: #d6a146;
    color: #fff;
}

.blog-detail__back svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    transition: transform .25s;
}

.blog-detail__back:hover svg {
    transform: translateX(-3px);
}

[dir="rtl"] .blog-detail__back:hover svg {
    transform: translateX(3px);
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 767px) {
    .blog-list { padding: 30px 16px 40px; }
    .blog-detail { padding: 30px 16px 40px; }

    .blog-detail__hero-img img {
        max-height: 300px;
    }

    .blog-detail__content blockquote {
        padding: 18px 20px;
    }
}

@media (max-width: 575px) {
    .blog-card__body { padding: 18px 18px 22px; }
    .blog-pagination { margin-top: 36px; }
}
