/*
Theme Name: AI Tools Hub
Theme URI: https://manus.im/
Author: Manus
Author URI: https://manus.im/
Description: قالب ووردبريس حديث ومشبع بالألوان مخصص لعرض أدوات الذكاء الاصطناعي مع لوحة تحكم شاملة وتصميم متجاوب.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-tools-hub
Domain Path: /languages/
*/

/* الأساسيات */
:root {
    --sidebar-padding: 15px;
    --widget-title-size: 1.2rem;
    --tool-name-size: 0.9rem;
    --tool-icon-size: 16px;
    --category-name-size: 0.85rem;
}

body {
    direction: rtl;
    text-align: right;
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8fafc;
    margin: 0;
    padding: 0;
    color: #334155;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* Header & Navigation */
.top-bar-nav {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

.top-bar-nav .container {
    display: flex;
    justify-content: center;
}

.top-bar-nav .top-bar-menu {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.top-bar-nav .top-bar-menu li {
    margin: 0;
}

.top-bar-nav .top-bar-menu li a {
    display: block;
    padding: 12px 18px;
    color: var(--text-color, #334155);
    text-decoration: none;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
}

.top-bar-nav .top-bar-menu li a:hover,
.top-bar-nav .top-bar-menu li a:focus {
    color: var(--primary-color, #6366f1);
    background: #f8fafc;
}

header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.top-banner {
    width: 100%;
    min-height: 180px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.top-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.main-nav {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: inset 0 -1px 0 rgba(99, 102, 241, 0.08);
    backdrop-filter: blur(8px);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0.35rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.main-nav li {
    position: relative;
}

.main-nav li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    color: var(--text-color, #334155);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    border-radius: 999px;
    transition: all 0.25s ease;
    position: relative;
}

.main-nav li a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 0;
    height: 3px;
    background: var(--primary-color, #6366f1);
    border-radius: 999px;
    transition: width 0.3s ease, left 0.3s ease;
}

.main-nav li a:hover,
.main-nav li a:focus {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color, #6366f1) 0%, var(--secondary-color, #a855f7) 100%);
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.14);
}

.main-nav li a:hover::after,
.main-nav li a:focus::after {
    width: calc(100% - 24px);
    left: 12px;
}

.main-nav li.current-menu-item > a,
.main-nav li.current_page_item > a,
.main-nav li.current-menu-ancestor > a {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color, #6366f1) 0%, var(--secondary-color, #a855f7) 100%);
}

/* Notification Bar */
.news-ticker {
    background: #1e293b;
    color: #fff;
    padding: 10px 0;
    font-size: 0.9rem;
    overflow: hidden;
}

.news-ticker a {
    color: #fbbf24;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.news-ticker a:hover {
    color: #f59e0b;
    text-decoration: underline;
}

.news-ticker strong,
.news-ticker b {
    font-weight: 700;
    color: #e2e8f0;
}

.news-ticker em,
.news-ticker i {
    font-style: italic;
    color: #cbd5e1;
}

.news-ticker marquee {
    font-family: inherit;
    line-height: 1.4;
}

/* Main Content Grid */
.category-section {
    margin-top: 40px;
}

.category-header {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
    background: rgba(99, 102, 241, 0.08);
    padding: 16px 20px;
    border-radius: 20px;
    margin-bottom: 30px;
}

.category-view-all {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.category-view-all:hover {
    color: var(--secondary-color);
    transform: translateY(-50%) scale(1.02);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    padding: 0;
    border: none;
    display: inline-block;
    width: auto;
}

.category-title-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    border-radius: 999px;
    transition: all 0.25s ease;
    position: relative;
    background: linear-gradient(135deg, var(--primary-color, #6366f1) 0%, var(--secondary-color, #a855f7) 100%);
    box-shadow: 0 14px 30px rgba(99, 102, 241, 0.14);
}

.category-title-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 8px;
    width: 0;
    height: 3px;
    background: var(--primary-color, #6366f1);
    border-radius: 999px;
    transition: width 0.3s ease, left 0.3s ease;
}

.category-title-link:hover,
.category-title-link:focus {
    color: #fff;
    transform: translateY(-1px);
}

.category-title-link:hover::after,
.category-title-link:focus::after {
    width: calc(100% - 24px);
    left: 12px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.tool-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px -1px rgba(0, 0, 0, 0.15);
}

.tool-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.tool-card-link:hover {
    text-decoration: none;
}

.tool-card .tool-thumb {
    width: 100%;
    overflow: hidden;
}

article.tool-card .tool-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
}

.tool-content {
    padding: 15px;
    text-align: center;
}

.tool-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1e293b;
    text-align: center;
}

.tool-excerpt {
    font-size: 0.85rem;
    color: #64748b;
    height: 60px;
    overflow: hidden;
    text-align: center;
}

.tool-meta {
    text-align: center;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 8px;
}

/* Sidebar */
.sidebar {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* الشريط الجانبي الديناميكي */
.sidebar-dynamic {
    /* العرض والـ flex يتم تحديدهما عبر inline styles */
}

.widget-title {
    font-size: var(--widget-title-size, 1.2rem);
    margin-bottom: 15px;
    border-right: 4px solid #6366f1;
    padding-right: 10px;
}

/* Footer */
footer {
    background: #1e293b;
    color: #94a3b8;
    padding: 40px 0 20px;
    margin-top: 60px;
    text-align: center;
}

/* Single Post */
.single-tool-post {
    line-height: 1.8;
}

.entry-header {
    margin-bottom: 30px;
}

.entry-title {
    font-size: 2.2rem;
    color: #1e293b;
    margin-bottom: 15px;
    font-weight: 700;
}

.entry-meta {
    color: #94a3b8;
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.entry-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
}

.entry-footer {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

/* Archive Header */
.archive-header {
    margin-bottom: 40px;
    border-bottom: 2px solid #6366f1;
    padding-bottom: 20px;
}

.archive-title {
    font-size: 2.2rem;
    color: #1e293b;
    margin: 0;
    font-weight: 700;
}

.archive-description {
    margin-top: 10px;
    color: #64748b;
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    text-align: center;
}

.page-numbers {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-decoration: none;
    color: #475569;
    transition: all 0.3s ease;
}

.page-numbers:hover,
.page-numbers.current {
    background: #6366f1;
    color: #fff;
    border-color: #6366f1;
}

/* ========================================
   تصميم متقدم للشريط الجانبي
   ======================================== */

.sidebar-inner {
    position: sticky;
    top: 20px;
    width: 100%;
    padding: var(--sidebar-padding, 15px);
}

/* Widgets Container */
.widgets-container .widget {
    margin-bottom: 25px;
    animation: slideInRight 0.6s ease-out;
}

.sidebar[data-animation="fade"] .widget {
    animation: fadeIn 0.6s ease-out;
}

.sidebar[data-animation="slide"] .widget {
    animation: slideInRight 0.6s ease-out;
}

.sidebar[data-animation="bounce"] .widget {
    animation: bounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Widget Styles */
.widget {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
    overflow: hidden;
}

.widget:hover {
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

/* Widget Header */
.widget-header {
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 12px;
}

.widget-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-icon {
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
}

.widget-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #6366f1 0%, #a855f7 100%);
    border-radius: 3px;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.widget:hover .widget-decoration {
    transform: scaleX(1);
}

.widget-content {
    animation: fadeIn 0.4s ease-out 0.1s both;
}

/* Featured Tools Widget */
.widget-featured-tools .tools-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-featured-tools .tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.widget-featured-tools .tool-item:hover {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.tool-icon {
    font-size: var(--tool-icon-size, 16px);
    display: flex;
    align-items: center;
}

.tool-name {
    flex: 1;
    font-weight: 600;
    font-size: var(--tool-name-size, 0.9rem);
    line-height: 1.3;
}

.tool-meta {
    display: block;
    font-size: calc(var(--tool-name-size, 0.9rem) * 0.85);
    opacity: 0.7;
    margin-top: 3px;
}

.tool-error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #fdecea;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
    color: #b91c1c;
}

.widget-featured-tools .tool-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

/* Featured Tools Widget */
.widget-featured-tools .tools-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-featured-tools .tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.widget-featured-tools .tool-item:hover {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-5px);
}

.tool-icon {
    font-size: var(--tool-icon-size, 16px);
    display: flex;
    align-items: center;
}

.tool-name {
    flex: 1;
    font-weight: 600;
    font-size: var(--tool-name-size, 0.9rem);
    line-height: 1.3;
}

.tool-meta {
    display: block;
    font-size: calc(var(--tool-name-size, 0.9rem) * 0.85);
    opacity: 0.7;
    margin-top: 3px;
}

.tool-error-message {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #fdecea;
    border: 1px solid #f5c2c7;
    border-radius: 8px;
    color: #b91c1c;
}

.widget-featured-tools .tool-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}

.tool-arrow {
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 1.2rem;
}

.widget-featured-tools .tool-item:hover .tool-arrow {
    opacity: 1;
}

/* Featured Tools Display Variations */
.widget-featured-tools.show-thumbnails.hide-titles .tool-item {
    justify-content: center;
    padding: 20px 15px;
    min-height: 100px;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.widget-featured-tools.show-thumbnails.hide-titles .tool-icon {
    font-size: calc(var(--tool-icon-size, 16px) * 1.875);
    margin-bottom: 5px;
}

.widget-featured-tools.show-thumbnails.hide-titles .tool-thumb {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.widget-featured-tools.show-thumbnails.hide-titles .tool-item:hover .tool-thumb {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.widget-featured-tools.show-thumbnails.hide-titles .tool-arrow {
    display: none;
}

.widget-featured-tools.show-thumbnails.hide-titles .tool-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.widget-featured-tools.hide-thumbnails.show-titles .tool-item {
    padding: 15px 20px;
}

.widget-featured-tools.hide-thumbnails.show-titles .tool-name {
    font-size: 1.1rem;
    text-align: center;
    flex: none;
}

.widget-featured-tools.hide-thumbnails.show-titles .tool-meta {
    text-align: center;
    margin-top: 5px;
}

.widget-featured-tools.hide-thumbnails.show-titles .tool-arrow {
    margin-left: auto;
}

/* Custom HTML Content Styles */
.widget-featured-tools .custom-html-content {
    line-height: 1.6;
}

.widget-featured-tools .custom-html-content h1,
.widget-featured-tools .custom-html-content h2,
.widget-featured-tools .custom-html-content h3,
.widget-featured-tools .custom-html-content h4,
.widget-featured-tools .custom-html-content h5,
.widget-featured-tools .custom-html-content h6 {
    margin-top: 0;
    margin-bottom: 10px;
    color: inherit;
    font-weight: 600;
}

.widget-featured-tools .custom-html-content p {
    margin-bottom: 10px;
}

.widget-featured-tools .custom-html-content a {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.widget-featured-tools .custom-html-content a:hover {
    color: #a855f7;
}

.widget-featured-tools .custom-html-content ul,
.widget-featured-tools .custom-html-content ol {
    padding-left: 20px;
    margin-bottom: 10px;
}

.widget-featured-tools .custom-html-content ul,
.widget-featured-tools .custom-html-content ol {
    padding-left: 20px;
    margin-bottom: 10px;
}

.widget-featured-tools .custom-html-content li {
    margin-bottom: 5px;
}

/* Featured Tools Second Section */
.widget-featured-tools-2 {
    border-top: 2px solid #e5e7eb;
    margin-top: 20px;
    padding-top: 20px;
}

.widget-featured-tools-2 .widget-header {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.widget-featured-tools-2 .widget-title {
    color: #0369a1;
    font-size: 1.1rem;
}

/* Featured Tools Third Section */
.widget-featured-tools-3 {
    border-top: 2px solid #fef3c7;
    margin-top: 20px;
    padding-top: 20px;
}

.widget-featured-tools-3 .widget-header {
    background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.widget-featured-tools-3 .widget-title {
    color: #92400e;
    font-size: 1.1rem;
}

/* Featured Tools Fourth Section */
.widget-featured-tools-4 {
    border-top: 2px solid #dcfce7;
    margin-top: 20px;
    padding-top: 20px;
}

.widget-featured-tools-4 .widget-header {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.widget-featured-tools-4 .widget-title {
    color: #166534;
    font-size: 1.1rem;
}

/* Featured Tools Fifth Section */
.widget-featured-tools-5 {
    border-top: 2px solid #fce7f3;
    margin-top: 20px;
    padding-top: 20px;
}

.widget-featured-tools-5 .widget-header {
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.widget-featured-tools-5 .widget-title {
    color: #be185d;
    font-size: 1.1rem;
}

/* Featured Tools Sixth Section */
.widget-featured-tools-6 {
    border-top: 2px solid #e0e7ff;
    margin-top: 20px;
    padding-top: 20px;
}

.widget-featured-tools-6 .widget-header {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.widget-featured-tools-6 .widget-title {
    color: #3730a3;
    font-size: 1.1rem;
}

/* Featured Tools Seventh Section */
.widget-featured-tools-7 {
    border-top: 2px solid #fed7d7;
    margin-top: 20px;
    padding-top: 20px;
}

.widget-featured-tools-7 .widget-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fed7d7 100%);
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
}

.widget-featured-tools-7 .widget-title {
    color: #dc2626;
    font-size: 1.1rem;
}

/* Categories Widget */
.widget-categories .categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.category-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-weight: 600;
    min-width: 0;
    word-break: break-word;
}

.category-badge:hover {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.category-name {
    margin-bottom: 5px;
}

.category-count {
    font-size: 0.75rem;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
}

.category-badge:hover .category-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Recent Posts Widget */
.widget-recent-posts .recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-recent-posts .post-link {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: #334155;
    transition: all 0.3s ease;
    gap: 5px;
}

.widget-recent-posts li:last-child .post-link {
    border-bottom: none;
}

.post-link:hover {
    color: #6366f1;
    padding-right: 8px;
}

.post-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.post-date {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
}

.post-link:hover .post-date {
    color: #6366f1;
}

/* Search Widget */
.widget-search .sidebar-search-form {
    display: flex;
    gap: 8px;
}

.search-field {
    flex: 1;
    padding: 10px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.search-field:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-submit {
    padding: 10px 16px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.search-submit:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

/* Stats Widget */
.widget-stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-item:hover {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #fff;
    transform: scale(1.1);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #6366f1;
}

.stat-item:hover .stat-number {
    color: #fff;
}

.stat-label {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 5px;
    font-weight: 600;
}

.stat-item:hover .stat-label {
    color: rgba(255, 255, 255, 0.9);
}

/* CTA Widget */
.widget-cta {
    border: none;
    padding: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.widget-cta .widget-content {
    border-radius: 12px;
}

.cta-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cta-email {
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.cta-email::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.cta-email:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.2);
}

.cta-button {
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.cta-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.05);
}

/* Custom Posts Widget */
.widget-custom-posts .custom-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget-custom-posts .post-link {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: #334155;
    transition: all 0.3s ease;
}

.widget-custom-posts .post-link:hover {
    color: #6366f1;
}

.widget-custom-posts .post-thumbnail {
    margin-bottom: 8px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.widget-custom-posts .post-thumb {
    width: 100%;
    height: 60px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.widget-custom-posts .post-link:hover .post-thumb {
    transform: scale(1.05);
}

.widget-custom-posts .post-title {
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.4;
}

.widget-custom-posts .post-date {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Custom Categories Widget */
.widget-custom-categories .categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.widget-custom-categories .category-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    text-decoration: none;
    color: #334155;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-weight: 600;
    min-width: 0;
    word-break: break-word;
}

.widget-custom-categories .category-badge:hover {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.widget-custom-categories .category-name {
    margin-bottom: 5px;
}

.widget-custom-categories .category-count {
    font-size: 0.75rem;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.5);
    padding: 2px 6px;
    border-radius: 4px;
}

.widget-custom-categories .category-badge:hover .category-count {
    background: rgba(255, 255, 255, 0.3);
}

/* Hide Meta Information */
.sidebar.hide-meta .post-date,
.sidebar.hide-meta .category-count {
    display: none;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}

/* Responsive - Sidebar */
@media (max-width: 1200px) {
    .sidebar {
        padding: 15px;
    }
    
    .widget {
        padding: 15px;
    }
}

@media (max-width: 1100px) {
    .sidebar-dynamic {
        width: var(--sidebar-width);
        flex: 0 0 var(--sidebar-width);
    }
}

@media (max-width: 768px) {
    .sidebar-inner {
        position: static;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .sidebar-dynamic {
        width: 100% !important;
        flex: none !important;
        margin-bottom: 30px;
    }
}

@media (max-width: 480px) {
    .widget {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .widget-title {
        font-size: 1rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .tools-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .tools-grid { grid-template-columns: repeat(2, 1fr); }
    .top-banner { height: 200px; }
    #content { flex-direction: column; }
    .sidebar { width: 100%; }
}

@media (max-width: 480px) {
    .tools-grid { grid-template-columns: 1fr; }
    .top-banner h1 { font-size: 1.8rem; }
    .main-nav ul { flex-wrap: wrap; }
    .main-nav li a { padding: 10px 15px; font-size: 0.9rem; }
}
