:root {
    --primary: #2e7d32;
    --primary-dark: #1b5e20;
    --accent: #00c853;
    --text-main: #121412;
    --text-sub: #3d403d;
    --white: #ffffff;
    --glass: rgba(255, 255, 255, 0.92);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- تنسيقات تبديل اللغة --- */
.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px; /* الإعداد الافتراضي لليسار في الإنجليزي */
    z-index: 1000;
}

#lang-btn {
    background: var(--glass);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Tajawal', 'Inter', sans-serif;
    transition: var(--transition);
}

#lang-btn:hover {
    background: var(--primary);
    color: var(--white);
}

/* --- دعم اللغة العربية (RTL) --- */
[dir="rtl"] {
    font-family: 'Tajawal', sans-serif;
}

[dir="rtl"] .lang-switcher {
    right: auto;
    left: 20px;
}

[dir="rtl"] .header-brand {
    flex-direction: row; /* الحفاظ على ترتيب اللوجو والاسم */
}

/* عكس اتجاه العناصر في الشبكة عند التحويل للعربي */
[dir="rtl"] .content-grid {
    direction: rtl;
}

[dir="rtl"] .hero-content {
    text-align: right;
}

/* تعديل أماكن الأجهزة في النسخة العربية */
[dir="rtl"] .macbook { left: 50px; right: auto; }
[dir="rtl"] .ipad { right: 20px; left: auto; }
[dir="rtl"] .iphone { left: 30px; right: auto; }

/* --- باقي التنسيقات الأساسية --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f0f4f0;
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    transition: font-family 0.3s ease;
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: 
        radial-gradient(circle at 15% 25%, rgba(46, 125, 50, 0.08), transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(0, 200, 83, 0.12), transparent 45%),
        url('https://images.unsplash.com/photo-1500382017468-9049fed747ef?auto=format&fit=crop&q=80&w=2000');
    background-size: cover;
    background-position: center;
    filter: brightness(0.98);
}

.main-wrapper {
    width: 100%;
    max-width: 1300px;
    padding: 0 2rem;
    animation: fadeInUp 1s ease-out;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 3.5rem;
    text-decoration: none;
}

.logo-svg {
    width: 55px;
    height: 55px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

/* تنسيق اسم البراند المقسم - حل مشكلة اللون الأسود */

.brand-name {
    /* تدريج يبدأ بأبيض وينتهي بأخضر زاهي جداً */
    background: linear-gradient(to right, #ffffff 30%, #22ff6b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    /* السحر هنا: ظل غامق يحدد الحروف ويظهر اللون الأخضر */
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5)); 
    
    font-size: 4.2rem;
    font-weight: 800;
    display: flex;
    direction: ltr;
}

/* لضمان المحاذاة في النسخة العربي */
[dir="rtl"] .brand-name {
    flex-direction: row !important; 
}

/* تعديلات الموبايل */
@media (max-width: 768px) {
    .brand-name { 
        font-size: 2.2rem !important; 
    }
}

.content-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    background: var(--glass);
    backdrop-filter: blur(15px);
    padding: 4rem;
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.08);
}

.badge {
    display: inline-block;
    padding: 8px 20px;
    background: #e8f5e9;
    color: var(--primary);
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.5rem;
}

/* التعديل المطلوب فقط بدون المساس بباقي التصميم */

/* 1. العنوان الرئيسي: محتاج مساحة ومحاذاة أفضل */
h1 {
    font-size: 2.2rem !important;
    line-height: 1.4 !important; /* زيادة المسافة بين السطرين */
    margin-bottom: 0.5rem !important; /* تقليل المسافة عشان الـ Tagline يقرب بس بشياكة */
    color: #121412;
}

/* 2. التاج لاين: محتاج يصغر ويبان إنه "شرح" للعنوان */
.tagline {
    font-size: 1.05rem !important; /* حجم أصغر بكتير ليعطي فخامة */
    font-weight: 600 !important;
    color: var(--primary) !important;
    margin-bottom: 2rem !important; /* مسافة كافية قبل بداية الوصف */
    display: block;
    opacity: 0.85;
}

/* 3. الوصف: عشان الكلام التقني يكون واضح */
.description {
    line-height: 1.8 !important; /* وسعنا السطور عشان القراءة تكون أسهل */
    font-size: 1rem !important;
    color: #444 !important;
}

/* تعديل للموبايل عشان الكلام ميبقاش ضخم */
@media (max-width: 768px) {
    h1 { font-size: 1.8rem !important; }
    .tagline { font-size: 0.95rem !important; }
}

.description {
    font-size: 1.05rem; /* صغرناه شوية عشان يدي هيبة للعنوان */
    color: var(--text-sub);
    margin-bottom: 2.5rem;
    line-height: 1.8; /* زودنا المسافة بين السطور لراحة العين في الكلام الكتير */
    text-align: justify; /* عشان السطور تكون متساوية من الجنبين زي المجلات الاحترافية */
}

.subscription-box {
    display: flex;
    background: var(--white);
    padding: 8px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border: 1px solid #e0e4e0;
}

.subscription-box input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 1.1rem;
    outline: none;
    border-radius: 15px;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    padding: 15px 35px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(46, 125, 50, 0.3);
}

/* --- تنسيق الأجهزة المعدل --- */
.visual-showcase {
    position: relative;
    height: 550px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.device {
    position: absolute;
    background: white;
    border: 2px solid #222;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
}

.device img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.macbook {
    width: 520px;
    aspect-ratio: 16 / 10; 
    top: 20px;
    right: 50px;
    z-index: 1;
}

.ipad {
    width: 250px;
    aspect-ratio: 3 / 4;
    bottom: 40px;
    left: 20px;
    z-index: 2;
    --rot: -3deg;
}

.iphone {
    width: 130px;
    aspect-ratio: 9 / 19.5;
    bottom: 60px;
    right: 30px;
    z-index: 3;
    border-radius: 20px;
    --rot: 5deg;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
    50% { transform: translateY(-20px) rotate(var(--rot, 0deg)); }
}

/* --- Responsiveness --- */
@media (max-width: 1100px) {
    .content-grid { grid-template-columns: 1fr; text-align: center; }
    .header-brand { justify-content: center; }
    .visual-showcase { transform: scale(0.8); height: 400px; margin-top: 2rem; }
    .macbook { right: auto; top: 0; }
    .ipad { left: 10%; }
    .iphone { right: 10%; }
}
#msg-box {
    background: rgba(46, 125, 50, 0.1); /* خلفية خضراء شفافة */
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--primary);
    text-align: center;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}