/* ========================================
   NITROBOTS.AI - MODERN AI AGENCY THEME
   ======================================== */

/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --accent-glow: rgba(6, 182, 212, 0.5);
    --dark: #0f172a;
    --darker: #020617;
    --card-bg: rgba(15, 23, 42, 0.8);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
    --gradient-2: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--darker);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Animated Background */
.hero-gradient-bg {
    background: #3d54e0;
    background-size: 400% 400%;
    animation: gradient-shift 15s ease infinite;
    min-height: 100vh;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2), 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(-8px);
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow Effects */
.glow-sm {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.glow-lg {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.4), 0 0 80px rgba(139, 92, 246, 0.2);
}

.text-glow {
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

/* Buttons */
.btn-primary {
    background: var(--gradient-1);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 9999px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover::before {
    opacity: 1;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes float {

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

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

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.6), 0 0 60px rgba(139, 92, 246, 0.3);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Animation Classes */
.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-fade-in-right {
    animation: fadeInRight 0.8s ease forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

/* Scroll Animation (hidden by default) */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

.delay-500 {
    transition-delay: 500ms;
}

/* Header Styles */
.header-glass {
    background: #ffffff;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

.header-glass.scrolled {
    background: #ffffff;
    border-bottom-color: rgba(99, 102, 241, 0.3);
}

.nav-link {
    position: relative;
    color: #000000;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #000000;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Image Glow Ring */
.hero-image-container {
    position: relative;
    width: 80%;
    justify-self: center;
}

.hero-image-container::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 1.5rem;
    opacity: 0.6;
    z-index: -1;
    animation: pulse-glow 3s ease-in-out infinite;
}

.core-services {
    background: #e4e0ff;
}

.upcoming-events {
    background: #eefb7b;
}

.agent-card-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 500px;
  transform-style: preserve-3d;
}

.agent-card {
  position: absolute;
  width: 90%;
  height: 500px;
  border-radius: 10px;
  animation: rotateCard 28s ease-in-out infinite;
}

.agent-card img {
  width: 100%;
  height: 500px;
  border-radius: 10px;
  object-fit: cover;
}

@keyframes rotateCard {
  /* Hold front */
  0% {
    transform: translateZ(1px);
  }
  /* Hold front */
  28.57% {
    transform: translateZ(1px);
  }
  /* Move left */
  33.33% {
    transform: rotate(-4deg) scale(0.9) translate(-15%, -5%);
  }
  /* Hold left */
  61.90% {
    transform: rotate(-4deg) scale(0.9) translate(-15%, -5%);
  }
  /* Move right */
  66.67% {
    transform: rotate(4deg) scale(0.9) translate(15%, -5%);
  }
  /* Hold right */
  95.23% {
    transform: rotate(4deg) scale(0.9) translate(15%, -5%);
  }
  /* Move front */
  100% {
    transform: translateZ(1px);
  }
}

/* Keep the existing delays for 9 cards */
.agent-card:nth-child(9) {
  animation-delay: -28s;
}
.agent-card:nth-child(8) {
  animation-delay: -24.5s;
}
.agent-card:nth-child(7) {
  animation-delay: -21s;
}
.agent-card:nth-child(6) {
  animation-delay: -17.5s;
}
.agent-card:nth-child(5) {
  animation-delay: -14s;
}
.agent-card:nth-child(4) {
  animation-delay: -10.5s;
}
.agent-card:nth-child(3) {
  animation-delay: -7s;
}
.agent-card:nth-child(2) {
  animation-delay: -3.5s;
}
.agent-card:nth-child(1) {
  animation-delay: 0;
}




/* Service Cards */
.service-card {
    background: #3d54e0;
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 1.5rem;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.25);
}

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

.service-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Stats Section */
.stats-section {
    background: #3d54e0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(99,102,241,0.1)"/></svg>');
    background-size: 50px 50px;
    opacity: 0.5;
}

.stat-card {
    background: #ffffff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 1.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-4px);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Contact Section */
.contact-section {
    background: #eefb7b;
}

/* Footer */
.footer {
    background: #ffffff;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}
.footer-heading {
    color: #3d54e0;
}
.footer-link {
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-light);
    transform: translateX(4px);
}

/* Dropdown Styles - Dark Theme */
.dropdown-content {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}

.dropdown-item {
    color: var(--text-secondary) !important;
    transition: all 0.3s ease !important;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    color: var(--text-primary) !important;
}

.nested-dropdown-content {
    background: rgba(15, 23, 42, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.2) !important;
}

/* Geometric Decorations */
.geo-decoration {
    position: absolute;
    pointer-events: none;
    opacity: 0.1;
}

.geo-circle {
    width: 400px;
    height: 400px;
    border: 1px solid var(--primary);
    border-radius: 50%;
}

.geo-ring {
    width: 300px;
    height: 300px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: spin-slow 30s linear infinite reverse;
}


/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background: rgba(2, 6, 23, 0.98);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(99, 102, 241, 0.2);
    transition: right 0.3s ease;
    z-index: 100;
    padding: 2rem;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 0.5rem;
}

.mobile-submenu.open {
    max-height: 500px;
    /* Arbitrary large number */
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.mobile-menu-link {
    cursor: pointer;
}

.chevron-icon {
    transition: transform 0.3s ease;
}

.chevron-icon.rotate {
    transform: rotate(180deg);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 101;
}

.hamburger span {
    width: 28px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .desktop-nav {
        display: none;
    }
}

/* Responsive */
@media (max-width: 1023px) {
    .stat-number {
        font-size: 2.5rem;
    }
}