/*
Theme Name: AllinOneWeb
Theme URI: https://allinoneweb.ir
Author: AllinOneWeb Team
Author URI: https://allinoneweb.ir
Description: قالب اختصاصی سایت آل این وان وب - مجموعه ابزارهای آنلاین رایگان
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.5
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: allinoneweb
Domain Path: /languages
Tags: rtl-language-support, custom-logo, custom-menu, featured-images, theme-options

این قالب برای سایت آل این وان وب طراحی شده است.
*/

/* ==========================================================================
   CSS Variables - متغیرهای اصلی
   ========================================================================== */
:root {
    /* Colors */
    --aiow-primary: #667eea;
    --aiow-secondary: #764ba2;
    --aiow-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* Success/Warning/Error */
    --aiow-success: #10b981;
    --aiow-warning: #f59e0b;
    --aiow-error: #ef4444;
    
    /* Neutrals */
    --aiow-white: #ffffff;
    --aiow-gray-50: #f9fafb;
    --aiow-gray-100: #f3f4f6;
    --aiow-gray-200: #e5e7eb;
    --aiow-gray-300: #d1d5db;
    --aiow-gray-400: #9ca3af;
    --aiow-gray-500: #6b7280;
    --aiow-gray-600: #4b5563;
    --aiow-gray-700: #374151;
    --aiow-gray-800: #1f2937;
    --aiow-gray-900: #111827;
    
    /* Typography */
    --aiow-font-family: 'Vazirmatn', system-ui, sans-serif;
    --aiow-font-size-base: 16px;
    
    /* Spacing */
    --aiow-container-max: 1280px;
    --aiow-header-height: 80px;
    
    /* Border Radius */
    --aiow-radius-sm: 0.375rem;
    --aiow-radius-md: 0.5rem;
    --aiow-radius-lg: 0.75rem;
    --aiow-radius-xl: 1rem;
    --aiow-radius-2xl: 1.5rem;
    
    /* Shadows */
    --aiow-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --aiow-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --aiow-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --aiow-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --aiow-transition: all 0.3s ease;
}

/* ==========================================================================
   Base Styles - استایل‌های پایه
   ========================================================================== */
* {
    box-sizing: border-box;
}

html {
    font-size: var(--aiow-font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--aiow-font-family);
    direction: rtl;
    text-align: right;
    background-color: var(--aiow-gray-50);
    color: var(--aiow-gray-800);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   Utility Classes - کلاس‌های کمکی
   ========================================================================== */
.aiow-container {
    max-width: var(--aiow-container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.aiow-gradient-text {
    background: var(--aiow-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.aiow-gradient-bg {
    background: var(--aiow-gradient);
}

.aiow-card {
    background: var(--aiow-white);
    border-radius: var(--aiow-radius-2xl);
    box-shadow: var(--aiow-shadow-md);
    transition: var(--aiow-transition);
}

.aiow-card:hover {
    box-shadow: var(--aiow-shadow-xl);
    transform: translateY(-4px);
}

/* ==========================================================================
   Button Styles - دکمه‌ها
   ========================================================================== */
.aiow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    border-radius: var(--aiow-radius-xl);
    border: none;
    cursor: pointer;
    transition: var(--aiow-transition);
    text-decoration: none;
}

.aiow-btn-primary {
    background: var(--aiow-gradient);
    color: var(--aiow-white);
}

.aiow-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: var(--aiow-shadow-lg);
}

.aiow-btn-secondary {
    background: var(--aiow-white);
    color: var(--aiow-primary);
    border: 2px solid var(--aiow-primary);
}

.aiow-btn-secondary:hover {
    background: var(--aiow-primary);
    color: var(--aiow-white);
}

/* ==========================================================================
   WordPress Core Styles - استایل‌های هسته وردپرس
   ========================================================================== */
.alignleft {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: var(--aiow-gray-500);
    text-align: center;
    padding: 0.5rem;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* ==========================================================================
   Accessibility - دسترسی‌پذیری
   ========================================================================== */
:focus {
    outline: 2px solid var(--aiow-primary);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

:focus-visible {
    outline: 2px solid var(--aiow-primary);
    outline-offset: 2px;
}

/* ==========================================================================
   Custom Styles - استایل‌های سفارشی
   ========================================================================== */

/* Gradient Background */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Tool Card Hover Effect */
.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

/* Category Card Hover Effect */
.category-card:hover {
    transform: scale(1.05);
}

/* Floating Animation */
.floating {
    animation: float 3s ease-in-out infinite;
}

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

/* Pulse Glow Animation */
.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.4); }
    50% { box-shadow: 0 0 40px rgba(102, 126, 234, 0.8); }
}

/* Navigation Link Underline Effect */
.nav-link:hover::after {
    width: 100%;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

/* Search Input Focus */
.search-input:focus {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

/* Back to Top Button */
#backToTop {
    z-index: 9999;
}

/* FAQ Accordion */
.faq-item.open .faq-answer {
    display: block;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Header Styles - استایل‌های هدر
   ========================================================================== */
#site-header {
    transition: all 0.3s ease;
}

#site-header.scrolled {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* ==========================================================================
   Footer Styles - استایل‌های فوتر
   ========================================================================== */
#site-footer a {
    transition: color 0.3s ease;
}

#site-footer .widget-title {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   WordPress Menu Styles - استایل‌های منوی وردپرس
   ========================================================================== */
.menu-item a {
    display: block;
    padding: 0.5rem 0;
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.menu-item a:hover {
    color: var(--aiow-primary);
}

/* Sub-menu */
.sub-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ==========================================================================
   Form Styles - استایل‌های فرم
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
    font-family: var(--aiow-font-family);
    font-size: 1rem;
}

/* ==========================================================================
   Responsive Utilities - ابزارهای واکنش‌گرا
   ========================================================================== */
@media (max-width: 768px) {
    .floating {
        animation: none;
    }
    
    .tool-card:hover,
    .category-card:hover {
        transform: none;
    }
}

/* Categories page specific tweaks */
.aiow-hero { direction: rtl; }
.aiow-stats .aiow-card { min-height: 92px; }
.subcategory-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:0.5rem; }
.subcategory-item { transition: all .18s ease; }
.subcategory-item:hover { transform:scale(1.02); background:var(--aiow-gradient); color:#fff; }
.expand-btn { cursor:pointer; }
.category-icon { transition: transform .25s ease; }
.category-card:hover .category-icon { transform:scale(1.06) rotate(3deg); }

/* Stats cards with icons */
.stats-card {
    position: relative;
    overflow: hidden;
}

.stats-categories::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 50%;
    transform: translate(20%, -20%);
}

.stats-categories::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23667eea'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2H5a2 2 0 00-2-2z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M8 5a2 2 0 012-2h4a2 2 0 012 2v2H8V5z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.stats-subcategories::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    border-radius: 50%;
    transform: translate(20%, -20%);
}

.stats-subcategories::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2310b981'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.stats-tools::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    border-radius: 50%;
    transform: translate(20%, -20%);
}

.stats-tools::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23f59e0b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

.stats-users::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(124, 58, 237, 0.1) 100%);
    border-radius: 50%;
    transform: translate(20%, -20%);
}

.stats-users::after {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238b5cf6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 4.354a4 4 0 110 5.292M15 21H3v-1a6 6 0 0112 0v1zm0 0h6v-1a6 6 0 00-9-5.197m13.5-9a2.5 2.5 0 11-5 0 2.5 2.5 0 015 0z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
}

/* Filter and view button active states */
.filter-tag:hover, .filter-tag.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

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

/* Subcategory grid styles */
.subcategory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    transition: max-height 0.3s ease;
}

.subcategory-grid.collapsed {
    max-height: 120px;
    overflow: hidden;
}

.subcategory-grid.expanded {
    max-height: none;
}

.subcategory-item {
    text-decoration: none;
    transition: background-color 0.2s;
}

.subcategory-item:hover {
    background-color: #f1f5f9 !important;
}

.subcategory-count {
    background: #e2e8f0;
    color: #475569;
}

/* Expand button styles */
.expand-btn {
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.expand-btn:hover {
    background-color: #eef2ff !important;
}

/* Category card hover effect */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Not Found Section - Exact styles from categories.html */
#notFound {
    padding: 4rem 0;
    background: linear-gradient(to right, #4f46e5, #7c3aed);
}

#notFound .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

#notFound .max-w-2xl {
    max-width: 42rem;
    margin: 0 auto;
}

#notFound h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
}

#notFound p {
    color: #e0e7ff;
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

#notFound .flex {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

#notFound .flex a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
}

#notFound .flex a:first-child {
    background: white;
    color: #4f46e5;
}

#notFound .flex a:first-child:hover {
    background: #f9fafb;
}

#notFound .flex a:last-child {
    background: #6366f1;
    color: white;
}

#notFound .flex a:last-child:hover {
    background: #4f46e5;
}

@media (min-width: 640px) {
    #notFound .flex {
        flex-direction: row;
    }
}

/* Force Font Awesome icons */
.fas, .far, .fab, .fa {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900 !important;
}

/* Category icons */
.category-icon i {
    font-size: 2rem !important;
    color: inherit !important;
}

/* Featured Tool Styles */
.featured-tool {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 2px solid rgba(102, 126, 234, 0.3);
    transition: border-color 0.3s ease;
}

.featured-tool:hover {
    border-color: #667eea;
}

/* Custom Logo Styles */
.custom-logo {
    max-height: 80px;
    width: auto;
    object-fit: contain;
}
