/* =========================================
   1. تعريف المتغيرات (الألوان الأساسية)
   ========================================= */
:root {
    --primary-color: #003B73; 
    --secondary-color: #00A8CC; 
    --accent-color: #FF5722; 
    --text-dark: #212529; 
    --text-light: #6c757d; 
    --bg-light: #F4F8FB; 
    --bg-white: #FFFFFF; 
    --border-radius-base: 8px; 
    --box-shadow-card: 0 5px 15px rgba(0, 59, 115, 0.08); 
    --font-cairo: 'Cairo', sans-serif;
    --transition-speed: 0.3s;
}

/* =========================================
   2. الوضع الفاخر المطور (Enhanced Luxury Theme)
   ========================================= */
body[data-theme="luxury"] {
    --primary-color: #D4AF37; /* لون ذهبي ملكي */
    --secondary-color: #FFFFFF; 
    --accent-color: #C5A028; 
    --bg-light: #040D14; /* خلفية داكنة جداً وعميقة */
    --bg-white: #0A1929; /* لون الصناديق */
    --text-dark: #F8F9FA; 
    --box-shadow-card: 0 15px 35px rgba(212, 175, 55, 0.15); 
}

body[data-theme="luxury"] .product-card {
    border: 1px solid rgba(212, 175, 55, 0.3);
    background: linear-gradient(145deg, #0A1929, #0D2136); /* تدرج لوني فخم */
}

/* إضافة لمعان ذهبي عند التحويم */
body[data-theme="luxury"] .product-card:hover {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    transform: translateY(-10px);
}

body[data-theme="luxury"] .btn-primary {
    background: linear-gradient(45deg, #D4AF37, #F5E050); /* زر ذهبي متدرج */
    color: #000;
    border: none;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* تحسين شكل الجدول في الوضع الفاخر */
body[data-theme="luxury"] .specs-table th {
    background-color: #040D14;
    color: #D4AF37;
    border-color: #D4AF37;
}

/* =========================================
   3. التنسيق الأساسي (Reset)
   ========================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-cairo); color: var(--text-dark); background-color: var(--bg-light); line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; transition: all var(--transition-speed) ease; }
ul { list-style: none; }
button { font-family: var(--font-cairo); }
.container { width: 90%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* =========================================
   4. الهيدر والبانر (Header & Hero)
   ========================================= */
.top-bar { background-color: var(--primary-color); color: #ffffff; padding: 10px 0; font-size: 0.9rem; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }

.main-header { background-color: var(--bg-white); padding: 15px 0; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); position: sticky; top: 0; z-index: 1000; }
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo img { height: 50px; width: auto; }
.company-name-header { font-size: 1.4rem; font-weight: 800; color: var(--primary-color); line-height: 1.2; margin-right: 10px; }

.main-nav ul { display: flex; gap: 25px; }
.main-nav a { color: var(--primary-color); font-weight: 700; font-size: 1rem; position: relative; }
.main-nav a:hover { color: var(--secondary-color); }

.header-actions { display: flex; gap: 15px; align-items: center; }
.header-actions button, .header-actions a { background: none; border: none; color: var(--primary-color); font-size: 1.2rem; cursor: pointer; position: relative; }
.badge { position: absolute; top: -8px; right: -8px; background-color: var(--accent-color); color: #fff; border-radius: 50%; padding: 2px 5px; font-size: 0.7rem; font-weight: bold; min-width: 18px; text-align: center; }

.hero-banner {
    background: linear-gradient(rgba(0, 59, 115, 0.75), rgba(0, 31, 63, 0.75)), url('images/banar.jpg');
    background-size: cover; background-position: center top;
    color: #fff; padding: 140px 0; text-align: right;
}
.hero-content h1 { font-size: 2.5rem; margin-bottom: 20px; }

/* =========================================
   5. الشبكة والمنتجات (Grid & Cards)
   ========================================= */
.product-listing { padding: 40px 0; }
.content-wrapper { display: flex; flex-direction: column; gap: 30px; }

/* الفلتر */
.filter-sidebar { background: var(--bg-white); padding: 20px; border-radius: var(--border-radius-base); box-shadow: 0 2px 10px rgba(0,0,0,0.05); width: 100%; }
.filter-options { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.filter-options label span { display: inline-block; padding: 5px 15px; background: #fff; border: 1px solid #ddd; border-radius: 20px; cursor: pointer; transition: 0.2s; font-size: 0.9rem; }
.filter-options input:checked + span { background: var(--secondary-color); color: #fff; border-color: var(--secondary-color); }
.filter-options input { display: none; }

/* شبكة المنتجات */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.product-card {
    background: var(--bg-white); border-radius: var(--border-radius-base); overflow: hidden;
    box-shadow: var(--box-shadow-card); transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(0,0,0,0.05); display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }

.product-image { height: 200px; padding: 15px; display: flex; align-items: center; justify-content: center; background: #fff; position: relative; }
.product-image img { max-width: 100%; max-height: 100%; object-fit: contain; }

.product-info { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; }
.product-category { font-size: 0.8rem; color: var(--text-light); }
.product-info h3 { font-size: 1rem; margin: 5px 0 10px; height: 45px; overflow: hidden; line-height: 1.4; }
.price-box .price { font-size: 1.2rem; font-weight: bold; color: var(--primary-color); }

.btn-primary { background-color: var(--secondary-color); color: #fff; padding: 10px 25px; border-radius: 5px; border: none; cursor: pointer; font-weight: bold; transition: 0.3s; }
.btn-primary:hover { background-color: var(--primary-color); }
.btn-secondary { background: transparent; border: 1px solid var(--primary-color); color: var(--primary-color); padding: 8px 20px; border-radius: 5px; cursor: pointer; }
.btn-secondary:hover { background: var(--primary-color); color: #fff; }

/* =========================================
   6. صفحة تفاصيل المنتج (Product Details) - هام جداً للإصلاح
   ========================================= */
.product-details-section { padding: 40px 0; }

/* الشبكة الرئيسية لصفحة المنتج */
.product-content {
    display: grid;
    grid-template-columns: 45% 50%; /* تقسيم العرض بين الصور والتفاصيل */
    gap: 5%;
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--border-radius-base);
    box-shadow: 0 2px 15px rgba(0,0,0,0.03);
    align-items: start;
}

/* معرض الصور */
.product-gallery { display: flex; flex-direction: column; gap: 15px; }
.main-image-container {
    width: 100%; height: 350px; 
    border: 1px solid #eee; border-radius: var(--border-radius-base);
    display: flex; align-items: center; justify-content: center;
    background: #fff; padding: 10px;
}
.main-image-container img { max-width: 100%; max-height: 100%; object-fit: contain; }

.thumbnails-container { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.thumbnail {
    width: 70px; height: 70px; border: 1px solid #ddd; border-radius: 6px;
    cursor: pointer; padding: 5px; opacity: 0.6; flex-shrink: 0; background: #fff;
}
.thumbnail.active { opacity: 1; border-color: var(--secondary-color); border-width: 2px; }
.thumbnail img { width: 100%; height: 100%; object-fit: contain; }

/* قسم النصوص والتفاصيل */
.product-details h1 { font-size: 1.8rem; margin: 10px 0; color: var(--primary-color); }
.detail-price-box {
    background: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0;
    border-right: 4px solid var(--accent-color);
}
.detail-price-box .price { font-size: 2rem; font-weight: bold; color: var(--accent-color); }
.installments-badge { background: #fff; border: 1px solid #eee; padding: 10px; border-radius: 5px; margin-top: 10px; font-size: 0.9rem; }

/* الخيارات والكمية */
.service-options { margin-top: 20px; border: 1px solid #eee; padding: 15px; border-radius: 8px; }
.service-option { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.quantity-input-group { margin: 20px 0; display: flex; align-items: center; gap: 10px; }
.quantity-input-group input { width: 60px; padding: 8px; text-align: center; border: 1px solid #ddd; border-radius: 4px; }
.action-buttons { display: flex; gap: 10px; margin-top: 20px; }
.action-buttons button { flex: 1; padding: 12px; }

/* جدول المواصفات (Specs Table) */
.specs-details-section { margin-top: 40px; background: var(--bg-white); padding: 30px; border-radius: var(--border-radius-base); }
.specs-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
.specs-table th, .specs-table td { padding: 12px 15px; border-bottom: 1px solid #eee; text-align: right; }
.specs-table th { width: 30%; color: var(--text-light); font-weight: 600; background: #fafafa; }
.specs-table td { color: var(--primary-color); font-weight: 700; }
.specs-table tr:last-child th, .specs-table tr:last-child td { border-bottom: none; }

/* =========================================
   7. الفوتر (Footer) - النسخة المصححة
   ========================================= */
.main-footer {
    background-color: #1a1a1a;
    color: #ccc;
    padding: 60px 0 20px;
    margin-top: 50px;
}

.footer-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: space-between;
    align-items: flex-start; /* محاذاة للأعلى لترتيب العناصر */
}

/* تنسيق الشعار والاسم */
.footer-col.about-us {
    flex: 1 1 300px;
    text-align: right;
}

.footer-logo {
    width: 100px;
    height: auto;
    margin-bottom: 15px;
    display: block;
    background-color: transparent; /* جعل الخلفية شفافة */
    padding: 0; /* إزالة المسافة الداخلية */
    border-radius: 0; /* إزالة الحواف الدائرية */
}
.company-name-footer {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.1rem;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--secondary-color);
}

/* تنسيق الروابط الاجتماعية (أفقي وبشكل دائري) */
.social-links {
    display: flex;       /* جعل العناصر بجانب بعضها */
    flex-direction: row; /* تأكيد الاتجاه الأفقي */
    gap: 10px;           /* مسافة بين الأيقونات */
    padding: 0;
    margin-top: 15px;
    list-style: none;
}

.social-links li {
    display: inline-block;
    margin: 0; /* إزالة أي هوامش إضافية */
}

.social-links a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #888;
}

/* =========================================
   تنسيقات صفحة المقارنة (النسخة النهائية - صور صغيرة وتفاصيل كاملة)
   ========================================= */

.comparison-section {
    padding: 40px 0;
    background-color: var(--bg-light);
    min-height: 80vh;
}

.comparison-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* حاوية الجدول (للسماح بالتمرير) */
.comparison-table-wrapper {
    overflow-x: auto; /* مهم جداً للجوال */
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    position: relative;
    padding-bottom: 10px;
}

.comparison-table {
    width: 100%;
    min-width: 900px; /* ضمان عدم انضغاط الأعمدة */
    border-collapse: separate; /* ضروري للحدود */
    border-spacing: 0;
}

.comparison-table th, 
.comparison-table td {
    padding: 10px 8px; /* تقليل الهوامش لتوفير المساحة */
    text-align: center;
    border-bottom: 1px solid #eee;
    border-right: 1px solid #eee; /* فواصل عمودية */
    vertical-align: middle;
    font-size: 0.9rem; /* خط أصغر للبيانات */
}

/* العمود الأول (المسميات) - مثبت */
.comparison-table .comp-label {
    background-color: var(--primary-color);
    color: #fff;
    width: 140px; /* عرض مناسب للمسميات */
    min-width: 140px;
    position: sticky;
    left: 0;
    z-index: 10;
    font-weight: bold;
    font-size: 0.9rem;
}

.comparison-table tr:nth-child(even) td {
    background-color: #fcfcfc;
}

/* === تنسيق الصور المصغرة (التعديل الذي طلبته) === */
.comp-img-wrapper {
    width: 90px;   /* تم التصغير */
    height: 90px;  /* تم التصغير */
    margin: 0 auto 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 5px;
    border-radius: 5px;
}

.comp-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* عنوان المنتج */
.comp-product-title {
    font-size: 0.85rem; /* خط صغير */
    margin-bottom: 5px;
    height: 35px; /* ارتفاع ثابت لسطرين */
    overflow: hidden;
    line-height: 1.3;
    color: var(--text-dark);
}

/* السعر */
.comp-price {
    font-size: 1rem;
    font-weight: bold;
    color: var(--accent-color);
    display: block;
    margin-bottom: 5px;
}

/* زر الحذف (X) */
.remove-btn {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #ffecec;
    color: red;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
}
.remove-btn:hover {
    background: red;
    color: white;
}

.product-column-header {
    position: relative;
    background-color: #fff;
    padding-top: 10px;
}

/* تحسينات للجوال */
@media (max-width: 768px) {
    .comparison-table .comp-label {
        font-size: 0.8rem;
        width: 110px;
        min-width: 110px;
    }
    .comp-img-wrapper {
        width: 70px; /* أصغر أكثر للجوال */
        height: 70px;
    }
    .comp-product-title {
        font-size: 0.75rem;
    }
}
/* =========================================
   9. الاستجابة للجوال (Responsive)
   ========================================= */
@media (max-width: 992px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .product-content { grid-template-columns: 1fr; } 
}

@media (max-width: 768px) {
    .main-header .container { flex-wrap: wrap; justify-content: center; gap: 15px; }
    .logo { width: 100%; text-align: center; justify-content: center; }
    .main-nav { order: 3; width: 100%; overflow-x: auto; }
    .main-nav ul { justify-content: flex-start; padding-bottom: 5px; }
    
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .filter-sidebar { margin-bottom: 20px; }
    
    /* إصلاح الفوتر في الجوال ليكون متوسطاً */
    .footer-columns {
        flex-direction: column;
        text-align: center;
    }
    .footer-col.about-us {
        text-align: center;
        align-items: center;
        display: flex;
        flex-direction: column;
    }
    .footer-col h4::after {
        right: 50%;
        transform: translateX(50%); /* توسيط الخط تحت العنوان */
    }
    .social-links {
        justify-content: center; /* توسيط الأيقونات */
    }
    
    /* إصلاح صفحة المنتج للجوال */
    .product-content { padding: 15px; gap: 20px; }
    .main-image-container { height: 250px; }
    .product-details h1 { font-size: 1.4rem; }
    .specs-table th { width: 40%; font-size: 0.85rem; }
    .specs-table td { font-size: 0.85rem; }
    .action-buttons { flex-direction: column; }
}

/* =========================================
   إصلاح زر المفضلة (القلب) ليكون في الزاوية
   ========================================= */

/* تأكد أولاً أن بطاقة المنتج لها خاصية relative */
.product-card {
    position: relative; /* ضروري جداً لكي يعمل زر القلب */
    /* باقي الخصائص كما هي... */
}

/* تنسيق زر المفضلة */
.wishlist-icon-btn {
    position: absolute;  /* هذا هو السطر السحري الذي يمنع ظهوره كمسطرة */
    top: 10px;           /* مسافة من الأعلى */
    right: 10px;         /* مسافة من اليمين */
    width: 35px;
    height: 35px;
    border-radius: 50%;  /* يجعله دائرياً تماماً */
    background: #ffffff;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;         /* يضمن ظهوره فوق صورة المنتج */
    cursor: pointer;
    color: #ccc;         /* لون القلب وهو فارغ */
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* ظل خفيف للزر */
}

/* عند تمرير الماوس */
.wishlist-icon-btn:hover {
    color: #ff4d4d;
    border-color: #ff4d4d;
    transform: scale(1.1); /* تكبير بسيط عند الماوس */
}

/* عندما يكون المنتج مضافاً للمفضلة (القلب ممتلئ) */
.wishlist-icon-btn.active {
    color: #ff4d4d;
    border-color: #ff4d4d;
}
/* =========================================
   إصلاح نهائي: إجبار القلب على الامتلاء باللون الأحمر عند الاختيار
   ========================================= */

/* عندما يكون الزر نشطاً (active)، اجبر الأيقونة داخله أن تكون ممتلئة */
.wishlist-icon-btn.active i {
    font-weight: 900 !important; /* رقم 900 هو كود الامتلاء في مكتبة الأيقونات */
    color: #ff0000 !important;   /* لون أحمر صريح */
}

/* تنسيق الزر نفسه عند التفعيل */
.wishlist-icon-btn.active {
    border-color: #ff0000 !important; /* حدود حمراء */
    background-color: #fff !important; /* خلفية بيضاء لكي يبرز القلب الأحمر */
}

/* تحسين شكل الزر ليكون في الزاوية تماماً (تأكيد للكود السابق) */
.product-card {
    position: relative;
}

.wishlist-icon-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 9;
    background: white;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s;
}
/* =========================================
   إصلاح زر المقارنة: تعبئة الزر عند الاختيار
   ========================================= */

/* الحالة المختارة (عندما تضغط على الزر) */
.compare-btn.selected {
    background-color: var(--secondary-color) !important; /* تعبئة الخلفية باللون الأزرق */
    color: #ffffff !important;       /* تحويل لون الأسهم للأبيض */
    border-color: var(--secondary-color) !important; /* تلوين الحدود بنفس اللون */
    box-shadow: 0 2px 8px rgba(0, 168, 204, 0.4); /* إضافة توهج خفيف */
    transform: scale(1.05); /* تكبير بسيط جداً لتمييزه */
}

/* تحسين حركة الأيقونة */
.compare-btn {
    transition: all 0.3s ease;
}

.compare-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

/* تنسيق زر الحذف في صفحة المفضلة */
.wishlist-remove-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    background-color: #ffebeb; /* خلفية حمراء فاتحة */
    color: #ff4d4d;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.wishlist-remove-btn:hover {
    background-color: #ff4d4d;
    color: #fff;
    transform: rotate(90deg); /* حركة دوران لطيفة عند التحويم */
}

/* إيقاف وميض وحركة ظهور المنتجات */
.product-card.fade-in, 
.product-card {
    animation: none !important;
    opacity: 1 !important;
    transition: none !important; /* إذا كنت تريد إيقاف كل الحركات حتى عند التحويم */
}

/* إعادة تفعيل حركة التحويم البسيطة فقط (اختياري) */
.product-card:hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

/* تأثير النبض عند التفاعل */
@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

/* تطبيق التأثير على الأزرار المهمة */
.btn-primary:active {
    animation: pulse-gold 1s;
}

.cart-btn .badge {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cart-btn.bump .badge {
    transform: scale(1.5);
    background-color: var(--accent-color);
}

/* تنسيقات الحاسبة الجديدة */
.calc-tabs {
    display: flex;
    margin-bottom: 20px;
    background: #f1f1f1;
    border-radius: 8px;
    padding: 5px;
}

.tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    cursor: pointer;
    border-radius: 6px;
    font-weight: bold;
    color: var(--text-light);
    transition: all 0.3s;
}

.tab-btn.active {
    background-color: var(--bg-white);
    color: var(--primary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.input-row {
    display: flex;
    gap: 10px;
}

/* تنسيق خاص للوضع الفاخر */
body[data-theme="luxury"] .calc-tabs {
    background: #051626;
}
body[data-theme="luxury"] .tab-btn.active {
    background-color: var(--accent-color);
    color: #000;
}

/* =========================================
   تنسيقات النافذة المنبثقة (Modal) - الحاسبة
   ========================================= */
.modal {
    display: none; /* مخفي افتراضياً */
    position: fixed; 
    z-index: 9999; /* لضمان الظهور فوق كل العناصر */
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6); /* خلفية معتمة */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px); /* تأثير ضبابي للخلفية */
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px; /* عرض مناسب للحاسبة */
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    position: relative;
    animation: fadeIn 0.3s;
}

/* زر الإغلاق (X) */
.close-modal {
    color: #aaa;
    float: left; /* ليكون في اليسار لأن الموقع عربي */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--accent-color); 
    text-decoration: none;
}

/* تنسيق حقول الإدخال داخل الحاسبة */
.calc-inputs {
    margin: 20px 0;
}

.calc-inputs .input-group {
    margin-bottom: 15px;
    text-align: right;
}

.calc-inputs label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--primary-color);
}

.calc-inputs input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Cairo', sans-serif;
}

/* نتيجة الحاسبة */
.calc-result {
    background: #f0f8ff;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    border: 1px solid #b3d7ff;
}

/* حركة ظهور النافذة */
@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}
