﻿/* ============================================
           BLOG — مجله ریحانو
           ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #1a1a2e;
    direction: rtl;
    padding: 20px;
}

/* ============================================
           HEADER
           ============================================ */
.blog-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 20px 24px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f2f5;
}

    .blog-header .title-section {
        display: flex;
        align-items: center;
        gap: 14px;
    }

        .blog-header .title-section .title-icon {
            width: 50px;
            height: 50px;
            background: linear-gradient(135deg, #003366, #0a4d8c);
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #F4B400;
            font-size: 1.4rem;
            box-shadow: 0 4px 15px rgba(0, 51, 102, 0.2);
        }

        .blog-header .title-section h2 {
            font-weight: 800;
            color: #003366;
            margin: 0;
            font-size: 1.4rem;
        }

        .blog-header .title-section small {
            display: block;
            color: #9ca3af;
            font-size: 0.8rem;
            font-weight: 400;
        }

    .blog-header .header-actions {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
    }

/* ============================================
           SEARCH
           ============================================ */
.blog-search {
    background: #ffffff;
    padding: 12px 20px;
    border-radius: 16px;
    border: 1px solid #f0f2f5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

    .blog-search .search-box {
        flex: 1;
        min-width: 200px;
        display: flex;
        align-items: center;
        background: #f5f7fa;
        border-radius: 50px;
        padding: 4px 16px;
        border: 2px solid transparent;
        transition: all 0.4s ease;
    }

        .blog-search .search-box:focus-within {
            border-color: #F4B400;
            background: #ffffff;
            box-shadow: 0 0 0 4px rgba(244, 180, 0, 0.08);
        }

        .blog-search .search-box i {
            color: #9ca3af;
            font-size: 1rem;
        }

        .blog-search .search-box input {
            border: none;
            background: transparent;
            padding: 10px 12px;
            font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
            font-size: 0.95rem;
            width: 100%;
            outline: none;
            color: #1a1a2e;
        }

            .blog-search .search-box input::placeholder {
                color: #9ca3af;
            }

    .blog-search .categories-badge {
        display: flex;
        gap: 6px;
        flex-wrap: wrap;
    }

        .blog-search .categories-badge .cat-badge {
            padding: 6px 16px;
            border-radius: 50px;
            background: #f0f2f5;
            color: #6b7280;
            font-size: 0.8rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.4s ease;
            border: none;
            font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
        }

            .blog-search .categories-badge .cat-badge:hover {
                background: #003366;
                color: #fff;
            }

            .blog-search .categories-badge .cat-badge.active {
                background: #003366;
                color: #fff;
            }

/* ============================================
           FEATURED POST
           ============================================ */
.featured-post {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f0f2f5;
    margin-bottom: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    transition: all 0.5s ease;
}

    .featured-post:hover {
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    }

    .featured-post .featured-row {
        display: flex;
        flex-wrap: wrap;
    }

    .featured-post .featured-image {
        flex: 1.2;
        min-width: 300px;
        height: 320px;
        position: relative;
        overflow: hidden;
    }

        .featured-post .featured-image img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.7s cubic-bezier(.34, 1.56, .64, 1);
        }

    .featured-post:hover .featured-image img {
        transform: scale(1.03);
    }

    .featured-post .featured-image .featured-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        padding: 4px 18px;
        border-radius: 50px;
        background: linear-gradient(135deg, #F4B400, #d49d00);
        color: #003366;
        font-size: 0.7rem;
        font-weight: 700;
        box-shadow: 0 4px 15px rgba(244, 180, 0, 0.3);
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .featured-post .featured-image .post-category-tag {
        position: absolute;
        bottom: 12px;
        right: 12px;
        padding: 4px 14px;
        border-radius: 50px;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
        color: #fff;
        font-size: 0.7rem;
        font-weight: 500;
    }

    .featured-post .featured-content {
        flex: 1;
        min-width: 280px;
        padding: 28px 30px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

        .featured-post .featured-content .featured-label {
            color: #F4B400;
            font-size: 0.8rem;
            font-weight: 600;
            margin-bottom: 4px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .featured-post .featured-content h3 {
            font-weight: 800;
            color: #003366;
            font-size: 1.5rem;
            margin-bottom: 6px;
            line-height: 1.3;
        }

        .featured-post .featured-content p {
            color: #6b7280;
            font-size: 0.95rem;
            line-height: 1.8;
            margin-bottom: 14px;
        }

        .featured-post .featured-content .post-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 18px;
            margin-bottom: 16px;
        }

            .featured-post .featured-content .post-meta .meta-item {
                display: flex;
                align-items: center;
                gap: 6px;
                color: #9ca3af;
                font-size: 0.85rem;
            }

                .featured-post .featured-content .post-meta .meta-item i {
                    color: #F4B400;
                }

        .featured-post .featured-content .read-btn {
            padding: 12px 28px;
            background: linear-gradient(135deg, #003366, #0a4d8c);
            color: #fff;
            border: none;
            border-radius: 50px;
            font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
            font-weight: 700;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(.34, 1.56, .64, 1);
            display: inline-flex;
            align-items: center;
            gap: 10px;
            box-shadow: 0 4px 20px rgba(0, 51, 102, 0.2);
            width: fit-content;
        }

            .featured-post .featured-content .read-btn:hover {
                transform: translateY(-3px);
                box-shadow: 0 8px 30px rgba(0, 51, 102, 0.3);
            }

/* ============================================
           POSTS GRID
           ============================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.post-item {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f0f2f5;
    transition: all 0.5s cubic-bezier(.34, 1.56, .64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    cursor: pointer;
}

    .post-item:hover {
        transform: translateY(-8px);
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
        border-color: #F4B400;
    }

    /* ============================================
           POST THUMBNAIL
           ============================================ */
    .post-item .post-thumbnail {
        height: 200px;
        position: relative;
        overflow: hidden;
        background: linear-gradient(135deg, #1a1a2e, #003366);
    }

        .post-item .post-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.7s cubic-bezier(.34, 1.56, .64, 1);
        }

    .post-item:hover .post-thumbnail img {
        transform: scale(1.05);
    }

    .post-item .post-thumbnail .post-category-tag {
        position: absolute;
        bottom: 12px;
        right: 12px;
        padding: 4px 14px;
        border-radius: 50px;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(8px);
        color: #fff;
        font-size: 0.7rem;
        font-weight: 500;
    }

    .post-item .post-thumbnail .post-badge {
        position: absolute;
        top: 12px;
        right: 12px;
        padding: 4px 14px;
        border-radius: 50px;
        font-size: 0.65rem;
        font-weight: 700;
        z-index: 2;
        display: flex;
        align-items: center;
        gap: 4px;
    }

        .post-item .post-thumbnail .post-badge.popular {
            background: linear-gradient(135deg, #F4B400, #d49d00);
            color: #003366;
            box-shadow: 0 4px 15px rgba(244, 180, 0, 0.3);
        }

        .post-item .post-thumbnail .post-badge.new {
            background: linear-gradient(135deg, #24c06d, #1a9e58);
            color: #fff;
            box-shadow: 0 4px 15px rgba(36, 192, 109, 0.3);
        }

    /* ============================================
           POST CONTENT
           ============================================ */
    .post-item .post-content {
        padding: 16px 18px 18px;
    }

        .post-item .post-content .post-meta {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 12px;
            margin-bottom: 6px;
        }

            .post-item .post-content .post-meta .meta-item {
                display: flex;
                align-items: center;
                gap: 4px;
                color: #9ca3af;
                font-size: 0.75rem;
            }

                .post-item .post-content .post-meta .meta-item i {
                    color: #F4B400;
                    font-size: 0.7rem;
                }

        .post-item .post-content h4 {
            font-weight: 700;
            color: #003366;
            font-size: 1.05rem;
            margin-bottom: 4px;
            line-height: 1.4;
        }

        .post-item .post-content .post-excerpt {
            color: #6b7280;
            font-size: 0.9rem;
            line-height: 1.7;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            margin-bottom: 12px;
        }

        .post-item .post-content .post-footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-top: 12px;
            border-top: 1px solid #f0f2f5;
        }

            .post-item .post-content .post-footer .read-time {
                display: flex;
                align-items: center;
                gap: 4px;
                color: #9ca3af;
                font-size: 0.75rem;
            }

                .post-item .post-content .post-footer .read-time i {
                    color: #F4B400;
                }

            .post-item .post-content .post-footer .read-more {
                color: #003366;
                font-weight: 600;
                font-size: 0.85rem;
                text-decoration: none;
                display: inline-flex;
                align-items: center;
                gap: 4px;
                transition: all 0.4s ease;
            }

    .post-item:hover .post-content .post-footer .read-more {
        color: #F4B400;
        gap: 8px;
    }

/* ============================================
           NEWSLETTER SECTION
           ============================================ */
.newsletter-section {
    margin-top: 30px;
    background: linear-gradient(135deg, #003366, #0a4d8c);
    border-radius: 16px;
    padding: 40px 45px;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    box-shadow: 0 4px 25px rgba(0, 51, 102, 0.2);
    position: relative;
    overflow: hidden;
}

    .newsletter-section::before {
        content: '';
        position: absolute;
        top: -50%;
        left: -20%;
        width: 50%;
        height: 200%;
        background: radial-gradient(circle, rgba(244, 180, 0, 0.06), transparent 60%);
        pointer-events: none;
    }

    .newsletter-section .newsletter-content {
        position: relative;
        z-index: 2;
    }

        .newsletter-section .newsletter-content h3 {
            font-weight: 800;
            font-size: 1.5rem;
            margin-bottom: 4px;
        }

            .newsletter-section .newsletter-content h3 span {
                color: #F4B400;
            }

        .newsletter-section .newsletter-content p {
            opacity: 0.8;
            font-size: 0.95rem;
        }

    .newsletter-section .newsletter-form {
        display: flex;
        gap: 10px;
        flex-wrap: wrap;
        position: relative;
        z-index: 2;
    }

        .newsletter-section .newsletter-form input {
            padding: 12px 22px;
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-radius: 50px;
            font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
            font-size: 0.95rem;
            min-width: 250px;
            transition: all 0.4s ease;
            background: rgba(255, 255, 255, 0.06);
            color: #fff;
        }

            .newsletter-section .newsletter-form input::placeholder {
                color: rgba(255, 255, 255, 0.5);
            }

            .newsletter-section .newsletter-form input:focus {
                outline: none;
                border-color: #F4B400;
                background: rgba(255, 255, 255, 0.1);
            }

        .newsletter-section .newsletter-form button {
            padding: 12px 32px;
            border: none;
            border-radius: 50px;
            background: linear-gradient(135deg, #F4B400, #d49d00);
            color: #003366;
            font-weight: 700;
            font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
            font-size: 0.95rem;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(.34, 1.56, .64, 1);
        }

            .newsletter-section .newsletter-form button:hover {
                transform: scale(1.03);
                box-shadow: 0 8px 25px rgba(244, 180, 0, 0.3);
            }

/* ============================================
           FOOTER
           ============================================ */
.blog-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 30px;
    padding: 16px 24px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #f0f2f5;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

    .blog-footer .posts-count {
        color: #6b7280;
        font-size: 0.9rem;
    }

        .blog-footer .posts-count strong {
            color: #003366;
        }

    .blog-footer .pagination {
        display: flex;
        gap: 6px;
        list-style: none;
        padding: 0;
        margin: 0;
    }

        .blog-footer .pagination li {
            display: inline-block;
        }

            .blog-footer .pagination li a,
            .blog-footer .pagination li span {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                min-width: 38px;
                height: 38px;
                padding: 0 12px;
                border-radius: 10px;
                border: 1px solid #e5e7eb;
                color: #003366;
                font-weight: 600;
                font-size: 0.85rem;
                text-decoration: none;
                transition: all 0.3s ease;
                background: #fff;
                cursor: pointer;
            }

                .blog-footer .pagination li a:hover {
                    background: #003366;
                    color: #fff;
                    border-color: #003366;
                }

            .blog-footer .pagination li.active span {
                background: #F4B400;
                color: #003366;
                border-color: #F4B400;
            }

/* ============================================
           RESPONSIVE
           ============================================ */
@media (max-width: 992px) {
    .blog-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 18px;
    }

    .featured-post .featured-row {
        flex-direction: column;
    }

    .featured-post .featured-image {
        height: 250px;
        min-width: unset;
    }

    .featured-post .featured-content {
        padding: 20px 24px;
    }

        .featured-post .featured-content h3 {
            font-size: 1.2rem;
        }

    .newsletter-section {
        flex-direction: column;
        text-align: center;
        padding: 30px 25px;
    }

        .newsletter-section .newsletter-form {
            justify-content: center;
        }
}

@media (max-width: 768px) {
    .blog-header .title-section h2 {
        font-size: 1.1rem;
    }

    .blog-header .title-section .title-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 14px;
    }

    .post-item .post-thumbnail {
        height: 160px;
    }

    .post-item .post-content h4 {
        font-size: 0.95rem;
    }

    .post-item .post-content .post-excerpt {
        font-size: 0.85rem;
        -webkit-line-clamp: 1;
    }

    .blog-search {
        flex-direction: column;
        align-items: stretch;
    }

        .blog-search .categories-badge {
            justify-content: center;
        }

            .blog-search .categories-badge .cat-badge {
                font-size: 0.7rem;
                padding: 4px 12px;
            }

    .featured-post .featured-image {
        height: 200px;
    }

    .featured-post .featured-content {
        padding: 16px 18px;
    }

        .featured-post .featured-content h3 {
            font-size: 1rem;
        }

        .featured-post .featured-content p {
            font-size: 0.85rem;
        }

    .blog-footer {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        padding: 14px 18px;
    }

    .featured-post .featured-content .read-btn {
        width: 100%;
        justify-content: center;
    }

    .newsletter-section .newsletter-content h3 {
        font-size: 1.2rem;
    }

    .newsletter-section .newsletter-form input {
        min-width: 100%;
    }

    .newsletter-section .newsletter-form button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .posts-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .post-item .post-thumbnail {
        height: 130px;
    }

    .post-item .post-content {
        padding: 10px 12px 14px;
    }

        .post-item .post-content h4 {
            font-size: 0.85rem;
        }

        .post-item .post-content .post-excerpt {
            display: none;
        }

        .post-item .post-content .post-meta {
            gap: 8px;
        }

            .post-item .post-content .post-meta .meta-item {
                font-size: 0.65rem;
            }

        .post-item .post-content .post-footer .read-time {
            font-size: 0.65rem;
        }

        .post-item .post-content .post-footer .read-more {
            font-size: 0.75rem;
        }

    .post-item .post-thumbnail .post-badge {
        font-size: 0.55rem;
        padding: 2px 10px;
        top: 8px;
        right: 8px;
    }

    .post-item .post-thumbnail .post-category-tag {
        font-size: 0.6rem;
        padding: 2px 10px;
        bottom: 8px;
        right: 8px;
    }

    .blog-header {
        padding: 14px 16px;
    }

        .blog-header .title-section .title-icon {
            width: 36px;
            height: 36px;
            font-size: 0.95rem;
        }

        .blog-header .title-section h2 {
            font-size: 0.95rem;
        }

        .blog-header .title-section small {
            font-size: 0.7rem;
        }

    .blog-footer .posts-count {
        font-size: 0.8rem;
    }

    .blog-footer .pagination li a,
    .blog-footer .pagination li span {
        min-width: 32px;
        height: 32px;
        font-size: 0.75rem;
        padding: 0 8px;
    }

    .blog-search .search-box input {
        font-size: 0.85rem;
        padding: 8px 10px;
    }

    .featured-post .featured-image {
        height: 170px;
    }

    .featured-post .featured-content {
        padding: 14px 16px;
    }

        .featured-post .featured-content h3 {
            font-size: 0.95rem;
        }

        .featured-post .featured-content .post-meta .meta-item {
            font-size: 0.75rem;
        }

        .featured-post .featured-content .read-btn {
            font-size: 0.85rem;
            padding: 10px 20px;
        }

    .featured-post .featured-image .featured-badge {
        font-size: 0.6rem;
        padding: 3px 12px;
        top: 8px;
        right: 8px;
    }

    .newsletter-section {
        padding: 24px 18px;
    }

        .newsletter-section .newsletter-content h3 {
            font-size: 1rem;
        }

        .newsletter-section .newsletter-content p {
            font-size: 0.85rem;
        }
}

/* ============================================
           SCROLLBAR
           ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f0f2f5;
}

::-webkit-scrollbar-thumb {
    background: #F4B400;
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #d49d00;
    }
