/*
Theme Name: Online Tools Theme
Theme URI: https://example.com/online-tools-theme
Description: A modern WordPress theme for online tools and calculators. Supports both LTR and RTL languages.
Version: 1.1.0
Author: Your Name
Author URI: https://example.com
Text Domain: alwebmtools
Domain Path: /languages
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* أنماط إضافية للأدوات في لوحة الإدارة */
.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.error {
    padding: 20px;
    text-align: center;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
}

.custom-shortcode-section {
    margin-top: 15px;
}

.custom-shortcode-section textarea {
    font-family: 'Courier New', monospace;
    direction: ltr;
}

/* تحسين مظهر meta boxes */
#tools_selector select,
#custom_shortcode textarea {
    width: 100%;
    margin-top: 5px;
}

#tool-settings-container table {
    width: 100%;
}

#tool-settings-container th {
    width: 200px;
    text-align: left;
    vertical-align: top;
    padding: 10px 0;
}

#tool-settings-container td {
    padding: 10px 0;
}

/* أنماط للعرض المبسط */
.view-app {
    background: #f8fafc;
}

.view-app .tool-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* تحسين مظهر الأدوات في الواجهة الأمامية */
.tool-calculator-section {
    margin-bottom: 30px;
}

.tool-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px 10px 0 0;
}

.tool-content {
    background: white;
    padding: 30px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* أنماط للرسوم البيانية */
.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

/* أنماط للجداول */
.tool-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.tool-table th,
.tool-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.tool-table th {
    background: #f9fafb;
    font-weight: 600;
}

/* أنماط للأزرار */
.tool-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tool-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* أنماط للحقول */
.tool-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

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

/* أنماط للنتائج */
.tool-results {
    background: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #667eea;
}

.tool-results h3 {
    color: #374151;
    margin-bottom: 15px;
}

.tool-result-value {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

/* أنماط للتنبيهات */
.tool-alert {
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.tool-alert.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.tool-alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.tool-alert.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* أنماط للشعارات */
.tool-logo {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

/* أنماط للتحميل */
.tool-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.tool-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* أنماط للطباعة */
@media print {
    .tool-calculator-section {
        break-inside: avoid;
    }
    
    .tool-header {
        background: #f8fafc !important;
        color: #000 !important;
    }
}

/* أنماط للشاشات الصغيرة */
@media (max-width: 768px) {
    .tool-header {
        padding: 20px;
    }
    
    .tool-content {
        padding: 20px;
    }
    
    .tool-result-value {
        font-size: 20px;
    }
    
    .chart-container {
        height: 300px;
    }
}

/* أنماط خاصة لصفحة الهبوط للأدوات */
.tool-landing-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.tool-landing-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.1"%3E%3Ccircle cx="30" cy="30" r="2"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
    opacity: 0.3;
}

.tool-landing-container {
    position: relative;
    z-index: 10;
}

.tool-landing-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tool-landing-feature {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-landing-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.tool-landing-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.tool-landing-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* أنماط للرسوم المتحركة */
.tool-landing-fade-in {
    animation: fadeInUp 0.8s ease-out;
}

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

.tool-landing-stagger {
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

.tool-landing-stagger:nth-child(1) { animation-delay: 0.1s; }
.tool-landing-stagger:nth-child(2) { animation-delay: 0.2s; }
.tool-landing-stagger:nth-child(3) { animation-delay: 0.3s; }

/* أنماط للشعارات والأيقونات */
.tool-landing-icon {
    transition: transform 0.3s ease;
}

.tool-landing-feature:hover .tool-landing-icon {
    transform: scale(1.1);
}

/* أنماط للجداول في صفحة الهبوط */
.tool-landing-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tool-landing-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    padding: 16px;
}

.tool-landing-table td {
    padding: 16px;
    border-bottom: 1px solid #f3f4f6;
}

.tool-landing-table tr:hover {
    background: #f9fafb;
}

/* أنماط للأزرار في صفحة الهبوط */
.tool-landing-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
}

.tool-landing-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

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

/* أنماط للحقول في صفحة الهبوط */
.tool-landing-input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

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

/* أنماط للنتائج في صفحة الهبوط */
.tool-landing-result {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    text-align: center;
}

.tool-landing-result-value {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin: 10px 0;
}

/* أنماط للتنبيهات في صفحة الهبوط */
.tool-landing-alert {
    padding: 16px;
    border-radius: 8px;
    margin: 16px 0;
    border-left: 4px solid;
}

.tool-landing-alert.success {
    background: #d1fae5;
    color: #065f46;
    border-left-color: #10b981;
}

.tool-landing-alert.error {
    background: #fee2e2;
    color: #991b1b;
    border-left-color: #ef4444;
}

.tool-landing-alert.warning {
    background: #fef3c7;
    color: #92400e;
    border-left-color: #f59e0b;
}

/* أنماط للرسوم البيانية في صفحة الهبوط */
.tool-landing-chart {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* أنماط للشاشات الصغيرة في صفحة الهبوط */
@media (max-width: 768px) {
    .tool-landing-hero {
        padding: 40px 20px;
    }
    
    .tool-landing-card {
        margin: 0 10px;
    }
    
    .tool-landing-result-value {
        font-size: 24px;
    }
    
    .tool-landing-button {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* Modern Navbar Styles */
.modern-navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    text-decoration: none;
}

.navbar-logo:hover {
    color: #3b82f6;
}

.navbar-logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.navbar-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-links a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-links a:hover {
    color: #3b82f6;
}

.navbar-mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.5rem;
    cursor: pointer;
}

/* FAQ Styles */
.faq-section {
    padding: 4rem 0;
    background: white;
}

.faq-item {
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #1f2937;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f1f5f9;
}

.faq-answer {
    padding: 0 1.5rem 1.5rem;
    color: #6b7280;
    line-height: 1.6;
    display: none;
}

.faq-answer.active {
    display: block;
}

.faq-icon {
    transition: transform 0.3s ease;
}

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

/* Enhanced Card Styles */
.enhanced-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.enhanced-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.enhanced-card-image {
    position: relative;
    overflow: hidden;
}

.enhanced-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.enhanced-card:hover .enhanced-card-image img {
    transform: scale(1.05);
}

.enhanced-card-content {
    padding: 1.5rem;
}

.enhanced-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.enhanced-card-title a {
    color: inherit;
    text-decoration: none;
}

.enhanced-card-title a:hover {
    color: #3b82f6;
}

.enhanced-card-excerpt {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.enhanced-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
}

.enhanced-card-category {
    color: #9ca3af;
    font-weight: 500;
}

.enhanced-card-link {
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    transition: color 0.3s ease;
}

.enhanced-card-link:hover {
    color: #2563eb;
}

/* Admin Panel Enhancements */
.feature-item, .faq-item {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.feature-item:hover, .faq-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.feature-item.highlighted, .faq-item.highlighted {
    background: #eff6ff;
    border-color: #3b82f6;
}

.button.clicked {
    transform: scale(0.95);
}

.form-table tr.focused {
    background: #f0f9ff;
}

.icon-preview {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.75rem;
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar-links {
        display: none;
    }
    
    .navbar-mobile-toggle {
        display: block;
    }
    
    .navbar-mobile-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        padding: 1rem;
    }
    
    .navbar-mobile-menu.active {
        display: block;
    }
    
    .navbar-mobile-menu a {
        display: block;
        padding: 0.75rem 0;
        color: #6b7280;
        text-decoration: none;
        border-bottom: 1px solid #f3f4f6;
    }
    
    .navbar-mobile-menu a:hover {
        color: #3b82f6;
        background: #f9fafb;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .modern-navbar {
        background: rgba(17, 24, 39, 0.95);
        border-bottom-color: rgba(75, 85, 99, 0.5);
    }
    
    .navbar-logo {
        color: #f9fafb;
    }
    
    .navbar-links a {
        color: #d1d5db;
    }
    
    .navbar-links a:hover {
        color: #60a5fa;
    }
    
    .enhanced-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .enhanced-card-title {
        color: #f9fafb;
    }
    
    .enhanced-card-excerpt {
        color: #d1d5db;
    }
    
    .faq-item {
        background: #374151;
        border-color: #4b5563;
    }
    
    .faq-question {
        color: #f9fafb;
    }
    
    .faq-question:hover {
        background-color: #4b5563;
    }
    
    .faq-answer {
        color: #d1d5db;
    }
}

/* أنماط للمحتوى في المقالات */
.prose {
    max-width: 100%;
    line-height: 1.7;
    color: #374151;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #111827;
}

.prose h1 {
    font-size: 2.25rem;
    margin-top: 0;
}

.prose h2 {
    font-size: 1.875rem;
}

.prose h3 {
    font-size: 1.5rem;
}

.prose h4 {
    font-size: 1.25rem;
}

.prose h5 {
    font-size: 1.125rem;
}

.prose h6 {
    font-size: 1rem;
}

.prose p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.prose blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6b7280;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.prose blockquote p {
    margin-bottom: 0;
}

.prose hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 3rem 0;
}

.prose pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.prose code {
    background: #f3f4f6;
    color: #dc2626;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: 'Courier New', monospace;
}

.prose pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.prose ul,
.prose ol {
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.prose li ul,
.prose li ol {
    margin: 0.5rem 0;
}

.prose dl {
    margin: 1.5rem 0;
}

.prose dt {
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
}

.prose dd {
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 2px solid #e5e7eb;
    padding-left: 1rem;
}

.prose figure {
    margin: 2rem 0;
    text-align: center;
}

.prose figure img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.prose figure figcaption {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

.prose table th,
.prose table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.prose table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.prose table tr:hover {
    background: #f8fafc;
}

/* أنماط للوضع المظلم */
@media (prefers-color-scheme: dark) {
    .prose {
        color: #d1d5db;
    }
    
    .prose h1,
    .prose h2,
    .prose h3,
    .prose h4,
    .prose h5,
    .prose h6 {
        color: #f9fafb;
    }
    
    .prose blockquote {
        background: #374151;
        color: #d1d5db;
        border-left-color: #60a5fa;
    }
    
    .prose hr {
        border-top-color: #4b5563;
    }
    
    .prose code {
        background: #374151;
        color: #f87171;
    }
    
    .prose dd {
        border-left-color: #4b5563;
    }
    
    .prose table th {
        background: #374151;
        color: #d1d5db;
    }
    
    .prose table tr:hover {
        background: #4b5563;
    }
    
    .prose figure figcaption {
        color: #9ca3af;
    }
}

/* تحسينات للأجهزة المحمولة */
@media (max-width: 768px) {
    .prose h1 {
        font-size: 1.875rem;
    }
    
    .prose h2 {
        font-size: 1.5rem;
    }
    
    .prose h3 {
        font-size: 1.25rem;
    }
    
    .prose blockquote {
        padding: 1rem;
        margin: 1.5rem 0;
    }
    
    .prose pre {
        padding: 1rem;
        font-size: 0.75rem;
    }
    
    .prose table {
        font-size: 0.75rem;
    }
    
    .prose table th,
    .prose table td {
        padding: 0.5rem;
    }
}