/*
Theme Name: ktblib
Theme URI: https://www.ktblib.online
Author: KNZKTB
Author URI: https://www.ktblib.online
Description: قالب ووردبريس لموقع تحميل الكتب المجانية
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: mytheme
*/

/* متغيرات CSS */
/* متغيرات الوضع النهاري */
:root {
    --bg-primary: #ffffff;
    --text-primary: #212529;
    --border-color: #dee2e6;
}

/* متغيرات الوضع الليلي */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --text-primary: #f8f9fa;
    --border-color: #495057;
}

/* تأثيرات التبديل */
#darkModeToggle {
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#darkModeToggle:hover {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] #darkModeToggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.fa-sun {
    color: #ffd700;
}

.book-single {
  background: var(--bg-primary);
  color: var(--text-primary);
  transition: background 0.3s ease;
}

.hover-effect {
  transition: transform 0.2s ease;
}

.hover-effect:hover {
  transform: translateY(-3px);
}
.book-single {
  direction: rtl;
  text-align: right;
}
.btn-download {
    background: #3b82f6;
    color: white !important;
    border: 2px solid #3b82f6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

.btn-download:hover {
    background: #2563eb;
    border-color: #2563eb;
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.2);
}

.btn-favorite {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6 !important;
    border: 2px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.05);
}

.btn-favorite:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.1);
}

/* تأثيرات الميتا كارد المعدلة للتناسق */
.meta-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

.meta-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    border-color: #93c5fd;
}
#favoritesCounter {
    font-size: 0.65rem;
    min-width: 1.25rem;
    padding: 0.25em 0.4em;
}

/* تأثيرات hover */
.btn-icon:hover .fa-heart {
    color: #dc3545 !important;
    transition: color 0.3s ease;
}

/* توافق مع الوضع الليلي */
[data-theme="dark"] .btn-icon .fa-heart {
    color: #eee;
}
/* أنماط الفوتر */
.footer {
    transition: all 0.3s ease;
}

.social-icon {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: rgba(var(--text-primary-rgb), 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
}

:root {
    --text-secondary: #6c757d;
    --text-primary-rgb: 33, 37, 41;
}

[data-theme="dark"] {
    --text-secondary: #8e8e8e;
    --text-primary-rgb: 248, 249, 250;
}
.content-separator {
    position: relative;
    margin: 4rem 0 0;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.content-separator::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 30px;
    background: var(--bg-primary);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    z-index: 1;
}

@media (max-width: 768px) {
    .content-separator {
        padding: 1.5rem 0;
        margin: 2rem 0 0;
    }
    
    .content-separator::before {
        width: 40px;
        height: 20px;
        top: -10px;
    }
}
/* تصميم محرك البحث */
.search-wrapper {
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--border-color-rgb), 0.2);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: translateY(-2px);
}

/* تصميم الكروت */
.book-card {
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.book-cover {
    height: 280px;
    object-fit: cover;
    border-radius: 15px 15px 0 0;
}

.book-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    right: 15px;
    display: flex;
    justify-content: space-between;
}

.new-badge {
    background: var(--bs-success);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
}

/* تصميم المخططات */
.chart-wrapper {
    border: 2px solid rgba(var(--primary-rgb), 0.1);
}

.bg-gradient {
    background: linear-gradient(90deg, var(--bs-primary), var(--bs-info));
}

.rank-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* سحابة التصنيفات */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.tag-item {
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    color: var(--bs-dark);
    border: 1px solid transparent;
}

.tag-item:hover {
    color: white;
    border-color: currentColor;
}