:root {
    /* Color Palette - Premium Navy, White, and Red */
    --primary-color: #001a41;
    /* Dark Navy */
    --secondary-color: #c4202e;
    /* Red from Logo */
    --accent-color: #00d2ff;
    /* Cyan for tech feel */
    --bg-light: #ffffff;
    --text-dark: #001a41;
    --text-light: #ffffff;
    --card-bg-light: #f8f9fa;
    --footer-bg: #001a41;

    /* Dark Mode Defaults */
    --bg-dark: #0a0e14;
    --text-dark-mode: #e1e7ef;
    --card-bg-dark: #161b22;
    --nav-link-color: #001a41;

    --transition-speed: 0.3s;
    --border-radius: 12px;
}

[data-theme="dark"] {
    --bg-light: #0d1117;
    --text-dark: #e1e7ef;
    --card-bg-light: #161b22;
    --primary-color: #58a6ff;
    /* Blue for dark mode */
    --accent-color: #58a6ff;
    --bg-light-subtle: #0d1117;
    --nav-link-color: #e1e7ef;
    /* Fix for sub-sections */
}

.bg-light-subtle {
    background-color: #f8f9fa;
    transition: background-color var(--transition-speed);
}

[data-theme="dark"] .bg-light-subtle {
    background-color: #0d1117;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    transition: background-color var(--transition-speed), color var(--transition-speed);
    overflow-x: hidden;
}

[lang="ar"] {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    direction: rtl;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
}

.premium-title {
    font-size: 3.5rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

[data-theme="dark"] .premium-title {
    background: linear-gradient(45deg, #ffffff, var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .navbar {
    background: rgba(13, 17, 23, 0.8);
    /* More transparent */
    backdrop-filter: blur(12px);
    /* Stronger blur */
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Remove border radius from navbar in mobile if present, keep it sleek */

.navbar-brand img {
    height: 60px;
    transition: transform var(--transition-speed);
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.nav-link {
    color: var(--nav-link-color) !important;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Buttons */
.btn-premium {
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    /* Slightly smaller for elegance */
}

.btn-primary-premium {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary-premium:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Hero Section */
.hero-section {
    padding: 130px 0 60px;
    /* Reduced top/bottom padding */
    background: radial-gradient(circle at 80% 20%, rgba(0, 210, 255, 0.08), transparent 40%),
        radial-gradient(circle at 20% 80%, rgba(196, 32, 46, 0.08), transparent 40%);
    position: relative;
    overflow: hidden;
}

/* Add animated background blobs for premium feel */
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxe999IiBoZWlnaHQ9IjEwMCUiPjxmaWx0ZXIgaWQ9Im4iPjxmZVR1cmJ1bGVuY2UgdHlwZT0iZnJhY3RhbE5vaXNlIiBiYXNlRnJlcXVlbmN5PSIwLjUiIG51bSBPY3RhZmVzPSIxIiBzdGl0Y2hUaWxlcz0ibm9TdGl0Y2giLz48L2ZpbHRlcj48cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWx0ZXI9InVybCgjbikiIG9wYWNpdHk9IjAuMDUiLz48L3N2Zz4=');
    opacity: 0.03;
    animation: rotateBackground 60s linear infinite;
    pointer-events: none;
}

@keyframes rotateBackground {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.hero-img {
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Feature Section */
.bg-light-subtle {
    background-color: #f8f9fa !important;
}

[data-theme="dark"] .bg-light-subtle {
    background-color: var(--bg-light) !important;
}

.feature-card {
    background: var(--card-bg-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    height: 100%;
}

[data-theme="dark"] .feature-card {
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(0, 210, 255, 0.1);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* Global Section Padding Correction */
.py-100 {
    padding: 60px 0;
    /* Further reduced from 80px */
}

/* Contact Form */
.contact-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.contact-card {
    background: var(--card-bg-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .contact-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-control {
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .form-control {
    background: #1c2128;
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: white;
    padding: 80px 0 30px;
}

footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: white;
}

.footer-logo {
    height: 80px;
    margin-bottom: 1.5rem;
}

/* Theme & Lang Switchers */
.mode-toggle,
.lang-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 1rem;
}

/* Responsive RTL Adjustments */
[lang="ar"] .ms-auto {
    margin-right: auto !important;
    margin-left: 0 !important;
}

[lang="ar"] .me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

@media (max-width: 991px) {
    .premium-title {
        font-size: 2.5rem;
    }
}