/* blog.css - نسخه بهبود یافته */

:root {
    --primary: #0f7347;
    --primary-light: #00A651;
    --primary-dark: #0a5c38;
    --accent: #ff7e30;
    --accent-light: #ff9d5c;
    --bg-dark: #050814;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-light: #e5e7eb;
    --text-muted: #94a3b8;
    --border-glass: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-hover: 0 20px 40px rgba(0, 166, 81, 0.2);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
/* ===== HERO READABILITY FIX ===== */

.post-hero {
    position: relative;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            to top,
            rgba(5, 8, 20, 0.85) 0%,
            rgba(5, 8, 20, 0.55) 35%,
            rgba(5, 8, 20, 0.15) 70%,
            rgba(5, 8, 20, 0.05) 100%
        );
    z-index: 1;
}

.hero-content {
    position: absolute;
    bottom: 36px;
    right: 36px;
    left: 36px;
    z-index: 10;

    background: rgba(10, 15, 35, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    padding: 28px;
    border-radius: 22px;
}

.hero-content h1 {
    color: #ffffff;
    font-size: 32px;
    line-height: 1.4;
    margin-bottom: 14px;
}

.hero-content p {
    color: #c7d2fe;
    font-size: 15px;
    line-height: 1.8;
}

/* ====== RESET & BASE ====== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: rgb(181, 185, 184) !important;
    color: var(--text-light) !important;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(15, 115, 71, 0.1) 0%, transparent 50%) ,
        radial-gradient(circle at 80% 20%, rgba(0, 166, 81, 0.1) 0%, transparent 50%) !important;
  
}

/* ====== HEADER SPACING ====== */
body::before {
    content: '';
    display: block;
    height: 120px;
}

/* ====== TOP MAGAZINE SECTION ====== */
.blog-magazine {
    max-width: 1300px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 30px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====== HERO POST ====== */
.post-hero {
    min-height: 420px;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-glass);
}

.post-hero:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 166, 81, 0.3);
}

.post-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

.post-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
    z-index: 1;
}

.post-hero a {
    position: absolute;
    bottom: 40px;
    right: 40px;
    left: 40px;
    color: white;
    text-decoration: none;
    z-index: 2;
    transition: var(--transition);
}

.post-hero:hover a {
    bottom: 44px;
}

.post-hero h1 {
    font-size: 32px;
    line-height: 1.4;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    position: relative;
    padding-bottom: 15px;
}

.post-hero h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-light);
    border-radius: 2px;
}

.post-hero p {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.6;
    max-width: 90%;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.post-hero:hover p {
    opacity: 1;
}

/* ====== BADGE FOR FEATURED POST ====== */
.hero-badge {
    position: absolute;
    top: 25px;
    right: 25px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 4px 15px rgba(0, 166, 81, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-badge i {
    font-size: 12px;
}

/* ====== SIDE POSTS ====== */
.side-posts {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-side {
    flex: 1;
    min-height: 200px;
    border-radius: var(--radius-md);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-glass);
}

.post-side:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 166, 81, 0.3);
}

.post-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

.post-side h3 {
    position: absolute;
    bottom: 20px;
    right: 20px;
    left: 20px;
    color: white;
    font-size: 18px;
    line-height: 1.4;
    z-index: 2;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.post-side:hover h3 {
    transform: translateY(-5px);
}

/* ====== SECTION DIVIDER ====== */
.section-divider {
    max-width: 1300px;
    margin: 50px auto 30px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-glass), transparent);
}

.divider-title {
    color: var(--text-muted);
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 10px;
}

.divider-title i {
    color: var(--primary-light);
}

/* ====== GRID SECTION ====== */
.blog-grid {
    max-width: 1300px;
    margin: 0 auto 60px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.post-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #097b4f;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 166, 81, 0.3);
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover::before {
    opacity: 1;
}

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover img {
    transform: scale(1.05);
}

.post-card h4 {
    padding: 20px;
    font-size: 17px;
    line-height: 1.5;
    flex-grow: 1;
    position: relative;
    background: #097b4f;
    color: white;
}

.post-card a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-card:hover a {
    color: var(--primary-light);
}

/* ====== READ MORE BUTTON ====== */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--primary-light);
    font-weight: 600;
    text-decoration: none;
    padding: 8px 0;
    margin: 0 20px 20px;
    border-top: 1px solid var(--border-glass);
    padding-top: 15px;
    transition: gap 0.3s ease;
}

.read-more-btn:hover {
    gap: 15px;
}

.read-more-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(5px);
}

/* ====== CATEGORY TAG ====== */
.category-tag {
    display: inline-block;
    background: rgba(0, 166, 81, 0.15);
    color: var(--primary-light);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 15px 20px 0;
    border: 1px solid rgba(0, 166, 81, 0.2);
    align-self: flex-start;
}
.card-link {
    position: absolute;
    inset: 0;
    z-index: 20;
}
.post-card::before,
.post-card::after {
    pointer-events: none;
}
/*------post-----*/
/* ================= BLOG POST ================= */



/* ===============================
   Content Reset & Readability
================================ */

.post-content {
    max-width: 720px;
    margin: auto;
    font-size: 1.05rem;
    line-height: 2.1;
    color: #e5e7eb;
}

/* headings */

.post-content h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    color: #f9fafb;
    line-height: 1.6;
    margin-top: 56px;
    margin-bottom: 20px;
    font-weight: 700;
}

.post-content h2 { font-size: 1.5rem; }
.post-content h3 { font-size: 1.25rem; }

/* paragraphs */

.post-content p {
    margin-bottom: 28px;
    text-align: justify;
}

/* images inside content */

.post-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 40px auto;
    border-radius: 16px;
    background: #000;
}

/* lists */

.post-content ul,
.post-content ol {
    margin: 32px 0;
    padding-right: 24px;
}

.post-content li {
    margin-bottom: 12px;
}

/* blockquote */

.post-content blockquote {
    border-right: 3px solid #00A651;
    padding: 16px 24px;
    margin: 40px 0;
    background: rgba(0,166,81,0.08);
    border-radius: 12px;
    color: #d1fae5;
}

/* ====== LOADING ANIMATION ====== */
.loading-skeleton {
    animation: skeleton-loading 1.5s infinite ease-in-out;
}

@keyframes skeleton-loading {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 1100px) {
    .blog-magazine {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .post-hero {
        min-height: 380px;
    }
    
    .side-posts {
        flex-direction: row;
    }
    
    .post-side {
        min-height: 180px;
    }
}

@media (max-width: 768px) {
    .blog-magazine {
        margin-top: 100px;
    }
    
    .post-hero h1 {
        font-size: 24px;
    }
    
    .post-hero p {
        font-size: 14px;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .side-posts {
        flex-direction: column;
    }
    
    .hero-badge {
        top: 15px;
        right: 15px;
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .blog-magazine,
    .blog-grid {
        padding: 0 15px;
    }
    
    .post-hero a {
        bottom: 25px;
        right: 25px;
        left: 25px;
    }
    
    .post-side h3 {
        font-size: 16px;
    }
    
    .post-card h4 {
        font-size: 15px;
        padding: 15px;
    }
    
}
