/* =========================================
   BLOG STYLES — blog.css
   Insights listing + Single article pages
   ========================================= */

/* #region HERO */
main {
    padding-top: var(--header-height);
}

.blog-hero {
    background-color: #1F2026;
    padding: 80px 0 60px;
    text-align: center;
}

.blog-hero h1 {
    color: #F6F6F6;
    font-size: clamp(50px, 8vw, 100px);
    font-family: var(--font-heading);
    font-weight: 500;
    margin-bottom: 16px;
}

.blog-hero p {
    color: rgba(246, 246, 246, 0.7);
    font-size: 18px;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* #endregion */


/* #region GRID SECTION */
.blog-grid-section {
    padding: 80px 0 120px;
    background-color: #F6F6F6;
}

.blog-grid-container {
    width: 90%;
    max-width: none;
    margin: 0 auto;
}

.blog-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* #endregion */


/* #region BLOG CARD */
.blog-card {
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.4s ease;
    text-decoration: none;
    color: inherit;
    position: relative;
}

/* Light sweep overlay */
.blog-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
    z-index: 5;
    pointer-events: none;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(31, 32, 38, 0.12);
}

.blog-card:hover::after {
    left: 100%;
}

/* Card Image */
.blog-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.06);
}

/* Card Body */
.blog-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-date {
    font-size: 13px;
    color: #979797;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-card-date i {
    color: #FEC96D;
    font-size: 12px;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.3;
    color: #1F2026;
    margin-bottom: 12px;
}

.blog-card-desc {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.blog-card-tag {
    font-size: 11px;
    padding: 3px 10px;
    background: rgba(31, 32, 38, 0.06);
    color: #555;
    border-radius: var(--border-radius);
    font-family: 'Poppins', sans-serif;
}

.blog-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1F2026;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    transition: color 0.3s, gap 0.3s;
    margin-top: auto;
}

.blog-card-cta:hover {
    color: #FEC96D;
    gap: 12px;
}

html[dir="rtl"] .blog-card-cta svg {
    transform: scaleX(-1);
}

/* #endregion */


/* #region STAGGER ANIMATION */
.blog-card {
    opacity: 0;
    transform: translateY(30px);
    animation: blogCardIn 0.6s forwards;
}

@keyframes blogCardIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card:nth-child(1) {
    animation-delay: 0.05s;
}

.blog-card:nth-child(2) {
    animation-delay: 0.10s;
}

.blog-card:nth-child(3) {
    animation-delay: 0.15s;
}

.blog-card:nth-child(4) {
    animation-delay: 0.20s;
}

.blog-card:nth-child(5) {
    animation-delay: 0.25s;
}

.blog-card:nth-child(6) {
    animation-delay: 0.30s;
}

.blog-card:nth-child(7) {
    animation-delay: 0.35s;
}

.blog-card:nth-child(8) {
    animation-delay: 0.40s;
}

.blog-card:nth-child(9) {
    animation-delay: 0.45s;
}

/* #endregion */


/* #region SINGLE ARTICLE */

/* Post Hero */
.post-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background-color: #1F2026;
}

.post-hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}

.post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(31, 32, 38, 0.95) 0%, rgba(31, 32, 38, 0.3) 100%);
    z-index: 1;
}

.post-hero-content {
    position: relative;
    z-index: 2;
    width: 90%;
    margin: 0 auto;
    padding-bottom: 60px;
}

.post-hero-content h1 {
    color: #F6F6F6;
    font-size: clamp(32px, 5vw, 60px);
    line-height: 1.15;
    margin-bottom: 20px;
    max-width: 800px;
}

/* Back link */
.post-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #FEC96D;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 30px;
    transition: gap 0.3s;
}

.post-back-link:hover {
    gap: 12px;
}

html[dir="rtl"] .post-back-link svg {
    transform: scaleX(-1);
}

/* Meta */
.post-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    color: rgba(246, 246, 246, 0.7);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta-item i {
    color: #FEC96D;
    font-size: 13px;
}

/* Tags */
.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.post-tag {
    background: rgba(254, 201, 109, 0.15);
    color: #FEC96D;
    padding: 4px 14px;
    border-radius: var(--border-radius);
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    border: 1px solid rgba(254, 201, 109, 0.25);
}

/* Article Body */
.post-body-wrapper {
    padding: 80px 0 120px;
    background-color: #F6F6F6;
}

.post-body {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
}

.post-body h2 {
    font-size: clamp(24px, 3vw, 36px);
    font-family: var(--font-heading);
    color: #1F2026;
    margin: 50px 0 20px;
    line-height: 1.2;
}

.post-body h3 {
    font-size: clamp(20px, 2.5vw, 28px);
    font-family: var(--font-heading);
    color: #1F2026;
    margin: 40px 0 16px;
    line-height: 1.3;
}

.post-body p {
    font-size: 17px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 24px;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}

.post-body ul,
.post-body ol {
    margin: 0 0 24px 20px;
    list-style: disc;
}

.post-body li {
    font-size: 17px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}

.post-body blockquote {
    border-left: 3px solid #FEC96D;
    padding: 16px 24px;
    margin: 30px 0;
    background: rgba(254, 201, 109, 0.06);
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

html[dir="rtl"] .post-body blockquote {
    border-left: none;
    border-right: 3px solid #FEC96D;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.post-body blockquote p {
    color: #555;
    font-style: italic;
    margin-bottom: 0;
}

.post-body img {
    width: 100%;
    border-radius: var(--border-radius);
    margin: 30px 0;
}

.post-body a {
    color: #1F2026;
    text-decoration: underline;
    text-decoration-color: #FEC96D;
    text-underline-offset: 3px;
    transition: color 0.3s;
}

.post-body a:hover {
    color: #FEC96D;
}

.post-body strong {
    font-weight: 500;
    color: #1F2026;
}

/* Divider */
.post-divider {
    width: 60px;
    height: 3px;
    background: #FEC96D;
    margin: 50px 0;
    border-radius: var(--border-radius);
}

/* Author card */
.post-author-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
}

.post-author-card .author-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: #1F2026;
}

.post-author-card .author-role {
    font-size: 14px;
    color: #979797;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}

/* Arabic article body */
html[dir="rtl"] .post-body p,
html[dir="rtl"] .post-body li {
    font-family: "greycliff-arabic-cf", sans-serif;
}

html[dir="rtl"] .post-body ul,
html[dir="rtl"] .post-body ol {
    margin: 0 20px 24px 0;
}

/* #endregion */


/* #region RESPONSIVE */
@media (max-width: 992px) {
    .blog-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .post-hero {
        min-height: 40vh;
    }

    .post-hero-content {
        padding-bottom: 40px;
    }

    .post-body-wrapper {
        padding: 50px 0 80px;
    }

    .post-meta {
        gap: 12px;
    }

    .post-author-card {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .blog-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-hero {
        padding: 60px 0 40px;
    }

    .blog-grid-section {
        padding: 60px 0 80px;
    }
}

/* Noto Sans Arabic for tablet/mobile */
@media (max-width: 1024px) {

    html[dir="rtl"] .post-body p,
    html[dir="rtl"] .post-body li,
    html[dir="rtl"] .post-body blockquote p {
        font-family: "Noto Sans Arabic", sans-serif;
        font-optical-sizing: auto;
        font-variation-settings: "wdth" 100;
    }
}

/* #endregion */