/* Root Variables */
:root {
    /* Updated Brand Colors */
    --primary-color: rgb(39, 141, 198);
    --primary-dark: rgb(31, 113, 158);
    --primary-color: rgb(39, 141, 198);
    --primary-dark: rgb(31, 113, 158);
    --primary-light: rgb(47, 169, 238);
    --accent-purple: #8b5cf6;
    /* Hero Purple */
    --gradient-brand: linear-gradient(135deg, var(--primary-color) 0%, #263356 100%);
    --gradient-brand-hover: linear-gradient(135deg, var(--primary-light) 0%, #a78bfa 100%);

    /* Light Theme Colors */
    --bg-primary: #f8fafc;
    /* Very light cool gray */
    --bg-secondary: #f1f5f9;
    /* Slate 100 */
    --bg-alt: #eef2ff;
    /* Very soft Indigo tint */
    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #475569;
    /* Slate 600 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border-color: #e2e8f0;
    --shadow-light: rgba(14, 165, 233, 0.1);
    /* Sky Blue Shadow */
    --shadow-medium: rgba(14, 165, 233, 0.15);

    /* Hero Theme Colors - Light */
    --hero-grid-color: rgba(39, 141, 198, 0.05);
    /* Vibrant, distinct Light Mode Gradient */
    --hero-bg-light: linear-gradient(135deg, #f6f9fc 0%, #eef2f5 100%);
    --hero-blob-1: #4fc3f7;
    /* Bright Sky Blue */
    --hero-blob-2: #ab47bc;
    /* Bright Purple */
    --hero-blob-3: #26c6da;
    /* Bright Cyan */

    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-arabic: 'Tajawal', sans-serif;

    /* Spacing */
    --section-padding: 80px 0;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    /* Richer, deeper backgrounds (Not just flat black) */
    --bg-primary: #0B1120;
    /* Deepest Void Blue */
    --bg-secondary: #151E32;
    /* Rich Navy */
    --bg-alt: #0F172A;
    /* Slate 900 */

    --text-primary: #F8FAFC;
    /* Slate 50 */
    --text-secondary: #94A3B8;
    /* Slate 400 */
    --text-muted: #64748B;
    /* Slate 500 */

    --border-color: rgba(56, 189, 248, 0.1);
    /* Subtle Blue Border */
    --card-bg: rgba(15, 23, 42, 0.6);
    /* Glassy Navy */

    --shadow-light: rgba(56, 189, 248, 0.2);
    --shadow-medium: rgba(56, 189, 248, 0.3);

    /* Hero Theme Colors - Dark */
    --hero-grid-color: rgba(255, 255, 255, 0.05);
    /* Deep, Cosmic Dark Mode Gradient */
    --hero-bg-dark: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    --hero-blob-1: #3b82f6;
    /* Vivid Blue */
    --hero-blob-2: #8b5cf6;
    /* Vivid Violet */
    --hero-blob-3: #06b6d4;
    /* Vivid Cyan */
}

/* RTL Support */
[dir="rtl"] {
    font-family: var(--font-arabic);
}

[dir="ltr"] {
    font-family: var(--font-primary);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-size: 16px;
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-image:
        linear-gradient(var(--hero-grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--hero-grid-color) 1px, transparent 1px),
        radial-gradient(circle at 10% 20%, var(--bg-secondary) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, var(--bg-alt) 0%, transparent 20%);
    background-size: 50px 50px, 50px 50px, auto, auto;
    background-attachment: scroll, scroll, fixed, fixed;
    transition: var(--transition);
    overflow-x: hidden;
}

[dir="rtl"] body {
    font-family: var(--font-arabic);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    font-size: 92.5%;
    /* Reduces base size to ~14.8px */
}

section {
    display: flex;
    min-height: 650px;
    align-items: center;
}
.form-floating>label ,.accordion-item{
    color: var(--text-secondary) !important;
}
.bg-body {
    background: var(--bg-primary) !important;
}

.bg-card {
    position: relative;
    /* Hero-like Light Background */
    background: linear-gradient(135deg, rgb(219 237 249 / 38%), rgba(238, 242, 245, 0.9)) !important;
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    /* Glassy border */
    overflow: hidden;
    z-index: 1;
}

/* Hero-like Dark Background */
[data-theme="dark"] .bg-card {
    background: linear-gradient(135deg, rgb(0 0 0 / 0%), rgb(21 114 173 / 43%)) !important;
    border: none;
}

/* Remove the previous colorful tint overlay as we want the "Hero" look now */
.bg-card::before {
    display: none;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

p,
span.badge,
.small,
.list-unstyled span,
.Contact-info a {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.text-muted {
    color: var(--text-secondary) !important;
}

/* Modern Hero Section */
.hero-section {
    height: 100vh;
    position: relative;
    margin-top: 0;
    display: flex;
    align-items: center;
    overflow: hidden;
    /* Ensure Hero has its own distinct base background */
    background: var(--hero-bg-light);
}

[data-theme="dark"] .hero-section {
    background: var(--hero-bg-dark);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    pointer-events: none;
    /* Grid restored to Hero */
    background-image:
        linear-gradient(var(--hero-grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--hero-grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Background Blobs - Aurora Effect */
.hero-background::before,
.hero-background::after {
    content: '';
    position: absolute;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    filter: blur(100px);
    /* Stronger blur for smoother aurora */
    opacity: 0.4;
    animation: auroraFloat 12s infinite alternate ease-in-out;
}

.hero-background::before {
    background: var(--hero-blob-1);
    top: -15%;
    left: -10%;
    animation-delay: 0s;
}

.hero-background::after {
    background: var(--hero-blob-2);
    bottom: -15%;
    right: -10%;
    animation-delay: -6s;
}

@keyframes auroraFloat {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(50px, 50px) rotate(10deg);
    }
}

/* Hide old shapes if they exist or repurpose them */
.hero-shapes {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 10;
    padding: 2rem 0;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(39, 141, 198, 0.1), rgba(47, 169, 238, 0.1));
    border: 1px solid rgba(39, 141, 198, 0.2);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    backdrop-filter: blur(10px);
}

div#navbarNav {
    justify-content: flex-end;
}

.hero-title {
    font-size: 55px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.hero-title-main {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.hero-title-accent {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 90%;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.hero-trusted {
    margin-top: 2rem;
}

.trusted-text {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.trusted-logos {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.logo-placeholder {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    opacity: 0.6;
    letter-spacing: 0.5px;
}

/* Hero Visual */
.hero-visual {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card {
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    position: absolute;
    animation: cardFloat 4s ease-in-out infinite;
}

.main-card {
    width: 350px;
    height: 200px;
    z-index: 5;
    animation-delay: 0s;
}

.stats-card {
    width: 180px;
    height: 140px;
    top: -40px;
    right: -20px;
    z-index: 4;
    animation-delay: 1s;
}

.notification-card {
    width: 280px;
    height: 80px;
    bottom: 40px;
    left: -40px;
    z-index: 3;
    animation-delay: 2s;
    display: flex;
    align-items: center;
    padding: 1rem;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.card-dots {
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f57;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #28ca42;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-content {
    padding: 1.5rem;
}

.code-line {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.line-number {
    color: var(--text-muted);
    margin-right: 1rem;
    width: 20px;
    text-align: right;
}

.code-text {
    color: var(--primary-color);
}

.terminal-cursor {
    width: 8px;
    height: 16px;
    background: var(--primary-color);
    animation: blink 1s infinite;
    margin-left: 0.5rem;
}

.stats-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.stats-chart {
    display: flex;
    align-items: end;
    gap: 0.5rem;
    padding: 0 1rem 1rem;
    height: 60px;
}

.chart-bar {
    background: linear-gradient(to top, var(--primary-color), var(--primary-light));
    width: 20px;
    border-radius: 2px 2px 0 0;
    animation: barGrow 2s ease-out infinite alternate;
}

.notification-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #10b981, #34d399);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.notification-icon i {
    color: white;
    font-size: 1.2rem;
}

.notification-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.notification-subtitle {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-icon {
    position: absolute;
    width: 50px;
    height: 50px;
    background: var(--bg-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    animation: iconFloat 3s ease-in-out infinite;
}

.floating-icon i {
    font-size: 1.5rem;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.icon-1 {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.icon-2 {
    top: 20%;
    right: 15%;
    animation-delay: 1s;
}

.icon-3 {
    bottom: 30%;
    left: 5%;
    animation-delay: 2s;
}

.icon-4 {
    bottom: 15%;
    right: 10%;
    animation-delay: 3s;
}

.icon-5 {
    bottom: 60%;
    right: 20%;
    animation-delay: 3s;
}

.icon-6 {
    bottom: 55%;
    right: 35%;
    animation-delay: 3s;
}

.icon-7 {
    bottom: 75%;
    right: 70%;
    animation-delay: 3s;
}

/* Navigation */
.navbar {
    border: none;
    border-bottom: none !important;
    box-shadow: 0px 1px 9px 1px var(--shadow-light);
    background-color: #00000000;
    backdrop-filter: blur(10px);
    transition: var(--transition);
    z-index: 9999;
}

[data-theme="dark"] .navbar {
    background-color: #ffffff00;
    border-bottom: none;
}

.navbar-brand .logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.brand-icon {
    color: var(--primary-color);
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

[dir="rtl"] .brand-icon {
    margin-right: 0;
    margin-left: 0.5rem;
}

.navbar-controls {
    display: flex;
    align-items: center;
}

.btn-toggle {
    background: none;
    border: 2px solid var(--border-color);
    padding: 18px;
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 0;
}

.btn-toggle:hover {
    border-color: var(--primary-color);
    color: var(--accent-purple);
    /* Purple hover for toggle */
}

.navbar-nav .nav-link {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.75rem 1rem;
    transition: var(--transition);
    position: relative;
}

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

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-brand);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 40%;
}

/* Gradient Text for Active Link */
.navbar-nav .nav-link.active {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--primary-color) !important;
    /* Fallback and forced visibility */
    font-weight: 700;
    /* Extra bold to verify */
}

/* Custom Navbar Toggler */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    background-image: none;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    position: relative;
    transition: var(--transition);
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler-icon::after {
    bottom: -8px;
}

/* Buttons */
.btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    /* Purple tint shadow */
    background-size: 200% auto;
    transition: 0.5s;
}

.btn-primary:hover {
    background-position: right center;
    /* Animate gradient */
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 141, 198, 0.5);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Service Cards */
.service-card {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px -5px var(--shadow-light);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(39, 141, 198, 0.1), transparent);
    transition: var(--transition);
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0px 10px 30px rgba(139, 92, 246, 0.15);
}

/* Service Icons Gradient */
.service-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-brand);
    /* Use the mix */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
    /* Purple shadow */
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-card h4 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.goals-list {
    list-style: none;
    padding: 0;
}

.goals-list li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 2rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.goals-list li:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

[dir="rtl"] .goals-list li {
    padding-left: 0;
    padding-right: 2rem;
}

.goals-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

[dir="rtl"] .goals-list li::before {
    left: auto;
    right: 0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.value-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    /* Subtle Gradient Background for cards */
    background: linear-gradient(to bottom right, var(--bg-primary), var(--bg-secondary));
}

.value-item:hover {
    transform: translateY(-5px);
    box-shadow: 0px 1px 10px 2px var(--shadow-light);
}

.value-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.value-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.value-item p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Portfolio Section - Enhanced */
.portfolio-project {
    /*    margin-bottom: 8rem;*/
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.portfolio-project.animate {
    opacity: 1;
    transform: translateY(0);
}

.portfolio-project:last-of-type {
    margin-bottom: 4rem;
}

.project-content {
    padding: 1rem;
    position: relative;
}

.accordion-button:not(.collapsed)::after {
    background-image: none;
    transform: var(--bs-accordion-btn-icon-transform);
}

.project-category {
    display: inline-block;
    background: linear-gradient(135deg, rgba(39, 141, 198, 0.1), rgba(47, 169, 238, 0.1));
    border: 1px solid rgba(39, 141, 198, 0.2);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    backdrop-filter: blur(10px);
}

.project-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.project-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.tag {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.project-btn {
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 1rem 2.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(39, 141, 198, 0.3);
    position: relative;
    overflow: hidden;
}

.project-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: var(--transition);
}

.project-btn:hover::before {
    left: 100%;
}

.project-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(39, 141, 198, 0.4);
    color: white;
}

.project-video {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0px 2px 8px 1px rgba(0, 0, 0, 0.20);
    background: var(--bg-secondary);
    transition: var(--transition);
}

.project-video:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.2);
}

.project-video video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    /*    min-height: 300px;*/
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: var(--transition);
    border-radius: 20px;
}

.video-overlay i {
    font-size: 4rem;
    color: white;
    background: rgba(39, 141, 198, 0.9);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    cursor: pointer;
}

.video-overlay:hover i {
    background: var(--primary-color);
    transform: scale(1.1);
}

.project-video.playing .video-overlay {
    opacity: 0;
    pointer-events: none;
}

.view-more-btn {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.view-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: var(--transition);
    z-index: -1;
}

.view-more-btn:hover::before {
    left: 0;
}

.view-more-btn:hover {
    color: white;
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

/* FAQ Section */
.accordion-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.accordion-button {
    background: var(--bg-primary);
    color: var(--text-primary);
    border: none;
    padding: 1.5rem;
    font-weight: 600;
    position: relative;
}

.accordion-button:not(.collapsed) {
    background: var(--primary-color);
    color: white;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border: none;
}

.accordion-button::after {
    background-image: none;
    content: '+';
    font-size: 1.5rem;
    font-weight: bold;
    color: inherit;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.accordion-button:not(.collapsed)::after {
    content: '-';
    padding-left: 10px;
}

.accordion-body {
    padding: 1.5rem;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

/* Contact Section */
.contact-form {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: 0px 1px 4px 2px var(--shadow-light);
}

.form-control {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(39, 141, 198, 0.25);
    color: var(--text-primary);
}

.form-label {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.accordion-item {
    border-top: 1px solid var(--border-color) !important;
}

/*
.contact-info {
    padding: 2rem 0;
}
*/

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-light);
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

[dir="rtl"] .contact-icon {
    margin-right: 0;
    margin-left: 1rem;
}

.contact-icon i {
    color: white;
    font-size: 1.5rem;
}

.contact-details h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-details p {
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.social-links {
    margin-top: 2rem;
}

.social-links h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

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

.map-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-light);
    height: 400px;
    border: 1px solid var(--border-color);
}

/* Footer - Enhanced */
.footer {
    background: var(--bg-secondary);
    padding: 3rem 0 1rem;
    border-top: 1px solid var(--border-color);
    position: relative;
}

/* Footer decorative top border/glow */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-brand);
    opacity: 0.8;
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

.footer h5 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.contact-info-footer p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.contact-info-footer i {
    color: var(--primary-color);
    width: 20px;
    margin-right: 0.5rem;
}

[dir="rtl"] .contact-info-footer i {
    margin-right: 0;
    margin-left: 0.5rem;
}

.footer-divider {
    border-color: var(--border-color);
    margin: 2rem 0 1rem;
}

.copyright {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-card {
        display: none;
    }

    .row.align-items-center.min-vh-100 {
        position: relative;
    }

    #home .col-lg-6.order-1.order-lg-2 {
        width: 100%;
        height: 100%;
        position: absolute;
    }

    .hero-visual {
        height: 400px;
        margin-top: 2rem;
    }

    .main-card {
        width: 300px;
        height: 180px;
    }

    .stats-card {
        width: 150px;
        height: 120px;
        right: -10px;
    }

    .notification-card {
        width: 240px;
        height: 70px;
        left: -20px;
    }

    .floating-icon {
        width: 40px;
        height: 40px;
    }

    .floating-icon i {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
        max-width: 100%;
    }

    .hero-stats {
        gap: 1.5rem;
        justify-content: center;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .trusted-logos {
        justify-content: center;
        gap: 1rem;
    }

    .hero-visual {
        height: 300px;
    }

    .main-card {
        width: 280px;
        height: 160px;
    }

    .stats-card {
        width: 130px;
        height: 100px;
        top: -20px;
        right: 0;
    }

    .notification-card {
        width: 220px;
        height: 60px;
        left: 0;
        bottom: 20px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-badge {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    .btn {
        padding: 0.6rem 1.5rem;
    }

    .btn-lg {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    .navbar-brand .logo {
        font-size: 24px;
    }

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

.logo img {
    margin: 0 3px;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes cardFloat {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-15px) scale(1.05);
    }
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

@keyframes barGrow {
    0% {
        transform: scaleY(0.8);
    }

    100% {
        transform: scaleY(1);
    }
}

@keyframes videoLoad {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.project-video video {
    animation: videoLoad 0.5s ease-out;
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error States */
.form-success {
    color: #28a745;
    font-weight: 500;
}

.form-error {
    color: #dc3545;
    font-weight: 500;
}

/* Utility Classes */
.text-primary-color {
    color: var(--primary-color) !important;
}

.bg-primary-color {
    background-color: var(--primary-color) !important;
}

.border-primary-color {
    border-color: var(--primary-color) !important;
}

/* Print Styles */
@media print {

    .navbar,
    .hero-section,
    .footer {
        display: none;
    }

    .section {
        padding: 2rem 0;
    }

    * {
        background: white !important;
        color: black !important;
    }
}

/* New Sections Styles */

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-medium) !important;
}

/* Feature Card */
.feature-card {
    background: var(--bg-primary);
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    border-color: var(--primary-color) !important;
}

/* Project Card (Brief) */
.project-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-medium) !important;
}

.project-card img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

/* Testimonial Card */
.testimonial-card {
    position: relative;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--shadow-medium) !important;
}

/* CTA Box */
.cta-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color) !important;
}

/* Floating Actions */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 15px;
}

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

.action-btn-main {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(39, 141, 198, 0.4);
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.action-btn-main:hover {
    transform: scale(1.1);
}

.action-menu {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.floating-actions:hover .action-menu,
.floating-actions.active .action-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.action-item {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    text-decoration: none;
    box-shadow: 0 2px 10px var(--shadow-medium);
    transition: var(--transition);
}

.action-item:hover {
    transform: scale(1.1);
    color: white;
}

.action-item.whatsapp:hover {
    background: #25D366;
}

.action-item.facebook:hover {
    background: #1877F2;
}

.action-item.phone:hover {
    background: #007bff;
}

.action-item.github:hover {
    background: #333;
}

.action-item.linkedin:hover {
    background: #0077b5;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(39, 141, 198, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(39, 141, 198, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(39, 141, 198, 0);
    }
}

/* Scroll Progress Line */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--gradient-brand);
    z-index: 9999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: width 0.1s ease;
}

/* Scrolled Navbar State */
.navbar.scrolled {
    background: #ffffff66 !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    padding-top: 10px;
    padding-bottom: 10px;
}

[data-theme="dark"] .navbar.scrolled {
    background: #00000000 !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Modern CTA Section */
.cta-modern {
    position: relative;
    overflow: hidden;
    color: white;
}

.cta-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    z-index: 1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.3);
    top: -100px;
    right: -50px;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--primary-light);
    bottom: -50px;
    left: -50px;
}

.btn-glow {
    background: white;
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    border: none;
}

.btn-glow:hover {
    background: white;
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    color: var(--primary-dark);
}

/* Modern Stats Section */
.stats-modern {
    position: relative;
    overflow: hidden;
    padding: 100px 0;
}

.Call-to-Action::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(39, 141, 198, 0.1) 0%, transparent 50%);
    animation: rotate 30s linear infinite;
}

.Call-to-Action {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a1a2e 100%);
}

.stat-card-modern {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.stat-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: 0.5s;
}

.stat-card-modern:hover::before {
    left: 100%;
}

.stat-card-modern:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.stat-icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(39, 141, 198, 0.2), rgba(47, 169, 238, 0.2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--primary-light);
    position: relative;
}

.stat-number-modern {
    font-size: 3.5rem;
    font-weight: 800;
    color: #177ab1;
    margin-bottom: 5px;
    background: linear-gradient(to right, #fff, #bfbfbf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: #00000021;
}

.stat-label-modern {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Modern Tech Stack Section */
.tech-modern {
    padding: 80px 0;
    overflow: hidden;
}

.tech-marquee-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
}

.tech-marquee-wrapper::before,
.tech-marquee-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 150px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.tech-marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-alt), transparent);
}

.tech-marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-alt), transparent);
}

.tech-track {
    display: flex;
    gap: 40px;
    width: max-content;
    animation: marquee 30s linear infinite;
}

.tech-track:hover {
    animation-play-state: paused;
}

.tech-item {
    background: var(--bg-primary);
    padding: 20px 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 4px 15px var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    min-width: 200px;
    justify-content: center;
}

.tech-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(39, 141, 198, 0.2);
}

.tech-item i {
    font-size: 2rem;
    color: var(--text-muted);
    transition: 0.3s;
}

.tech-item:hover i {
    color: var(--primary-color);
    transform: scale(1.1);
}

.tech-item span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .stat-card-modern {
        margin-bottom: 20px;
    }

    .tech-track {
        animation-duration: 20s;
        gap: 20px;
    }

    .tech-item {
        padding: 15px 30px;
        min-width: 160px;
    }
}

/* Modern Timeline Section */
.timeline-section {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
}

.timeline-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-container::after {
    content: '';
    position: absolute;
    width: 4px;
    background: linear-gradient(to bottom, transparent, var(--primary-color), transparent);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item-modern {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.timeline-item-modern.animate {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item-modern::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-primary);
    border: 4px solid var(--primary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 0 10px var(--primary-color);
    transition: all 0.3s ease;
}

.timeline-item-modern:hover::after {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

.timeline-left {
    left: 0;
}

.timeline-right {
    left: 50%;
}

.timeline-left::before {
    content: '';
    position: absolute;
    height: 1px;
    width: 40px;
    right: 0;
    top: 35px;
    background: linear-gradient(to left, var(--primary-color), transparent);
}

.timeline-right::before {
    content: '';
    position: absolute;
    height: 1px;
    width: 40px;
    left: 0;
    top: 35px;
    background: linear-gradient(to right, var(--primary-color), transparent);
}

.timeline-right::after {
    left: -10px;
}

.timeline-content-modern {
    padding: 25px;
    background: var(--bg-primary);
    position: relative;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 20px var(--shadow-light);
    transition: all 0.3s ease;
}

.timeline-content-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px var(--shadow-medium);
    border-color: var(--primary-color);
}

.timeline-year {
    display: inline-block;
    padding: 5px 15px;
    background: linear-gradient(45deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(39, 141, 198, 0.3);
}

.timeline-title {
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Modern Team Section */
.team-card-modern {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-primary);
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: all 0.4s ease;
    height: 100%;
    border: 1px solid var(--border-color);
}

.team-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px var(--shadow-medium);
    border-color: var(--primary-light);
}

.team-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 300px;
}

.team-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.team-card-modern:hover .team-image-wrapper img {
    transform: scale(1.1);
}

.team-overlay {
    position: absolute;
    bottom: -60px;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    justify-content: center;
    gap: 15px;
    transition: bottom 0.4s ease;
    opacity: 0;
}

.team-card-modern:hover .team-overlay {
    bottom: 0;
    opacity: 1;
}

.team-social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.team-info {
    padding: 25px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.team-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.team-role {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Timeline Responsive */
@media screen and (max-width: 768px) {
    .timeline-container::after {
        left: 31px;
    }

    .timeline-item-modern {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item-modern::after {
        left: 21px;
    }

    .timeline-left::after,
    .timeline-right::after {
        left: 21px;
    }

    .timeline-right {
        left: 0%;
    }

    .timeline-left::before,
    .timeline-right::before {
        left: 40px;
        width: 30px;
        background: linear-gradient(to right, var(--primary-color), transparent);
    }

    [dir='rtl'] .timeline-container::after {
        left: auto;
        right: 31px;
    }

    [dir='rtl'] .timeline-item-modern {
        padding-right: 70px;
        padding-left: 25px;
    }

    [dir='rtl'] .timeline-item-modern::after {
        right: 21px;
        left: auto;
    }

    [dir='rtl'] .timeline-left::before,
    [dir='rtl'] .timeline-right::before {
        right: 40px;
        left: auto;
        background: linear-gradient(to left, var(--primary-color), transparent);
    }
}


/* Modern Work Process */
.process-modern {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.process-steps-container {
    padding-top: 50px;
    padding-bottom: 50px;
}

.process-step-modern {
    position: relative;
    z-index: 2;
    padding: 30px;
    background: var(--bg-primary);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px var(--shadow-light);
    transition: all 0.4s ease;
    height: 100%;
}

.process-step-modern:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 50px rgba(39, 141, 198, 0.2);
}

.step-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    position: relative;
}

.step-number-bg {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 4rem;
    font-weight: 900;
    color: var(--primary-color);
    opacity: 0.1;
    line-height: 1;
    z-index: -1;
    transition: all 0.3s ease;
}

.process-step-modern:hover .step-number-bg {
    transform: scale(1.2) rotate(10deg);
    opacity: 0.2;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.step-desc {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Connecting lines (Desktop) */
@media (min-width: 992px) {
    .process-steps-container::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        width: 100%;
        height: 2px;
        background: repeating-linear-gradient(90deg, var(--primary-color) 0, var(--border-color) 10px, transparent 10px, transparent 20px);
        z-index: 1;
        transform: translateY(-50%);
    }
}

/* Modern Services List Section */
.services-modern-section {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
}

.service-card-modern {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 30px;
    height: 100%;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(39, 141, 198, 0.05) 0%, rgba(47, 169, 238, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.service-card-modern:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 50px var(--shadow-medium);
}

.service-card-modern:hover::before {
    opacity: 1;
}

.service-icon-modern {
    width: 70px;
    height: 70px;
    background: var(--bg-secondary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: all 0.4s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.service-card-modern:hover .service-icon-modern {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 20px rgba(39, 141, 198, 0.3);
}

.service-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.service-card-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.service-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.service-features-list li {
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
}

.service-features-list li i {
    color: var(--primary-color);
    margin-right: 10px;
    font-size: 0.8rem;
}

.service-btn {
    text-decoration: none;
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.service-btn i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.service-btn:hover {
    color: var(--primary-dark);
}

.service-btn:hover i {
    transform: translateX(5px);
}


/* Project/Portfolio Overlay Styles (matching Team Overlay) */
.project-image-wrapper {
    position: relative;
    overflow: hidden;
}

.project-overlay-modern {
    position: absolute;
    bottom: -60px;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    justify-content: center;
    gap: 15px;
    transition: bottom 0.4s ease;
    opacity: 0;
    z-index: 2;
}

.project-card:hover .project-overlay-modern,
.project-image-wrapper:hover .project-overlay-modern {
    bottom: 0;
    opacity: 1;
}

.project-icon-modern {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-icon-modern:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    color: white;
}


/* Modern Portfolio Filters */
.portfolio-filters-modern {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 10px;
}

.filter-btn-modern {
    border: 1px solid transparent;
    /* Reserve space for border */
    background: var(--bg-card);
    padding: 12px 30px;
    border-radius: 50px;
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
}

/* Subtle gradient border effect for default state */
.filter-btn-modern::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    padding: 1px;
    /* border width */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.filter-btn-modern:hover {
    transform: translateY(-3px);
    color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(39, 141, 198, 0.15);
}

.filter-btn-modern.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(39, 141, 198, 0.4);
    border-color: transparent;
}

.filter-btn-modern.active::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.filter-btn-modern.active:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Add a small dot indicator for style */
.filter-btn-modern span {
    position: relative;
    z-index: 2;
}



/* Modern Particle Cursor */
#cursor-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

@media (hover: hover) and (pointer: fine) {
    body {
        cursor: none;
        /* Hide default cursor */
    }
}

/* Fluid Ghost Cursor Hero */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-section {
    position: relative;
    background-color: var(--bg-primary);
    /* Ensure dark background for visibility */
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    /* Text above canvas */
}

/* Enhancing text readability on canvas */
.hero-title,
.hero-subtitle {
    text-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}

/* Modern Footer Shapes */
.footer {
    position: relative;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

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

.footer-shape.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--hero-blob-1);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.footer-shape.shape-2 {
    width: 400px;
    height: 400px;
    background: var(--hero-blob-2);
    bottom: -150px;
    left: -100px;
    animation-delay: -5s;
    opacity: 0.3;
}

.footer-shape.shape-3 {
    width: 200px;
    height: 200px;
    background: var(--primary-light);
    top: 30%;
    right: 15%;
    animation-delay: -2s;
    opacity: 0.4;
    filter: blur(60px);
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(30px, -30px) scale(1.1);
    }
}

.footer-brand .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-links li a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: var(--transition);
    display: block;
    padding: 5px 0;
}

.footer-links li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--bg-alt);
    border-radius: 50%;
    color: var(--primary-color);
    margin-left: 10px;
    transition: var(--transition);
    text-decoration: none;
}

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