:root {
    --bg-color: #0b0c15;
    --card-bg: #161b22;
    --text-primary: #f8fafc;
    --text-secondary: #f1f5f9;
    --accent-color: #67e8f9;
    /* Vibrant Cyan for perfect contrast */
    --primary-rgb: 59, 130, 246;
    /* Added for rgba usage */
    /* Blue */
    --accent-glow: rgba(59, 130, 246, 0.5);
    --secondary-accent: #8b5cf6;
    --secondary-rgb: 139, 92, 246;
    /* Added for rgba usage */
    /* Purple */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* Font Awesome display swap override */
@font-face {
    font-family: 'Font Awesome 6 Free';
    font-display: swap;
    src: local('Font Awesome 6 Free');
}

@font-face {
    font-family: 'Font Awesome 6 Brands';
    font-display: swap;
    src: local('Font Awesome 6 Brands');
}

.bg-primary-gradient {
    background: var(--gradient-primary) !important;
}

.text-primary-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-dark-deep {
    background-color: var(--bg-color) !important;
}

.bg-card {
    background: rgba(22, 27, 34, 0.6) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-body);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: #fff;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-accent);
    text-shadow: 0 0 10px var(--accent-glow);
}

/* Navbar */
.navbar {
    background-color: rgba(11, 12, 21, 0.8) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 15px 0;
    transition: all 0.4s ease;
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 1.2rem !important;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

.nav-link:hover,
.nav-link.active {
    color: #fff !important;
    text-shadow: 0 0 10px var(--accent-glow);
}

.navbar-collapse .nav-link {
    color: #fff !important;
    /* Ensure visibility on both desktop and mobile */
}

/* Mobile Navbar Styling */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: rgba(11, 12, 21, 0.98);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        margin-top: 15px;
        padding: 20px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    }

    .navbar-nav {
        text-align: center;
    }

    .nav-item {
        margin-bottom: 15px;
    }

    .nav-link::after {
        display: none;
    }

    .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.1);
        padding: 8px;
    }

    .navbar-toggler:focus {
        box-shadow: 0 0 15px var(--accent-glow);
    }
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-outline-primary {
    color: var(--accent-color);
    border-color: var(--accent-color);
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Hero Section */
#hero {
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at center, #1e293b 0%, #0b0c15 100%);
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

/* Cards (Services, Blog, Testimonials) */
.card,
.service-card,
.testimonial-card,
.blog-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover,
.service-card:hover,
.testimonial-card:hover,
.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border-color: var(--accent-color) !important;
    background-color: rgba(22, 27, 34, 0.8) !important;
}

.icon-glow {
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
    transition: all 0.3s ease;
}

.card:hover .icon-glow,
.service-card:hover .icon-glow {
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.8));
}

.hover-white:hover {
    color: #fff !important;
    opacity: 1 !important;
}

.card-title,
.service-card h3 {
    color: #fff;
}

/* Ensure service cards have solid background for contrast audits */
.service-card,
.feature-card,
.card.bg-card {
    background-color: #161b22 !important;
    opacity: 1 !important;
}

.text-muted,
.text-white-50 {
    color: var(--text-secondary) !important;
    opacity: 1 !important;
}

/* Specific interaction point contrast */
.service-card .text-primary,
.card-body .text-primary,
.stretched-link.text-primary {
    color: #67e8f9 !important;
    /* Force ultra-bright cyan for links */
    font-weight: 700;
}

.badge.bg-light.text-primary {
    background-color: #f1f5f9 !important;
    color: #0b0c15 !important;
    /* High contrast dark on light */
    font-weight: 800;
}

/* Neutralize opacity on text for better contrast */
p.opacity-75,
.text-light.opacity-75 {
    opacity: 1 !important;
    color: var(--text-secondary) !important;
}

.bg-light {
    background-color: #0b0c15 !important;
    /* Override light backgrounds */
}

/* Chatbot AI Theme */
.chat-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 1050;
}

.chat-button {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 16px var(--accent-glow);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.chat-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 24px var(--accent-glow);
}

.chat-box {
    display: none;
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 380px;
    background: rgba(11, 12, 21, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
    animation: slideUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.chat-header {
    background: var(--gradient-primary);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header span {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    font-family: var(--font-heading);
}

.chat-body {
    height: 380px;
    overflow-y: auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    scroll-behavior: smooth;
}

.chat-message {
    margin-bottom: 20px;
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.5;
    position: relative;
    animation: fadeIn 0.3s ease;
}

.bot-message {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.user-message {
    background: var(--gradient-primary);
    color: white;
    align-self: flex-end;
    margin-left: auto;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.chat-options .btn-outline-primary {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: transparent;
    margin-top: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.chat-options .btn-outline-primary:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--accent-glow);
}

.chat-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    background: rgba(255, 255, 255, 0.03);
    align-items: center;
}

.chat-footer input {
    background: transparent;
    border: none;
    outline: none;
    flex: 1;
    padding: 8px 0;
    font-size: 0.95rem;
    color: #fff;
}

.chat-footer button {
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 0 0 0 15px;
    transition: transform 0.2s ease;
}

.chat-footer button:hover {
    transform: scale(1.1) rotate(10deg);
    color: var(--secondary-accent);
}

/* Footer Section Fixes */
footer,
#contact {
    background-color: #0b0c15 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Form Inputs */
.form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    color: #fff;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25);
}

.text-primary {
    color: var(--accent-color) !important;
}