/**
 * Category Sections CSS - 7 Professional Styles
 * Version: 1.0
 * Modern 2025 Design
 */

/* ===============================
   COMMON SECTION STYLES
   =============================== */

.home-category-section {
    margin: 10px 0;
    padding: 10px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

/* Section Title */
.section-title-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 3px solid #e9ecef;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 32px;
    font-weight: 900;
    color: #1a1a1a;
    margin: 0;
    position: relative;
}

.section-title-icon {
    font-size: 40px;
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
    background-clip: initial !important;
    color: initial !important;
}

.section-title-line {
    position: absolute;
    bottom: -20px;
    left: 0;
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, #00A859, #00c46e);
    border-radius: 50px;
}

.view-all-link {
    padding: 12px 25px;
    background: linear-gradient(135deg, #00A859, #00c46e);
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 800;
    font-size: 15px;
    box-shadow: 0 5px 20px rgba(0,168,89,0.3);
}

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

/* Lazy Loading Images */
.lazy-home-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #e9ecef, #f8f9fa);
}

.lazy-home-img[data-src] {
    filter: blur(5px);
}

/* ===============================
   STYLE 1: GRID - شبكة
   =============================== */

.section-style-grid .section-content-wrapper {
    background: transparent;
}

.grid-layout {
    display: grid;
    gap: 10px;
}

.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

.grid-item {
    background: #fff;
    border: 3px solid #e8f4f8;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.grid-item:hover {
    border-color: #00A859;
    box-shadow: 0 8px 35px rgba(0,168,89,0.2);
}

.grid-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.grid-item-img {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
}

.grid-item-img,
.list-item-img,
.featured-big-img,
.featured-small-img,
.compact-item-img {
    position: relative;
}

.grid-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* No transform on hover */

.post-category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #00A859, #00c46e);
    color: #fff;
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 800;
    box-shadow: 0 4px 15px rgba(0,168,89,0.4);
}

.grid-item-content {
    padding: 10px;
}

.grid-item-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.5;
    color: #1a1a1a;
}

.grid-item:hover .grid-item-title {
    color: #00A859;
}

.grid-item-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #888;
    font-weight: 700;
}

/* ===============================
   STYLE 2: LIST - قائمة
   =============================== */

.section-style-list {
    background: linear-gradient(to right, #fef6f8, #ffe8f0);
}

.list-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.list-item {
    background: #fff;
    border: 3px solid #f5d0df;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(240,147,251,0.15);
}

.list-item:hover {
    border-color: #f5576c;
    box-shadow: 0 8px 30px rgba(245,87,108,0.3);
}

.list-item-link {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    padding: 10px;
}

.list-item-img {
    width: 280px;
    height: 180px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.list-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* No transform on hover */

.list-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.list-item-title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.4;
    color: #1a1a1a;
}

.list-item:hover .list-item-title {
    color: #f5576c;
}

.list-item-excerpt {
    margin: 0 0 15px;
    font-size: 15px;
    line-height: 1.6;
    color: #666;
}

.list-item-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    font-weight: 700;
    color: #888;
}

/* ===============================
   STYLE 3: FEATURED - مميز
   =============================== */

.section-style-featured {
    background: linear-gradient(135deg, #e8f4f8, #d4e9f7);
}

.featured-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 10px;
}

.featured-big {
    background: #fff;
    border: 4px solid #b8d4e8;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 35px rgba(0,0,0,0.15);
}

.featured-big:hover {
    border-color: #667eea;
    box-shadow: 0 12px 50px rgba(102,126,234,0.3);
}

.featured-big-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.featured-big-img {
    width: 100%;
    height: 450px;
    position: relative;
}

.featured-big-content {
    padding: 10px;
}

.featured-big-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-big-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 35px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: #fff;
}

.featured-badge {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 10px 22px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 15px;
    box-shadow: 0 5px 20px rgba(102,126,234,0.5);
}

.featured-big-title {
    margin: 0 0 15px;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.3;
}

.featured-big-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    font-weight: 700;
}

.featured-small-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.featured-small {
    background: #fff;
    border: 3px solid #c8e0f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.featured-small:hover {
    border-color: #667eea;
    box-shadow: 0 6px 25px rgba(102,126,234,0.2);
}

.featured-small-link {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    padding: 10px;
}

.featured-small-img {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.featured-small-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-small-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-small-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    color: #1a1a1a;
}

.featured-small:hover .featured-small-title {
    color: #667eea;
}

.featured-small-time {
    font-size: 12px;
    color: #888;
    font-weight: 700;
}

/* ===============================
   STYLE 4: COMPACT - مدمج
   =============================== */

.section-style-compact {
    background: linear-gradient(135deg, #fff5f7, #ffe8ed);
}

.compact-layout {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.compact-item {
    background: #fff;
    border: 3px solid #ffd0dd;
    border-radius: 10px;
    box-shadow: 0 3px 12px rgba(255,147,180,0.15);
}

.compact-item:hover {
    border-color: #ff6b9d;
    box-shadow: 0 5px 20px rgba(255,107,157,0.3);
}

.compact-item-link {
    display: flex;
    gap: 10px;
    padding: 10px;
    text-decoration: none;
    color: inherit;
}

.compact-item-img {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.compact-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.compact-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.compact-item-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.compact-item:hover .compact-item-title {
    color: #ff6b9d;
}

.compact-item-time {
    font-size: 11px;
    color: #888;
    font-weight: 700;
}

/* ===============================
   STYLE 5: MAGAZINE - مجلة (محسّن)
   =============================== */

.section-style-magazine {
    background: #f8f9fa;
}

.magazine-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.magazine-main {
    background: #fff;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.magazine-main:hover {
    border-color: #00A859;
    box-shadow: 0 6px 20px rgba(0,168,89,0.2);
}

.magazine-main-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.magazine-main-img {
    width: 100%;
    height: 250px;
}

.magazine-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.magazine-main-content {
    padding: 20px;
}

.magazine-cat {
    display: inline-block;
    background: #00A859;
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 12px;
}

.magazine-main-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.4;
    color: #1a1a1a;
    border-bottom: 3px solid #e9ecef;
    padding-bottom: 8px;
}

.magazine-main:hover .magazine-main-title {
    color: #00A859;
    border-color: #00A859;
}

.magazine-main-excerpt {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

.magazine-main-time {
    font-size: 12px;
    color: #888;
    font-weight: 700;
}

.magazine-sidebar {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.magazine-side-item {
    background: #fff;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}

.magazine-side-item:hover {
    border-color: #00A859;
    box-shadow: 0 5px 18px rgba(0,168,89,0.15);
}

.magazine-side-link {
    display: flex;
    gap: 12px;
    padding: 10px;
    text-decoration: none;
    color: inherit;
}

.magazine-side-img {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

.magazine-side-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.magazine-side-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.magazine-side-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
    color: #1a1a1a;
    border-bottom: 2px solid transparent;
    padding-bottom: 4px;
}

.magazine-side-item:hover .magazine-side-title {
    color: #00A859;
    border-color: #00A859;
}

.magazine-side-time {
    font-size: 11px;
    color: #888;
    font-weight: 700;
}

/* ===============================
   STYLE 6: MASONRY - بناء حر (محسّن)
   =============================== */

.section-style-masonry {
    background: #f8f9fa;
}

.masonry-layout {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.masonry-item {
    background: #fff;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.masonry-item:hover {
    border-color: #00A859;
    box-shadow: 0 6px 20px rgba(0,168,89,0.2);
}

.masonry-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.masonry-item-img {
    width: 100%;
    height: 200px;
    position: relative;
}

.masonry-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.masonry-overlay {
    position: absolute;
    top: 0;
    right: 0;
    padding: 12px;
}

.masonry-cat {
    display: inline-block;
    background: #00A859;
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}

.masonry-content {
    padding: 15px;
}

.masonry-title {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
    color: #1a1a1a;
    border-bottom: 2px solid transparent;
    padding-bottom: 6px;
}

.masonry-item:hover .masonry-title {
    color: #00A859;
    border-color: #00A859;
}

.masonry-time {
    font-size: 12px;
    font-weight: 700;
    color: #888;
}

/* ===============================
   STYLE 7: TIMELINE - خط زمني (محسّن)
   =============================== */

.section-style-timeline {
    background: #f8f9fa;
}

.timeline-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-item {
    background: #fff;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.timeline-item:hover {
    border-color: #00A859;
    box-shadow: 0 6px 20px rgba(0,168,89,0.2);
}

.timeline-link {
    display: flex;
    gap: 20px;
    text-decoration: none;
    color: inherit;
    padding: 15px;
}

.timeline-img {
    width: 200px;
    height: 150px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
}

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

.timeline-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.timeline-cat {
    display: inline-block;
    background: #00A859;
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 10px;
    width: fit-content;
}

.timeline-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.4;
    color: #1a1a1a;
    border-bottom: 3px solid transparent;
    padding-bottom: 6px;
}

.timeline-item:hover .timeline-title {
    color: #00A859;
    border-color: #00A859;
}

.timeline-time {
    font-size: 12px;
    color: #888;
    font-weight: 700;
}

/* ===============================
   STYLE 8: TABS - تبويبات
   =============================== */

.section-style-tabs {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.tabs-layout {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Tabs Navigation */
.section-tabs-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.tab-btn {
    padding: 12px 28px;
    background: #f8f9fa;
    border: 3px solid #e9ecef;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 800;
    color: #1a1a1a;
    cursor: pointer;
    position: relative;
}

.tab-btn:hover {
    background: #e8f9f0;
    border-color: #00A859;
}

.tab-btn.active {
    background: linear-gradient(135deg, #00A859, #00c46e);
    color: #fff;
    border-color: #00A859;
    box-shadow: 0 4px 15px rgba(0,168,89,0.3);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: #fff;
    border-radius: 50px;
}

/* Tab Content */
.tab-content-pane {
    display: none;
}

.tab-content-pane.active {
    display: block;
}

.tabs-grid {
    display: grid;
    gap: 10px;
}

.tabs-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.tabs-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.tabs-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.tabs-grid.cols-5 { grid-template-columns: repeat(5, 1fr); }
.tabs-grid.cols-6 { grid-template-columns: repeat(6, 1fr); }

.tabs-grid-item {
    background: #fff;
    border: 3px solid #d1fae5;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.tabs-grid-item:hover {
    border-color: #00A859;
    box-shadow: 0 6px 25px rgba(0,168,89,0.2);
}

.tabs-item-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.tabs-item-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.tabs-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tabs-item-content {
    padding: 10px;
}

.tabs-item-title {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.5;
    color: #1a1a1a;
    position: relative;
    padding-bottom: 10px;
}

.tabs-item-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #00A859, #00c46e);
    border-radius: 50px;
}

.tabs-grid-item:hover .tabs-item-title::after {
    width: 50% !important;
}

.tabs-grid-item:hover .tabs-item-title {
    color: #00A859;
}

.tabs-item-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    font-weight: 700;
}

.tabs-cat {
    color: #00A859;
}

.tabs-time {
    color: #888;
}

/* ===============================
   RESPONSIVE DESIGN
   =============================== */

@media (max-width: 1200px) {
    .grid-cols-6 { grid-template-columns: repeat(4, 1fr); }
    .grid-cols-5 { grid-template-columns: repeat(3, 1fr); }
    .masonry-layout { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .home-category-section { padding: 30px 20px; }
    .section-title { font-size: 26px; }
    .grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
    .featured-layout { grid-template-columns: 1fr; }
    .magazine-layout { grid-template-columns: 1fr; }
    .masonry-layout { grid-template-columns: repeat(2, 1fr); }
    .timeline-link { flex-direction: column; }
    .timeline-img { width: 100%; height: 200px; }
}

@media (max-width: 768px) {
    .home-category-section { margin: 10px 0; padding: 10px; }
    .section-title { font-size: 22px; }
    .grid-cols-3,
    .grid-cols-4,
    .grid-cols-5,
    .grid-cols-6 { grid-template-columns: repeat(2, 1fr); }
    .list-item-link { flex-direction: column; }
    .list-item-img { width: 100%; height: 200px; }
    .compact-layout { grid-template-columns: 1fr; }
    .magazine-layout { grid-template-columns: 1fr; }
    .masonry-layout { grid-template-columns: repeat(2, 1fr); }
    .timeline-link { flex-direction: column; }
    .timeline-img { width: 100%; height: 180px; }
    .tabs-grid,
    .tabs-grid.cols-3,
    .tabs-grid.cols-4,
    .tabs-grid.cols-5,
    .tabs-grid.cols-6 { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .section-tabs-nav { padding: 10px; gap: 10px; }
    .tab-btn { padding: 10px 20px; font-size: 14px; }
}

@media (max-width: 480px) {
    .grid-layout { grid-template-columns: 1fr !important; }
    .section-title { font-size: 20px; }
    .view-all-link { padding: 10px 20px; font-size: 14px; }
    .masonry-layout { grid-template-columns: 1fr !important; }
    .tabs-grid,
    .tabs-grid.cols-2,
    .tabs-grid.cols-3,
    .tabs-grid.cols-4,
    .tabs-grid.cols-5,
    .tabs-grid.cols-6 { grid-template-columns: 1fr !important; }
    .section-tabs-nav { flex-direction: column; }
    .tab-btn { width: 100%; }
}

