
@import url('./fonts/style.css');
:root {
    --primary-color: #0073e6;
    --primary-gradient: linear-gradient(45deg, #0073e6 0%, #005bb5 100%);
    --dark-color: #1a202c;
    --light-gray-color: #f7fafc;
    --gray-color: #a0aec0;
    --border-color: #edf2f7;
    --border-radius: 12px; /* Slightly larger radius for a modern look */
    --shadow: 0 8px 15px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 15px 25px rgba(0, 0, 0, 0.1);
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Main Container & RTL Support --- */
.blog-home-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 20px;
    font-family: var(--body-font);
    direction: rtl;
}

.section-title {
    font-family: var(--header-font);
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--dark-color);
    border-bottom: 1px solid black;
    padding-bottom: 30px;
    line-height: 1.4
}

/* --- Main Layout Grid (Responsive) --- */
.blog-layout-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 50px;
}

@media (min-width: 1024px) {
    .blog-layout-grid {
        grid-template-columns: 2fr 1fr;
    }
}

/* --- Main Content: Recent Post Cards --- */
.recent-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

.main-post-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.main-post-card:nth-child(2) { animation-delay: 0.1s; }
.main-post-card:nth-child(3) { animation-delay: 0.2s; }
.main-post-card:nth-child(4) { animation-delay: 0.3s; }

.main-post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.card-thumbnail {
    overflow: hidden;
}

.card-thumbnail a { display: block; }

.card-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.main-post-card:hover .card-thumbnail img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-date {
    font-size: 0.8rem;
    color: var(--gray-color);
    margin-bottom: 10px;
}

.card-title {
    margin: 0 0 15px 0;
    line-height: 1.4;
}
.card-title a {
    font-family: var(--header-font);
    font-size: 1.6rem;
    color: var(--dark-color);
    text-decoration: none;
}

.card-excerpt {
    color: #4a5568;
    line-height: 1.6;
    flex-grow: 1;
}
.card-excerpt p {
    margin: 0;
}

.read-more-btn
 {
    margin-right: auto;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    margin-top: 20px;
    padding: 15px 20px;
    background-image: var(--primary-gradient);
    color: #fff;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 115, 230, 0.25);
    position: relative;
}
.read-more-btn::after {
    content: '←';
    font-size: 1.2rem;
    margin-right: 8px;
    transition: transform 0.2s ease;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 115, 230, 0.35);
}
.read-more-btn:hover::after {
    transform: translateX(-4px);
}

/* --- Sidebar Widgets --- */
.blog-sidebar {
    position: sticky;
    top: 40px;
    align-self: start;
}

.sidebar-widget {
    /* SLEEK SHADOW: Replaced the flat background color with a subtle gradient. */
    background-image: linear-gradient(to top, #f8faff 0%, #ffffff 100%);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
    animation: fadeInUp 0.5s ease-out 0.2s forwards;
    opacity: 0;
    /* SLEEK SHADOW: Added a very light border to define the edge. */
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* SLEEK SHADOW: The new, layered box-shadow for a softer, deeper effect. */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02), 0 10px 30px rgba(0, 0, 0, 0.06);
}

.widget-title {
    font-family: var(--header-font);
    font-size: 1.5rem;
    color: var(--dark-color);
    margin: 0 0 20px 0;
    padding-bottom: 25px;
    border-bottom: 1px solid #95aabf;
}

/* Top Posts Widget */
.top-post-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    text-decoration: none;
    transition: background-color 0.2s ease;
    padding: 10px;
    border-radius: var(--border-radius);
}
.top-post-item:hover {
    background-color: #e9eef3;
}

.top-post-item:last-child { margin-bottom: 0; }
.top-post-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-left: 15px;
}
.top-post-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    line-height: 1.4;
}
.top-post-date {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-color);
    font-weight: 400;
    margin-top: 4px;
}

/* --- CREATIVE CATEGORY WIDGET --- */
.category-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.category-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: linear-gradient(to top, #ffffff 0%, #f9fafd 100%);
    padding: 10px 20px;
    border-radius: var(--border-radius);
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
    line-height: 1;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.category-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 5px;
    z-index: 2;
}

.category-card-count {
    font-size: 0.85rem;
    color: var(--gray-color);
    background-color: #fff;
    padding: 2px 8px;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    z-index: 2;
}

.category-card::before {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 100px;
    background-image: var(--primary-gradient);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 1;
}

.category-card:hover::before {
    bottom: -60px;
    opacity: 0.1;
    transform: translateX(-50%) scale(3);
}

/* --- Pagination & Mobile Fixes --- */
.pagination-container { margin-top: 50px; }
.nav-links { display: flex; justify-content: center; align-items: center; gap: 10px; }
.page-numbers {
    display: block;
    padding: 15px 15px;
    border: 1px solid #5fafff;
    border-radius: var(--border-radius);
    text-decoration: none;
    color: #506682;
    font-weight: 600;
    transition: all 0.2s ease;
    font-size: 1rem;
}
.page-numbers:hover { background-image: var(--primary-gradient); color: #fff; border-color: transparent; }
.page-numbers.current { background-image: var(--primary-gradient); color: #fff; border-color: transparent; font-weight: 700; }
    .card-excerpt p
 {
        font-size: 1rem;
        text-align: justify;
    }

@media (max-width: 768px) {
    .card-excerpt p { font-size: 1rem; }
    .card-title a { font-size: 1.4rem; }

    .blog-home-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 60px 0px;
    font-family: var(--body-font);
    direction: rtl;
}
    .card-excerpt p{
        font-size: 1rem;
        text-align: justify;
    }
        .card-title a
 {
        font-size: 1.2rem;
        text-align: justify;
        width: 100%;
        display: block;
    }

    .section-title {
 
    font-size: 1.4rem;
   
}
}
