/* ==========================================================================
   Nuqta Text - Main Core Stylesheet
   (Contains: Variables, Layout, Hero, Workspace, Footer, Utilities)
   * Header styles are separated in 'header.css'
   ========================================================================== */

/* =========================================
   1. Design Tokens & Variables
   ========================================= */
:root {
    /* الألوان الأساسية */
    --bg-core: #09090b;       /* أسود مطفي للخلفية */
    --bg-panel: #141416;      /* لون الصناديق والقوائم */
    --border: #27272a;        /* لون الحدود الفاصلة */
    
    /* هوية نقطة */
    --primary: #4a7c59;       /* الأخضر الرسمي */
    --primary-hover: #5da374; /* الأخضر عند التحويم */
    --primary-glow: rgba(74, 124, 89, 0.4);
    
    /* النصوص */
    --text-main: #ffffff;
    --text-sub: #a1a1aa;
    
    /* حالات النظام */
    --danger: #ff4d4f;
    --success: #4a7c59;
    
    /* قياسات */
    --nav-height: 70px; /* مستخدم لحساب المسافات */
    --radius-lg: 24px;
    --radius-md: 16px;
}

/* =========================================
   2. Reset & Base Styles
   ========================================= */
* { box-sizing: border-box; outline: none; margin: 0; padding: 0; }

body {
    background-color: var(--bg-core);
    font-family: 'Cairo', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
button { font-family: inherit; }

/* الخلفية التقنية الشبكية */
.tech-background {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: radial-gradient(circle at 50% 30%, black 20%, transparent 80%);
    z-index: -1;
    pointer-events: none;
}

/* الحاوية العامة */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   3. Hero Section & Stats
   ========================================= */
.main-wrapper {
    flex: 1;
    padding-top: var(--nav-height); /* مسافة عشان النافبار ميعطيش ع المحتوى */
}

.hero-section {
    text-align: center;
    padding: 80px 20px 50px;
}

/* Trust Badge (عداد الزوار) */
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(74, 124, 89, 0.15);
    border: 1px solid rgba(74, 124, 89, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    color: #fff;
    font-size: 0.9rem;
    margin-bottom: 25px;
    backdrop-filter: blur(5px);
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.trust-badge strong {
    color: var(--primary-hover);
    font-weight: 800;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.trust-badge i { color: var(--primary); }

/* أيقونة النبض */
.pulse-icon {
    width: 8px; height: 8px;
    background: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(74, 124, 89, 0.7);
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(74, 124, 89, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(74, 124, 89, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 124, 89, 0); }
}

/* Hero Texts */
.hero-title {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 0 0 20px;
    line-height: 1.2;
}

.text-highlight {
    color: var(--primary);
    position: relative;
    display: inline-block;
}
.text-highlight::after {
    content: ''; position: absolute; bottom: 8px; left: 0; width: 100%; height: 12px;
    background: var(--primary); opacity: 0.2; z-index: -1;
    transform: skewX(-15deg);
}

.hero-desc {
    color: var(--text-sub);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =========================================
   4. Workspace / Converter Interface
   ========================================= */
.workspace-section { padding-bottom: 80px; }

.converter-interface {
    display: flex;
    gap: 20px;
    align-items: stretch;
    background: rgba(20, 20, 22, 0.6);
    padding: 25px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    backdrop-filter: blur(20px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    height: 580px;
    position: relative;
}

/* Panels */
.panel {
    flex: 1;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

.panel:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.15);
}

.panel-header {
    background: rgba(255,255,255,0.02);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.panel-title {
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #eee;
}
.panel-title i { color: var(--primary); font-size: 1.2rem; }

/* Action Buttons inside panels */
.action-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-sub);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex; align-items: center; gap: 6px;
}
.action-btn:hover { background: rgba(255,255,255,0.08); color: #fff; }

.action-btn.primary { background: var(--primary); color: #fff; }
.action-btn.primary:hover { background: var(--primary-hover); box-shadow: 0 5px 15px rgba(74, 124, 89, 0.3); }

.action-btn.danger:hover { background: rgba(255, 77, 79, 0.1); color: var(--danger); }

/* Textarea */
.editor-area { flex: 1; position: relative; }
textarea {
    width: 100%; height: 100%;
    background: transparent; border: none;
    color: #f0f0f0; padding: 20px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 18px; line-height: 1.8;
    resize: none;
}
textarea::placeholder { color: #333; }

/* Center Control Button */
.control-center {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    z-index: 10;
}

.process-btn {
    width: 70px; height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #2d4f3a);
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 0 30px var(--primary-glow);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.process-btn i { transition: 0.3s; }
.process-btn span { font-size: 10px; font-weight: bold; margin-top: 0; opacity: 0; height: 0; transition: 0.3s; overflow: hidden; }

.process-btn:hover { width: 90px; height: 90px; border-radius: 24px; box-shadow: 0 0 50px var(--primary-glow); }
.process-btn:hover i { transform: scale(0.9); }
.process-btn:hover span { opacity: 1; height: auto; margin-top: 4px; }
.process-btn:active { transform: scale(0.95); }

/* =========================================
   5. Footer Styling
   ========================================= */
.footer-gradient-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.5;
    margin-top: auto;
}

.main-footer {
    background: #050505;
    padding: 60px 0 30px;
    color: var(--text-sub);
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '\eb98'; /* RemixIcon: code-s-slash */
    font-family: 'remixicon';
    position: absolute;
    top: 20px; left: -50px;
    font-size: 300px;
    color: var(--primary);
    opacity: 0.02;
    transform: rotate(20deg);
    pointer-events: none;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 40px;
    margin-bottom: 50px;
}

/* Footer Brand */
.f-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 15px;
    display: flex; align-items: center; gap: 8px;
}
.f-logo i { color: var(--primary); }
.f-logo span { color: var(--primary); }

.footer-brand p {
    line-height: 1.7;
    font-size: 0.95rem;
    max-width: 350px;
}
.company-link { color: #fff; border-bottom: 1px dashed var(--primary); }
.company-link:hover { color: var(--primary); border-bottom-style: solid; }

/* Footer Links */
.footer-links h4, .footer-contact h4 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}
.footer-links h4::after {
    content: ''; position: absolute; bottom: -5px; right: 0; 
    width: 30px; height: 3px; background: var(--primary); border-radius: 2px;
}

.footer-links ul li { margin-bottom: 12px; }
.footer-links ul li a {
    transition: 0.3s;
    display: flex; align-items: center; gap: 8px;
}
.footer-links ul li a:hover { color: var(--primary); transform: translateX(-5px); }
.footer-links ul li a::before { content: '›'; font-size: 1.2rem; color: var(--primary); opacity: 0; transition: 0.3s; }
.footer-links ul li a:hover::before { opacity: 1; }

/* Branches */
.branches-list { display: flex; flex-direction: column; gap: 15px; }

.branch-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    padding: 12px 15px;
    border-radius: 12px;
    display: flex; align-items: center; gap: 15px;
    transition: 0.3s;
}
.branch-item:hover {
    border-color: var(--primary);
    background: rgba(74, 124, 89, 0.1);
    transform: translateY(-2px);
}

.flag { font-size: 1.8rem; }
.details { display: flex; flex-direction: column; }
.city { font-weight: bold; color: #fff; font-size: 0.9rem; }
.phone { font-size: 0.85rem; color: var(--text-sub); margin-top: 2px; }
.phone:hover { color: var(--primary-hover); }

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.made-with {
    background: rgba(255,255,255,0.05);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
}
.made-with .om { color: #ff4d4d; font-weight: bold; }
.made-with .eg { color: #d4af37; font-weight: bold; }

/* =========================================
   6. Utilities & Animations
   ========================================= */
.animate-up { animation: fadeUp 0.8s ease forwards; opacity: 0; transform: translateY(30px); }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }

@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* Toast Notification */
.toast-msg {
    position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    background: var(--bg-panel); 
    border: 1px solid var(--border);
    border-right: 4px solid var(--primary);
    color: #fff; padding: 12px 25px; border-radius: 50px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6); z-index: 2000;
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes slideUp { from { bottom: -50px; opacity: 0; } to { bottom: 30px; opacity: 1; } }

/* =========================================
   7. Responsive Design (Global & Workspace)
   Note: Header responsive styles are in header.css
   ========================================= */
@media (max-width: 900px) {
    /* Hero & Interface */
    .hero-title { font-size: 2.5rem; }
    
    .converter-interface {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }
    
    .panel { min-height: 250px; }
    
    /* Control Button Adjustment */
    .control-center {
        width: 100%;
        margin: -25px 0;
        pointer-events: none;
    }
    .process-btn {
        pointer-events: auto;
        width: 60px; height: 60px;
        border: 4px solid var(--bg-core);
    }
    .process-btn:hover { width: 70px; height: 70px; border-radius: 50%; }

    /* Footer Adjustments */
    .footer-grid { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    .footer-links h4::after { right: 50%; transform: translateX(50%); }
    .f-logo { justify-content: center; }
    .footer-brand p { margin: 0 auto; }
    .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
    .branch-item { justify-content: flex-start; text-align: right; }
}