/* ===================================
   YAF Business Suite - Custom Styles
   =================================== */

/* ============ CSS Variables ============ */
:root {
    /* Brand Colors - From Logo */
    --primary-navy: #1a2742;
    --primary-red: #c82333;
    --accent-cyan: #00d4ff;
    --accent-blue: #0066ff;

    /* Light Mode Colors - Enhanced */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f8fa;
    --bg-tertiary: #e8eef3;
    --bg-gradient: linear-gradient(180deg, #ffffff 0%, #f5f8fa 100%);
    --text-primary: #1a2742;
    --text-secondary: #5a6c7d;
    --text-muted: #99a5b3;
    --border-color: #d8e0e8;
    --border-light: #e8ecf0;

    /* Enhanced Shadows for Light Mode */
    --shadow-sm: 0 2px 12px rgba(26, 39, 66, 0.06);
    --shadow-md: 0 8px 24px rgba(26, 39, 66, 0.10);
    --shadow-lg: 0 16px 48px rgba(26, 39, 66, 0.15);
    --shadow-xl: 0 24px 64px rgba(26, 39, 66, 0.20);
    --shadow-colored: 0 8px 32px rgba(0, 212, 255, 0.25);
    --glow-cyan: 0 0 20px rgba(0, 212, 255, 0.3);

    /* Vibrant Gradients */
    --gradient-primary: linear-gradient(135deg, #1a2742 0%, #2d4a7c 50%, #1a2742 100%);
    --gradient-accent: linear-gradient(135deg, #00d4ff 0%, #00b8e6 50%, #0099cc 100%);
    --gradient-hero: linear-gradient(135deg, rgba(26, 39, 66, 0.97) 0%, rgba(45, 74, 124, 0.92) 50%, rgba(26, 39, 66, 0.95) 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 248, 250, 0.95) 100%);
    --gradient-red: linear-gradient(135deg, #c82333 0%, #e63946 100%);

    /* Glass Effects */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: blur(12px);

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --section-padding: 80px;

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark Mode Variables - Enhanced */
[data-theme="dark"] {
    /* Dark Backgrounds with Better Depth */
    --bg-primary: #0a0e14;
    --bg-secondary: #12171f;
    --bg-tertiary: #1a2229;
    --bg-gradient: linear-gradient(180deg, #0a0e14 0%, #12171f 100%);

    /* Enhanced Text Colors for Dark Mode */
    --text-primary: #f0f6fc;
    --text-secondary: #b6c2d1;
    --text-muted: #7d8897;

    /* Better Border Colors */
    --border-color: #2d3947;
    --border-light: #242b36;

    /* Enhanced Shadows with Glow */
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 56px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 24px 72px rgba(0, 0, 0, 0.8);
    --shadow-colored: 0 8px 32px rgba(0, 212, 255, 0.4);
    --glow-cyan: 0 0 30px rgba(0, 212, 255, 0.6), 0 0 60px rgba(0, 212, 255, 0.3);

    /* Vibrant Gradients for Dark Mode */
    --gradient-primary: linear-gradient(135deg, #0a0e14 0%, #1a2742 50%, #0a0e14 100%);
    --gradient-accent: linear-gradient(135deg, #00e5ff 0%, #00d4ff 50%, #00b8e6 100%);
    --gradient-hero: linear-gradient(135deg, rgba(10, 14, 20, 0.98) 0%, rgba(26, 39, 66, 0.92) 50%, rgba(10, 14, 20, 0.95) 100%);
    --gradient-card: linear-gradient(135deg, rgba(18, 23, 31, 0.9) 0%, rgba(26, 34, 41, 0.95) 100%);
    --gradient-red: linear-gradient(135deg, #ff3d4f 0%, #c82333 100%);

    /* Enhanced Glass Effects for Dark Mode */
    --glass-bg: rgba(18, 23, 31, 0.7);
    --glass-border: rgba(0, 212, 255, 0.2);
    --glass-blur: blur(16px);

    /* Brighter Accent Cyan for Dark Mode */
    --accent-cyan: #00e5ff;
}

/* ============ Global Styles ============ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* RTL Support for Arabic */
[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

[dir="rtl"] .me-2,
[dir="rtl"] .me-3 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

/* ============ Navbar ============ */
.navbar {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    padding: 1rem 0;
    border-bottom: 1px solid var(--glass-border);
}

.navbar.scrolled {
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .navbar {
    background: var(--glass-bg);
    border-bottom: 1px solid rgba(0, 212, 255, 0.1);
}

[data-theme="dark"] .navbar.scrolled {
    box-shadow: var(--shadow-md), 0 0 20px rgba(0, 212, 255, 0.1);
}

.navbar-brand .logo {
    height: 50px;
    transition: var(--transition-smooth);
}

.navbar-brand .logo:hover {
    transform: scale(1.05);
}

.nav-link {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 8px;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--gradient-accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-link:hover {
    color: var(--accent-cyan) !important;
    background-color: rgba(0, 212, 255, 0.1);
}

.btn-icon {
    background-color: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.btn-icon:hover {
    background-color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    color: white;
    transform: rotate(15deg) scale(1.1);
}

.navbar-toggler {
    border: 2px solid var(--border-color);
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 212, 255, 0.25);
}

/* ============ Hero Section ============ */
.hero-section {
    position: relative;
    background: var(--gradient-hero);
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Enhanced Light Mode Hero */
[data-theme="light"] .hero-section {
    background: linear-gradient(135deg, #1a2742 0%, #2d4a7c 40%, #4a6fa5 100%);
    position: relative;
}

/* Animated gradient overlay for light mode */
[data-theme="light"] .hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(0, 212, 255, 0.1) 0%,
            rgba(0, 180, 230, 0.15) 50%,
            rgba(26, 39, 66, 0.2) 100%);
    z-index: 1;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }
}

/* Particle effect overlay for light mode */
[data-theme="light"] .hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(0, 180, 230, 0.1) 0%, transparent 50%);
    z-index: 1;
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Circuit Board Background */
.circuit-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(90deg, var(--accent-cyan) 1px, transparent 1px),
        linear-gradient(0deg, var(--accent-cyan) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.03;
    z-index: 0;
    animation: circuitMove 20s linear infinite;
}

/* Enhanced circuit visibility in light mode */
[data-theme="light"] .circuit-bg {
    background-image:
        linear-gradient(90deg, rgba(0, 212, 255, 0.4) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 212, 255, 0.4) 1px, transparent 1px);
    opacity: 0.08;
}

@keyframes circuitMove {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 50px 50px;
    }
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: -1px;
}

/* Enhanced title for light mode */
[data-theme="light"] .hero-title {
    color: #ffffff;
    text-shadow:
        0 2px 10px rgba(0, 0, 0, 0.3),
        0 4px 20px rgba(0, 212, 255, 0.2),
        0 0 40px rgba(0, 212, 255, 0.1);
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--accent-cyan);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

/* Enhanced subtitle for light mode */
[data-theme="light"] .hero-subtitle {
    color: #00e5ff;
    text-shadow:
        0 2px 8px rgba(0, 212, 255, 0.4),
        0 0 30px rgba(0, 229, 255, 0.3);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
}

/* Enhanced description for light mode */
[data-theme="light"] .hero-description {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-cta .btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition-bounce);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient-accent);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 212, 255, 0.5);
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: var(--glow-cyan), 0 12px 40px rgba(0, 229, 255, 0.6);
}

.btn-outline-primary {
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
    background: transparent;
    position: relative;
    overflow: hidden;
}

.btn-outline-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--accent-cyan);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-outline-primary:hover::before {
    width: 100%;
}

.btn-outline-primary:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(0, 212, 255, 0.4);
}

[data-theme="dark"] .btn-outline-primary:hover {
    box-shadow: 0 10px 35px rgba(0, 229, 255, 0.5);
}

/* Hero Visual - Floating Cards */
.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card {
    position: absolute;
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--accent-cyan);
    animation: float 6s ease-in-out infinite;
}

/* Enhanced floating cards for light mode */
[data-theme="light"] .floating-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(16px);
    border: 2px solid rgba(0, 229, 255, 0.6);
    box-shadow:
        0 8px 32px rgba(0, 212, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 0 40px rgba(0, 212, 255, 0.2);
}

[data-theme="light"] .floating-card i {
    color: #00e5ff;
    filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.6));
}

.floating-card:nth-child(1) {
    top: 0;
    left: 10%;
    animation: float 6s ease-in-out infinite, cardGlow 3s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    top: 50%;
    right: 10%;
    animation: float 6s ease-in-out infinite 2s, cardGlow 3s ease-in-out infinite 1s;
}

.floating-card:nth-child(3) {
    bottom: 10%;
    left: 30%;
    animation: float 6s ease-in-out infinite 4s, cardGlow 3s ease-in-out infinite 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes cardGlow {

    0%,
    100% {
        box-shadow:
            0 8px 32px rgba(0, 212, 255, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            0 0 40px rgba(0, 212, 255, 0.2);
    }

    50% {
        box-shadow:
            0 8px 32px rgba(0, 212, 255, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.5),
            0 0 60px rgba(0, 229, 255, 0.4);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--accent-cyan);
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ============ Sections ============ */
section {
    padding: var(--section-padding) 0;
    position: relative;
}

.services-section {
    background-color: var(--bg-secondary);
}

.section-header {
    margin-bottom: 4rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-accent);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* ============ Service Cards ============ */
.service-card {
    background: var(--gradient-card);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    height: 100%;
    transition: var(--transition-smooth);
    border: 2px solid var(--border-light);
    position: relative;
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover::after {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-12px);
    box-shadow: var(--shadow-xl), var(--shadow-colored);
    border-color: var(--accent-cyan);
}

[data-theme="dark"] .service-card:hover {
    box-shadow: var(--shadow-xl), var(--glow-cyan);
}

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1.5rem;
    transition: var(--transition-bounce);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.service-desc {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.service-features li i {
    color: var(--accent-cyan);
    margin-right: 0.75rem;
    font-size: 0.8rem;
}

[dir="rtl"] .service-features li i {
    margin-right: 0;
    margin-left: 0.75rem;
}

/* ============ Feature Boxes ============ */
.feature-box {
    padding: 2rem;
    text-align: center;
    transition: var(--transition-smooth);
}

.feature-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
    margin: 0 auto 1.5rem;
    transition: var(--transition-bounce);
}

.feature-box:hover .feature-icon {
    transform: scale(1.15) rotate(360deg);
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-desc {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}

/* ============ Stats ============ */
.stat-box {
    padding: 1.5rem;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============ Contact Section ============ */
.contact-section {
    background-color: var(--bg-secondary);
}

.contact-info {
    padding-right: 2rem;
}

[dir="rtl"] .contact-info {
    padding-right: 0;
    padding-left: 2rem;
}

.contact-item {
    display: flex;
    align-items: start;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
    transition: var(--transition-smooth);
}

.contact-item:hover {
    border-color: var(--accent-cyan);
    transform: translateX(10px);
}

[dir="rtl"] .contact-item:hover {
    transform: translateX(-10px);
}

.contact-item i {
    font-size: 1.8rem;
    color: var(--accent-cyan);
    margin-right: 1.5rem;
    margin-top: 0.25rem;
}

[dir="rtl"] .contact-item i {
    margin-right: 0;
    margin-left: 1.5rem;
}

.contact-item h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-item a,
.contact-item p {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.contact-item a:hover {
    color: var(--accent-cyan);
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--gradient-card);
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-light);
    backdrop-filter: var(--glass-blur);
}

[data-theme="dark"] .contact-form-wrapper {
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 212, 255, 0.08);
}

.form-label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control {
    background-color: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    transition: var(--transition-smooth);
}

.form-control:focus {
    background-color: var(--bg-primary);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 0.25rem rgba(0, 212, 255, 0.15), 0 4px 12px rgba(0, 212, 255, 0.1);
    color: var(--text-primary);
    transform: translateY(-2px);
}

[data-theme="dark"] .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 229, 255, 0.25), var(--shadow-colored);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

#formMessage {
    padding: 1rem;
    border-radius: 12px;
    display: none;
    font-weight: 500;
}

#formMessage.success {
    display: block;
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 2px solid #28a745;
}

[data-theme="dark"] #formMessage.success {
    background-color: rgba(40, 200, 80, 0.15);
    color: #4ade80;
    box-shadow: 0 0 20px rgba(40, 200, 80, 0.2);
}

#formMessage.error {
    display: block;
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 2px solid #dc3545;
}

[data-theme="dark"] #formMessage.error {
    background-color: rgba(255, 60, 80, 0.15);
    color: #ff6b7a;
    box-shadow: 0 0 20px rgba(255, 60, 80, 0.2);
}

/* ============ Footer ============ */
.footer {
    background-color: var(--primary-navy);
    color: white;
    border-top: 4px solid var(--accent-cyan);
}

.footer-logo {
    height: 40px;
    /* Removed filter to keep original logo colors visible */
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
    text-decoration: none;
}

.social-link:hover {
    background: var(--accent-cyan);
    color: white;
    transform: translateY(-5px);
}

/* ============ Scroll to Top ============ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-accent);
    color: white;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

[dir="rtl"] .scroll-top {
    right: auto;
    left: 30px;
}

/* ============ Animations ============ */
.fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.fade-in.delay-1 {
    animation-delay: 0.2s;
}

.fade-in.delay-2 {
    animation-delay: 0.4s;
}

.fade-in.delay-3 {
    animation-delay: 0.6s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* AOS Animations Support */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* ============ Responsive Design ============ */

/* Tablet and below (991px and below) */
@media (max-width: 991px) {
    :root {
        --section-padding: 60px;
    }

    .hero-section {
        min-height: auto;
        padding: 120px 0 80px;
    }

    .hero-visual {
        height: 300px;
        margin-top: 3rem;
    }

    .floating-card {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .navbar-collapse {
        background: var(--bg-primary);
        padding: 1.5rem;
        margin-top: 1rem;
        border-radius: 12px;
        box-shadow: var(--shadow-md);
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
        font-size: 1.05rem;
    }

    .contact-info {
        padding-right: 0;
        margin-bottom: 2rem;
    }

    .service-card {
        margin-bottom: 1.5rem;
    }

    .section-padding {
        padding: 3.5rem 0;
    }
}

/* Mobile devices (767px and below) */
@media (max-width: 767px) {
    :root {
        --section-padding: 50px;
    }

    /* Hero Section Mobile */
    .hero-section {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1.25rem;
    }

    .hero-subtitle {
        font-size: 1.15rem;
        margin-bottom: 1.25rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: 1.75rem;
        line-height: 1.7;
    }

    /* Touch-friendly buttons */
    .hero-cta .btn {
        padding: 1rem 1.75rem;
        font-size: 1rem;
        margin-bottom: 1rem;
        width: 100%;
        min-height: 48px;
        display: block;
    }

    .hero-cta .btn:last-child {
        margin-bottom: 0;
    }

    /* Floating cards - better visibility on mobile */
    .hero-visual {
        height: 280px;
        margin-top: 2.5rem;
    }

    .floating-card {
        width: 90px;
        height: 90px;
        font-size: 2rem;
    }

    .floating-card:nth-child(1) {
        top: 10%;
        left: 5%;
    }

    .floating-card:nth-child(2) {
        top: 45%;
        right: 5%;
    }

    .floating-card:nth-child(3) {
        bottom: 5%;
        left: 25%;
    }

    /* Sections */
    .section-title {
        font-size: 1.875rem;
        margin-bottom: 1.25rem;
    }

    .section-subtitle {
        font-size: 1.05rem;
        padding: 0 1rem;
    }

    /* Service Cards */
    .service-card {
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
    }

    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
        margin-bottom: 1.25rem;
    }

    .service-title {
        font-size: 1.35rem;
        margin-bottom: 0.875rem;
    }

    .service-desc {
        font-size: 0.95rem;
        line-height: 1.65;
    }

    /* Feature Boxes */
    .feature-box {
        padding: 1.75rem 1rem;
        margin-bottom: 2rem;
    }

    .feature-icon {
        width: 85px;
        height: 85px;
        font-size: 2.5rem;
    }

    .feature-title {
        font-size: 1.3rem;
    }

    .feature-desc {
        font-size: 0.95rem;
    }

    /* Stats */
    .stat-box {
        padding: 1.25rem 0.5rem;
        margin-bottom: 1rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 0.875rem;
    }

    /* Contact Section */
    .contact-form-wrapper {
        padding: 2rem 1.5rem;
        margin-top: 1.5rem;
    }

    .contact-item {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .contact-item i {
        font-size: 1.5rem;
        margin-right: 1rem;
    }

    [dir="rtl"] .contact-item i {
        margin-right: 0;
        margin-left: 1rem;
    }

    /* Form elements - touch-friendly */
    .form-control {
        padding: 0.875rem 1rem;
        font-size: 1rem;
        min-height: 48px;
    }

    textarea.form-control {
        min-height: 140px;
    }

    .form-label {
        font-size: 0.95rem;
        margin-bottom: 0.625rem;
    }

    /* Touch-friendly submit button */
    .contact-form button[type="submit"] {
        width: 100%;
        min-height: 52px;
        font-size: 1.05rem;
        padding: 1rem;
    }

    /* Navbar mobile */
    .btn-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .navbar-brand .logo {
        height: 40px;
    }

    .navbar-collapse {
        margin-top: 1rem;
    }

    /* Footer mobile */
    .footer {
        padding: 2.5rem 0;
        text-align: center;
    }

    .footer .row>div {
        margin-bottom: 1.5rem;
    }

    .footer .row>div:last-child {
        margin-bottom: 0;
    }

    .footer-logo {
        height: 35px;
        margin-bottom: 0.75rem;
    }

    .social-links {
        margin: 1rem 0;
    }

    .social-link {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    /* Scroll to top button */
    .scroll-top {
        width: 48px;
        height: 48px;
        bottom: 20px;
        right: 20px;
        font-size: 1.1rem;
    }

    [dir="rtl"] .scroll-top {
        right: auto;
        left: 20px;
    }
}

/* Small mobile devices (575px and below) */
@media (max-width: 575px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 1.65rem;
    }

    .service-card,
    .feature-box {
        padding: 1.75rem 1.25rem;
    }

    .contact-form-wrapper {
        padding: 1.75rem 1.25rem;
    }

    .floating-card {
        width: 75px;
        height: 75px;
        font-size: 1.75rem;
    }

    /* Better container padding */
    .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        padding: 80px 0 50px;
        min-height: auto;
    }

    .hero-visual {
        display: none;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Print Styles */
@media print {

    .navbar,
    .scroll-top,
    .scroll-indicator,
    .hero-cta,
    .contact-form,
    #themeToggle,
    #langToggle {
        display: none;
    }

    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }

    body {
        background: white;
        color: black;
    }
}