/* ================================================================
BLOG PAGE - Figma Spec Implementation
Uses existing CSS variables from variables.css & custom.css
================================================================ */

/* ========== BASE CONTAINER ========== */
.blog-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: var(--c-bg-gradient);
    overflow: hidden;
    padding-bottom: 120px; /* Space for footer */
}

.blog-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.blog-main-wrapper {
    position: relative;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(16px, 2.4vw, 30px);
    z-index: 1;
}

/* ========== PAGE TITLE ========== */
.blog-page-title {
    text-align: center;
    margin: 0 auto 60px;
    position: relative;
}

.blog-page-title-text {
    font-family: var(--font-latin);
    font-weight: 400;
    font-size: 60px;
    line-height: 100%;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 1);
    margin: 0;
    text-align: center;
}

.blog-title-line {
    display: block;
    width: 186px;
    height: 12px;
    background: rgba(212, 175, 55, 1);
    margin: 20px auto 0;
    border-radius: 2px;
}

/* ========== BLOG POSTS GRID ========== */
.blog-posts-grid {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin: 0 auto;
}

/* Clickable wrapper */
.blog-post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.blog-post-card-link:hover .blog-post-card {
    transform: translateY(-4px);
    opacity: 1;
}

/* ========== BLOG POST CARD (Desktop: Auto-height) ========== */
.blog-post-card {
    position: relative;
    max-width: 1230px;
    /* Remove fixed height - let content determine height */
    min-height: 300px;
    margin: 0 auto;
    border-radius: 0 150px 0 150px;
    border-top: 2px solid rgba(255, 255, 255, 1);
    border-bottom: 2px solid rgba(255, 255, 255, 1);
    background: transparent;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0.9;
    display: flex;
    overflow: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease;
    cursor: pointer;
    padding: 20px 40px;
    align-items: center; /* Vertically center content */
}

/* ========== BLOG POST IMAGE ========== */
.blog-post-image-wrapper {
    position: relative;
    width: 394px;
    height: 244px;
    flex-shrink: 0;
    border-radius: 0 80px 0 80px;
    border: 2px solid var(--c-white);
    /* border-image-source: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 17.31%, rgba(255, 255, 255, 0) 86.54%, #FFFFFF 100%); */
    border-image-slice: 1;
    overflow: hidden;
}

.blog-post-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.blog-post-card-link:hover .blog-post-image-wrapper img {
    transform: scale(1.05);
    opacity: 1;
}

/* ========== BLOG POST CONTENT ========== */
.blog-post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 0 0 40px;
    text-align: center;
    gap: 16px; /* Space between excerpt and "More..." */
}

.blog-post-excerpt {
    font-family: var(--font-arabic);
    font-weight: 400;
    font-size: 28px;
    letter-spacing: 0;
    color: rgba(255, 255, 255, 1);
    margin: 0;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* "More..." link - Desktop only (hidden on mobile) */
.blog-post-read-more {
    font-family: var(--font-arabic);
    font-weight: 400;
    font-size: 32px;
    line-height: 100%;
    letter-spacing: 0;
    vertical-align: middle;
    color: rgba(255, 255, 255, 1);
    display: inline-block;
    margin-top: 8px;
    transition: color 0.3s ease;
}

.blog-post-card-link:hover .blog-post-read-more {
    color: var(--c-accent);
}


/* ========== RESPONSIVE - TABLET ========== */
@media (max-width: 1023.98px) {
    .blog-post-card {
        max-width: min(90vw, 800px);
        min-height: auto;
        border-radius: 0 100px 0 100px;
        flex-direction: column;
        padding: 24px;
        align-items: stretch;
    }
    
    .blog-post-image-wrapper {
        width: 100%;
        height: 200px;
        border-radius: 0 60px 0 60px;
    }
    
    .blog-post-content {
        padding: 24px 0 0;
        gap: 12px;
    }
    
    .blog-post-excerpt {
        font-size: 20px;
        line-height: 24px;
    }
    
    .blog-post-read-more {
        font-size: 24px;
    }
}

/* ========== RESPONSIVE - MOBILE (Hide "More..." link) ========== */
@media (max-width: 767.98px) {
    .blog-page{
        padding-bottom: 20px;
    }
    .blog-page-title-text {
        font-size: 40px;
    }
    
    .blog-title-line {
        width: 120px;
        height: 8px;
    }
    
    .blog-posts-grid {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    .blog-post-card {
        max-width: 183px;
        min-width: 183px;
        min-height: 128px;
        margin: 0 auto;
        border-radius: 0 15px 0 15px;
        border-right: 1px solid var(--c-white);
        border-left: 1px solid var(--c-white);
        border-top: 1px solid var(--c-black);
        border-bottom: 1px solid var(--c-black);
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(5px);
        flex-direction: column;
        padding: 10px 18px;
        opacity: 1;
        align-items: center;
    }
    
    .blog-post-image-wrapper {
        width: 100px;
        height: 50px;
        margin: 5px auto 0;
        border-radius: 0 10px 0 10px;
        border: 2px solid var(--c-white);
    }
    
    .blog-post-content {
        padding: 0 6px;
        gap: 4px;
    }
    
    .blog-post-excerpt {
        font-size: 10px;
        line-height: 13px;
    }
    
    /* Hide "More..." link on mobile */
    .blog-post-read-more {
        display: none;
    }
    
}

/* ========== SMALL MOBILE ========== */
@media (max-width: 319.98px) {
    .blog-page{
        padding-bottom: 20px;
    }
    .blog-page-title-text {
        font-size: 32px;
    }
    
    .blog-post-card {
        max-width: calc(100vw - 20px);
        padding: 8px 14px;
    }
    
    .blog-post-excerpt {
        font-size: 9px;
        line-height: 12px;
    }
}