/* تعريف المتغيرات العامة */
:root {
    --primary-color: #2A4E01;
    --secondary-color: #527529;
    --accent-color: #FBF8D9;
    --text-primary: #2d3436;
    --text-secondary: #5B5B5B;
    --border-color: #e0e0e0;
    --box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

* {
    margin: 0px;
    padding: 0px;
    font-family: "Almarai", sans-serif;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(135deg, #f8fdf5, #ffffff, #f0f8e8);
    background-attachment: fixed;
    line-height: 1.7;
    color: var(--text-primary);
}

section {
    width: 90vw;
    position: relative;
}

/* HEADER */
    /* HEADER */
    header {
        width: 100%;
        margin-bottom: 5vh;
      }
      
      #mobile_header {
        display: none;
      }
      
      /* تصميم الـ menubar المحسن - جميع الشاشات */
      .menubar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: linear-gradient(135deg, 
          #FBF8D9 0%, 
          #F5F2C7 50%, 
          #F0EDB5 100%
        );
        padding: 15px 25px;
        box-shadow: 
          0 2px 10px rgba(42, 78, 1, 0.1),
          inset 0 1px 0 rgba(255, 255, 255, 0.5);
        border-bottom: 2px solid rgba(42, 78, 1, 0.1);
        position: relative;
        overflow: visible; /* تغيير من hidden إلى visible */
      }
      
      .menubar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: linear-gradient(90deg,
          transparent,
          rgba(42, 78, 1, 0.3),
          transparent
        );
      }
      
      .menubar div {
        display: flex;
        gap: 25px;
        font-weight: 700;
        align-items: center;
      }
      
      .menubar div ul {
        display: flex;
        gap: 12px;
        align-items: center;
      }
      
      .menubar div ul li {
        border: 2px solid var(--primary-color);
        border-radius: 50%;
        width: 38px;
        height: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg,
          rgba(255, 255, 255, 0.9),
          rgba(248, 253, 245, 0.8)
        );
        transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: 
          0 3px 8px rgba(42, 78, 1, 0.15),
          inset 0 1px 0 rgba(255, 255, 255, 0.7);
        position: relative;
        overflow: hidden;
      }
      
      .menubar div ul li::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg,
          rgba(42, 78, 1, 0.1),
          rgba(74, 144, 16, 0.08)
        );
        border-radius: 50%;
        opacity: 0;
        transition: opacity 0.3s ease;
      }
      
      .menubar div ul li:hover {
        border-color: var(--secondary-color);
        transform: translateY(-2px) scale(1.05);
        box-shadow: 
          0 6px 15px rgba(42, 78, 1, 0.25),
          inset 0 1px 0 rgba(255, 255, 255, 0.9);
      }
      
      .menubar div ul li:hover::before {
        opacity: 1;
      }
      
      .menubar div ul li:active {
        transform: translateY(0) scale(0.95);
        box-shadow: 
          0 2px 6px rgba(42, 78, 1, 0.2),
          inset 0 1px 3px rgba(42, 78, 1, 0.1);
      }
      
      .menubar a {
        color: var(--primary-color);
        font-size: 18px;
        transition: all 0.3s ease;
        position: relative;
        z-index: 1;
      }
      
      .menubar div ul li:hover a {
        color: var(--secondary-color);
        transform: scale(1.1);
      }
      
      .menubar_left {
        display: flex;
        align-items: center;
        gap: 20px;
      }
      
      .menubar_left span {
        border-right: 2px solid rgba(82, 117, 41, 0.4);
        padding-right: 25px;
        font-size: 16px;
        color: var(--primary-color);
        font-weight: 600;
        position: relative;
      }
      
      .menubar_left span::after {
        content: '';
        position: absolute;
        right: -1px;
        top: 20%;
        bottom: 20%;
        width: 1px;
        background: linear-gradient(to bottom,
          transparent,
          rgba(82, 117, 41, 0.6),
          transparent
        );
      }
      
      /* تحسينات إضافية للـ menubar */
      .menubar {
        transition: all 0.3s ease;
      }
      
      .menubar:hover {
        box-shadow: 
          0 4px 15px rgba(42, 78, 1, 0.15),
          inset 0 1px 0 rgba(255, 255, 255, 0.7);
      }
      
      .menubar_left span {
        transition: all 0.3s ease;
        cursor: default;
      }
      
      .menubar_left span:hover {
        color: var(--secondary-color);
        transform: translateX(-2px);
      }
      
      /* تأثير ripple للأيقونات */
      .menubar div ul li {
        position: relative;
        overflow: hidden;
      }
      
      .menubar div ul li::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 0;
        height: 0;
        background: radial-gradient(circle, 
          rgba(255, 255, 255, 0.6) 0%, 
          rgba(255, 255, 255, 0.3) 70%,
          transparent 100%
        );
        transform: translate(-50%, -50%);
        border-radius: 50%;
        transition: width 0.4s ease, height 0.4s ease;
        pointer-events: none;
      }
      
      .menubar div ul li:active::after {
        width: 60px;
        height: 60px;
      }
      
      /* تحسين الأداء */
      .menubar, .menubar * {
        will-change: transform;
        backface-visibility: hidden;
      }
      
      /* تحسين تموضع contact link */
      .contact-container {
        position: relative;
        display: inline-block;
      }
      
      #contact-link {
        position: relative;
        cursor: pointer;
        padding: 8px 12px;
        border-radius: 8px;
        transition: all 0.3s ease;
        display: inline-flex;
        align-items: center;
        gap: 8px;
      }
      
      #contact-link:hover {
        background: rgba(42, 78, 1, 0.1);
        color: var(--secondary-color);
      }
      
      /* صندوق التولتيب المحسن */
      #tooltip {
        display: none;
        position: fixed; /* تغيير من absolute إلى fixed */
        top: auto;
        left: 50%;
        transform: translateX(-50%) translateY(-10px);
        background: linear-gradient(135deg, #2A4E01 0%, #1e3a01 100%);
        padding: 20px;
        border-radius: 15px;
        box-shadow: 
          0 10px 30px rgba(42, 78, 1, 0.3),
          0 4px 15px rgba(0, 0, 0, 0.2),
          inset 0 1px 0 rgba(255, 255, 255, 0.1);
        min-width: 280px;
        color: white;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        z-index: 9999; /* زيادة z-index */
        opacity: 0;
        visibility: hidden;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.1);
      }
      
      #tooltip.show {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
      }
  
      /* السهم الصغير فوق التولتيب */
      #tooltip::before {
        content: "";
        position: absolute;
        top: -12px;
        left: 50%;
        transform: translateX(-50%);
        border-width: 12px;
        border-style: solid;
        border-color: transparent transparent #2A4E01 transparent;
        filter: drop-shadow(0 -3px 3px rgba(0, 0, 0, 0.1));
      }
      
      /* تحسين تصميم الصفوف */
      #tooltip .row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
      }
      
      #tooltip .row:last-child {
        border-bottom: none;
        margin-bottom: 0;
      }
      
      #tooltip .row:hover {
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        padding: 12px 8px;
      }
      
      /* تحسين النصوص */
      .phone_no,
      #email-text {
        margin: 0;
        font-size: 15px;
        font-weight: 600;
        letter-spacing: 0.5px;
        color: #ffffff;
        font-family: 'Courier New', monospace;
        direction: ltr;
        text-align: left;
      }
  
      /* تحسين الأزرار */
      #tooltip button {
        border-radius: 8px;
        background: linear-gradient(135deg, #ffffff, #f8f9fa);
        font-weight: bold;
        cursor: pointer;
        font-size: 16px;
        border: none;
        color: #2A4E01;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
        position: relative;
        overflow: hidden;
      }
      
      #tooltip button::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #2A4E01, #527529);
        transform: scale(0);
        transition: transform 0.3s ease;
        border-radius: 8px;
        z-index: -1;
      }
      
      #tooltip button:hover::before {
        transform: scale(1);
      }
      
      #tooltip button:hover {
        color: white;
        transform: translateY(-2px) scale(1.05);
        box-shadow: 0 6px 20px rgba(42, 78, 1, 0.3);
      }
      
      #tooltip button i {
        position: relative;
        z-index: 1;
        transition: transform 0.3s ease;
      }
      
      #tooltip button:hover i {
        transform: scale(1.1);
      }
      
      /* تأثيرات إضافية */
      #tooltip {
        animation: tooltipFadeIn 0.4s ease-out;
      }
      
      @keyframes tooltipFadeIn {
        from {
          opacity: 0;
          transform: translateX(-50%) translateY(-20px) scale(0.9);
        }
        to {
          opacity: 1;
          transform: translateX(-50%) translateY(0) scale(1);
        }
      }
      
      /* ضمان ظهور الـ tooltip فوق كل شيء */
      header, .menubar {
        z-index: 100;
      }
      
      .contact-container {
        z-index: 101;
      }
      
      #tooltip {
        pointer-events: auto;
        will-change: transform, opacity;
      }
      
      /* تحسين للشاشات الصغيرة */
      @media (max-width: 768px) {
        #tooltip {
          min-width: 250px;
          padding: 15px;
          position: fixed;
          left: 50%;
          right: auto;
          margin: 0;
          transform: translateX(-50%) translateY(-10px);
        }
        
        #tooltip.show {
          transform: translateX(-50%) translateY(0);
        }
        
        #tooltip::before {
          left: 50%;
          transform: translateX(-50%);
        }
      }
  
      .header {
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        height: 20vh;
        width: 100%;
        background: url("../assets/banner.png");
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
      }
      
      .header_right {
        height: 100%;
        width: 25%;
        background: url("../assets/website_title.png");
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
      }
      
      .header_left {
        width: 60%;
        height: 100%;
      }
      
      /* تصميم البحث البسيط والمتجاوب */
      .header_left form {
        height: 100%;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 8px;
        position: relative;
      }
      
      /* حاوي البحث البسيط */
      .search-container {
        position: relative;
        width: 70%;
      }
      
      /* حقل البحث البسيط */
      input {
        width: 100%;
        height: 45px;
        border: 1px solid #ddd;
        background: white;
        border-radius: 22px;
        padding: 0 16px 0 40px;
        font-size: 14px;
        color: #333;
        transition: border-color 0.2s ease;
        outline: none;
        box-shadow: none;
      }
      
      input:focus {
        border-color: var(--primary-color);
      }
      
      input::placeholder {
        color: #999;
        font-size: 14px;
      }
      
      /* أيقونة البحث البسيطة */
      .search-icon {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: #999;
        font-size: 14px;
        pointer-events: none;
      }
      
      /* زر البحث البسيط */
      .header_left button {
        height: 45px;
        width: 45px;
        border-radius: 22px;
        background: var(--primary-color);
        color: white;
        border: none;
        cursor: pointer;
        font-size: 14px;
        transition: background 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      
      .header_left button:hover {
        background: var(--secondary-color);
      }
      
      /* رابط اللغة البسيط */
      .header_left a {
        height: 45px;
        width: 45px;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 10px;
        background: var(--secondary-color);
        color: white;
        font-size: 13px;
        font-weight: 600;
        transition: background 0.2s ease;
        text-decoration: none;
      }
      
      .header_left a:hover {
        background: #3a5f02;
      }
      
      /* نتائج البحث البسيطة */
      #search-results {
        position: absolute;
        top: calc(100% + 5px);
        left: 0;
        right: 0;
        background: white;
        border: 1px solid #ddd;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        max-height: 300px;
        overflow-y: auto;
        z-index: 1000;
        display: none;
        opacity: 0;
        transition: opacity 0.2s ease;
      }
      
      #search-results.show {
        display: block;
        opacity: 1;
      }

      /* عناصر البحث البسيطة */
      .header_left .search-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        color: #333;
        text-decoration: none;
        border-bottom: 1px solid #f5f5f5;
        transition: background 0.2s ease;
        cursor: pointer;
        width: 100%;
        height: 100%;
        background-color: #ffffff;
      }

      .header_left .search-item:last-child {
        border-bottom: none;
      }

      .header_left .search-item:hover,
      .header_left .search-item.selected {
        background: #f8f9fa;
      }

      .search-item-icon {
        width: 28px;
        height: 28px;
        background: #f0f0f0;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary-color);
        font-size: 12px;
        flex-shrink: 0;
      }

      .search-item-content {
        flex: 1;
        min-width: 0;
      }

      .search-item-type {
        font-size: 10px;
        color: #666;
        text-transform: uppercase;
        font-weight: 600;
        margin-bottom: 2px;
      }

      .search-item-title {
        font-size: 13px;
        font-weight: 500;
        color: #333;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      
      /* تحسين الـ scrollbar */
      #search-results::-webkit-scrollbar {
        width: 6px;
      }
      
      #search-results::-webkit-scrollbar-track {
        background: rgba(42, 78, 1, 0.05);
        border-radius: 10px;
      }
      
      #search-results::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, 
          rgba(42, 78, 1, 0.3), 
          rgba(82, 117, 41, 0.25)
        );
        border-radius: 10px;
        transition: all 0.3s ease;
      }
      
      #search-results::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, 
          rgba(42, 78, 1, 0.5), 
          rgba(82, 117, 41, 0.4)
        );
      }
      
      /* رسائل البحث البسيطة */
      .no-results {
        text-align: center;
        padding: 16px;
        color: #666;
        font-size: 13px;
      }
      
      .no-results i {
        font-size: 16px;
        margin-bottom: 6px;
        color: #ccc;
        display: block;
      }
      
      .search-loading {
        text-align: center;
        padding: 16px;
        color: #666;
        font-size: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
      }
      
      .loading-spinner {
        width: 14px;
        height: 14px;
        border: 2px solid #f3f3f3;
        border-radius: 50%;
        border-top-color: var(--primary-color);
        animation: spin 1s linear infinite;
      }
      
      @keyframes spin {
        to { transform: rotate(360deg); }
      }
      

      nav {
        box-shadow: 0px 10px 20px 8px rgba(0, 0, 0, 0.155); 
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 10px;
        position: relative;
        background-color: #ffffff;
        z-index: 9;
      }
      
      /* زر القائمة للموبايل - مخفي في الديسكتوب */
      .mobile-menu-btn {
        display: none;
        position: fixed;
        top: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        border: none;
        border-radius: 50%;
        color: white;
        font-size: 1.4rem;
        cursor: pointer;
        z-index: 1001;
        box-shadow: 0 8px 25px rgba(42, 78, 1, 0.3);
        transition: all 0.3s ease;
      }
      
      .mobile-menu-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 12px 35px rgba(42, 78, 1, 0.4);
      }
      
      .mobile-menu-btn.active {
        background: linear-gradient(135deg, #dc2626, #ef4444);
        transform: rotate(90deg);
      }
      
      .mobile-menu-btn i {
        transition: transform 0.3s ease;
      }
      
      /* Overlay للموبايل */
      .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(5px);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
      }
      
      .nav-overlay.active {
        opacity: 1;
        visibility: visible;
      }
      
      /* منع التمرير عند فتح القائمة */
      body.nav-open {
        overflow: hidden;
      }
      
      nav ul {
        display: flex;
        justify-content: space-between;
        gap: 20px;
        width: 80%;
        height: 100%;
        flex-wrap: wrap;
      }
      
      nav ul li {
        width: 15%;
        height: 10vh;
        position: relative;
        transition: ease 0.5s;
        border-radius: 10px;
      }
      
      nav ul li a {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10%;
        transition: ease 0.5s;
        color: #2A4E01;
        border-radius: 10px;
        justify-content: center;
      }
      
      nav ul li a i {
        border: 1px solid #2A4E01;
        border-radius: 50%;
        padding: 2px;
      }
      
      /* تصميم للموبايل - قائمة جانبية */
      @media (max-width: 768px) {
        .submenu{
            right: 0px !important;
        }
        .mobile-menu-btn {
          display: flex;
          align-items: center;
          justify-content: center;
        }
        
        nav {
          position: fixed;
          top: 0;
          right: -100%;
          width: 320px;
          height: 100vh;
          background: linear-gradient(180deg, #ffffff 0%, #f8fffe 50%, #f0fdf4 100%);
          box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
          padding: 0;
          flex-direction: column;
          justify-content: flex-start;
          z-index: 1000;
          transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
          border-radius: 20px 0 0 20px;
          border-left: 4px solid var(--primary-color);
          overflow-y: auto;
        }
        
        nav.active {
          right: 0;
        }
        
        nav ul {
          flex-direction: column;
          width: 100%;
          padding: 80px 15px 20px 15px;
          gap: 10px;
          align-items: stretch;
        }
        
        nav ul li {
          width: 100%;
          height: auto;
          background: rgba(255, 255, 255, 0.8);
          border-radius: 15px;
          border: 1px solid rgba(42, 78, 1, 0.1);
          margin-bottom: 8px;
          transform: translateX(50px);
          opacity: 0;
          transition: all 0.5s ease;
        }
        
        nav.active ul li {
          transform: translateX(0);
          opacity: 1;
        }
        
        nav ul li a {
          width: 100%;
          height: auto;
          padding: 18px 20px;
          border-radius: 15px;
          flex-direction: row;
          justify-content: space-between;
          font-size: 1.1rem;
          font-weight: 600;
          gap: 10px;
        }
        
        nav ul li a i {
          border: none;
          padding: 0;
          font-size: 1rem;
        }
        
        nav ul li:hover {
          background: rgba(42, 78, 1, 0.1);
          transform: scale(1.02);
        }
        
        nav ul li.nav_main {
          background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
          border: 2px solid rgba(255, 255, 255, 0.3);
          box-shadow: 0 8px 25px rgba(42, 78, 1, 0.3);
        }
        
        nav ul li.nav_main a {
          color: white;
          border-radius: 10px;
          font-weight: 700;
        }
        nav ul li.nav_main a div {
          display: flex;
          align-items: center;
          gap: 10px;
        }
        nav ul li a img {
            width: 40%;
            object-fit: contain;
          }
        
        nav ul li.nav_main a i {
          color: white;
        }
        
        /* تأثيرات الانتقال للعناصر */
        nav.active ul li:nth-child(1) { transition-delay: 0.1s; }
        nav.active ul li:nth-child(2) { transition-delay: 0.2s; }
        nav.active ul li:nth-child(3) { transition-delay: 0.3s; }
        nav.active ul li:nth-child(4) { transition-delay: 0.4s; }
        nav.active ul li:nth-child(5) { transition-delay: 0.5s; }
        
        /* القوائم المنسدلة في الموبايل - محسنة أكثر */
        .dropdown {
          position: static;
          transform: none;
          background: linear-gradient(135deg, 
            rgba(248, 253, 245, 0.98), 
            rgba(240, 253, 244, 0.95),
            rgba(232, 245, 232, 0.9)
          );
          border-radius: 15px;
          margin: 15px 5px 10px 5px;
          max-height: 0;
          overflow: hidden;
          transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
          padding: 0;
          border: 2px solid transparent;
          background-clip: padding-box;
          box-shadow: 
            0 8px 25px rgba(42, 78, 1, 0.12),
            0 4px 15px rgba(42, 78, 1, 0.08),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
          backdrop-filter: blur(15px) saturate(180%);
          position: relative;
        }
        
        .dropdown::before {
          content: '';
          position: absolute;
          top: -2px;
          left: -2px;
          right: -2px;
          bottom: -2px;
          background: linear-gradient(135deg, 
            rgba(42, 78, 1, 0.2), 
            rgba(74, 144, 16, 0.15),
            rgba(42, 78, 1, 0.1)
          );
          border-radius: 15px;
          z-index: -1;
          opacity: 0;
          transition: opacity 0.4s ease;
        }
        
        .dropdown-toggle.active .dropdown {
          max-height: fit-content;
          padding: 20px 18px;
          transform: translateY(2px);
        }
        
        .dropdown-toggle.active .dropdown::before {
          opacity: 1;
        }
        
        .dropdown div {
          margin-bottom: 10px;
          position: relative;
          opacity: 0;
          transform: translateX(20px);
          animation: slideInFromRight 0.4s ease forwards;
        }
        
        .dropdown div:nth-child(1) { animation-delay: 0.1s; }
        .dropdown div:nth-child(2) { animation-delay: 0.15s; }
        .dropdown div:nth-child(3) { animation-delay: 0.2s; }
        .dropdown div:nth-child(4) { animation-delay: 0.25s; }
        .dropdown div:nth-child(5) { animation-delay: 0.3s; }
        
        @keyframes slideInFromRight {
          to {
            opacity: 1;
            transform: translateX(0);
          }
        }
        
        .dropdown a {
          padding: 18px 20px;
          font-size: 1.05rem;
          color: var(--primary-color);
          border-radius: 12px;
          background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.9), 
            rgba(248, 253, 245, 0.8),
            rgba(240, 253, 244, 0.7)
          );
          margin-bottom: 8px;
          border: 1px solid rgba(42, 78, 1, 0.1);
          font-weight: 600;
          text-decoration: none;
          display: flex;
          justify-content: space-between;
          align-items: center;
          transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
          box-shadow: 
            0 4px 12px rgba(42, 78, 1, 0.08),
            0 2px 6px rgba(42, 78, 1, 0.05),
            inset 0 1px 0 rgba(255, 255, 255, 0.6);
          position: relative;
          overflow: hidden;
        }
        
        .dropdown a::before {
          content: '';
          position: absolute;
          top: 0;
          left: -100%;
          width: 100%;
          height: 100%;
          background: linear-gradient(90deg, 
            transparent, 
            rgba(255, 255, 255, 0.4), 
            transparent
          );
          transition: left 0.6s ease;
        }
        
        .dropdown a:hover,
        .dropdown a:focus {
          background: linear-gradient(135deg, 
            rgba(42, 78, 1, 0.15), 
            rgba(74, 144, 16, 0.12),
            rgba(42, 78, 1, 0.1)
          );
          transform: translateX(-10px) scale(1.03) rotateY(2deg);
          border-color: rgba(42, 78, 1, 0.25);
          box-shadow: 
            0 8px 25px rgba(42, 78, 1, 0.18),
            0 4px 15px rgba(42, 78, 1, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.8);
          color: var(--secondary-color);
          text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        }
        
        .dropdown a:hover::before {
          left: 100%;
        }
        
        /* تأثير للعناصر التي لها قوائم فرعية */
        .dropdown a[style*="flex-direction: row"] {
          position: relative;
        }
        
        .dropdown a[style*="flex-direction: row"]:hover {
          background: linear-gradient(135deg, rgba(42, 78, 1, 0.15), rgba(42, 78, 1, 0.1));
        }
        
        /* القوائم الفرعية محسنة أكثر */
        .submenu {
          margin-top: 12px;
          background: linear-gradient(135deg, 
            rgba(232, 245, 232, 0.95), 
            rgba(240, 253, 244, 0.85),
            rgba(248, 253, 245, 0.8)
          );
          border-radius: 12px;
          padding: 0;
          border: 1px solid rgba(42, 78, 1, 0.15);
          box-shadow: 
            inset 0 3px 10px rgba(42, 78, 1, 0.08),
            0 2px 8px rgba(42, 78, 1, 0.05);
          max-height: 0;
          overflow: hidden;
          transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
          backdrop-filter: blur(8px);
          position: relative;
        }
        
        .submenu::before {
          content: '';
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          height: 1px;
          background: linear-gradient(90deg, 
            transparent,
            rgba(42, 78, 1, 0.3),
            transparent
          );
        }
        
        /* عرض القائمة الفرعية عند hover في الديسكتوب */
        @media (min-width: 769px) {
          .dropdown div:hover .submenu {
            max-height: 300px;
            padding: 12px;
          }
        }
        
        /* تحسينات إضافية للموبايل */
        nav ul li.dropdown-toggle.active {
          background: linear-gradient(135deg, 
            rgba(42, 78, 1, 0.12), 
            rgba(74, 144, 16, 0.08)
          );
          border-radius: 15px;
          box-shadow: 
            0 4px 15px rgba(42, 78, 1, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
          transform: scale(1.02);
        }
        
        .dropdown a i {
          transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
          font-size: 0.95rem;
          color: var(--primary-color);
          padding: 6px;
          border-radius: 50%;
          background: rgba(42, 78, 1, 0.1);
          width: 28px;
          height: 28px;
          display: flex;
          align-items: center;
          justify-content: center;
          box-shadow: 0 2px 6px rgba(42, 78, 1, 0.1);
        }
        
        .dropdown a:hover i {
          background: rgba(255, 255, 255, 0.9);
          color: var(--secondary-color);
          transform: rotate(180deg) scale(1.1);
          box-shadow: 0 4px 12px rgba(42, 78, 1, 0.15);
        }
        
        /* تأثير لمس محسن للموبايل */
        @media (max-width: 768px) {
          .dropdown a:active {
            background: linear-gradient(135deg, 
              rgba(42, 78, 1, 0.22), 
              rgba(74, 144, 16, 0.18),
              rgba(42, 78, 1, 0.15)
            );
            transform: translateX(-8px) scale(0.96);
            box-shadow: 
              0 6px 18px rgba(42, 78, 1, 0.2),
              inset 0 2px 4px rgba(42, 78, 1, 0.1);
          }
          
          .submenu a:active {
            background: linear-gradient(135deg, 
              rgba(42, 78, 1, 0.18), 
              rgba(74, 144, 16, 0.15),
              rgba(42, 78, 1, 0.12)
            );
            transform: translateX(-6px) scale(0.96);
            box-shadow: 
              0 4px 12px rgba(42, 78, 1, 0.15),
              inset 0 1px 3px rgba(42, 78, 1, 0.1);
          }
          
          /* تأثير ripple للروابط */
          .dropdown a,
          .submenu a {
            position: relative;
            overflow: hidden;
          }
          
          .dropdown a::after,
          .submenu a::after {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            background: radial-gradient(
              circle, 
              rgba(255, 255, 255, 0.6) 0%, 
              rgba(255, 255, 255, 0.3) 70%,
              transparent 100%
            );
            transform: translate(-50%, -50%);
            border-radius: 50%;
            transition: width 0.4s ease, height 0.4s ease;
            pointer-events: none;
          }
          
          .dropdown a:active::after,
          .submenu a:active::after {
            width: 200px;
            height: 200px;
          }
        }
        
        .submenu a {
          padding: 15px 18px;
          font-size: 0.98rem;
          background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.95), 
            rgba(248, 253, 245, 0.9),
            rgba(240, 253, 244, 0.85)
          );
          margin: 6px 12px;
          border-radius: 10px;
          border: 1px solid rgba(42, 78, 1, 0.1);
          font-weight: 500;
          box-shadow: 
            0 2px 6px rgba(42, 78, 1, 0.06),
            inset 0 1px 0 rgba(255, 255, 255, 0.7);
          transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
          position: relative;
          overflow: hidden;
          display: block;
        }
        
        .submenu a::before {
          content: '';
          position: absolute;
          top: 0;
          left: -100%;
          width: 100%;
          height: 100%;
          background: linear-gradient(90deg,
            transparent,
            rgba(42, 78, 1, 0.1),
            transparent
          );
          transition: left 0.5s ease;
        }
        
        .submenu a:hover {
          background: linear-gradient(135deg, 
            rgba(42, 78, 1, 0.12), 
            rgba(74, 144, 16, 0.1),
            rgba(42, 78, 1, 0.08)
          );
          transform: translateX(-8px) scale(1.02);
          border-color: rgba(42, 78, 1, 0.2);
          box-shadow: 
            0 5px 15px rgba(42, 78, 1, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
          color: var(--secondary-color);
        }
        
        .submenu a:hover::before {
          left: 100%;
        }
        
        /* تحسين شريط التمرير */
        nav::-webkit-scrollbar {
          width: 6px;
        }
        
        nav::-webkit-scrollbar-track {
          background: rgba(42, 78, 1, 0.1);
        }
        
        nav::-webkit-scrollbar-thumb {
          background: var(--primary-color);
          border-radius: 3px;
        }
      }
      
      @media (max-width: 576px) {
        nav {
          width: 300px;
        }
        
        .mobile-menu-btn {
          width: 50px;
          height: 50px;
          font-size: 1.2rem;
          top: 15px;
          right: 15px;
        }
        
        nav ul {
            height: fit-content;
            justify-content: unset;
          padding: 75px 12px 15px 12px;
        }
        
        nav ul li a {
          padding: 16px 18px;
          font-size: 1.05rem;
        }
      }
      
      @media (max-width: 480px) {
        nav {
          width: 280px;
        }
        
        .mobile-menu-btn {
          width: 45px;
          height: 45px;
          font-size: 1.1rem;
          top: 12px;
          right: 12px;
        }
      }
      
      /* تصميم الديسكتوب فقط */
      @media (min-width: 769px) {
        nav ul li a:hover {
          gap: 15%;
          box-shadow: 0 4px 15px rgba(42, 78, 1, 0.2);
          transform: translateY(-1px);
        }
        
        /* العنصر النشط في الديسكتوب */
        nav ul li.nav_main a {
          background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
          color: white;
          justify-content: center;
          border-radius: 10px;
          box-shadow: 0 6px 20px rgba(42, 78, 1, 0.3);
        }
        
        nav ul li.nav_main a i {
          color: white;
          border-color: white;
        }
        
        nav ul li.nav_main a img {
          filter: brightness(0) invert(1);
        }
      }
      
      nav img {
        width: 100%;
        height: 60%;
        object-fit: contain;
      }
  
      /* القوائم المنسدلة للديسكتوب */
      @media (min-width: 769px) {
        .dropdown {
          position: absolute;
          top: 100%;
          left: 50%;
          transform: translate(-50%, 15px);
          background: white;
          box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
          border-radius: 5px;
          flex-direction: column;
          min-width: 220px;
          z-index: 10;
          border: 1px solid #2a4e0143;
          height: fit-content;
          opacity: 0;
          pointer-events: none;
          transition: all 0.4s ease;
        }
    
        nav ul li:hover .dropdown {
          opacity: 1;
          transform: translate(-50%, 0);
          pointer-events: auto;
        }
    
        .dropdown a {
          padding: 12px 15px;
          text-decoration: none;
          color: #2b2b2b;
          font-weight: bolder;
          display: flex;
          font-size: 14px;
          transition: ease 0.5s;
          justify-content: space-between;
          align-items: flex-start;
          border-radius: 5px;
        }
    
        .dropdown a:hover {
          background-color: #f0f0f0;
          padding-right: 20px;
        }
        
        .submenu {
          position: absolute;
          top: 0;
          left: 100%;
          margin-left: 5px;
          background: white;
          box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
          border-radius: 5px;
          min-width: 200px;
          opacity: 0;
          pointer-events: none;
          transition: all 0.3s ease;
        }
        
        .dropdown div:hover .submenu {
          opacity: 1;
          pointer-events: auto;
        }
      }
  
      /* الكود المكرر للزر القديم محذوف */
  
      /* تحسينات متجاوبة للشاشات الكبيرة فقط */
      @media (min-width: 769px) and (max-width: 1200px) {
        nav ul li {
          width: 18%;
        }
        
        nav img {
          height: 50%;
        }
      }
      
      @media (min-width: 769px) and (max-width: 992px) {
        nav ul {
          width: 95%;
          gap: 15px;
        }
        
        nav ul li {
          width: 18%;
          height: 8vh;
        }
        
        nav ul li a {
          font-size: 0.95rem;
        }
        
        nav img {
          height: 45%;
        }
      }
  
      /* استجابة للشاشات الكبيرة */
      @media (min-width: 1200px) {
        .menubar {
          padding: 18px 40px;
        }
        
        .menubar div {
          gap: 30px;
        }
        
        .menubar div ul {
          gap: 15px;
        }
        
        .menubar div ul li {
          width: 42px;
          height: 42px;
        }
        
        .menubar a {
          font-size: 20px;
        }
        
        .menubar_left span {
          font-size: 18px;
          padding-right: 30px;
        }
      }
      
      @media (max-width: 992px) {
        .menubar {
          padding: 12px 20px;
          background: linear-gradient(135deg, 
            #FBF8D9 0%, 
            #F5F2C7 100%
          );
        }
        
        .menubar div {
          gap: 20px;
        }
        
        .menubar div ul {
          gap: 10px;
        }
        
        .menubar div ul li {
          width: 35px;
          height: 35px;
          border-width: 1.5px;
        }
        
        .menubar a {
          font-size: 16px;
        }
        
        .menubar_left span {
          font-size: 15px;
          padding-right: 20px;
        }
        
        .header {
          height: auto;
          min-height: 15vh;
          padding: 15px 0;
        }
        
        .header_right {
          height: 70px;
        }
        
        .header_left {
          width: 70%;
        }
      }
  
      /* تحسينات خاصة بالشاشات الصغيرة فقط */
      @media (max-width: 768px) {
        .header {
          flex-direction: column;
          padding: 10px;
          height: auto;
        }
        
        .header_right {
          width: 80%;
          height: 80px;
          margin-bottom: 15px;
        }
        
        .header_left {
          width: 90%;
        }
        
        .header_left form {
          flex-wrap: wrap;
        }
        
        input {
          width: 70%;
        }
      }
  
      @media (max-width: 576px) {
        .menubar {
          padding: 8px 15px;
          background: linear-gradient(135deg, 
            #FBF8D9 0%, 
            #F0EDB5 100%
          );
          box-shadow: 0 1px 6px rgba(42, 78, 1, 0.08);
        }
        
        .menubar div {
          gap: 15px;
        }
        
        .menubar div ul {
          gap: 8px;
        }
        
        .menubar div ul li {
          width: 30px;
          height: 30px;
          border-width: 1.5px;
          box-shadow: 0 2px 6px rgba(42, 78, 1, 0.12);
        }
        
        .menubar div ul li:hover {
          transform: translateY(-1px) scale(1.03);
          box-shadow: 0 4px 10px rgba(42, 78, 1, 0.2);
        }
        
        .menubar a {
          font-size: 15px;
        }
        
        .menubar_left span {
          padding-right: 15px;
          font-size: 14px;
          border-right: 1px solid rgba(82, 117, 41, 0.3);
        }
        
        .header_left form {
          flex-direction: row;
          justify-content: center;
        }
        
        .header_left div {
          width: 65% !important;
        }
        
        input {
          width: 100%;
          height: 5vh;
        }
        
        .header_left button, .header_left a {
          height: 5vh;
          width: 5vh;
          font-size: 1rem;
        }
        
        /* الكود القديم المكرر محذوف */
      }
  
      @media (max-width: 480px) {
        .menubar {
          padding: 6px 12px;
          flex-direction: column;
          gap: 8px;
          align-items: center;
        }
        
        .menubar div {
          gap: 12px;
          justify-content: center;
        }
        
        .menubar div ul {
          gap: 6px;
        }
        
        .menubar div ul li {
          width: 28px;
          height: 28px;
          border-width: 1px;
        }
        
        .menubar a {
          font-size: 14px;
        }
        
        .menubar_left {
          order: -1;
        }
        
        .menubar_left span {
          padding-right: 12px;
          font-size: 13px;
          text-align: center;
        }
        
        .header_right {
          height: 60px;
        }
        
        .header_left div {
          width: 60% !important;
        }
        
        input, .header_left button, .header_left a {
          height: 4vh;
        }
        
        .header_left a {
          font-size: 0.8rem;
        }
      }
      
      /* الشاشات الصغيرة جداً */
      @media (max-width: 360px) {
        .menubar {
          padding: 5px 10px;
        }
        
        .menubar div {
          gap: 8px;
        }
        
        .menubar div ul {
          gap: 4px;
        }
        
        .menubar div ul li {
          width: 26px;
          height: 26px;
        }
        
        .menubar a {
          font-size: 13px;
        }
        
        .menubar_left span {
          font-size: 12px;
          padding-right: 8px;
        }
      }
/* END HEADER */


/* SECTIONS TITLE */
.Section_Name {
    width: 100%;
    border-bottom: var(--primary-color) 3px solid;
    margin-bottom: 30px;
    position: relative;
}

.Section_Name::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), transparent);
}

.s_name {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: fit-content;
    padding: 12px 25px;
    border-top-right-radius: 20px;
    border-top-left-radius: 5px;
    font-weight: 600;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

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

.s_name:hover::before {
    left: 100%;
}

.s_name h3 {
    margin: 0;
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}
/* END SECTIONS TITLE */

section {
    margin-bottom: 60px;
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.s_cards {
    display: grid;
    gap: 30px;
    width: 100%;
    height: fit-content;
    grid-template-columns: repeat(4, 1fr);
    align-items: start;
}

.small_div {
    grid-column: 2 / 5;
}

.larag_div {
    grid-column: 1 / 5;
}

.s_card {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    background: white;
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.s_card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.s_card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover);
}

.s_card:hover::before {
    transform: scaleX(1);
}

.card_body {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-content: space-between;
}

.title {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
}

.title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 50%;
    transform: translateX(50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.p {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 16px;
    line-height: 1.7;
}

/* بطاقة الخطب والدروس والمحاضرات (قسم اخترنا لكم) */
.lls_card {
    width: 350px;
    height: 75vh;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background: white;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.lls_card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.lls_card:hover::before {
    transform: scaleX(1);
}

.badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(42, 78, 1, 0.3);
    transition: var(--transition);
}

.badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(42, 78, 1, 0.4);
}

.lls_card:hover {
    transform: translateY(-8px);
    box-shadow: var(--box-shadow-hover);
}

.lls_card-header {
    background: linear-gradient(135deg, var(--accent-color), #f0f8e8);
    color: var(--primary-color);
    padding: 25px 20px;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.lls_card-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(42, 78, 1, 0.1), transparent);
    transition: left 0.6s;
}

.lls_card:hover .lls_card-header::before {
    left: 100%;
}

.lls_card-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.lls_card-content {
    padding: 25px 20px;
    color: var(--text-primary);
    line-height: 1.8;
    text-align: right;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    font-size: 15px;
}

.lls_card-content::-webkit-scrollbar {
    width: 6px;
}

.lls_card-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.lls_card-content::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    border: 1px solid #f1f1f1;
}

.lls_card-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.lls_card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(135deg, #fafafa, #f5f5f5);
}

.nav-button {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(42, 78, 1, 0.2);
    position: relative;
    overflow: hidden;
}

.nav-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scale(0);
    transition: transform 0.3s ease;
    border-radius: 50%;
}

.nav-button:hover::before {
    transform: scale(1);
}

.nav-button:hover {
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(42, 78, 1, 0.3);
}

.nav-button:active {
    transform: translateY(0);
}

.audio-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    border-top: 1px solid #e0e0e0;
}

/* Responsiveness */
@media (max-width: 400px) {
    .lls_card {
        width: 300px;
    }
    
    .volume-control {
        width: 60px;
    }
}
.sli{
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s;
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.lls_active{
    opacity: 1;
    visibility: visible;
    position: relative;
}


/* سلايدر الكتب */
.custom-slider-wrapper {
    position: relative;
    width: 60vw;
    height: 100%;
    margin: auto;
    overflow: hidden;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.custom-slider-track {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 25px;
    transition: var(--transition);
    overflow-x: auto;
    scroll-behavior: smooth;
    width: -webkit-fill-available;
    height: 100%;
    padding: 15px 40px;
}

.custom-slider-track::-webkit-scrollbar {
    height: 6px;
}

.custom-slider-track::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-slider-track::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
    border: 1px solid #f1f1f1;
}

.custom-slider-track::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.custom-slider-track .custom-slide-item {
    min-width: 250px;
    height: 350px;
    background-color: #f8f9fa;
    border-radius: var(--border-radius);
    flex-shrink: 0;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.custom-slider-track .custom-slide-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.custom-slider-button {
    position: absolute;
    top: 50%;
    width: 50px;
    height: 50px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, white, #f8f9fa);
    border: 2px solid var(--primary-color);
    font-size: 20px;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-slider-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.custom-slider-button:hover::before {
    transform: scale(1);
}

.custom-slider-button:hover {
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(42, 78, 1, 0.3);
}

.custom-slider-button.left {
    left: 15px;
}

.custom-slider-button.right {
    right: 15px;
}
/* نهاية السلايدر */

.slider{
    display: flex;
    align-content: space-between;
    flex-direction: column;
    height: fit-content;
    padding: 20px;
    gap: 20px;
}
.slider .p{
    display: none;
}
.slider .p a{
    width: 100%;
    text-align: end;
}
.slider .active{
    display: flex;
    flex-direction: column;
    align-items: center
}
.card_head{
    background-color: #FBFBFB;
    border-bottom: 1px solid #afafaf;
    padding: 10px
}

/* IFrame Design */
.responsive-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* نسبة 16:9 للفيديو */
}

.responsive-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
/* END */

/* HomePage NewPublished */
.tabs {
    background: linear-gradient(135deg, white, #f8f9fa);
    padding: 15px;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    gap: 12px;
    justify-content: space-evenly;
    margin-bottom: 25px;
    flex-wrap: wrap;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    box-shadow: inset 0 -2px 4px rgba(42, 78, 1, 0.1);
}

.tabs button {
    background: white;
    border: 2px solid var(--primary-color);
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
    font-weight: 600;
    width: 22%;
    min-width: 120px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(42, 78, 1, 0.1);
}

.tabs button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: left 0.3s ease;
}

.tabs button:hover::before,
.tabs button.active::before {
    left: 0;
}

.tabs button.active,
.tabs button:hover {
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(42, 78, 1, 0.2);
}
@media (max-width: 768px) {
    .tabs {
        padding: 12px;
        gap: 8px;
    }
    
    .tabs button {
        width: 45%;
        padding: 10px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .tabs button {
        width: 48%;
        padding: 8px 12px;
        font-size: 13px;
    }
}

.container {
    background: white;
    margin: auto;
    box-shadow: var(--box-shadow);
    text-align: center;
    border-radius: var(--border-radius);
    min-height: 320px;
    position: relative;
    transition: var(--transition);
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}
.content-div {
    display: none; /* نخفي كل الديفات بالبداية */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.content-div.active {
    display: block; /* نظهر الديف الفعال */
    height: -webkit-fill-available;
    opacity: 1;
    visibility: visible;
}
.title {
    font-size: 28px;
    color: #2A4E01;
    margin-bottom: 20px;
}
.text {
    font-size: 18px;
    color: #333;
}
.custom-slider-track .homepage_box{
    width: 300px;
    height: 400px;
    text-align: right;
    z-index: 0;
    margin-left: -8vw;
}

.custom-slider-track .homepage_box:hover{
    margin-left: 0vw;
}
.custom-slider-track .homepage_box .box-image-wrapper{
    height: 150px;
}
/* ENd */

.slider_arrows{
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    color: #2a4e0185;
}
.slider_arrows div{
    transition: ease 0.2s;
}
.slider_arrows div:hover{
    color: #2a4e01;
    cursor: pointer;
    transform: scale(1.4)
}

/* Books Page */

.books{
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}
.books a{
    position: relative;
}
.book_card {
    width: 15%;
    min-width: 250px;
    height: 350px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: flex-end;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.book_card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(42, 78, 1, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.book_card:hover::before {
    opacity: 1;
}

.book_card:hover {
    transform: scale(1.08) translateY(-12px);
    box-shadow: 0 15px 40px rgba(42, 78, 1, 0.25);
}

.book_card_info {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    width: 100%;
    height: 100%;
    padding: 25px 15px;
    color: white;
    background-image: linear-gradient(to bottom, transparent 30%, rgba(42, 78, 1, 0.7) 70%, var(--primary-color));
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.book_card:hover .book_card_info {
    background-image: linear-gradient(to bottom, rgba(42, 78, 1, 0.1) 30%, rgba(42, 78, 1, 0.8) 70%, var(--primary-color));
}

.book_card_info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.book_card_info button {
    background: linear-gradient(135deg, white, #f8f9fa);
    padding: 12px 20px;
    border: 2px solid var(--accent-color);
    border-radius: 25px;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.book_card_info button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: left 0.3s ease;
}

.book_card_info button:hover::before {
    left: 0;
}

.book_card_info button:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(42, 78, 1, 0.3);
}

/* End Books Page*/


/* صفحة الخطب والمحاضرات */

:root {
    --primary-color: #7b975a;
    --secondary-color: #2A4E01;
    --accent-color: #FBF8D9;
    --text-primary: #2d3436;
    --text-secondary: #5B5B5B;
    --box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    --box-radius: 24px;
}

.box-container {
    perspective: 1500px;
    width: 360px;
    flex-wrap: wrap;
}

.box {
    background: linear-gradient(145deg, #ffffff, #f8f9ff);
    border-radius: var(--box-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    z-index: 10;
    min-width: 300px;
}

.box:hover {
    transform: translateY(-15px) rotateX(5deg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.box-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
    border-top-left-radius: var(--card-radius);
    border-top-right-radius: var(--card-radius);
}

.box-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%);
    z-index: 2;
}

.box-category {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--accent-color);
    color: #2A4E01;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 1000;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px #fbf8d92b;
    z-index: 3;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.box:hover .box-category {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px #fbf8d98f;
}

.box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    transform-origin: center;
    display: block;
}

.box:hover img {
    transform: scale(1.1);
}

.box-content {
    padding: 30px 25px;
    position: relative;
}

.box-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-secondary);
}

.box-views span{
    margin-left: 7px;
    color: #2A4E01;
}

.box-date span{
    margin-left: 7px;
    color: #2A4E01;
}

.box-title {
    font-size: 1.5vw;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.box-title:after {
    content: "";
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.box:hover .box-title:after {
    width: 100%;
}

.box-description {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 300;
}

.box-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(58, 123, 213, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.read-more-btn:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, #2A4E01, #386702);
    transition: width 0.4s ease;
    z-index: -1;
    border-radius: 50px;
}

.read-more-btn:hover:before {
    width: 100%;
}

.read-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(44, 125, 24, 0.4);
}

@media (max-width: 768px) {
    .box-container {
        width: 90%;
    }

    .box {
        border-radius: 16px;
    }

    .box-title {
        font-size: 22px;
    }

    .box-description {
        font-size: 15px;
    }

    .read-more-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .box-container {
        width: 100%;
    }

    .box-content {
        padding: 20px 15px;
    }

    .box-title {
        font-size: 20px;
    }

    .box-description {
        font-size: 14px;
    }

    .box-meta {
        gap: 6px;
    }

    .box-footer {
        flex-direction: column;
        gap: 10px;
    }

    .box-footer i{
        display: none;
    }

    .read-more-btn {
        width: 100%;
        text-align: center;
    }

    .bookmark-btn {
        width: 40px;
        height: 40px;
    }
}


/* نهاية صفحة الخطب والمحاضرات */

/* Footer Styles */
.footer {
    background-color: #fff;
    border-top: 1px solid var(--border-color);
    padding: 0;
    font-size: 15px;
    width: 100vw;
    margin-top: 20px;
}

.footer-top {
    background-color: var(--primary-color);
    color: white;
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.footer-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='rgba(255,255,255,0.05)' fill-rule='evenodd'/%3E%3C/svg%3E") repeat;
    z-index: 0;
}

.footer_container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
    line-height: 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
    color: white;
}

.footer-title::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.5);
}

.footer-about p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: white;
    transform: translateX(-5px);
}

.footer-links a::before {
    content: "•";
    margin-left: 8px;
    color: rgba(255, 255, 255, 0.6);
}

.popular-item {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start;
}

.popular-item img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    border-radius: 5px;
    margin-left: 12px;
}

.popular-item-info {
    flex: 1;
}

.popular-item-title {
    font-weight: 600;
    color: white;
    font-size: 15px;
    margin-bottom: 3px;
    line-height: 1.4;
}

.popular-item-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
}

.popular-item-date svg {
    margin-left: 5px;
}

.social-icons {
    display: flex;
    margin-top: 20px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    margin-left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    background-color: var(--secondary-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 15px 0;
    text-align: center;
    font-size: 14px;
}

/* تحسينات إضافية للتصميم المتجاوب الشامل */

/* زر العودة للأعلى */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transform: scale(0);
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: scale(1);
}

.scroll-to-top:hover {
    transform: scale(1.1);
    box-shadow: var(--box-shadow-hover);
}

/* تحسينات الاستجابة الشاملة */
@media (max-width: 1200px) {
    .s_cards {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .small_div {
        grid-column: 2 / 4;
    }
    
    .larag_div {
        grid-column: 1 / 4;
    }
}

@media (max-width: 992px) {
    section {
        width: 95vw;
    }
    
    .s_cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .small_div,
    .larag_div {
        grid-column: 1 / 3;
    }
    
    .lls_card {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .custom-slider-wrapper {
        width: 80vw;
    }
}

@media (max-width: 768px) {
    .s_cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .small_div,
    .larag_div {
        grid-column: 1;
    }
    
    .lls_card {
        height: 60vh;
        min-height: 400px;
    }
    
    .custom-slider-wrapper {
        width: 90vw;
    }
    
    .custom-slider-track {
        padding: 10px 25px;
        gap: 15px;
    }
    
    .custom-slider-button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .book_card {
        min-width: 40vw;
        height: 300px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-top {
        padding: 30px 0;
    }
}

@media (max-width: 576px) {
    section {
        width: 98vw;
    }
    
    .Section_Name {
        margin-bottom: 20px;
    }
    
    .s_name {
        padding: 8px 15px;
        font-size: 1.2rem;
    }
    
    .lls_card {
        width: 100%;
        height: 50vh;
        min-height: 350px;
    }
    
    .lls_card-header {
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .lls_card-content {
        padding: 15px;
        font-size: 14px;
    }
    
    .lls_card-footer {
        padding: 15px;
    }
    
    .nav-button {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .custom-slider-wrapper {
        width: 95vw;
    }
    
    .custom-slider-track {
        padding: 10px 20px;
        gap: 10px;
    }
    
    .custom-slider-button {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .custom-slider-button.left {
        left: 10px;
    }
    
    .custom-slider-button.right {
        right: 10px;
    }
    
    .book_card {
        min-width: 40vw;
        height: 250px;
    }
    
    .book_card_info {
        padding: 15px 10px;
    }
    
    .book_card_info h3 {
        font-size: 1rem;
    }
    
    .book_card_info button {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .scroll-to-top {
        bottom: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* تحسين التمرير السلس */
html {
    scroll-behavior: smooth;
}

/* تحسين التركيز للمتصفحات */
*:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* تحسين النصوص */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
}

/* تحسين الأزرار العامة */
button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

button:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* تحسين الروابط */
a {
    transition: var(--transition);
}

a:hover {
    opacity: 0.8;
}

/* تأثيرات التحميل */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s infinite;
}

/* تحسين الطباعة */
@media print {
    .custom-slider-button,
    .nav-button,
    .scroll-to-top {
        display: none !important;
    }
    
    .s_card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* تحسين الشاشات عالية الدقة */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .book_card,
    .custom-slide-item {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* دعم الوضع المظلم - محسن بدون خلفيات سوداء */
@media (prefers-color-scheme: dark) {
    :root {
        --text-primary: #2d3436;
        --text-secondary: #5B5B5B;
        --border-color: #e0e0e0;
    }
    
    body {
        background: linear-gradient(135deg, #f0f8e8, #ffffff, #f8fdf5);
        color: var(--text-primary);
    }
    
    .s_card {
        background: white;
        border: 1px solid var(--border-color);
    }
}

/* تحسين الحركة للمستخدمين الذين يفضلون تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== تحسينات جديدة للصفحة الرئيسية ===== */

/* قسم المقدمة الترحيبي */
.hero-intro {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.hero-intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20h20v20H20zM60 20h20v20H60zM20 60h20v20H20zM60 60h20v20H60z' fill='rgba(255,255,255,0.05)'/%3E%3C/svg%3E") repeat;
    animation: backgroundMove 20s linear infinite;
}

@keyframes backgroundMove {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-60px) translateY(-60px); }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 50px;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.stat-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 30px 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.25);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: white;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

/* تحسينات الأقسام */
.featured-section,
.latest-section {
    margin-bottom: 80px;
    opacity: 1;
    transform: translateY(0);
}

/* بطاقات محسنة */
.enhanced-lectures,
.enhanced-books,
.enhanced-posts {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(42, 78, 1, 0.1);
    overflow: hidden;
    position: relative;
}

.enhanced-lectures::before,
.enhanced-books::before,
.enhanced-posts::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

.card-header-enhanced {
    background: linear-gradient(135deg, #f8fdf5, white);
    padding: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
}

.header-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 5px 15px rgba(42, 78, 1, 0.3);
}

.header-content h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 700;
}

.header-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 0;
}

/* تحسين الدروس والمحاضرات */
.lectures-container {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.lecture-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s ease;
    padding: 30px;
}

.lecture-slide.lls_active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

.lecture-content-wrapper {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.lecture-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.lecture-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.4;
    flex: 1;
    margin-left: 20px;
}

.lecture-type-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 3px 10px rgba(42, 78, 1, 0.3);
}

.lecture-description {
    background: #f8fdf5;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    border-right: 4px solid var(--primary-color);
}

.lecture-description p {
    color: var(--text-primary);
    line-height: 1.8;
    font-size: 1rem;
}

.audio-player-section {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.audio-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--primary-color);
    font-weight: 600;
}

.custom-audio-player {
    width: 100%;
    border-radius: 10px;
    outline: none;
}

.custom-audio-player::-webkit-media-controls-panel {
    background-color: var(--accent-color);
}

.lecture-actions {
    text-align: center;
}

.read-more-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 15px 30px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(42, 78, 1, 0.3);
}

.read-more-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(42, 78, 1, 0.4);
    color: white;
    opacity: 1;
}

/* التنقل بين المحاضرات */
.lectures-navigation {
    background: #f8fdf5;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-btn {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.2rem;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.lecture-indicators {
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

/* تحسين سلايدر الكتب */
.books-slider-wrapper {
    position: relative;
    padding: 30px 0;
}

.books-slider-track {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    padding: 0 60px;
    scroll-behavior: smooth;
}

.books-slider-track::-webkit-scrollbar {
    height: 8px;
}

.books-slider-track::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.books-slider-track::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

.book-card-enhanced {
    min-width: 280px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(42, 78, 1, 0.1);
    transition: var(--transition);
    text-decoration: none;
    position: relative;
}

.book-card-enhanced:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(42, 78, 1, 0.2);
    color: inherit;
    opacity: 1;
}

.book-image-container {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.book-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.book-card-enhanced:hover .book-image-container img {
    transform: scale(1.1);
}

.book-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(42, 78, 1, 0.8), rgba(82, 117, 41, 0.6));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: var(--transition);
}

.book-card-enhanced:hover .book-overlay {
    opacity: 1;
}

.book-overlay i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.book-category-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.book-info {
    padding: 25px;
    text-align: center;
}

.book-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.book-action-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.book-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 78, 1, 0.3);
}

/* تحسين أزرار التنقل */
.slider-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 3px 10px rgba(42, 78, 1, 0.2);
}

.slider-nav-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.slider-nav-btn.right {
    right: 10px;
}

.slider-nav-btn.left {
    left: 10px;
}

/* تحسين الفتاوى والمقالات */
.posts-content {
    padding: 30px;
}

.posts-navigation {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

.posts-indicators {
    display: flex;
    gap: 8px;
    align-items: center;
}

.posts-indicators .indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.posts-indicators .indicator.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

.posts-indicators .indicator:hover {
    background: var(--primary-color);
    transform: scale(1.2);
}

.posts-container {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.post-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s ease;
    padding: 30px;
    background: #f8fdf5;
    border-radius: 20px;
    border-right: 5px solid var(--primary-color);
}

.post-item.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

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

.post-type-badge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-meta {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-title {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.4;
}

.post-excerpt {
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 25px;
    font-size: 1rem;
}

.post-actions {
    text-align: left;
}

.posts-navigation {
    position: absolute;
    bottom: 20px;
    right: 30px;
    display: flex;
    gap: 10px;
}

/* تحسين التابات الجديدة */
.enhanced-tabs-container {
    background: linear-gradient(135deg, #f8fdf5, white);
    border-bottom: 3px solid var(--primary-color);
}

.tabs-navigation {
    display: flex;
    justify-content: center;
    gap: 0;
    padding: 20px;
    flex-wrap: wrap;
}

.tab-button {
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 15px 25px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 150px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.tab-button:first-child {
    border-radius: 25px 0 0 25px;
}

.tab-button:last-child {
    border-radius: 0 25px 25px 0;
}

.tab-button:not(:first-child):not(:last-child) {
    border-radius: 0;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: left 0.3s ease;
    z-index: -1;
}

.tab-button.active::before,
.tab-button:hover::before {
    left: 0;
}

.tab-button.active,
.tab-button:hover {
    color: white;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 78, 1, 0.2);
}

.tabs-content-wrapper {
    padding: 30px;
}

.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسين المحتوى الجديد */
.content-slider-wrapper {
    position: relative;
    padding: 20px 0;
}

.content-slider-track {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    padding: 0 60px;
    scroll-behavior: smooth;
}

.content-slider-track::-webkit-scrollbar {
    height: 8px;
}

.content-slider-track::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.content-slider-track::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

.latest-item {
    min-width: 300px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(42, 78, 1, 0.1);
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.latest-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(42, 78, 1, 0.2);
    color: inherit;
    opacity: 1;
}

.latest-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.latest-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.latest-item:hover .latest-image img {
    transform: scale(1.1);
}

.latest-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(42, 78, 1, 0.8), rgba(82, 117, 41, 0.6));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    opacity: 0;
    transition: var(--transition);
}

.latest-item:hover .latest-overlay {
    opacity: 1;
}

.latest-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}

.latest-info {
    padding: 25px;
}

.latest-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.latest-date,
.latest-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

.latest-info h5 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.4;
}

.latest-info p {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.latest-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.latest-read-more:hover {
    color: var(--secondary-color);
    opacity: 1;
}

.latest-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

.book-latest .latest-info {
    text-align: center;
}

.content-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 3px 10px rgba(42, 78, 1, 0.2);
}

.content-nav-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.content-nav-btn.right {
    right: 10px;
}

.content-nav-btn.left {
    left: 10px;
}

/* إزالة الخلفيات السوداء من جميع المؤثرات */
.box-image-overlay {
    background: linear-gradient(0deg, rgba(42, 78, 1, 0.7) 0%, rgba(82, 117, 41, 0.3) 100%);
}

/* تحسين الرسوم المتحركة */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تحسين زر العودة للأعلى */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    transform: scale(0);
    transition: all 0.4s ease;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(42, 78, 1, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: scale(1);
}

.scroll-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(42, 78, 1, 0.4);
}

/* تحسينات التصميم المتجاوب للأجزاء الجديدة */
@media (max-width: 1200px) {
    .hero-stats {
        gap: 40px;
    }
    
    .stat-item {
        padding: 25px 30px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .card-header-enhanced {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .header-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .tabs-navigation {
        gap: 10px;
    }
    
    .tab-button {
        min-width: 120px;
        padding: 12px 20px;
    }
}

@media (max-width: 768px) {
    .hero-intro {
        padding: 60px 0;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .stat-item {
        padding: 20px 25px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .lectures-container,
    .posts-container {
        height: auto;
        min-height: 400px;
    }
    
    .lecture-slide,
    .post-item {
        position: relative;
        padding: 20px;
    }
    
    .books-slider-track,
    .content-slider-track {
        padding: 0 30px;
        gap: 15px;
    }
    
    .book-card-enhanced,
    .latest-item {
        min-width: 250px;
    }
    
    .tabs-navigation {
        flex-direction: column;
        gap: 0;
    }
    
    .tab-button {
        border-radius: 0;
        min-width: auto;
        width: 100%;
    }
    
    .tab-button:first-child {
        border-radius: 15px 15px 0 0;
    }
    
    .tab-button:last-child {
        border-radius: 0 0 15px 15px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .lecture-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .lecture-title {
        margin-left: 0;
        font-size: 1.3rem;
    }
    
    .book-card-enhanced,
    .latest-item {
        min-width: 200px;
    }
    
    .slider-nav-btn,
    .content-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        left: 20px;
        font-size: 1rem;
    }
    
    .read-more-button {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
}

/* تحسين الوضوح وإزالة آخر الخلفيات المظلمة */
.custom-slide-item .box-image-overlay {
    background: linear-gradient(0deg, rgba(42, 78, 1, 0.8) 0%, rgba(251, 248, 217, 0.2) 100%);
}

/* تحسين حالة التحميل */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* تحسين إمكانية الوصول */
.latest-item:focus,
.book-card-enhanced:focus,
.read-more-button:focus,
.tab-button:focus,
.nav-btn:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* تحسين للشاشات الصغيرة جداً */
@media (max-width: 320px) {
    .hero-intro {
        padding: 40px 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .book-card-enhanced,
    .latest-item {
        min-width: 180px;
    }
}

/* ===== تحسينات صفحة English ===== */

/* تحسينات خاصة بالصفحة الإنجليزية */
.english-page {
    direction: ltr;
    text-align: left;
}

.english-page .Section_Name .s_name {
    border-top-left-radius: 20px;
    border-top-right-radius: 5px;
}

.english-page .s_name h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.english-page .s_name h3 i {
    font-size: 1.2rem;
}

/* تحسين الإحصائيات في Hero */
.english-hero .hero-stats {
    margin-top: 40px;
}

.english-hero .stat-item {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.english-hero .stat-item:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-5px) scale(1.05);
}

/* تحسين البطاقات الإنجليزية */
.english-books .book-card-english {
    text-align: left;
}

.english-card .card-meta {
    font-family: 'Arial', sans-serif;
}

.english-card .card-date,
.english-card .card-views {
    font-size: 0.85rem;
}

/* تحسين الأزرار للنصوص الإنجليزية */
.english-page .btn-primary,
.english-page .btn-read-more {
    font-family: 'Arial', sans-serif;
    letter-spacing: 0.5px;
}

/* تحسين التنقل بين الصفحات للصفحة الإنجليزية */
.english-page .pagination-wrapper {
    direction: ltr;
}

.english-page .pagination-wrapper nav {
    direction: ltr;
}

/* تحسين رسالة عدم وجود محتوى */
.english-page .no-content-message {
    font-family: 'Georgia', serif;
}

.english-page .no-content-message h3 {
    font-weight: 600;
}

/* تحسين hover effects للبطاقات الإنجليزية */
.english-card:hover .card-title {
    color: var(--secondary-color);
}

.english-card .card-overlay {
    backdrop-filter: blur(5px);
}

/* تحسين الخطوط للعناوين الإنجليزية */
.english-page h1,
.english-page h2,
.english-page h3,
.english-page h4 {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-weight: 600;
}

/* تحسين التباعد للنصوص الإنجليزية */
.english-page .card-description {
    line-height: 1.7;
    font-family: 'Arial', sans-serif;
}

/* تحسين التأثيرات المتحركة */
.english-page .content-section {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* تنسيق التنقل السريع */
.quick-navigation {
    background: linear-gradient(135deg, #f8fdf5 0%, #e8f5e8 100%);
    padding: 60px 0;
    margin: 40px 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.nav-container h3 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 40px;
    font-weight: 600;
}

.nav-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1000px;
    margin: 0 auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    background: white;
    padding: 25px 30px;
    border-radius: 15px;
    text-decoration: none;
    color: var(--primary-color);
    border: 2px solid transparent;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::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.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-color);
    box-shadow: 0 15px 35px rgba(42, 78, 1, 0.2);
    color: var(--primary-color);
    opacity: 1;
}

.nav-link i {
    font-size: 2rem;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.2) rotate(10deg);
    color: var(--primary-color);
}

.nav-link span {
    font-size: 1.1rem;
    font-weight: 600;
    font-family: 'Arial', sans-serif;
}

/* تحسين رسالة عدم وجود محتوى */
.no-content-section .contact-info {
    margin-top: 30px;
    padding: 25px;
    background: rgba(42, 78, 1, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(42, 78, 1, 0.1);
}

.no-content-section .contact-info p {
    color: var(--primary-color);
    font-weight: 500;
    margin: 0;
}

/* تحسين التصميم المتجاوب للصفحة الإنجليزية */
@media (max-width: 992px) {
    .english-page .hero-title {
        font-size: 2.5rem;
    }
    
    .english-page .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .nav-container h3 {
        font-size: 1.9rem;
    }
    
    .nav-links {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .english-page .content-section {
        margin: 40px 0;
    }
    
    .english-page .hero-stats {
        gap: 10px;
    }
    
    .english-page .stat-item {
        padding: 20px 25px;
    }
    
    .quick-navigation {
        padding: 40px 0;
        margin: 30px 0;
    }
    
    .nav-container h3 {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }
    
    .nav-links {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .nav-link {
        padding: 20px 25px;
    }
    
    .nav-link i {
        font-size: 1.6rem;
    }
    
    .nav-link span {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .english-page .hero-title {
        font-size: 1.9rem;
    }
    
    .english-page .hero-subtitle {
        font-size: 1rem;
    }
    
    .english-page .stat-item {
        padding: 15px 20px;
        min-width: 120px;
    }
    
    .english-page .stat-number {
        font-size: 2rem;
    }
    
    .english-page .stat-label {
        font-size: 0.9rem;
    }
    
    .quick-navigation {
        padding: 30px 0;
        margin: 20px 0;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-container h3 {
        font-size: 1.4rem;
        margin-bottom: 25px;
    }
    
    .nav-link {
        padding: 18px 20px;
        gap: 12px;
        border-radius: 12px;
    }
    
    .nav-link i {
        font-size: 1.4rem;
    }
    
    .nav-link span {
        font-size: 0.95rem;
    }
    
    .no-content-section .contact-info {
        padding: 20px;
        margin: 0 15px;
    }
}

/* ===== تحسينات نهائية وتنظيف الكود ===== */

/* إزالة التكرار في scroll-thumb */
.lls_card-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* تحسين تأثيرات الضوء بدلاً من الظلام */
.latest-content-card {
    background: linear-gradient(135deg, white, #f8fdf5);
    border-radius: 25px;
    overflow: hidden;
    position: relative;
}

.latest-content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

/* تحسين الانتقالات والحركات */
.section {
    opacity: 1;
    transform: translateY(0);
}

/* تحسين النصوص والخطوط */
.hero-title,
.lecture-title,
.post-title,
.book-title {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* تحسين تأثيرات الصور */
.latest-image img,
.book-image-container img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    filter: contrast(1.05) brightness(1.02);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.latest-item:hover .latest-image img,
.book-card-enhanced:hover .book-image-container img {
    filter: contrast(1.1) brightness(1.05) saturate(1.1);
}

/* تحسين الظلال لتكون أكثر واقعية */
.enhanced-lectures,
.enhanced-books,
.enhanced-posts,
.latest-content-card {
    box-shadow: 
        0 4px 8px rgba(42, 78, 1, 0.08),
        0 8px 16px rgba(42, 78, 1, 0.06),
        0 16px 32px rgba(42, 78, 1, 0.04);
}

.enhanced-lectures:hover,
.enhanced-books:hover,
.enhanced-posts:hover {
    box-shadow: 
        0 8px 16px rgba(42, 78, 1, 0.12),
        0 16px 32px rgba(42, 78, 1, 0.08),
        0 32px 64px rgba(42, 78, 1, 0.06);
}

/* تحسين نمط المؤشرات */
.lecture-indicators .indicator {
    box-shadow: 0 2px 4px rgba(42, 78, 1, 0.2);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lecture-indicators .indicator:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(42, 78, 1, 0.3);
}

/* تحسين الأزرار للمسة */
.nav-btn,
.slider-nav-btn,
.content-nav-btn,
.tab-button,
.read-more-button {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* تحسين التباعد والتنسيق */
.featured-section .s_cards,
.latest-section .s_cards {
    gap: 40px;
}

/* تحسين أداء الرسوم المتحركة */
.hero-intro,
.lecture-slide,
.post-item,
.latest-item,
.book-card-enhanced {
    will-change: auto;
}

.hero-intro:hover,
.lecture-slide.lls_active,
.post-item.active,
.latest-item:hover,
.book-card-enhanced:hover {
    will-change: transform;
}

/* تحسين التركيز للوحة المفاتيح */
.nav-btn:focus-visible,
.slider-nav-btn:focus-visible,
.content-nav-btn:focus-visible,
.tab-button:focus-visible,
.read-more-button:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(251, 248, 217, 0.3);
}

/* تحسين الطباعة */
@media print {
    .hero-intro {
        background: white !important;
        color: var(--text-primary) !important;
        box-shadow: none !important;
    }
    
    .enhanced-lectures,
    .enhanced-books,
    .enhanced-posts,
    .latest-content-card {
        box-shadow: none !important;
        border: 2px solid var(--border-color) !important;
        break-inside: avoid;
    }
    
    .hero-intro::before {
        display: none !important;
    }

}

/* تحسينات خاصة بنظام iOS */
@supports (-webkit-touch-callout: none) {
    .books-slider-track,
    .content-slider-track {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
    }
    
    .book-card-enhanced,
    .latest-item {
        scroll-snap-align: start;
    }
}

/* تحسين للشاشات عالية الكثافة */
@media (-webkit-min-device-pixel-ratio: 3), (min-resolution: 288dpi) {
    .hero-title,
    .lecture-title,
    .post-title,
    .book-title {
        -webkit-font-smoothing: subpixel-antialiased;
    }
}

/* تحسين الألوان للتباين العالي */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #1a3001;
        --secondary-color: #2d4e01;
        --text-primary: #000000;
        --border-color: #666666;
    }
    
    .enhanced-lectures,
    .enhanced-books,
    .enhanced-posts,
    .latest-content-card {
        border: 2px solid var(--border-color);
    }
}

/* تحسين التصميم للشاشات الكبيرة جداً */
@media (min-width: 1920px) {
    .hero-content {
        max-width: 1600px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 2.2rem;
    }
    
    .stat-item {
        padding: 40px 50px;
    }
    
    .stat-number {
        font-size: 3.5rem;
    }
}

/* تحسين خاص للشاشات فائقة العرض */
@media (min-width: 2560px) {
    .hero-content {
        max-width: 2000px;
    }
    
    .s_cards {
        max-width: 1800px;
        margin: 0 auto;
    }
}

/* إزالة النقاط المتبقية من القوائم */
ul, ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* تحسين المساحات البيضاء */
* + * {
    margin-top: 0;
}

/* تحسين نهائي للأداء */
.hero-intro,
.featured-section,
.latest-section {
    opacity: 1;
    visibility: visible;
}

/* تحسين خاص للشاشات القابلة للطي */
@media (max-width: 280px) {
    .hero-title {
        font-size: 1.3rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 0.8rem;
    }
    
    .stat-item {
        padding: 15px 20px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .tab-button {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* ===== حل مشكلة اختفاء الأقسام ===== */

/* ضمان ظهور جميع الأقسام */
.hero-intro,
.featured-section, 
.latest-section,
section {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    transform: none !important;
    animation: none !important;
}

/* إزالة جميع التأثيرات التي قد تخفي العناصر */
.hero-intro *,
.featured-section *,
.latest-section * {
    opacity: inherit;
    visibility: inherit;
}

/* تأكيد ظهور الأقسام الرئيسية */
.s_cards {
    opacity: 1 !important;
    visibility: visible !important;
    display: grid !important;
}

.s_card {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* تأكيد ظهور قسم Hero */
.hero-content {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.hero-title,
.hero-subtitle,
.hero-stats {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.hero-stats {
    display: flex !important;
}

/* تأكيد ظهور البطاقات المحسنة */
.enhanced-lectures,
.enhanced-books,
.enhanced-posts,
.latest-content-card {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* إزالة أي تأثيرات قد تسبب الإخفاء */
@keyframes fadeInUp {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInUp {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 1; }
    to { opacity: 1; }
}

/* تأكيد عدم إخفاء العناصر عند التمرير */
section:not(.hidden) {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* إصلاح مشكلة التابات */
.tab-content {
    opacity: 1;
    visibility: visible;
}

.tab-content.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* إصلاح مشكلة السلايدرات */
.lecture-slide {
    opacity: 0;
    visibility: hidden;
    position: absolute;
}

.lecture-slide.lls_active {
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
}

.post-item {
    opacity: 0;
    visibility: hidden;
    position: absolute;
}

.post-item.active {
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
}

/* التأكد من ظهور كل شيء بشكل افتراضي */
* {
    box-sizing: border-box;
}

body, html {
    visibility: visible !important;
    opacity: 1 !important;
}

/* إزالة أي contain قد يسبب مشاكل */
* {
    contain: none !important;
}

/* تأكيد الظهور للعناصر المهمة */
.Section_Name,
.s_name {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* تحسين قسم جديد الموقع */
.latest-section {
    margin: 60px 0;
}

.section-description {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-top: 10px;
    opacity: 0.8;
}

.latest-content-card {
    background: linear-gradient(135deg, white, #f8fdf5);
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(42, 78, 1, 0.1);
}

.latest-content-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

/* تحسين شريط التنقل */
.enhanced-tabs-container {
    background: linear-gradient(135deg, #f8fdf5, white);
    padding: 25px 30px 0;
    border-bottom: 1px solid #e8f5e8;
}

.tabs-navigation {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-button {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: white;
    border: 2px solid transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(42, 78, 1, 0.1);
    min-width: 140px;
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: left 0.3s ease;
    z-index: 0;
}

.tab-button:hover::before {
    left: 0;
}

.tab-button.active::before {
    left: 0;
}

.tab-button:hover,
.tab-button.active {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(42, 78, 1, 0.2);
}

.tab-icon {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-color);
    border-radius: 10px;
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.tab-button:hover .tab-icon,
.tab-button.active .tab-icon {
    background: white;
    color: var(--primary-color);
    transform: scale(1.1);
}

.tab-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tab-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.tab-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
    transition: color 0.3s ease;
}

.tab-button:hover .tab-title,
.tab-button.active .tab-title,
.tab-button:hover .tab-count,
.tab-button.active .tab-count {
    color: white;
}

/* شريط التقدم */
.progress-bar {
    height: 4px;
    background: #e8f5e8;
    border-radius: 2px;
    margin-top: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 25%;
    transition: width 0.3s ease;
}

/* محتوى التابات */
.tabs-content-wrapper {
    padding: 30px;
}

.tab-content {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.tab-content.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* رأس المحتوى */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8f5e8;
}

.content-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 700;
}

.content-title i {
    color: var(--secondary-color);
}

.content-stats {
    display: flex;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: #f8fdf5;
    padding: 5px 10px;
    border-radius: 15px;
}

/* تحسين البطاقات */
.latest-item {
    min-width: 280px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(42, 78, 1, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    display: block;
}

.latest-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(42, 78, 1, 0.2);
    color: inherit;
    opacity: 1;
}

.latest-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.latest-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.latest-item:hover .latest-image img {
    transform: scale(1.1);
}

.latest-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(42, 78, 1, 0.8), rgba(82, 117, 41, 0.6));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.latest-item:hover .latest-overlay {
    opacity: 1;
}

.latest-overlay i {
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.latest-overlay span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* الشارات */
.latest-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.post-type-badge,
.lecture-type-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
}

.audio-indicator {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    z-index: 2;
}

.latest-info {
    padding: 20px;
}

.latest-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.latest-date,
.latest-views {
    display: flex;
    align-items: center;
    gap: 5px;
}

.latest-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-excerpt {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.latest-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.latest-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.latest-item:hover .latest-btn {
    transform: scale(1.05);
}

.latest-read-more {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.latest-read-more:hover {
    color: var(--secondary-color);
    gap: 12px;
}

/* حالة فارغة */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    margin: 0;
}

/* تحسين أزرار التنقل */
.content-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    box-shadow: 0 3px 10px rgba(42, 78, 1, 0.2);
}

.content-nav-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 15px rgba(42, 78, 1, 0.3);
}

.content-nav-btn.right {
    right: 10px;
}

.content-nav-btn.left {
    left: 10px;
}

/* تحسين السلايدر */
.content-slider-wrapper {
    position: relative;
    padding: 0 60px;
}

.content-slider-track {
    display: flex;
    gap: 25px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 0;
}

.content-slider-track::-webkit-scrollbar {
    height: 8px;
}

.content-slider-track::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.content-slider-track::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 10px;
}

.content-slider-track::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .tabs-navigation {
        gap: 10px;
    }
    
    .tab-button {
        min-width: 120px;
        padding: 12px 15px;
    }
    
    .tab-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .content-stats {
        flex-wrap: wrap;
    }
    
    .latest-item {
        min-width: 250px;
    }
    
    .content-slider-wrapper {
        padding: 0 50px;
    }
    
    .content-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .tabs-navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-button {
        width: 100%;
        max-width: 200px;
    }
    
    .latest-item {
        min-width: 220px;
    }
    
    .content-slider-wrapper {
        padding: 0 40px;
    }
    
    .content-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    .latest-title {
        font-size: 1rem;
    }
    
    .latest-excerpt {
        font-size: 0.8rem;
    }
}

/* التصميم المتجاوب للبحث */

/* تابلت */
@media (max-width: 992px) {
  .search-container {
    width: 72%;
  }
  
  input {
    height: 45px;
    font-size: 15px;
    padding: 0 16px 0 45px;
  }
  
  .search-icon {
    left: 16px;
    font-size: 15px;
  }
  
  .header_left button,
  .header_left a {
    height: 45px;
    width: 45px;
    font-size: 15px;
  }
  
  #search-results {
    max-height: 300px;
  }
  
  .search-item {
    padding: 10px 14px;
  }
  
  .search-item-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .search-item-type {
    font-size: 10px;
  }
  
  .search-item-title {
    font-size: 13px;
  }
}

/* جوال */
@media (max-width: 768px) {
  .header_left form {
    gap: 6px;
  }
  
  .search-container {
    width: 75%;
  }
  
  input {
    height: 42px;
    font-size: 14px;
    padding: 0 14px 0 42px;
  }
  
  .search-icon {
    left: 14px;
    font-size: 14px;
  }
  
  .header_left button,
  .header_left a {
    height: 42px;
    width: 42px;
    font-size: 14px;
  }
  
  #search-results {
    max-height: 280px;
    border-radius: 10px;
  }
  
  .search-item {
    padding: 10px 12px;
  }
  
  .search-item-icon {
    width: 26px;
    height: 26px;
    font-size: 11px;
  }
  
  .search-item-type {
    font-size: 9px;
  }
  
  .search-item-title {
    font-size: 12px;
  }
  
  .no-results {
    padding: 20px 12px;
    font-size: 13px;
  }
  
  .no-results i {
    font-size: 20px;
  }
}

/* شاشات صغيرة */
@media (max-width: 576px) {
  .search-container {
    width: 70%;
  }
  
  input {
    height: 40px;
    font-size: 14px;
    padding: 0 12px 0 38px;
    border-radius: 20px;
  }
  
  .search-icon {
    left: 12px;
    font-size: 13px;
  }
  
  .header_left button,
  .header_left a {
    height: 40px;
    width: 40px;
    font-size: 13px;
  }
  
  .header_left a {
    border-radius: 10px;
  }
  
  #search-results {
    max-height: 250px;
    border-radius: 8px;
  }
  
  .search-item {
    padding: 8px 10px;
    gap: 8px;
  }
  
  .search-item-icon {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }
  
  .search-item-type {
    font-size: 8px;
  }
  
  .search-item-title {
    font-size: 11px;
  }
  
  .no-results {
    padding: 16px 10px;
    font-size: 12px;
  }
  
  .no-results i {
    font-size: 18px;
  }
  
  .search-loading {
    padding: 16px 10px;
    font-size: 12px;
  }
  
  .loading-spinner {
    width: 14px;
    height: 14px;
  }
}

/* شاشات صغيرة جداً */
@media (max-width: 480px) {
  .search-container {
    width: 68%;
  }
  
  input {
    height: 38px;
    font-size: 13px;
    padding: 0 10px 0 35px;
  }
  
  .search-icon {
    left: 10px;
    font-size: 12px;
  }
  
  .header_left button,
  .header_left a {
    height: 38px;
    width: 38px;
    font-size: 12px;
  }
  
  .search-item {
    padding: 6px 8px;
  }
  
  .search-item-icon {
    width: 22px;
    height: 22px;
    font-size: 9px;
  }
  
  .search-item-title {
    font-size: 10px;
  }
  
  #search-results {
    max-height: 220px;
  }
}