/* 
* Creative Alpha Trading Website Styles
* Modern, professional bilingual website (Arabic/English)
*/

:root {
    --primary-color: #0056b3;
    --secondary-color: #6c757d;
    --accent-color: #ffc107;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --font-family-arabic: 'Cairo', 'Tajawal', sans-serif;
    --font-family-english: 'Poppins', 'Segoe UI', sans-serif;
    --transition-speed: 0.3s;
}

/* General Styles */
body {
    font-family: var(--font-family-arabic);
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    padding-top: 76px; /* For fixed navbar */
}

html[lang="en"] body {
    font-family: var(--font-family-english);
    direction: ltr;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

a:hover {
    color: #004494;
    text-decoration: none;
}

.btn {
    border-radius: 4px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #004494;
    border-color: #004494;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.section-header {
    margin-bottom: 3rem;
}

/* Navbar Styles */
.navbar {
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

.navbar-brand img.logo {
    height: 40px;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    font-weight: 600;
}

.navbar-light .navbar-nav .nav-link {
    color: #333;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary-color);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: rgba(0, 86, 179, 0.1);
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    padding: 5rem 0;
    background-color: #f8f9fa;
    position: relative;
}

.hero-section h1 {
    margin-bottom: 1.5rem;
    color: #333;
}

.hero-section .lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #555;
}

.hero-section img {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Services Section */
.services-section {
    padding: 5rem 0;
}

.service-card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.service-icon {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Why Choose Us Section */
.why-us-section {
    background-color: #f8f9fa;
    padding: 5rem 0;
}

.feature-box {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

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

.feature-icon {
    color: var(--primary-color);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #0056b3 0%, #0077cc 100%);
    padding: 4rem 0;
}

/* Testimonials Section */
.testimonials-section {
    padding: 5rem 0;
}

.testimonial-card {
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

html[lang="en"] .whatsapp-float {
    right: auto;
    left: 30px;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.whatsapp-btn i {
    font-size: 30px;
}

.whatsapp-btn:hover {
    background-color: #20ba5a;
    transform: scale(1.1);
    color: white;
}

/* Footer Styles */
.footer {
    background-color: #343a40;
    color: white;
    padding: 5rem 0 3rem;
}

.footer-logo {
    height: 40px;
    margin-bottom: 1.5rem;
}

.footer-heading {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
}

.footer-links,
.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: white;
    padding-right: 5px;
}

html[lang="en"] .footer-links a:hover {
    padding-right: 0;
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact li i {
    margin-left: 10px;
    margin-top: 5px;
    color: var(--primary-color);
}

html[lang="en"] .footer-contact li i {
    margin-left: 0;
    margin-right: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .navbar-collapse {
        background-color: white;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        margin-top: 0.5rem;
    }
    
    .hero-section {
        padding: 4rem 0;
        text-align: center;
    }
    
    .hero-section img {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 66px;
    }
    
    .navbar-brand img.logo {
        height: 30px;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .cta-section {
        text-align: center;
    }
    
    .cta-section .btn {
        margin-top: 1rem;
    }
}

/* Arabic-specific styles */
[dir="rtl"] .dropdown-menu {
    text-align: right;
}

[dir="rtl"] .me-auto {
    margin-right: 0 !important;
    margin-left: auto !important;
}

[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

[dir="rtl"] .text-md-end {
    text-align: left !important;
}

[dir="rtl"] .text-md-start {
    text-align: right !important;
}

/* Animation effects */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

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

/* Custom form styling */
.form-control {
    border-radius: 4px;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 86, 179, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ── Smooth scroll ─────────────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
}

/* ── Reading progress bar ──────────────────────────────────────────────────── */
#reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), #25d366);
    z-index: 1100;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* ── Back-to-top button ────────────────────────────────────────────────────── */
#back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
    z-index: 998;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
}

#back-to-top:hover {
    background: #004494;
    transform: translateY(-3px);
}

[dir="rtl"] #back-to-top {
    right: auto;
    left: 30px;
}

/* ── Toast notifications ───────────────────────────────────────────────────── */
.site-toast {
    position: fixed;
    bottom: 30px;
    left: 30px;
    min-width: 280px;
    max-width: 380px;
    padding: 14px 20px;
    border-radius: 8px;
    color: white;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1200;
    pointer-events: none;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.site-toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.site-toast.success { background: var(--success-color); }
.site-toast.error   { background: var(--danger-color); }

[dir="rtl"] .site-toast {
    left: auto;
    right: 30px;
}

#toast-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    line-height: 1;
    margin-inline-start: auto;
    opacity: 0.8;
    padding: 0;
}

#toast-close:hover { opacity: 1; }

/* ── Form validation highlighting ─────────────────────────────────────────── */
.form-control.is-invalid,
.form-select.is-invalid {
    background-color: #fff5f5;
    border-color: var(--danger-color);
}

.form-control:valid:not(:placeholder-shown),
.form-select:valid:not(:placeholder-shown) {
    border-color: var(--success-color);
}

/* ── Focus-visible states (accessibility) ──────────────────────────────────── */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.4);
}

/* ── Button active & disabled states ──────────────────────────────────────── */
.btn:active {
    transform: scale(0.97);
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Service card stagger animation ───────────────────────────────────────── */
.service-card,
.feature-box {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.service-card.card-animated,
.feature-box.card-animated {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(2).card-animated,
.feature-box:nth-child(2).card-animated { transition-delay: 0.1s; }

.service-card:nth-child(3).card-animated,
.feature-box:nth-child(3).card-animated { transition-delay: 0.2s; }

.service-card:nth-child(4).card-animated,
.feature-box:nth-child(4).card-animated { transition-delay: 0.3s; }

.service-card:nth-child(5).card-animated,
.feature-box:nth-child(5).card-animated { transition-delay: 0.4s; }

/* ── WhatsApp tooltip ─────────────────────────────────────────────────────── */
.whatsapp-btn {
    position: relative;
}

.whatsapp-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.whatsapp-btn:hover::before {
    opacity: 1;
}

[dir="rtl"] .whatsapp-btn::before {
    right: auto;
    left: 70px;
}

html[lang="en"] .whatsapp-btn::before {
    right: auto;
    left: 70px;
}

/* ── Mobile menu transition ───────────────────────────────────────────────── */
@media (max-width: 992px) {
    .navbar-collapse {
        transition: opacity 0.25s ease;
    }
    .navbar-collapse:not(.show) {
        opacity: 0;
        pointer-events: none;
    }
    .navbar-collapse.show {
        opacity: 1;
        pointer-events: auto;
    }
}

/* ── Mobile: adjust fixed buttons ─────────────────────────────────────────── */
@media (max-width: 576px) {
    #back-to-top {
        bottom: 90px;
        right: 16px;
        width: 40px;
        height: 40px;
    }
    [dir="rtl"] #back-to-top {
        right: auto;
        left: 16px;
    }
    .site-toast {
        left: 12px;
        right: 12px;
        min-width: unset;
        max-width: unset;
        bottom: 16px;
    }
}

/* ── prefers-reduced-motion ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    #reading-progress {
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}
