/* 
   =================================================
   EBDA3 SOFTWARE - PREMIUM DIGITAL AGENCY THEME
   =================================================
*/

:root {
    /* Highly Professional Tech Agency Color Palette (Stripe/Coinbase Inspired) */
    --primary-color: #0052FF;      /* Vibrant Trust Tech Blue */
    --primary-hover: #0043D2;      /* Deep Tech Blue */
    --secondary-color: #0A2540;    /* Premium Deep Navy */
    --accent-glow: rgba(0, 82, 255, 0.3);
    
    --dark-color: #0F172A;         /* Slate 900 (Text) */
    --darker-color: #020617;       /* Slate 950 (Footer/Deep BGs) */
    --text-muted: #475569;         /* Sophisticated Slate Gray */
    --bg-light: #F4F5F7;           /* Premium stark off-white */
    
    --success: #10B981;
    --info: #0EA5E9;
    --warning: #F59E0B;
    
    /* Fonts */
    --font-ar: 'Almarai', sans-serif;
    --font-en: 'Outfit', sans-serif;
}

/* ================================================= */
/* GLOBAL RESET & BASE                               */
/* ================================================= */

/* Force Font Family depending on language */
html[lang="ar"], html[lang="ar"] body, html[lang="ar"] h1, html[lang="ar"] h2, 
html[lang="ar"] h3, html[lang="ar"] h4, html[lang="ar"] h5, html[lang="ar"] h6,
html[lang="ar"] .btn, html[lang="ar"] .nav-link, html[lang="ar"] .form-control, html[lang="ar"] p span {
    font-family: var(--font-ar) !important;
}

html[lang="en"], html[lang="en"] body, html[lang="en"] h1, html[lang="en"] h2, 
html[lang="en"] h3, html[lang="en"] h4, html[lang="en"] h5, html[lang="en"] h6,
html[lang="en"] .btn, html[lang="en"] .nav-link, html[lang="en"] .form-control, html[lang="en"] p span {
    font-family: var(--font-en) !important;
}

/* Typography Refinements for Arabic */
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    line-height: 1.4 !important;
}

html[lang="ar"] p, html[lang="ar"] .lead, html[lang="ar"] .fs-5 {
    line-height: 1.9 !important; /* Arabic text needs more vertical spacing */
}

html, body {
    overflow-x: hidden;
    overflow-x: clip; /* Modern way to prevent horizontal scroll issues */
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    max-width: 100%;
}

body {
    background-color: var(--bg-light);
    color: var(--dark-color);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -webkit-overflow-scrolling: touch; /* Optimizes smooth scrolling on iOS */
}

.bg-light-theme { background-color: var(--bg-light); }
.bg-darker { background-color: var(--darker-color); }
.text-primary { color: var(--primary-color) !important; }

/* Utilities */
.tracking-tight { letter-spacing: -0.04em; }
.tracking-widest { letter-spacing: 0.1em; }
.transition { transition: all 0.3s ease; }
.hover-primary:hover { color: var(--primary-color) !important; }
.hover-white:hover { color: #ffffff !important; }
.filter-white { filter: brightness(0) invert(1); }
.py-6 { padding-top: 6rem; padding-bottom: 6rem; }
.line-height-lg { line-height: 1.9; }
.bg-primary-soft { background-color: rgba(0, 82, 255, 0.1); }
.bg-success-soft { background-color: rgba(16, 185, 129, 0.1); }
.bg-info-soft { background-color: rgba(14, 165, 233, 0.1); }
.bg-warning-soft { background-color: rgba(245, 158, 11, 0.1); }
.bg-danger-soft { background-color: rgba(239, 68, 68, 0.1); }
.bg-secondary-soft { background-color: rgba(100, 116, 139, 0.1); }

/* Text Gradient Effect */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--info));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

/* RTL Helpers */
[dir="rtl"] .ms-auto { margin-left: unset !important; margin-right: auto !important; }
[dir="rtl"] .me-auto { margin-right: unset !important; margin-left: auto !important; }
[dir="rtl"] .ps-lg-5 { padding-left: unset !important; padding-right: 3rem !important; }
[dir="rtl"] .pe-lg-5 { padding-right: unset !important; padding-left: 3rem !important; }

/* ================================================= */
/* PREMIUM NAVBAR                                    */
/* ================================================= */
.premium-nav {
    padding: 1.25rem 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: transparent;
}

.premium-nav.scrolled {
    padding: 0.75rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.nav-link {
    color: var(--dark-color) !important;
    margin: 0 10px;
    font-size: 1.05rem;
    position: relative;
    padding-bottom: 5px;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    right: 0; /* Starts from right in RTL */
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
[dir="ltr"] .nav-link::after { right: auto; left: 0; }

.nav-link:hover::after, .nav-link.active::after { width: 100%; }
#portfolio-tabs .nav-link::after { display: none !important; }

.btn-hover-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.btn-hover-effect:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--accent-glow) !important;
}

/* ================================================= */
/* HERO SECTION & ANIMATIONS                         */
/* ================================================= */
/* Custom Premium Shadows */
.shadow-sm { box-shadow: 0 4px 6px -1px rgba(10, 37, 64, 0.05) !important; }
.shadow { box-shadow: 0 10px 15px -3px rgba(10, 37, 64, 0.06), 0 4px 6px -2px rgba(10, 37, 64, 0.03) !important; }
.shadow-lg { box-shadow: 0 20px 25px -5px rgba(10, 37, 64, 0.08), 0 10px 10px -5px rgba(10, 37, 64, 0.03) !important; }

/* ================================================= */
/* HERO SECTION PROFESSIONAL BACKGROUND              */
/* ================================================= */
.hero-section {
    min-height: 100vh;
    min-height: 100dvh;
    padding-top: 120px;
    padding-bottom: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #F8FAFF, #FFFFFF, #F1F5F9);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-bg-elements {
    overflow: hidden;
}
.floating-shape {
    position: absolute;
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 20px;
    animation: floatShape 20s infinite linear;
}
.shape-1 {
    width: 350px;
    height: 350px;
    top: -50px;
    left: -100px;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation-duration: 25s;
}
.shape-2 {
    width: 450px;
    height: 450px;
    bottom: -100px;
    right: -100px;
    background: rgba(147, 51, 234, 0.03);
    border: 1px solid rgba(147, 51, 234, 0.08);
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    animation-duration: 30s;
    animation-direction: reverse;
}
.shape-3 {
    width: 200px;
    height: 200px;
    top: 30%;
    right: 20%;
    border-radius: 50%;
    animation-duration: 20s;
}
@keyframes floatShape {
    0% { transform: rotate(0deg) translate(0, 0) scale(1); }
    33% { transform: rotate(120deg) translate(30px, -50px) scale(1.05); }
    66% { transform: rotate(240deg) translate(-20px, 40px) scale(0.95); }
    100% { transform: rotate(360deg) translate(0, 0) scale(1); }
}

.hero-heading {
    line-height: 1.2;
    letter-spacing: -1px;
}


.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.5;
    animation: floatShape 10s infinite alternate ease-in-out;
}

.hero-shape-1 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
    top: -100px;
    right: -100px;
}

.hero-shape-2 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(79,70,229,0.1) 0%, transparent 70%);
    bottom: -100px;
    left: 10%;
    animation-delay: -5s;
}

@keyframes floatShape {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 30px) scale(1.1); }
}

.badge-premium {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid rgba(37, 99, 235, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pulse-dot {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

/* Hero Tech Mockup */
.hero-mockup-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
}
.hero-mockup-card {
    background: #fff;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    position: absolute;
    width: 90%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(2deg);
    z-index: 2;
    transition: transform 0.5s ease;
}
.hero-mockup-wrapper:hover .hero-mockup-card {
    transform: translate(-50%, -50%) rotate(0deg) scale(1.02);
}
.dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.mockup-skeleton { background: #f1f5f9; border-radius: 8px; }
.line-short { width: 40%; height: 20px; }
.line-long { width: 80%; height: 15px; }
.box-square { height: 100px; }

.floating-tech {
    position: absolute;
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    z-index: 3;
    animation: floatIcon 6s infinite ease-in-out;
}
.floating-react { top: 10%; right: 5%; color: #61DAFB; }
.floating-apple { bottom: 20%; left: 0; color: #000; animation-delay: -2s; }
.floating-code { bottom: -5%; right: 20%; color: var(--primary-color); animation-delay: -4s; }

@keyframes floatIcon {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* ================================================= */
/* CLIENTS MARQUEE                                   */
/* ================================================= */
.clients-marquee {
    position: relative;
}
.marquee-content {
    white-space: nowrap;
    animation: scrollMarquee 40s linear infinite;
    min-width: 200%;
}
[dir="ltr"] .marquee-content { animation-direction: reverse; }

@keyframes scrollMarquee {
    0% { transform: translateX(50%); /* Start pushed to right */ }
    100% { transform: translateX(-50%); /* Scroll to left */ }
}
/* ================================================= */
/* SERVICES SYSTEM                                   */
/* ================================================= */
.service-card-premium {
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);    
}
.service-card-premium:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--primary-color);
}
.service-icon-wrapper {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}
.tech-stack-mini i {
    cursor: pointer;
    transition: color 0.3s;
}
.tech-stack-mini i:hover { color: var(--primary-color) !important; }

/* ================================================= */
/* HOSTING & PRICING                                 */
/* ================================================= */
.pricing-card {
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);
}
.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1) !important;
}
.transform-scale {
    transform: scale(1.05);
    z-index: 2;
}
@media (max-width: 991px) {
    .transform-scale { transform: scale(1); }
}

.bg-gradient-dark {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
}
#portfolio-tabs .nav-link {
    color: var(--secondary-color);
    background: transparent;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
#portfolio-tabs .nav-link:hover {
    background: rgba(0,0,0,0.03);
}
#portfolio-tabs .nav-link.active {
    color: #fff !important;
    background: var(--primary-color) !important;
    box-shadow: 0 10px 20px -5px rgba(37,99,235, 0.3);
    border-color: var(--primary-color);
}
.min-vh-25 { min-height: 25vh; }

/* ================================================= */
/* PRODUCTS SHOWCASE                                 */
/* ================================================= */
#products {
    background-color: var(--darker-color);
}
.products-bg-pattern {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
}
.bg-gradient-primary { background: linear-gradient(135deg, #1E3A8A, #2563EB); }
.bg-gradient-success { background: linear-gradient(135deg, #064E3B, #10B981); }
.shadow-inner { box-shadow: inset 0 0 50px rgba(0,0,0,0.5); }
.pb-border { border-bottom: 1px solid rgba(255,255,255,0.1); }

/* ================================================= */
/* MISC EFFECTS & CONTACT                            */
/* ================================================= */
.hover-lift { transition: transform 0.3s ease; }
.hover-lift:hover { transform: translateY(-5px); }

.contact-icon { font-size: 1.5rem; flex-shrink: 0; }
.form-control, .form-select {
    border: 1px solid rgba(0,0,0,0.1);
    color: var(--dark-color);
    padding: 1rem 1.25rem;
    font-size: 1.1rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.1);
}

.social-icon { width: 50px; height: 50px; font-size: 1.25rem; }

/* ================================================= */
/* BENTO ABOUT SECTION                               */
/* ================================================= */
.bento-grid-about {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 200px);
    gap: 1.5rem;
}
.bento-item {
    border-radius: 2rem;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(0,0,0,0.05);
}
.bento-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}
.bento-main {
    grid-column: span 2;
    background: var(--darker-color);
    color: white;
    position: relative;
    overflow: hidden;
}
.bento-main i {
    position: absolute;
    right: -20px;
    bottom: -20px;
    font-size: 8rem;
    opacity: 0.1;
    transform: rotate(-15deg);
}
.bento-stat-1 {
    background: #fff;
    border: 1px solid rgba(37, 99, 235, 0.1);
}
.bento-stat-2 {
    background: #fff;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

@media (max-width: 991px) {
    .bento-grid-about {
        grid-template-rows: repeat(2, 180px);
    }
}
@media (max-width: 767px) {
    .bento-grid-about {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .bento-main { grid-column: span 1; height: 200px; }
}

/* Desktop view tweaks */
@media (min-width: 992px) {
    .hero-heading { font-size: 4rem; }
    .display-3 { font-size: 3.5rem; }
}
