/* Modern Hub - Sidebar Layout with Advanced Search */

/* Wrapper */
.modern-hub-wrapper {
    background: #f8fafc;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   SEARCH FILTER SECTION (Top - Compact)
   ============================================ */

.search-filter-section {
    background: white;
    padding: 15px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.search-filter-compact {
    max-width: 900px;
    margin: 0 auto;
}

.advanced-search-form {
    width: 100%;
}

.search-inputs-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input-group {
    flex: 1;
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    z-index: 1;
}

.search-input-main {
    width: 100%;
    padding: 10px 12px 10px 40px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.search-input-main:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-select {
    padding: 10px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 140px;
}

.search-select:focus {
    outline: none;
    border-color: #667eea;
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.btn-icon {
    font-size: 16px;
}

/* ============================================
   MAIN CONTENT GRID (3 Columns: Sidebar + Content + Sidebar)
   ============================================ */

.main-content-grid {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    gap: 20px;
    margin-bottom: 20px;
}

/* ============================================
   SIDEBARS (Left & Right)
   ============================================ */

.left-sidebar,
.right-sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.widget-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 15px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Circular Icons - Vertical Layout */
.circular-icons-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.circular-icon {
    text-align: center;
    text-decoration: none;
    padding: 10px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: block;
}

.circular-icon:hover {
    transform: translateX(5px);
    background: #f8fafc;
}

.icon-circle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 8px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.circular-icon:hover .icon-circle {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Color Variations */
.circular-icon.purple .icon-circle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.circular-icon.blue .icon-circle {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.circular-icon.green .icon-circle {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.circular-icon.yellow .icon-circle {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.circular-icon.red .icon-circle {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.circular-icon.orange .icon-circle {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.icon-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    margin-top: 3px;
}

.icon-count {
    display: block;
    font-size: 10px;
    color: #94a3b8;
    font-weight: 700;
    margin-top: 2px;
}

/* ============================================
   CENTER CONTENT
   ============================================ */

.center-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* News & Articles Columns */
.content-columns-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.column-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.column-title-compact {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.title-icon {
    font-size: 18px;
}

.view-link-compact {
    font-size: 12px;
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.view-link-compact:hover {
    color: #764ba2;
}

/* Compact Lists */
.compact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.compact-list-item {
    border-bottom: 1px solid #f1f5f9;
}

.compact-list-item:last-child {
    border-bottom: none;
}

.compact-item-link {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.compact-item-link:hover {
    background: #f8fafc;
    padding-left: 8px;
    border-radius: 6px;
}

.item-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.news-indicator {
    background: #ef4444;
}

.article-indicator {
    background: #667eea;
}

/* Special News Item with Fire Emoji */
.news-item-special .item-indicator.news-indicator-fire {
    width: auto;
    height: auto;
    background: none;
    font-size: 14px;
    margin-top: 4px;
    animation: fire-pulse 1.5s ease-in-out infinite;
}

@keyframes fire-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.15);
        opacity: 0.85;
    }
}

.news-item-special:hover .news-indicator-fire {
    animation: fire-shake 0.5s ease-in-out infinite;
}

@keyframes fire-shake {
    0%, 100% {
        transform: rotate(0deg) scale(1);
    }
    25% {
        transform: rotate(-5deg) scale(1.1);
    }
    75% {
        transform: rotate(5deg) scale(1.1);
    }
}

.news-item-special .item-title-compact {
    color: #dc2626;
    font-weight: 700;
}

.news-item-special:hover .item-title-compact {
    color: #ef4444;
}

.item-text-wrap {
    flex: 1;
}

.item-title-compact {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #1e293b;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-time-compact {
    font-size: 11px;
    color: #94a3b8;
}

.item-meta-compact {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 10px;
}

.meta-cat {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.meta-date {
    color: #94a3b8;
    font-weight: 600;
}

/* ============================================
   DOCUMENTS SECTION
   ============================================ */

.documents-compact-section {
    margin-bottom: 20px;
}

.section-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.section-title-compact {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-mini-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.doc-mini {
    text-align: center;
}

.doc-mini-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.3s ease;
}

.doc-mini-link:hover {
    transform: translateY(-3px);
}

.doc-mini-thumb {
    width: 100%;
    height: 140px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.doc-mini-link:hover .doc-mini-thumb {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.doc-mini-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doc-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.doc-mini-title {
    font-size: 12px;
    font-weight: 600;
    margin: 0;
    color: #475569;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doc-mini-link:hover .doc-mini-title {
    color: #667eea;
}

/* ============================================
   TAGS SECTION
   ============================================ */

.tags-compact-section {
    padding-top: 15px;
    border-top: 2px solid #f1f5f9;
}

.tags-header {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tags-icon {
    font-size: 18px;
}

.tags-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f1f5f9;
    color: #475569;
    padding: 6px 12px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tag-chip:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-2px);
}

.tag-num {
    background: rgba(0,0,0,0.1);
    color: inherit;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
}

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

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }
    
    .main-content-grid {
        grid-template-columns: 180px 1fr 180px;
        gap: 15px;
    }
    
    .icon-circle {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .icon-label {
        font-size: 10px;
    }
}

/* Tablets (Portrait) */
@media (max-width: 992px) {
    .main-content-grid {
        grid-template-columns: 1fr;
    }
    
    .left-sidebar,
    .right-sidebar {
        display: none;
    }
    
    .search-inputs-row {
        flex-wrap: wrap;
    }
    
    .search-input-group {
        flex-basis: 100%;
        margin-bottom: 8px;
    }
    
    .search-select {
        flex: 1;
        min-width: auto;
    }
    
    .search-btn {
        width: 100%;
        justify-content: center;
    }
    
    .center-content {
        padding: 15px;
    }
    
    .column-title-compact {
        font-size: 15px;
    }
}

/* Mobile Devices (Landscape & Portrait) */
@media (max-width: 768px) {
    .search-filter-section {
        padding: 12px 0;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .content-columns-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .docs-mini-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .search-btn .btn-text {
        display: inline;
    }
    
    .column-header-compact {
        margin-bottom: 12px;
    }
    
    .item-title-compact {
        font-size: 12px;
    }
    
    .item-time-compact,
    .item-meta-compact {
        font-size: 10px;
    }
    
    .section-title-compact {
        font-size: 16px;
    }
    
    .doc-mini-thumb {
        height: 130px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .modern-hub-wrapper {
        padding: 0;
    }
    
    .search-filter-section {
        padding: 10px 0;
        margin-bottom: 10px;
    }
    
    .search-input-main {
        font-size: 13px;
        padding: 8px 10px 8px 35px;
    }
    
    .search-select {
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .search-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .center-content {
        padding: 12px;
        border-radius: 8px;
    }
    
    .column-title-compact {
        font-size: 14px;
    }
    
    .view-link-compact {
        font-size: 11px;
    }
    
    .compact-item-link {
        padding: 8px 0;
        gap: 8px;
    }
    
    .item-indicator {
        width: 5px;
        height: 5px;
    }
    
    .item-title-compact {
        font-size: 11px;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .docs-mini-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .doc-mini-thumb {
        height: 110px;
        border-radius: 6px;
    }
    
    .doc-mini-title {
        font-size: 11px;
    }
    
    .section-title-compact {
        font-size: 14px;
    }
    
    .tags-flow {
        gap: 6px;
    }
    
    .tag-chip {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .tag-num {
        font-size: 9px;
        padding: 1px 4px;
    }
}

/* Extra Small Devices */
@media (max-width: 360px) {
    .container {
        padding: 0 8px;
    }
    
    .search-input-main {
        font-size: 12px;
    }
    
    .docs-mini-grid {
        grid-template-columns: 1fr;
    }
    
    .doc-mini-thumb {
        height: 140px;
    }
}
/* ==========================================
   Archive Enhanced Styles - Override
   ========================================== */

/* Breadcrumb Styles - Enhanced */
#breadcrumb {
  background: var(--archive-bg-white, #ffffff) !important;
  padding: 18px 24px !important;
  border-radius: var(--archive-radius-lg, 12px) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
  margin-bottom: 25px !important;
  border: 2px solid transparent !important;
  background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  position: relative !important;
  transition: all 0.3s ease !important;
}

#breadcrumb:hover {
  box-shadow: 0 4px 20px rgba(255, 87, 34, 0.15) !important;
  transform: translateY(-2px) !important;
}

#breadcrumb::before {
  content: "" !important;
  position: absolute !important;
  top: -2px !important;
  left: -2px !important;
  right: -2px !important;
  height: 4px !important;
  background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  background-size: 200% 100% !important;
  animation: gradientMove 3s ease infinite !important;
  border-radius: 12px 12px 0 0 !important;
  z-index: 0 !important;
}

#breadcrumb nav { 
  position: relative !important; 
  z-index: 1 !important; 
}

#breadcrumb .breadcrumb {
  margin-bottom: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
}

#breadcrumb .breadcrumb-item {
  font-size: 14px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: all 0.3s ease !important;
}

#breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: "→" !important;
  color: #ff5722 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 0 10px !important;
  float: none !important;
  opacity: 0.7 !important;
}

#breadcrumb .breadcrumb-item a {
  color: #495057 !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #f8f9fa !important;
  border: 1px solid transparent !important;
}

#breadcrumb .breadcrumb-item a:hover {
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.1), rgba(255, 152, 0, 0.1)) !important;
  color: #ff5722 !important;
  border-color: #ff5722 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 3px 8px rgba(255, 87, 34, 0.2) !important;
}

#breadcrumb .breadcrumb-item:first-child a::before {
  content: "🏠" !important;
  font-size: 16px !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1)) !important;
}

#breadcrumb .breadcrumb-item.active {
  color: #fff !important;
  font-weight: 700 !important;
  padding: 6px 16px !important;
  background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.3) !important;
  letter-spacing: 0.3px !important;
}

/* Archive Filter Bar Styles - Enhanced */
.archive-filter-bar {
  background: #ffffff !important;
  padding: 30px !important;
  border: 2px solid transparent !important;
  background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  margin-bottom: 30px !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
  position: relative !important;
  transition: all 0.3s ease !important;
}

.archive-filter-bar:hover {
  box-shadow: 0 6px 30px rgba(255, 87, 34, 0.12) !important;
}

.archive-filter-bar::before {
  content: '' !important;
  position: absolute !important;
  top: -2px !important;
  left: -2px !important;
  right: -2px !important;
  height: 4px !important;
  background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  background-size: 200% 100% !important;
  animation: gradientMove 3s ease infinite !important;
  border-radius: 12px 12px 0 0 !important;
  z-index: 0 !important;
}

.archive-filter-bar .filter-form {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 18px !important;
  align-items: end !important;
  position: relative !important;
  z-index: 1 !important;
}

.archive-filter-bar .filter-item {
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
}

.archive-filter-bar .form-label {
  font-size: 13px !important;
  font-weight: 700 !important;
  margin-bottom: 10px !important;
  color: #222222 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.8px !important;
}

.archive-filter-bar .form-label i {
  color: #fff !important;
  font-size: 12px !important;
  background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  width: 24px !important;
  height: 24px !important;
  border-radius: 6px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 6px rgba(255, 87, 34, 0.3) !important;
}

.archive-filter-bar .form-select,
.archive-filter-bar .form-control {
  padding: 12px 16px !important;
  border: 2px solid #e9ecef !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  width: 100% !important;
  background: #ffffff !important;
  color: #495057 !important;
  transition: all 0.3s ease !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

.archive-filter-bar .form-select {
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%23ff5722' d='M7 10L2 5h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left 12px center !important;
  padding-left: 38px !important;
  appearance: none !important;
}

.archive-filter-bar .form-select:focus,
.archive-filter-bar .form-control:focus {
  outline: none !important;
  border-color: #ff5722 !important;
  box-shadow: 0 0 0 4px rgba(255, 87, 34, 0.12), 0 4px 12px rgba(255, 87, 34, 0.2) !important;
  background: #fff !important;
  transform: translateY(-2px) !important;
}

.archive-filter-bar .btn-primary,
.archive-filter-bar .btn-filter {
  background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 13px 28px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  width: 100% !important;
  text-transform: uppercase !important;
  letter-spacing: 1.2px !important;
  box-shadow: 0 4px 15px rgba(255, 87, 34, 0.4) !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
}

.archive-filter-bar .btn-primary:hover,
.archive-filter-bar .btn-filter:hover {
  background: linear-gradient(135deg, #e64a19 0%, #f57c00 100%) !important;
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 25px rgba(255, 87, 34, 0.5) !important;
}

/* Archive Grid - Enhanced */
.archive-grid {
  padding: 20px 0 !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 25px !important;
  width: 100% !important;
  list-style: none !important;
  margin: 0 !important;
  position: relative !important;
}

/* Archive Card - Enhanced */
.archive-card {
  background: #ffffff !important;
  border: 2px solid #eeeeee !important;
  border-radius: 12px !important;
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  margin-bottom: 0 !important;
  height: auto !important;
  min-height: 220px !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.archive-card::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 4px !important;
  height: 100% !important;
  background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  transform: scaleY(0) !important;
  transition: transform 0.3s ease !important;
  transform-origin: bottom !important;
}

.archive-card:hover::before {
  transform: scaleY(1) !important;
  transform-origin: top !important;
}

.archive-card:hover {
  background: #ffffff !important;
  box-shadow: 0 8px 30px rgba(255, 87, 34, 0.15) !important;
  transform: translateY(-5px) !important;
  border-color: #ff5722 !important;
}

/* Card Title */
.archive-card .card-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #222222 !important;
  margin-bottom: 12px !important;
  line-height: 1.5 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  position: relative !important;
  padding-left: 12px !important;
}

.archive-card .card-title a {
  text-decoration: none !important;
  color: #222222 !important;
  display: block !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  transition: all 0.3s ease !important;
}

.archive-card .card-title a:hover {
  color: #ff5722 !important;
}

/* Card Meta */
.archive-card .card-meta {
  font-size: 13px !important;
  color: #777777 !important;
  margin-bottom: 14px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  padding: 10px 0 !important;
  border-top: 1px solid #eeeeee !important;
  border-bottom: 1px solid #eeeeee !important;
}

.archive-card .card-meta .author,
.archive-card .card-meta .date {
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  color: #777777 !important;
  background: #f8f9fa !important;
  padding: 5px 12px !important;
  border-radius: 20px !important;
  transition: all 0.2s ease !important;
}

.archive-card .card-meta .author:hover,
.archive-card .card-meta .date:hover {
  background: #ff5722 !important;
  color: #fff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.3) !important;
}

.archive-card .card-meta .author i,
.archive-card .card-meta .date i {
  color: #ff5722 !important;
  font-size: 12px !important;
  transition: all 0.2s ease !important;
}

.archive-card .card-meta .author:hover i,
.archive-card .card-meta .date:hover i {
  color: #fff !important;
}

/* Card Category */
.archive-card .card-category {
  font-size: 12px !important;
  color: #495057 !important;
  margin-bottom: 14px !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
}

.archive-card .card-category a {
  color: #fff !important;
  text-decoration: none !important;
  padding: 5px 14px !important;
  background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  border-radius: 20px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 6px rgba(255, 87, 34, 0.3) !important;
}

.archive-card .card-category a:hover {
  transform: translateY(-2px) scale(1.05) !important;
  box-shadow: 0 4px 12px rgba(255, 87, 34, 0.4) !important;
}

.archive-card .card-category i {
  color: #ff5722 !important;
  font-size: 13px !important;
  background: linear-gradient(135deg, rgba(255, 87, 34, 0.1), rgba(255, 152, 0, 0.1)) !important;
  width: 26px !important;
  height: 26px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid #ff5722 !important;
}

/* Card Text */
.archive-card .card-text {
  font-size: 14px !important;
  color: #495057 !important;
  line-height: 1.7 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  margin-top: auto !important;
  padding: 12px 0 !important;
}

/* Animations */
@keyframes gradientMove {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* ==========================================
   GLOBAL POST CARDS - تطبيق التصميم على كل المقالات
   ========================================== */

/* Post Item Card - تصميم البطاقات في الشبكة */
.post-item-card .post-item-block,
.post-item.post-item-card .p-block {
  background: #ffffff !important;
  border: 2px solid #eeeeee !important;
  border-radius: 12px !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  height: 100% !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.post-item-card .post-item-block::before,
.post-item.post-item-card .p-block::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 4px !important;
  height: 100% !important;
  background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  transform: scaleY(0) !important;
  transition: transform 0.3s ease !important;
  transform-origin: bottom !important;
  z-index: 1 !important;
}

.post-item-card .post-item-block:hover::before,
.post-item.post-item-card .p-block:hover::before {
  transform: scaleY(1) !important;
  transform-origin: top !important;
}

.post-item-card .post-item-block:hover,
.post-item.post-item-card .p-block:hover {
  background: #ffffff !important;
  box-shadow: 0 8px 30px rgba(255, 87, 34, 0.15) !important;
  transform: translateY(-5px) !important;
  border-color: #ff5722 !important;
}

/* Thumbnail */
.post-item-card .thumbnail {
  border-radius: 12px 12px 0 0 !important;
  overflow: hidden !important;
  position: relative !important;
  height: 200px !important;
}

.post-item-card .thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.3s ease !important;
}

.post-item-card .post-item-block:hover .thumbnail img,
.post-item.post-item-card .p-block:hover .thumbnail img {
  transform: scale(1.05) !important;
}

/* Post Tags/Badges */
.post-item-card .post-tags {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  z-index: 2 !important;
}

.post-item-card .post-tags .badge {
  background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  color: white !important;
  padding: 6px 12px !important;
  border-radius: 20px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px rgba(255, 87, 34, 0.4) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

/* Post Info */
.post-item-card .post-info {
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  flex: 1 !important;
}

/* Title */
.post-item-card .info-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #222222 !important;
  margin: 0 !important;
  line-height: 1.5 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2 !important;
  line-clamp: 2 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
}

.post-item-card .info-title a {
  color: #222222 !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
}

.post-item-card .info-title a:hover {
  color: #ff5722 !important;
}

.post-item-card .info-title .badge {
  background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  color: white !important;
  padding: 4px 10px !important;
  border-radius: 15px !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  margin-left: 8px !important;
  vertical-align: middle !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
}

/* Meta */
.post-item-card .info-meta {
  font-size: 14px !important;
  color: #495057 !important;
  line-height: 1.6 !important;
  margin: 0 !important;
}

/* Footer */
.post-item-card .info-footer {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-top: auto !important;
  padding-top: 12px !important;
  border-top: 1px solid #eeeeee !important;
  font-size: 13px !important;
}

.post-item-card .info-footer span,
.post-item-card .info-footer a {
  color: #777777 !important;
  transition: color 0.2s ease !important;
}

.post-item-card .info-footer i {
  color: #ff5722 !important;
  margin-left: 5px !important;
}

.post-item-card .info-footer a:hover {
  color: #ff5722 !important;
  text-decoration: none !important;
}

/* ==========================================
   POST LIST VIEW - تصميم القائمة
   ========================================== */

.post-item-list {
  background: #ffffff !important;
  border: 2px solid #eeeeee !important;
  border-radius: 12px !important;
  padding: 0 !important;
  display: flex !important;
  gap: 20px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
  margin-bottom: 20px !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  overflow: hidden !important;
}

.post-item-list::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 4px !important;
  height: 100% !important;
  background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  transform: scaleY(0) !important;
  transition: transform 0.3s ease !important;
  transform-origin: bottom !important;
}

.post-item-list:hover::before {
  transform: scaleY(1) !important;
  transform-origin: top !important;
}

.post-item-list:hover {
  box-shadow: 0 8px 30px rgba(255, 87, 34, 0.15) !important;
  transform: translateY(-3px) !important;
  border-color: #ff5722 !important;
}

.post-item-list .thumbnail {
  width: 280px !important;
  min-width: 280px !important;
  height: auto !important;
  border-radius: 12px 0 0 12px !important;
  overflow: hidden !important;
}

.post-item-list .thumbnail img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform 0.3s ease !important;
}

.post-item-list:hover .thumbnail img {
  transform: scale(1.05) !important;
}

.post-item-list .post-info {
  padding: 20px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  flex: 1 !important;
}

.post-item-list .info-title {
  font-size: 20px !important;
  font-weight: 700 !important;
  color: #222222 !important;
  margin-bottom: 12px !important;
  line-height: 1.4 !important;
}

.post-item-list .info-title a {
  color: #222222 !important;
  text-decoration: none !important;
  transition: color 0.3s ease !important;
}

.post-item-list .info-title a:hover {
  color: #ff5722 !important;
}

.post-item-list .info-title .badge {
  background: linear-gradient(135deg, #ff5722 0%, #ff9800 100%) !important;
  color: white !important;
  padding: 5px 12px !important;
  border-radius: 15px !important;
  font-size: 11px !important;
  margin-left: 10px !important;
  vertical-align: middle !important;
  box-shadow: 0 2px 6px rgba(255, 87, 34, 0.3) !important;
}

.post-item-list .info-meta {
  font-size: 15px !important;
  color: #495057 !important;
  line-height: 1.7 !important;
  margin-bottom: 12px !important;
}

.post-item-list .info-footer {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  gap: 12px !important;
  padding-top: 12px !important;
  border-top: 1px solid #eeeeee !important;
  font-size: 14px !important;
}

.post-item-list .info-footer span,
.post-item-list .info-footer a {
  color: #777777 !important;
  transition: color 0.2s ease !important;
}

.post-item-list .info-footer i {
  color: #ff5722 !important;
  margin-left: 5px !important;
}

.post-item-list .info-footer a:hover {
  color: #ff5722 !important;
  text-decoration: none !important;
}

/* Remove old title line */
.post-item .title-l-c {
  display: none !important;
}

/* ==========================================
   POSTS CONTAINER - حاوية المقالات
   ========================================== */

#posts .row {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 25px !important;
  margin: 0 !important;
}

/* ==========================================
   RESPONSIVE DESIGN - محسّن للأجهزة المختلفة
   ========================================== */

/* Large Tablets - 1024px */
@media (max-width: 1024px) {
  .archive-grid,
  #posts .row {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px !important;
  }
  
  .archive-filter-bar .filter-form {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Tablets - 992px */
@media (max-width: 992px) {
  .archive-grid,
  #posts .row {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
    gap: 18px !important;
  }
}

/* Tablets Portrait - 768px */
@media (max-width: 768px) {
  .archive-grid,
  #posts .row {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  
  .archive-filter-bar {
    padding: 20px 15px !important;
    margin-bottom: 15px !important;
  }
  
  .archive-filter-bar .filter-form {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  .archive-filter-bar .form-input,
  .archive-filter-bar .form-select {
    font-size: 13px !important;
    padding: 10px 12px !important;
  }
  
  #breadcrumb {
    padding: 14px 16px !important;
    font-size: 13px !important;
  }
  
  /* تحويل البطاقات الأفقية لعمودية */
  .post-item-list {
    flex-direction: column !important;
  }
  
  .post-item-list .thumbnail {
    width: 100% !important;
    height: 200px !important;
    border-radius: 12px 12px 0 0 !important;
  }
  
  .post-item-list .post-info {
    padding: 18px !important;
  }
  
  .post-item-list .info-title {
    font-size: 18px !important;
  }
  
  /* تحسين البطاقات العمودية */
  .post-item-card .thumbnail {
    height: 180px !important;
  }
  
  .post-item-card .post-info {
    padding: 16px !important;
  }
  
  .archive-card {
    padding: 16px !important;
  }
  
  .archive-card .card-title {
    font-size: 17px !important;
  }
  
  .archive-card .card-meta {
    flex-direction: row !important;
    gap: 10px !important;
  }
}

/* Mobile Landscape - 640px */
@media (max-width: 640px) {
  .archive-filter-bar {
    padding: 16px 12px !important;
  }
  
  .post-item-card .info-title,
  .archive-card .card-title {
    font-size: 16px !important;
  }
  
  .post-item-card .info-footer,
  .archive-card .card-meta {
    font-size: 12px !important;
  }
}

/* Mobile Portrait - 480px */
@media (max-width: 480px) {
  .archive-grid,
  #posts .row {
    gap: 15px !important;
  }
  
  .archive-card,
  .post-item-card .post-item-block {
    padding: 14px !important;
    border-radius: 10px !important;
  }
  
  .archive-card .card-title,
  .post-item-card .info-title {
    font-size: 15px !important;
    padding-left: 8px !important;
  }
  
  .archive-card .card-meta,
  .post-item-card .info-footer {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    font-size: 11px !important;
  }
  
  .archive-card .card-meta .author,
  .archive-card .card-meta .date {
    padding: 4px 10px !important;
    font-size: 11px !important;
  }
  
  .archive-card .card-text {
    font-size: 13px !important;
    -webkit-line-clamp: 2 !important;
    line-clamp: 2 !important;
  }
  
  .post-item-list .thumbnail {
    height: 160px !important;
  }
  
  .post-item-list .post-info {
    padding: 14px !important;
  }
  
  .post-item-list .info-title {
    font-size: 16px !important;
  }
  
  .post-item-list .info-meta {
    font-size: 13px !important;
  }
  
  .post-item-card .thumbnail {
    height: 160px !important;
  }
  
  .post-item-card .post-info {
    padding: 12px !important;
  }
  
  /* تحسين الأزرار والتفاعلات */
  .archive-filter-bar .filter-btn {
    padding: 9px 16px !important;
    font-size: 12px !important;
  }
  
  #breadcrumb {
    padding: 12px 14px !important;
    font-size: 12px !important;
  }
  
  .archive-card .card-category a {
    font-size: 10px !important;
    padding: 4px 10px !important;
  }
}

/* Extra Small Devices - 360px */
@media (max-width: 360px) {
  .archive-card,
  .post-item-card .post-item-block {
    padding: 12px !important;
  }
  
  .archive-card .card-title,
  .post-item-card .info-title {
    font-size: 14px !important;
  }
  
  .archive-card .card-text {
    font-size: 12px !important;
  }
  
  .post-item-list .thumbnail,
  .post-item-card .thumbnail {
    height: 140px !important;
  }
  
  .archive-filter-bar {
    padding: 12px 10px !important;
  }
}

/**
 * Documents Library Styles
 * Advanced library layout with sidebar and grid/list views
 * Version: 2.0.0
 */

/* ==========================================================================
   Library Wrapper
   ========================================================================== */

.documents-library-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background: #f5f7fa;
    min-height: 100vh;
}

/* ==========================================================================
   Filter Bar
   ========================================================================== */

.filter-bar {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px 30px;
    margin-bottom: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.filter-left {
    flex: 1;
}

.library-title {
    font-size: 28px;
    font-weight: 800;
    color: #2d3748;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.library-title svg {
    color: #667eea;
}

.library-stats {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #718096;
}

.library-stats .stat {
    color: #4a5568;
}

.library-stats strong {
    color: #667eea;
    font-weight: 700;
}

.stat-sep {
    color: #cbd5e0;
}

.filter-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Search Box */
.search-box {
    position: relative;
    width: 350px;
}

.search-box svg {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 5px;
    background: #f7fafc;
    padding: 4px;
    border-radius: 10px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: #718096;
    transition: all 0.2s ease;
}

.view-btn:hover {
    background: #edf2f7;
    color: #4a5568;
}

.view-btn.active {
    background: #667eea;
    color: #ffffff;
}

/* Advanced Filters */
.advanced-filters {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #4a5568;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 160px;
}

.filter-select:hover {
    border-color: #cbd5e0;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.reset-btn {
    padding: 10px 20px;
    background: #f56565;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #e53e3e;
    transform: translateY(-2px);
}

/* ==========================================================================
   Library Content (Sidebar + Main)
   ========================================================================== */

.library-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
    align-items: start;
}

/* ==========================================================================
   Categories Sidebar
   ========================================================================== */

.categories-sidebar {
    background: #ffffff;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 20px;
}

.sidebar-header {
    padding: 20px 25px;
    border-bottom: 2px solid #f7fafc;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #2d3748;
}

.categories-list {
    padding: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.category-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    margin-bottom: 5px;
}

.category-item:hover {
    background: #f7fafc;
}

.category-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.category-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.category-name {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
}

.category-count {
    background: rgba(0, 0, 0, 0.1);
    color: inherit;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
}

.category-item.active .category-count {
    background: rgba(255, 255, 255, 0.2);
}

/* Sidebar Stats */
.sidebar-stats {
    padding: 20px 25px;
    border-top: 2px solid #f7fafc;
}

.sidebar-stats h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 700;
    color: #2d3748;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 13px;
    color: #4a5568;
}

.sidebar-stats .stat-item svg {
    color: #667eea;
    flex-shrink: 0;
}

/* ==========================================================================
   Documents Main Area
   ========================================================================== */

.documents-main {
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.results-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f7fafc;
}

.results-count {
    font-size: 15px;
    color: #4a5568;
    margin: 0 0 10px 0;
}

.results-count span {
    font-weight: 700;
    color: #667eea;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
}

.filter-badge {
    background: #edf2f7;
    color: #4a5568;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

/* ==========================================================================
   Documents Grid
   ========================================================================== */

.documents-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.documents-grid.view-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.documents-grid.view-list {
    grid-template-columns: 1fr;
}

.loading {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
    font-size: 16px;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #a0aec0;
    font-size: 18px;
}

/* ==========================================================================
   Compact Document Card
   ========================================================================== */

.doc-card-compact {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.doc-card-compact:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-4px);
}

.doc-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Thumbnail */
.doc-thumbnail-compact {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

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

.doc-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
}

.lang-flag {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-type-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Content */
.doc-content-compact {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-title-compact {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.doc-title-compact a {
    color: #2d3748;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.doc-title-compact a:hover {
    color: #667eea;
}

.doc-author-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #718096;
}

.doc-author-compact svg {
    color: #a0aec0;
    flex-shrink: 0;
}

.doc-author-compact a {
    color: #718096;
    text-decoration: none;
    transition: color 0.2s ease;
}

.doc-author-compact a:hover {
    color: #667eea;
}

.doc-meta-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: #718096;
}

.doc-meta-compact .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.doc-meta-compact svg {
    color: #a0aec0;
    flex-shrink: 0;
}

.doc-stats-compact {
    display: flex;
    gap: 15px;
    padding-top: 8px;
    margin-top: auto;
    border-top: 1px solid #f7fafc;
}

.doc-stats-compact .stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #718096;
    font-weight: 600;
}

.doc-stats-compact svg {
    color: #a0aec0;
    flex-shrink: 0;
}

/* Actions */
.doc-actions-compact {
    display: flex;
    border-top: 2px solid #f7fafc;
}

.action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: none;
    background: transparent;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-btn:hover {
    background: #f7fafc;
    color: #667eea;
}

.action-btn + .action-btn {
    border-left: 2px solid #f7fafc;
}

/* List View Adjustments */
.documents-grid.view-list .doc-card-compact {
    border-radius: 12px;
}

.documents-grid.view-list .doc-card-inner {
    flex-direction: row;
}

.documents-grid.view-list .doc-thumbnail-compact {
    width: 150px;
    aspect-ratio: 3/4;
    flex-shrink: 0;
}

.documents-grid.view-list .doc-content-compact {
    flex: 1;
    padding: 20px;
}

.documents-grid.view-list .doc-title-compact {
    font-size: 18px;
}

.documents-grid.view-list .doc-actions-compact {
    flex-direction: column;
    width: 80px;
    border-top: none;
    border-left: 2px solid #f7fafc;
}

.documents-grid.view-list .action-btn + .action-btn {
    border-left: none;
    border-top: 2px solid #f7fafc;
}

/* ==========================================================================
   Load More Button
   ========================================================================== */

.load-more-wrapper {
    text-align: center;
    padding: 20px 0;
}

.load-more-btn {
    padding: 14px 40px;
    background: #667eea;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* ==========================================================================
   Responsive Design - محسّن للأجهزة المختلفة
   ========================================================================== */

/* Large Tablets - 1200px */
@media (max-width: 1200px) {
    .library-content {
        grid-template-columns: 240px 1fr;
        gap: 18px;
    }
    
    .search-box {
        width: 260px;
    }
    
    .documents-grid.view-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* Tablets - 992px */
@media (max-width: 992px) {
    .documents-library-wrapper {
        padding: 12px;
    }
    
    .library-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .categories-sidebar {
        position: static;
        margin-bottom: 20px;
        max-height: none;
    }
    
    .categories-list {
        max-height: 250px;
        overflow-y: auto;
    }
    
    .filter-container {
        flex-wrap: wrap;
    }
    
    .filter-right {
        width: 100%;
        margin-top: 12px;
    }
    
    .search-box {
        width: 100%;
        max-width: none;
    }
    
    .documents-grid.view-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* Tablets Portrait - 768px */
@media (max-width: 768px) {
    .documents-library-wrapper {
        padding: 10px;
    }
    
    .filter-bar,
    .documents-main {
        padding: 18px 14px;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .filter-left {
        width: 100%;
    }
    
    .filter-right {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        margin-top: 0;
    }
    
    .search-box {
        width: 100%;
    }
    
    .view-toggle {
        width: 100%;
        justify-content: center;
    }
    
    .view-toggle-btn {
        flex: 1;
        justify-content: center;
    }
    
    .advanced-filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filter-select {
        width: 100%;
    }
    
    .library-title {
        font-size: 20px;
    }
    
    .library-stats {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .stat-item {
        font-size: 12px;
    }
    
    .documents-grid.view-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 14px;
    }
    
    /* تحويل عرض القائمة للعمودي */
    .documents-grid.view-list .doc-card-inner {
        flex-direction: column;
    }
    
    .documents-grid.view-list .doc-thumbnail-compact {
        width: 100%;
        height: 180px;
        border-radius: 8px 8px 0 0;
    }
    
    .documents-grid.view-list .doc-content-compact {
        padding: 14px;
    }
    
    .documents-grid.view-list .doc-actions-compact {
        flex-direction: row;
        width: 100%;
        border-left: none;
        border-top: 2px solid #f7fafc;
    }
    
    .documents-grid.view-list .action-btn {
        flex: 1;
        justify-content: center;
        padding: 10px;
    }
    
    .documents-grid.view-list .action-btn + .action-btn {
        border-top: none;
        border-left: 2px solid #f7fafc;
    }
    
    .categories-sidebar {
        border-radius: 10px;
        padding: 16px;
    }
    
    .sidebar-title {
        font-size: 16px;
    }
}

/* Mobile Landscape - 640px */
@media (max-width: 640px) {
    .library-title {
        font-size: 18px;
    }
    
    .library-stats {
        font-size: 11px;
    }
    
    .doc-title {
        font-size: 13px;
    }
    
    .doc-meta {
        font-size: 11px;
    }
    
    .documents-grid.view-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 12px;
    }
}

/* Mobile Portrait - 480px */
@media (max-width: 480px) {
    .documents-library-wrapper {
        padding: 8px;
    }
    
    .filter-bar,
    .documents-main {
        padding: 16px 12px;
        border-radius: 10px;
    }
    
    .library-title {
        font-size: 18px;
    }
    
    .library-title svg {
        width: 24px;
        height: 24px;
    }
    
    .library-stats {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        font-size: 11px;
    }
    
    .stat-sep {
        display: none;
    }
    
    .stat-item {
        width: 100%;
    }
    
    .search-box {
        padding: 8px 12px 8px 36px;
        font-size: 13px;
    }
    
    .search-icon {
        font-size: 16px;
    }
    
    .filter-select {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .view-toggle-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .view-toggle-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .documents-grid.view-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .doc-card {
        padding: 12px;
    }
    
    .doc-thumbnail {
        height: 200px;
    }
    
    .doc-title {
        font-size: 14px;
    }
    
    .doc-author {
        font-size: 11px;
    }
    
    .doc-meta {
        font-size: 10px;
        gap: 8px;
    }
    
    .doc-actions {
        gap: 8px;
        padding-top: 10px;
    }
    
    .doc-btn {
        padding: 7px 12px;
        font-size: 11px;
    }
    
    .categories-sidebar {
        padding: 14px;
    }
    
    .sidebar-title {
        font-size: 14px;
    }
    
    .category-item {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .category-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
    
    .category-count {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .documents-grid.view-list .doc-thumbnail-compact {
        height: 160px;
    }
    
    .documents-grid.view-list .doc-content-compact {
        padding: 12px;
    }
    
    .documents-grid.view-list .doc-title {
        font-size: 13px;
    }
}

/* Extra Small Devices - 360px */
@media (max-width: 360px) {
    .documents-library-wrapper {
        padding: 6px;
    }
    
    .filter-bar,
    .documents-main {
        padding: 12px 10px;
    }
    
    .library-title {
        font-size: 16px;
    }
    
    .doc-card {
        padding: 10px;
    }
    
    .doc-thumbnail {
        height: 180px;
    }
    
    .doc-title {
        font-size: 13px;
    }
    
    .doc-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
    
    .category-item {
        padding: 8px 10px;
        font-size: 11px;
    }
}

/* ==========================================================================
   Responsive Fixes - إصلاحات التوافق الشاملة لجميع الأجهزة
   ==========================================================================
   هذا الملف يحتوي على إصلاحات عامة لضمان التوافق الكامل مع:
   - الهواتف المحمولة (Mobile: 320px - 480px)
   - الهواتف الكبيرة (Large Mobile: 481px - 640px)
   - الأجهزة اللوحية (Tablets: 641px - 992px)
   - أجهزة الكمبيوتر (Desktop: 993px+)
   ========================================================================== */

/* ==========================================================================
   Base Responsive Settings
   ========================================================================== */

/* منع overflow أفقي */
html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* تحسين الصور للأجهزة المختلفة */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* تحسين الجداول */
table {
    width: 100%;
    overflow-x: auto;
    display: block;
}

/* تحسين الفيديوهات والإطارات */
iframe,
video,
embed {
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   Container & Layout Fixes
   ========================================================================== */

.container,
.row {
    width: 100%;
    max-width: 1200px;
    overflow-x: hidden;
}

/* تحسين padding للعناصر الرئيسية */
@media (max-width: 768px) {
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

@media (max-width: 480px) {
    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* ==========================================================================
   Typography Responsive
   ========================================================================== */

/* تحسين الخطوط للهواتف */
@media (max-width: 768px) {
    h1 {
        font-size: 24px !important;
        line-height: 1.3 !important;
    }
    
    h2 {
        font-size: 20px !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 18px !important;
        line-height: 1.4 !important;
    }
    
    h4 {
        font-size: 16px !important;
        line-height: 1.4 !important;
    }
    
    h5, h6 {
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
    
    p {
        font-size: 14px !important;
        line-height: 1.6 !important;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 22px !important;
    }
    
    h2 {
        font-size: 18px !important;
    }
    
    h3 {
        font-size: 16px !important;
    }
    
    p {
        font-size: 13px !important;
    }
}

/* ==========================================================================
   Navigation & Menu Responsive
   ========================================================================== */

@media (max-width: 992px) {
    /* إخفاء القوائم الكبيرة على الأجهزة المتوسطة */
    .desktop-only {
        display: none !important;
    }
    
    /* تحسين القوائم المنسدلة */
    .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
    }
}

/* ==========================================================================
   Forms Responsive
   ========================================================================== */

@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px !important; /* منع zoom في iOS */
        padding: 10px 12px !important;
        width: 100% !important;
    }
    
    button,
    .btn,
    input[type="submit"] {
        padding: 10px 18px !important;
        font-size: 14px !important;
        width: 100% !important;
        margin-bottom: 8px !important;
    }
}

/* ==========================================================================
   Grid & Flexbox Responsive
   ========================================================================== */

/* تحويل الشبكات للعمودي على الهواتف */
@media (max-width: 768px) {
    .row,
    .flex-row,
    .grid-row {
        flex-direction: column !important;
    }
    
    [class*="col-"] {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* ==========================================================================
   Spacing & Padding Responsive
   ========================================================================== */

@media (max-width: 768px) {
    /* تقليل المسافات الكبيرة */
    .mt-5, .my-5 {
        margin-top: 20px !important;
    }
    
    .mb-5, .my-5 {
        margin-bottom: 20px !important;
    }
    
    .pt-5, .py-5 {
        padding-top: 20px !important;
    }
    
    .pb-5, .py-5 {
        padding-bottom: 20px !important;
    }
}

@media (max-width: 480px) {
    .mt-5, .my-5 {
        margin-top: 15px !important;
    }
    
    .mb-5, .my-5 {
        margin-bottom: 15px !important;
    }
    
    .pt-5, .py-5 {
        padding-top: 15px !important;
    }
    
    .pb-5, .py-5 {
        padding-bottom: 15px !important;
    }
}

/* ==========================================================================
   Touch Targets - تحسين أهداف اللمس للهواتف
   ========================================================================== */

@media (max-width: 768px) {
    a,
    button,
    .btn,
    input[type="button"],
    input[type="submit"],
    .clickable {
        min-height: 44px !important; /* معيار Apple للمس */
        min-width: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
}

/* ==========================================================================
   Sidebar Responsive
   ========================================================================== */

@media (max-width: 992px) {
    .sidebar,
    .widget-area,
    aside {
        width: 100% !important;
        margin: 20px 0 !important;
        padding: 15px !important;
    }
    
    .content-area,
    .main-content {
        width: 100% !important;
        padding: 0 !important;
    }
}

/* ==========================================================================
   Tables Responsive
   ========================================================================== */

@media (max-width: 768px) {
    table {
        font-size: 12px !important;
    }
    
    table thead {
        display: none !important;
    }
    
    table tr {
        display: block !important;
        margin-bottom: 15px !important;
        border: 1px solid #ddd !important;
        border-radius: 8px !important;
    }
    
    table td {
        display: block !important;
        text-align: right !important;
        padding: 8px !important;
        border-bottom: 1px solid #eee !important;
    }
    
    table td:last-child {
        border-bottom: none !important;
    }
    
    table td::before {
        content: attr(data-label) !important;
        float: left !important;
        font-weight: bold !important;
        color: #666 !important;
    }
}

/* ==========================================================================
   Breadcrumbs Responsive
   ========================================================================== */

@media (max-width: 768px) {
    #breadcrumb,
    .breadcrumbs {
        font-size: 12px !important;
        padding: 10px 12px !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 480px) {
    #breadcrumb,
    .breadcrumbs {
        font-size: 11px !important;
        padding: 8px 10px !important;
    }
}

/* ==========================================================================
   Modal & Popup Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .modal,
    .popup,
    .dialog {
        width: 95% !important;
        max-width: 95% !important;
        margin: 10px auto !important;
    }
    
    .modal-header,
    .popup-header {
        font-size: 16px !important;
        padding: 12px !important;
    }
    
    .modal-body,
    .popup-body {
        padding: 15px !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
    }
}

/* ==========================================================================
   Pagination Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .pagination {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .pagination a,
    .pagination span {
        padding: 8px 12px !important;
        font-size: 13px !important;
        margin: 2px !important;
    }
}

@media (max-width: 480px) {
    .pagination a,
    .pagination span {
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
}

/* ==========================================================================
   WordPress Core Responsive Fixes
   ========================================================================== */

@media (max-width: 768px) {
    /* تحسين الصور المضمنة */
    .wp-caption {
        max-width: 100% !important;
    }
    
    .wp-caption-text {
        font-size: 12px !important;
    }
    
    /* تحسين معارض الصور */
    .gallery {
        margin: 0 -5px !important;
    }
    
    .gallery-item {
        padding: 5px !important;
    }
    
    /* تحسين القوائم */
    .wp-block-navigation {
        flex-direction: column !important;
    }
    
    .wp-block-navigation-item {
        width: 100% !important;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .no-print,
    .sidebar,
    .navigation,
    .header,
    .footer,
    .breadcrumbs,
    .comments,
    button,
    .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt !important;
        line-height: 1.5 !important;
        color: #000 !important;
        background: #fff !important;
    }
    
    a {
        text-decoration: underline !important;
        color: #000 !important;
    }
}

/* ==========================================================================
   Utility Classes for Responsive
   ========================================================================== */

/* إخفاء على أجهزة محددة */
@media (max-width: 480px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .hide-tablet {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .hide-desktop {
        display: none !important;
    }
}

/* إظهار على أجهزة محددة */
.show-mobile {
    display: none !important;
}

@media (max-width: 480px) {
    .show-mobile {
        display: block !important;
    }
}

.show-tablet {
    display: none !important;
}

@media (min-width: 481px) and (max-width: 768px) {
    .show-tablet {
        display: block !important;
    }
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */

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

/* تحسين الأداء للشاشات الصغيرة */
@media (max-width: 768px) {
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* تقليل الظلال المعقدة */
    *[class*="shadow"] {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
}
/* ==========================================
   Advanced SEO Features Styles - Optimized for Performance
   ========================================== */

/* Auto Table of Contents - Optimized */
.auto-toc {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 25px 0;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.auto-toc h2 {
    margin: 0 0 12px 0;
    font-size: 18px;
    color: #2c3e50;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.auto-toc .toc-icon {
    font-size: 20px;
    line-height: 1;
}

.auto-toc ol {
    margin: 0;
    padding-left: 22px;
    line-height: 1.7;
}

.auto-toc li {
    margin-bottom: 6px;
}

.auto-toc .toc-sub-item {
    margin-left: 18px;
    margin-bottom: 4px;
}

.auto-toc a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auto-toc a:hover {
    color: #5568d3;
    text-decoration: underline;
}

/* Article Freshness Indicator - Simplified */
.article-freshness {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 12px 16px;
    border-radius: 6px;
    margin: 15px 0;
    font-size: 14px;
    border-left: 4px solid #4caf50;
}

.article-freshness strong {
    font-weight: 700;
}

/* Auto Internal Links - Simplified */
.auto-internal-link {
    color: #667eea;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

.auto-internal-link:hover {
    color: #5568d3;
}

/* Smart Internal Links - Simplified */
.smart-internal-link {
    color: #ff5722;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,87,34,0.3);
}

.smart-internal-link:hover {
    color: #e64a19;
    border-bottom-color: #e64a19;
}

/* Reading Time Badge - Simplified */
.reading-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff3e0;
    color: #e65100;
    padding: 5px 10px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    margin: 8px 0;
}

.reading-time-badge::before {
    content: '⏱️';
    font-size: 14px;
}

/* External Link Indicator - Performance optimized */
a[target="_blank"]::after {
    content: ' ↗';
    font-size: 0.8em;
    opacity: 0.5;
}

/* Responsive - Mobile */
@media (max-width:768px) {
    .auto-toc {
        padding: 16px;
        margin: 20px 0;
    }
    .auto-toc h2 {
        font-size: 16px;
    }
    .auto-toc ol {
        padding-left: 18px;
    }
    .auto-toc .toc-sub-item {
        margin-left: 12px;
    }
    .article-freshness {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Responsive - Small Mobile */
@media (max-width:480px) {
    .auto-toc {
        padding: 14px;
    }
    .auto-toc h2 {
        font-size: 15px;
    }
    .auto-toc a {
        font-size: 14px;
    }
}
/*
 * Single Post Enhanced Styles - Calm & Clean Design
 * Optimized for both LTR & RTL languages
 * Version: 2.1.0
 */

/* ============================================
   BREADCRUMB - Enhanced Design
   ============================================ */

#post #breadcrumb {
  background: var(--archive-bg-white, #ffffff) !important;
  padding: 18px 24px !important;
  border-radius: var(--archive-radius-lg, 12px) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06) !important;
  margin-bottom: 25px !important;
  border: 2px solid transparent !important;
  background-image: linear-gradient(#ffffff, #ffffff), linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  background-origin: border-box !important;
  background-clip: padding-box, border-box !important;
  position: relative !important;
  transition: all 0.3s ease !important;
}

#post #breadcrumb:hover {
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15) !important;
  transform: translateY(-2px) !important;
}

#post #breadcrumb::before {
  content: "" !important;
  position: absolute !important;
  top: -2px !important;
  inset-inline-start: -2px !important;
  inset-inline-end: -2px !important;
  height: 4px !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  background-size: 200% 100% !important;
  animation: gradientMove 3s ease infinite !important;
  border-radius: 12px 12px 0 0 !important;
  z-index: 0 !important;
}

#post #breadcrumb nav { 
  position: relative !important; 
  z-index: 1 !important; 
}

#post #breadcrumb .breadcrumb {
  margin-bottom: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
}

#post #breadcrumb .breadcrumb-item {
  font-size: 14px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  transition: all 0.3s ease !important;
}

#post #breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: "→" !important;
  color: #667eea !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 0 10px !important;
  float: none !important;
  opacity: 0.7 !important;
}

#post #breadcrumb .breadcrumb-item a {
  color: #495057 !important;
  text-decoration: none !important;
  transition: all 0.3s ease !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #f8f9fa !important;
  border: 1px solid transparent !important;
}

#post #breadcrumb .breadcrumb-item a:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1)) !important;
  color: #667eea !important;
  border-color: #667eea !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 3px 8px rgba(102, 126, 234, 0.2) !important;
}

#post #breadcrumb .breadcrumb-item:first-child a::before {
  content: "🏠" !important;
  font-size: 16px !important;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1)) !important;
}

#post #breadcrumb .breadcrumb-item.active {
  color: #fff !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  padding: 6px 14px !important;
  border-radius: 8px !important;
  font-weight: 600 !important;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25) !important;
}

/* RTL Support for Breadcrumb */
[dir="rtl"] #post #breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: "←" !important;
}

/* ============================================
   POST TITLE
   ============================================ */

#post-title {
  font-size: 32px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  color: var(--pk-text-primary, #1a1a1a) !important;
  margin-bottom: 20px !important;
  padding-bottom: 0 !important;
  font-family: 'Cairo', 'Inter', -apple-system, sans-serif !important;
  text-align: start !important;
}

/* New Badge */
#post-title .new-badge {
  display: inline-block !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  padding: 4px 12px !important;
  border-radius: 20px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  margin-inline-end: 10px !important;
  position: relative !important;
  top: -3px !important;
  animation: pulse 2s ease-in-out infinite !important;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.9; }
}

/* ============================================
   META INFO
   ============================================ */

.options {
  background: #f8f9fa !important;
  border-radius: 12px !important;
  padding: 15px !important;
  margin: 20px 0 !important;
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  border: 1px solid #e9ecef !important;
}

.options .option {
  background: white !important;
  padding: 8px 16px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  color: #495057 !important;
  border: 1px solid #dee2e6 !important;
  transition: all 0.3s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.options .option:hover {
  background: #667eea !important;
  color: white !important;
  border-color: #667eea !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

.options .option i {
  font-size: 14px !important;
  opacity: 0.8 !important;
}

/* ============================================
   CONTENT
   ============================================ */

.entry-content-box .content-main,
.content-main {
  font-size: 18px !important;
  line-height: 1.9 !important;
  color: #2d3436 !important;
  font-family: 'Cairo', 'Inter', -apple-system, sans-serif !important;
}

/* Paragraphs */
.entry-content-box .content-main p,
.content-main p {
  margin-bottom: 1.5em !important;
  text-align: justify !important;
  line-height: 1.9 !important;
}

/* First Letter Drop Cap */
.entry-content-box .content-main > p:first-of-type::first-letter,
.content-main > p:first-of-type::first-letter {
  font-size: 3.5em !important;
  font-weight: 700 !important;
  float: inline-start !important;
  line-height: 1 !important;
  margin-block-start: 5px !important;
  margin-inline-end: 15px !important;
  color: #667eea !important;
}

/* ============================================
   HEADINGS
   ============================================ */

/* H2 - Main Heading */
.entry-content-box .content-main h2,
.content-main h2 {
  font-size: 26px !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  margin: 40px 0 20px !important;
  padding-inline-start: 20px !important;
  border-inline-start: 5px solid #667eea !important;
  position: relative !important;
  transition: all 0.3s ease !important;
}

.entry-content-box .content-main h2::before,
.content-main h2::before {
  content: "📌" !important;
  position: absolute !important;
  inset-inline-start: -8px !important;
  top: -5px !important;
  font-size: 20px !important;
  animation: bounce 2s ease-in-out infinite !important;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* H3 - Sub Heading */
.entry-content-box .content-main h3,
.content-main h3 {
  font-size: 22px !important;
  font-weight: 600 !important;
  color: #2d3436 !important;
  margin: 30px 0 15px !important;
  padding-inline-start: 18px !important;
  border-inline-start: 4px solid #764ba2 !important;
  position: relative !important;
}

.entry-content-box .content-main h3::before,
.content-main h3::before {
  content: "▸" !important;
  position: absolute !important;
  inset-inline-start: 2px !important;
  color: #764ba2 !important;
  font-size: 18px !important;
}

/* H4 - Small Heading */
.entry-content-box .content-main h4,
.content-main h4 {
  font-size: 19px !important;
  font-weight: 600 !important;
  color: #495057 !important;
  margin: 25px 0 12px !important;
  padding-inline-start: 15px !important;
  border-inline-start: 3px solid #f093fb !important;
}

/* H5, H6 */
.entry-content-box .content-main h5,
.entry-content-box .content-main h6,
.content-main h5,
.content-main h6 {
  font-size: 17px !important;
  font-weight: 600 !important;
  color: #6c757d !important;
  margin: 20px 0 10px !important;
  padding-inline-start: 12px !important;
  border-inline-start: 2px solid #dee2e6 !important;
}

/* ============================================
   LINKS
   ============================================ */

.entry-content-box .content-main a,
.content-main a {
  color: #667eea !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  transition: all 0.3s ease !important;
  position: relative !important;
  display: inline !important;
}

.entry-content-box .content-main a:hover,
.content-main a:hover {
  color: #764ba2 !important;
  background-color: rgba(102, 126, 234, 0.1) !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}

/* Link Icon */
.entry-content-box .content-main a:hover::after,
.content-main a:hover::after {
  content: " 🔗" !important;
  font-size: 14px !important;
  opacity: 0.7 !important;
}

/* ============================================
   LISTS
   ============================================ */

/* Unordered Lists */
.entry-content-box .content-main ul,
.content-main ul {
  margin: 20px 0 !important;
  padding-inline-start: 0 !important;
  list-style: none !important;
}

.entry-content-box .content-main ul li,
.content-main ul li {
  position: relative !important;
  padding-inline-start: 30px !important;
  margin-bottom: 12px !important;
  line-height: 1.8 !important;
}

.entry-content-box .content-main ul li::before,
.content-main ul li::before {
  content: "✓" !important;
  position: absolute !important;
  inset-inline-start: 0 !important;
  color: #667eea !important;
  font-weight: 700 !important;
  font-size: 18px !important;
}

/* Ordered Lists */
.entry-content-box .content-main ol,
.content-main ol {
  margin: 20px 0 !important;
  padding-inline-start: 0 !important;
  list-style: none !important;
  counter-reset: custom-counter !important;
}

.entry-content-box .content-main ol li,
.content-main ol li {
  position: relative !important;
  padding-inline-start: 40px !important;
  margin-bottom: 12px !important;
  line-height: 1.8 !important;
  counter-increment: custom-counter !important;
}

.entry-content-box .content-main ol li::before,
.content-main ol li::before {
  content: counter(custom-counter) !important;
  position: absolute !important;
  inset-inline-start: 0 !important;
  width: 28px !important;
  height: 28px !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  top: 2px !important;
}

/* Nested Lists */
.entry-content-box .content-main ul ul,
.entry-content-box .content-main ol ul,
.content-main ul ul,
.content-main ol ul {
  margin-top: 10px !important;
  padding-inline-start: 20px !important;
}

/* ============================================
   BLOCKQUOTES
   ============================================ */

.entry-content-box .content-main blockquote,
.content-main blockquote {
  position: relative !important;
  margin: 30px 0 !important;
  padding: 25px 30px !important;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.08) 100%) !important;
  border-inline-start: 5px solid #667eea !important;
  border-radius: 8px !important;
  font-style: italic !important;
  color: #495057 !important;
  quotes: """ """ "'" "'" !important;
}

.entry-content-box .content-main blockquote::before,
.content-main blockquote::before {
  content: "💬" !important;
  position: absolute !important;
  top: 20px !important;
  inset-inline-end: 20px !important;
  font-size: 40px !important;
  opacity: 0.2 !important;
}

.entry-content-box .content-main blockquote p,
.content-main blockquote p {
  margin-bottom: 0 !important;
}

/* ============================================
   CODE BLOCKS
   ============================================ */

/* Inline Code */
.entry-content-box .content-main code,
.content-main code {
  background-color: rgba(102, 126, 234, 0.1) !important;
  color: #764ba2 !important;
  padding: 2px 8px !important;
  border-radius: 4px !important;
  font-family: 'Courier New', monospace !important;
  font-size: 0.9em !important;
}

/* Code Blocks */
.entry-content-box .content-main pre,
.content-main pre {
  position: relative !important;
  background: #2d3436 !important;
  color: #dfe6e9 !important;
  padding: 25px 20px !important;
  border-radius: 8px !important;
  overflow-x: auto !important;
  margin: 25px 0 !important;
  border-inline-start: 4px solid #667eea !important;
}

.entry-content-box .content-main pre::before,
.content-main pre::before {
  content: "💻 Code" !important;
  position: absolute !important;
  top: 5px !important;
  inset-inline-end: 10px !important;
  font-size: 12px !important;
  color: #b2bec3 !important;
  opacity: 0.6 !important;
}

.entry-content-box .content-main pre code,
.content-main pre code {
  background: none !important;
  color: inherit !important;
  padding: 0 !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
}

/* RTL Support for Code */
[dir="rtl"] .entry-content-box .content-main pre::before,
[dir="rtl"] .content-main pre::before {
  content: "💻 كود برمجي" !important;
}

/* ============================================
   IMAGES
   ============================================ */

.entry-content-box .content-main img,
.content-main img {
  max-width: 100% !important;
  height: auto !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  margin: 25px auto !important;
  display: block !important;
  transition: transform 0.3s ease !important;
}

.entry-content-box .content-main img:hover,
.content-main img:hover {
  transform: scale(1.02) !important;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2) !important;
}

.entry-content-box .content-main figure,
.content-main figure {
  margin: 25px 0 !important;
  text-align: center !important;
}

.entry-content-box .content-main figcaption,
.content-main figcaption {
  font-size: 14px !important;
  color: #6c757d !important;
  font-style: italic !important;
  margin-top: 10px !important;
}

/* ============================================
   TABLES
   ============================================ */

.entry-content-box .content-main table,
.content-main table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 25px 0 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.entry-content-box .content-main table thead,
.content-main table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
}

.entry-content-box .content-main table th,
.content-main table th {
  padding: 15px !important;
  text-align: start !important;
  font-weight: 600 !important;
  font-size: 16px !important;
}

.entry-content-box .content-main table td,
.content-main table td {
  padding: 12px 15px !important;
  border-bottom: 1px solid #e9ecef !important;
  text-align: start !important;
}

.entry-content-box .content-main table tbody tr,
.content-main table tbody tr {
  transition: background-color 0.2s ease !important;
}

.entry-content-box .content-main table tbody tr:nth-child(even),
.content-main table tbody tr:nth-child(even) {
  background-color: #f8f9fa !important;
}

.entry-content-box .content-main table tbody tr:hover,
.content-main table tbody tr:hover {
  background-color: rgba(102, 126, 234, 0.1) !important;
}

/* ============================================
   FOOTER INFO - TAGS
   ============================================ */

.footer-info .tags {
  margin: 30px 0 !important;
  padding: 20px !important;
  background: #f8f9fa !important;
  border-radius: 12px !important;
}

.footer-info .tags a,
.footer-info .tags span {
  display: inline-block !important;
  padding: 6px 14px !important;
  margin: 5px !important;
  background: white !important;
  color: #495057 !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 20px !important;
  font-size: 14px !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
}

.footer-info .tags a::before {
  content: "#" !important;
  color: #667eea !important;
  font-weight: 700 !important;
  margin-inline-end: 3px !important;
}

.footer-info .tags a:hover {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
  border-color: transparent !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3) !important;
}

/* ============================================
   ADS MANAGEMENT
   ============================================ */

.ad-container {
  margin: 40px 0 !important;
  padding: 20px !important;
  background: #f8f9fa !important;
  border: 2px dashed #dee2e6 !important;
  border-radius: 12px !important;
  position: relative !important;
  min-height: 100px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.ad-container::before {
  content: "📢 Advertisement" !important;
  position: absolute !important;
  top: 5px !important;
  inset-inline-start: 10px !important;
  font-size: 11px !important;
  color: #6c757d !important;
  opacity: 0.6 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
}

/* RTL Support */
[dir="rtl"] .ad-container::before {
  content: "📢 إعلان" !important;
}

/* Prevent consecutive ads */
.ad-container + .ad-container {
  margin-top: 40px !important;
}

.ad-container:has(+ .ad-container) {
  display: none !important;
}

/* ============================================
   RELATED POSTS
   ============================================ */

.post-relevant {
  padding: 30px 10px !important;
  margin-top: 40px !important;
  border-top: 2px solid #e9ecef !important;
}

/* Section title */
.post-relevant::before {
  content: "📚 Related Articles" !important;
  display: block !important;
  font-size: 24px !important;
  font-weight: 700 !important;
  color: #1a1a1a !important;
  margin-bottom: 25px !important;
  padding-inline-start: 15px !important;
  border-inline-start: 5px solid #667eea !important;
  font-family: 'Cairo', 'Inter', -apple-system, sans-serif !important;
}

/* RTL Support */
[dir="rtl"] .post-relevant::before {
  content: "📚 مقالات ذات صلة" !important;
}

.post-relevant .post-relevant-item {
  padding: 0 10px !important;
  margin-bottom: 20px !important;
  position: relative !important;
}

.post-relevant .post-relevant-item > div {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
  width: 100% !important;
  border-radius: 12px !important;
  height: 180px !important;
  position: relative !important;
  overflow: hidden !important;
  display: flex !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 20px !important;
  background-size: cover !important;
  background-position: center !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Article title */
.post-relevant .post-relevant-item > div .title {
  position: relative !important;
  z-index: 10 !important;
  color: white !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  text-align: center !important;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
  font-family: 'Cairo', 'Inter', -apple-system, sans-serif !important;
  display: block !important;
}

/* Prevent Drop Cap in related posts titles */
.post-relevant .post-relevant-item > div .title::first-letter {
  font-size: inherit !important;
  font-weight: inherit !important;
  float: none !important;
  margin: 0 !important;
  color: inherit !important;
}

/* Dark overlay */
.post-relevant .post-relevant-item > div::before {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(180deg, 
    rgba(0, 0, 0, 0.1) 0%, 
    rgba(0, 0, 0, 0.5) 50%, 
    rgba(102, 126, 234, 0.7) 100%) !important;
  z-index: 1 !important;
  transition: all 0.4s ease !important;
}

/* Hover Effects */
.post-relevant .post-relevant-item > div:hover {
  transform: translateY(-8px) scale(1.02) !important;
  box-shadow: 0 12px 24px rgba(102, 126, 234, 0.4) !important;
}

.post-relevant .post-relevant-item > div:hover::before {
  background: linear-gradient(180deg, 
    rgba(102, 126, 234, 0.3) 0%, 
    rgba(118, 75, 162, 0.6) 50%, 
    rgba(240, 147, 251, 0.8) 100%) !important;
}

.post-relevant .post-relevant-item > div:hover .title {
  transform: translateY(-5px) !important;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.7) !important;
}

/* Link icon */
.post-relevant .post-relevant-item::after {
  content: "🔗" !important;
  position: absolute !important;
  top: 15px !important;
  inset-inline-end: 15px !important;
  font-size: 18px !important;
  opacity: 0 !important;
  transform: scale(0) !important;
  transition: all 0.3s ease !important;
  z-index: 11 !important;
}

.post-relevant .post-relevant-item:hover::after {
  opacity: 1 !important;
  transform: scale(1) rotate(360deg) !important;
}

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

@media (max-width: 768px) {
  #post-title {
    font-size: 26px !important;
  }

  .entry-content-box .content-main,
  .content-main {
    font-size: 16px !important;
  }

  .entry-content-box .content-main h2,
  .content-main h2 {
    font-size: 22px !important;
  }

  .entry-content-box .content-main h3,
  .content-main h3 {
    font-size: 20px !important;
  }

  .entry-content-box .content-main h4,
  .content-main h4 {
    font-size: 18px !important;
  }

  .entry-content-box .content-main > p:first-of-type::first-letter,
  .content-main > p:first-of-type::first-letter {
    font-size: 2.8em !important;
  }

  .post-relevant .post-relevant-item > div {
    height: 140px !important;
    padding: 15px !important;
  }

  .post-relevant .post-relevant-item > div .title {
    font-size: 14px !important;
  }

  .post-relevant::before {
    font-size: 20px !important;
  }
}

@media (max-width: 480px) {
  #post-title {
    font-size: 22px !important;
  }

  .entry-content-box .content-main,
  .content-main {
    font-size: 15px !important;
  }

  .entry-content-box .content-main h2,
  .content-main h2 {
    font-size: 20px !important;
  }

  .entry-content-box .content-main > p:first-of-type::first-letter,
  .content-main > p:first-of-type::first-letter {
    font-size: 2.5em !important;
  }

  .post-relevant {
    padding: 20px 5px !important;
  }

  .post-relevant .post-relevant-item {
    padding: 0 5px !important;
  }

  .post-relevant .post-relevant-item > div {
    height: 120px !important;
  }

  .post-relevant .post-relevant-item > div .title {
    font-size: 13px !important;
  }

  .post-relevant::before {
    font-size: 18px !important;
  }
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */

.reading-progress-bar {
  position: fixed !important;
  top: 0 !important;
  inset-inline-start: 0 !important;
  height: 4px !important;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%) !important;
  z-index: 9999 !important;
  transition: width 0.2s ease !important;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .options,
  .footer-info .tags,
  .ad-container,
  .reading-progress-bar,
  .post-relevant {
    display: none !important;
  }

  .entry-content-box .content-main,
  .content-main {
    font-size: 12pt !important;
    line-height: 1.6 !important;
    color: black !important;
  }

  .entry-content-box .content-main a,
  .content-main a {
    color: black !important;
    text-decoration: underline !important;
  }

  .entry-content-box .content-main h2::before,
  .entry-content-box .content-main h3::before,
  .content-main h2::before,
  .content-main h3::before {
    display: none !important;
  }
}
