:root {
    /* Light Mode Variables (Default) */
    --bg-color: #F9FAFB;
    --text-color: #111827;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    --nav-bg: rgba(255, 255, 255, 0.8);
    --card-hover-border: rgba(56, 189, 248, 0.6);
    --font-body: 'Inter', 'Montserrat', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
    --font-display: 'Montserrat', 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
}

.dark {
    /* Dark Mode Variables */
    --bg-color: #030712;
    --text-color: #F9FAFB;
    --glass-bg: rgba(17, 24, 39, 0.5);
    --glass-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(17, 24, 39, 0.8);
    --card-hover-border: rgba(56, 189, 248, 0.4);
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6, .font-display {
    font-family: var(--font-display);
}

.gradient-text {
    background: linear-gradient(45deg, #2563EB, #7C3AED); /* Saturated: blue-600 to purple-600 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.dark .gradient-text {
    background: linear-gradient(90deg, #60A5FA, #A855F7); /* Luminous: blue-400 to purple-600 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.gradient-text-green {
    background: linear-gradient(30deg, #10B981, #6EE7B7); /* Emerald to a lighter green */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    -webkit-print-color-adjust: exact;
}
.dark .gradient-text-green {
    background: linear-gradient(30deg, #34D399, #A7F3D0); /* Lighter greens for dark mode */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}
.glass-card:hover {
    border-color: var(--card-hover-border);
    transform: translateY(-2px);
}
.nav-item {
    position: relative;
}
.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #38BDF8;
    transition: width 0.3s ease;
}
.nav-item:hover::after {
    width: 100%;
}

/* Dropdown Styles - Improved Sensitivity */
.group:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}
.dropdown-bridge {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Tech Grid Animation */
.tech-icon {
    filter: grayscale(100%);
    transition: all 0.3s ease;
    opacity: 0.7;
}
.tech-icon:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Process Steps */
.process-line {
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #38BDF8, #A78BFA);
    z-index: 0;
}
@media (min-width: 768px) {
    .process-line {
        left: 50%;
        margin-left: -1px;
    }
}

/* Accordion transition */
.accordion-content {
    transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}
.accordion-item.active .accordion-content {
    max-height: 500px; /* Increased to fit content */
    opacity: 1;
}
.accordion-item.active svg.chevron {
    transform: rotate(180deg);
}

/* Mask for Marquee */
.mask-linear-gradient {
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

/* WhatsApp Button Z-Index */
.whatsapp-float {
    position: fixed;
    width: 40px;
    height: 40px;
    bottom: 20px;
    right: 20px;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 20px;
    box-shadow: 2px 2px 3px #999;
    z-index: 9999; /* Highest priority */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none; 
    padding: 0; 
}
.whatsapp-float:hover {
    transform: translateY(-5px);
    box-shadow: 4px 4px 10px #999;
}
    .whatsapp-float img {
    width: 100%; 
    height: 100%;
    border-radius: 50%;
    object-fit: cover; 
}

/* Hamburger Animation - Smooth Ease */
.hamburger svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger #open-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}
.hamburger #close-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg) scale(0);
}

.hamburger.active #open-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scale(0);
}
.hamburger.active #close-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}

/* Mobile Menu Transition */
.mobile-menu-transition {
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.mobile-menu-transition.open {
    max-height: 500px; /* Adjust if menu gets taller */
    opacity: 1;
}

/* Theme Icon Animation */
@keyframes icon-pop {
    0% { transform: scale(0.5) rotate(-90deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.theme-trigger-btn.icon-animate svg {
    animation: icon-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Theme Switcher UI */
.theme-btn {
    cursor: pointer;
}

.theme-btn:hover {
    background-color: transparent;
    color: #38BDF8;
}
.dark .theme-btn:hover {
    background-color: transparent;
    color: #38BDF8;
}

.theme-btn.active {
    background: #38BDF8;
    color: white;
}

.dark .theme-btn.active {
    color: #1f2937; /* A dark gray is better than pure black */
    background-color: #38BDF8;
}

.theme-btn.active:hover {
    background-color: #38BDF8;
}

.dark .theme-btn.active:hover {
    color: #1f2937; /* A dark gray is better than pure black */
    background-color: #38BDF8;
}

/* Theme Dropdown Animation */
.theme-dropdown-transition {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s;
    transform: translateY(10px) scale(0.95);
    opacity: 0;
    visibility: hidden;
}

.theme-dropdown-transition.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Modal Transitions */
.modal-overlay {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: visibility 0s linear 0.3s, opacity 0.3s ease-in-out;
}
.modal-overlay.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0s;
}
.modal-panel {
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}
.modal-overlay.open .modal-panel {
    transform: scale(1);
    opacity: 1;
}
