/**
 * Home Page Styles
 * @package Kora_Plus_Pro
 */

.home-page {
    padding: 40px 0;
}

.home-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* === عناوين الأقسام === */
.section-title {
    display: flex;
    align-items: center;
    gap: 20px;
    margin: 0 0 30px;
}

.title-text {
    font-size: 28px;
    font-weight: 900;
    color: #1a1a1a;
    background: linear-gradient(135deg, var(--primary, #00A859), #00c46e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding-bottom: 5px;
}

.title-text::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary, #00A859), transparent);
    border-radius: 2px;
}

.title-line {
    flex: 1;
    height: 3px;
    background: linear-gradient(90deg, #e9ecef, transparent);
}

/* === السليدر الرئيسي === */
.main-slider {
    margin-bottom: 50px;
}

.slider-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 60px rgba(0,0,0,0.2);
    border: 4px solid #fff;
}

.slider-container {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #1a1a1a;
}

.slider-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.1);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-item.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.slider-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.slider-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, 
        rgba(0,0,0,0.95) 0%, 
        rgba(0,0,0,0.6) 40%, 
        rgba(0,0,0,0.3) 70%, 
        transparent 100%);
}

.slider-content {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 60px;
    z-index: 2;
}

.slider-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary, #00A859), #00c46e);
    color: #fff;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 20px;
    box-shadow: 0 6px 25px rgba(0,168,89,0.6);
    transition: all 0.4s;
    position: relative;
    overflow: hidden;
}

.slider-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s;
}

.slider-category:hover::before {
    left: 100%;
}

.slider-category:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 35px rgba(0,168,89,0.8);
}

.slider-title {
    font-size: 42px;
    font-weight: 900;
    line-height: 1.2;
    margin: 0 0 20px;
    text-shadow: 3px 3px 15px rgba(0,0,0,0.8);
}

.slider-title a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-block;
}

.slider-title a:hover {
    color: var(--primary, #00A859);
    transform: translateX(5px);
}

.slider-meta {
    display: flex;
    gap: 25px;
    color: rgba(255,255,255,0.95);
    font-size: 16px;
    font-weight: 700;
}

.slider-meta span {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.5);
    padding: 8px 18px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* أزرار التحكم */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(0,0,0,0.8), rgba(0,0,0,0.6));
    border: 4px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    transition: all 0.4s;
    z-index: 10;
    backdrop-filter: blur(15px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: linear-gradient(135deg, var(--primary, #00A859), #00c46e);
    border-color: var(--primary, #00A859);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 8px 30px rgba(0,168,89,0.6);
}

.slider-prev {
    right: 30px;
}

.slider-next {
    left: 30px;
}

/* النقاط */
.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
    background: rgba(0,0,0,0.4);
    padding: 12px 20px;
    border-radius: 30px;
    backdrop-filter: blur(15px);
}

.slider-dot {
    width: 14px;
    height: 14px;
    background: rgba(255,255,255,0.4);
    border: 3px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.4s;
}

.slider-dot:hover {
    background: rgba(255,255,255,0.7);
    transform: scale(1.2);
}

.slider-dot.active {
    background: var(--primary, #00A859);
    border-color: var(--primary, #00A859);
    transform: scale(1.4);
    box-shadow: 0 0 15px rgba(0,168,89,0.8);
}

/* === أقسام الصفحة الرئيسية === */
.home-sections {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.home-section {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    border: 3px solid #f8f9fa;
    box-shadow: 0 5px 25px rgba(0,0,0,0.06);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 25px;
    background: linear-gradient(135deg, var(--primary, #00A859), #00c46e);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s;
    box-shadow: 0 3px 12px rgba(0,168,89,0.3);
}

.view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(0,168,89,0.5);
}

/* إخفاء التاريخ على الصورة في الديسكتوب */
.section-post .mobile-meta {
    display: none;
}

/* جعل post-thumbnail positioned parent */
.section-post .post-thumbnail {
    position: relative;
}

/* === أنماط عرض المقالات === */

/* Grid - شبكة: مقالات مربعات صغيرة في صف */
.posts-style-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* عدد المقالات في كل صف - ديناميكي */
.posts-per-row-2 {
    grid-template-columns: repeat(2, 1fr) !important;
}

.posts-per-row-3 {
    grid-template-columns: repeat(3, 1fr) !important;
}

.posts-per-row-4 {
    grid-template-columns: repeat(4, 1fr) !important;
}

.posts-per-row-5 {
    grid-template-columns: repeat(5, 1fr) !important;
}

.posts-per-row-6 {
    grid-template-columns: repeat(6, 1fr) !important;
}

.posts-style-grid .section-post {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #f0f0f0;
}

.posts-style-grid .post-thumbnail {
    height: 160px;
    position: relative;
    overflow: hidden;
}

.posts-style-grid .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}

.posts-style-grid .section-post:hover .post-thumbnail img {
    transform: none;
}

.posts-style-grid .post-content {
    padding: 15px;
}

.posts-style-grid .post-title {
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* List - قائمة: صور صغيرة + عنوان جنبها */
.posts-style-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.posts-style-list .section-post {
    display: flex;
    gap: 20px;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    border: 2px solid #f0f0f0;
    align-items: center;
}

.posts-style-list .post-thumbnail {
    width: 160px;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
}

.posts-style-list .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.posts-style-list .post-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
}

.posts-style-list .post-title {
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 8px;
}

.posts-style-list .post-content {
    flex: 1;
}

/* Featured - مميز (أول مقال كبير) */
.posts-style-featured {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.posts-style-featured .featured-post {
    grid-row: 1 / 3;
}

.posts-style-featured .featured-post .post-thumbnail {
    height: 420px;
}

/* Compact - مدمج: صورة مستطيل موحدة بدون تأثير + خط تحت العنوان */
.posts-style-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.posts-style-compact .section-post {
    background: transparent;
    border: none;
}

.posts-style-compact .post-thumbnail {
    height: 200px;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.posts-style-compact .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none; /* بدون تأثير حركة */
}

.posts-style-compact .section-post:hover .post-thumbnail img {
    transform: none; /* بدون تكبير */
}

.posts-style-compact .section-post:hover {
    transform: none; /* بدون رفع */
    box-shadow: none;
    border-color: transparent;
}

.posts-style-compact .post-content {
    padding: 15px 0 0;
}

.posts-style-compact .post-title {
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef; /* خط تحت العنوان فقط */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.posts-style-compact .post-title a:hover {
    color: var(--primary, #00A859);
}

.posts-style-compact .post-cat-badge,
.posts-style-compact .post-excerpt,
.posts-style-compact .post-meta {
    display: none; /* إخفاء العناصر الإضافية */
}

/* === تصميم المقال === */
.section-post {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid #f0f0f0;
    position: relative;
}

.section-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary, #00A859), transparent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.section-post:hover::before {
    transform: scaleX(1);
}

.section-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,168,89,0.15);
    border-color: var(--primary, #00A859);
}

.post-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.section-post:hover .post-thumbnail img {
    transform: none;
}

.post-cat-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary, #00A859);
    color: #fff;
    padding: 6px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 5;
}

.post-content {
    padding: 20px;
}

.post-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.5;
    margin: 0 0 12px;
}

.post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.post-title a:hover {
    color: var(--primary, #00A859);
}

.post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.post-meta {
    font-size: 13px;
    color: #999;
    font-weight: 600;
}

/* Featured Post */
.featured-post .post-thumbnail {
    height: 420px;
}

.featured-post .post-title {
    font-size: 24px;
}

.featured-post .post-excerpt {
    font-size: 15px;
}

/* === Responsive === */
@media (max-width: 992px) {
    .slider-container {
        height: 500px;
    }
    
    .slider-title {
        font-size: 32px;
    }
    
    .slider-content {
        padding: 50px 40px;
    }
    
    .posts-style-grid,
    .posts-style-compact {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .posts-style-featured {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .slider-wrapper {
        border-radius: 15px;
        border-width: 3px;
    }
    
    .slider-container {
        height: 450px;
    }
    
    .slider-content {
        padding: 40px 25px;
    }
    
    .slider-category {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .slider-title {
        font-size: 26px;
    }
    
    .slider-meta {
        gap: 15px;
        font-size: 14px;
    }
    
    .slider-meta span {
        padding: 6px 12px;
    }
    
    .slider-btn {
        width: 55px;
        height: 55px;
        font-size: 22px;
    }
    
    .slider-prev {
        right: 15px;
    }
    
    .slider-next {
        left: 15px;
    }
    
    .slider-dots {
        bottom: 25px;
        padding: 10px 15px;
        gap: 8px;
    }
    
    .slider-dot {
        width: 10px;
        height: 10px;
        border-width: 2px;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .posts-style-grid,
    .posts-style-compact,
    .posts-style-featured {
        grid-template-columns: 1fr;
    }
    
    .posts-style-list .section-post {
        flex-direction: column;
    }
    
    .posts-style-list .post-thumbnail {
        width: 100%;
        height: 220px;
    }
    
    .featured-post .post-thumbnail {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .slider-container {
        height: 380px;
    }
    
    .slider-content {
        padding: 30px 20px;
    }
    
    .slider-title {
        font-size: 22px;
    }
    
    .slider-btn {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

