/* ========================================
   Blog Page - Precision Design Isolation
   ======================================== */

/* Reset/Override for Blog Page */
body.blog-page {
    background-color: #ffffff !important;
    font-family: 'Cairo', 'Tajawal', sans-serif !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.blog-page .top-bg-wrapper {
    position: relative;
    padding-top: 140px;
    min-height: 100vh;
    background: #FCF7EF !important;
}

.blog-page .top-bg-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../images/asset/blog_back.png') !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;
    background-size: cover !important;
    opacity: 0.1 !important;
    z-index: 0 !important;
    pointer-events: none;
}

/* Navbar - Floating Pill */
.blog-page .navbar-wrapper {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1100px;
    z-index: 1000;
}

.blog-page .navbar {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid #f0f0f0 !important;
    border-radius: 100px !important;
    padding: 10px 35px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.blog-page .logo a {
    color: #8E448B !important;
    font-weight: 800 !important;
    font-size: 1.6rem !important;
    text-decoration: none !important;
}

.blog-page .nav-links {
    display: flex !important;
    gap: 25px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.blog-page .nav-links a {
    color: #555 !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    transition: 0.3s;
}

.blog-page .nav-links a.active,
.blog-page .nav-links a:hover {
    color: #2F7482 !important;
}

.blog-page .btn-subscribe {
    background-color: #2F7482 !important;
    color: white !important;
    padding: 10px 25px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    border: none !important;
    cursor: pointer !important;
}

/* Hero Section */
.blog-hero {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 20px 80px;
}

.blog-header-text h1 {
    font-size: 5.5rem !important;
    font-weight: 500 !important;
    color: #121212 !important;
    margin: 0 0 20px 0 !important;
    font-family: 'Cairo', sans-serif !important;
    letter-spacing: -2px !important;
}

.blog-header-text p {
    font-size: 1.15rem !important;
    color: #0D0D0D !important;
    max-width: 750px !important;
    margin: 0 auto 60px !important;
    line-height: 1.8 !important;
    font-weight: 500 !important;
}

/* Featured Card */
.featured-card {
    max-width: 1100px;
    margin: 0 auto;
    cursor: pointer;
    text-decoration: none !important;
    display: block;
}

.featured-img-container {
    width: 100%;
    aspect-ratio: 16 / 8;
    border-radius: 40px !important;
    overflow: hidden !important;
    margin-bottom: 35px !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.05) !important;
}

.featured-img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    transition: transform 0.8s ease !important;
}

.featured-card:hover .featured-img-container img {
    transform: scale(1.02);
}

.featured-content {
    text-align: right;
    padding: 0 10px;
}

[dir="ltr"] .featured-content {
    text-align: left;
}

.featured-item-title {
    font-size: 2.3rem !important;
    font-weight: 500 !important;
    color: #1a1a1a !important;
    margin: 0 0 15px 0 !important;
    line-height: 1.4 !important;
}

.featured-item-meta {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 15px !important;
    color: #999 !important;
    font-size: 1.1rem !important;
}

[dir="ltr"] .featured-item-meta {
    justify-content: flex-start !important;
}

.meta-separator {
    color: #eee !important;
}

/* Mobile Adjustments */
@media (max-width: 992px) {
    .blog-header-text h1 {
        font-size: 4rem !important;
    }

    .featured-img-container {
        aspect-ratio: 16/9;
    }
}

@media (max-width: 768px) {
    .blog-page .navbar-wrapper {
        width: 95%;
        top: 15px;
    }

    .blog-page .navbar {
        padding: 8px 20px !important;
    }

    .blog-header-text h1 {
        font-size: 2.8rem !important;
    }

    .featured-img-container {
        border-radius: 20px !important;
    }

    .featured-item-title {
        font-size: 1.6rem !important;
    }
}

/* ========================================
   Latest Articles Section
   ======================================== */
.latest-articles-section {
    padding: 60px 0 100px;
    background-color: #ffffff;
    position: relative;
    z-index: 2;
}

.section-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 50px;
}

.topbar-content {
    max-width: 600px;
    text-align: right;
}

[dir="ltr"] .topbar-content {
    text-align: left;
}

.topbar-badge {
    display: inline-block;
    border: 1px solid #7cb3be;
    color: #2F7482;
    border-radius: 50px;
    padding: 6px 25px;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 20px;
}

.topbar-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #121212;
    margin: 0 0 15px 0;
    font-family: 'Cairo', sans-serif;
}

.topbar-desc {
    font-size: 1.05rem;
    color: #94a3b8;
    line-height: 1.7;
    margin: 0;
}

.topbar-controls {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.nav-arrow {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #f1f5f9;
    background: #ffffff;
    color: #2F7482;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.nav-arrow:hover {
    border-color: #2F7482;
    background: #2F7482;
    color: #fff;
    box-shadow: 0 8px 25px rgba(47, 116, 130, 0.2);
}

.articles-grid {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.article-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 20px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    flex: 0 0 calc((100% - 80px) / 3);
    /* 3 cards max */
}

.article-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
    transform: translateY(-5px);
}

.card-img-wrapper {
    width: 100%;
    aspect-ratio: 1.1 / 1;
    overflow: hidden;
    position: relative;
    padding: 0;
    background: #f8fafc;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.article-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-content-wrapper {
    padding: 25px;
    text-align: right;
    flex: 1;
    display: flex;
    flex-direction: column;
}

[dir="ltr"] .card-content-wrapper {
    text-align: left;
}

.card-tags {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.tag {
    padding: 5px 15px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.tag-primary {
    background: #e2f2f4;
    color: #2F7482;
}

.tag-secondary {
    background: #e2f2f4;
    color: #2F7482;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.5;
    margin: 0 0 15px 0;
    font-family: 'Cairo', sans-serif;
}

.card-excerpt {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.slider-dots .dot {
    width: 25px;
    height: 6px;
    background: #e2e8f0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.slider-dots .dot.active {
    background: #2F7482;
    width: 45px;
}

@media (max-width: 992px) {
    .article-card {
        flex: 0 0 calc((100% - 40px) / 2);
        /* 2 cards */
    }
}

@media (max-width: 768px) {
    .section-topbar {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }

    .article-card {
        flex: 0 0 100%;
        /* 1 card */
    }

    .topbar-title {
        font-size: 2.2rem;
    }

    .topbar-content,
    [dir="ltr"] .topbar-content {
        text-align: center;
        margin: 0 auto;
    }

    .topbar-controls {
        align-self: center;
    }
}

/* ========================================
   All Articles List Section
   ======================================== */
.all-articles-section {
    padding: 20px 0 100px;
    background-color: #ffffff;
}

.articles-list-container {
    max-width: 1000px;
    margin: 0 auto;
}

.list-article-item {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 40px 0;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
}

.list-article-item:first-child {
    border-top: 1px solid #e2e8f0;
}

.list-article-item:hover .list-article-img img {
    transform: scale(1.05);
}

.list-article-item:hover .list-article-title {
    color: #2F7482;
}

.list-article-img {
    width: 220px;
    height: 220px;
    flex-shrink: 0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
}

.list-article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.list-article-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.list-article-title {
    font-size: 1.8rem;
    font-weight: 500;
    color: #121212;
    line-height: 1.5;
    margin: 0 0 15px 0;
    font-family: 'Cairo', sans-serif;
    transition: color 0.3s;
}

.list-article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 1rem;
}

@media (max-width: 768px) {
    .list-article-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .list-article-img {
        width: 100%;
        height: 250px;
    }
}