/* Main CSS with updated design and mobile-first approach */
:root {
  --primary-color: #4361ee;
  --secondary-color: #7209b7;
  --accent-color: #4cc9f0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --transition-speed: 0.3s;
  --nav-text-color: #7593d1; /* rgb(117, 147, 209) */
  --nav-text-hover: #4361ee;
}

/* Base styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  overflow-x: hidden;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4efe9 100%);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

@keyframes float-short {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes shine {
  to {
    left: 100%;
    transform: translateX(100%);
  }
}

@keyframes slideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes spin {
    to { transform: rotate(180deg); }
}

/* Navigation styles */
.nav-item {
  display: block;
  white-space: nowrap;
  position: relative;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--nav-text-color);
  transition: all var(--transition-speed) ease;
}

.nav-item:hover {
  transform: translateY(-2px);
  color: var(--nav-text-hover);
  background-color: rgba(67, 97, 238, 0.05);
}

.nav-item::after {
  content: '';
  position: absolute;
  width: 70%;
  height: 2px;
  bottom: -3px;
  left: 15%;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transition: transform var(--transition-speed) ease;
}

.nav-item:hover::after {
  transform: scaleX(1);
}

.active-nav {
  color: var(--primary-color);
  font-weight: 600;
}

.active-nav::after {
  transform: scaleX(1);
}

/* Desktop Dropdown Content */
.dropdown-content {
  display: none;
  position: fixed;
  transform: translateX(-50%);
  width: 90vw;
  max-width: 200px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  padding: 10px;
  z-index: 100;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  margin-top: 20px;
  top: 70px;
  border: 1px solid rgba(67, 97, 238, 0.1);
}

.dropdown.active .dropdown-content {
  display: block;
}

/* Mobile Menu Container */
#mobile-menu {
  max-height: 80vh;
  overflow-y: auto;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.mobile-dropdown-content {
  display: none;
  position: relative;
  background-color: rgba(249, 250, 251, 0.5); /* lighter bg for nested items */
  padding-left: 15px;
  line-height: 0.75;
  border-left: 2px solid var(--primary-color);
  margin-left: 10px;
  border-radius: 4px;
}

.dropdown.active .mobile-dropdown-content {
  display: block;
}

/* Mobile Header Fix */
.header-logo {
    flex-shrink: 0;
}
.user-info {
    max-width: 10ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Hero section styles */
.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-text h1 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.hero-cta {
  position: relative;
  overflow: hidden;
}

.hero-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shine 3s infinite;
}

.hero-avatar {
  position: relative;
}

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

.avatar-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 110%;
  height: 110%;
  background: radial-gradient(
    circle at center,
    rgba(67, 97, 238, 0.2) 0%,
    rgba(114, 9, 183, 0.2) 50%,
    transparent 70%
  );
  filter: blur(20px);
  z-index: -1;
  opacity: 0.7;
}

/* Services and Cards */
.service-card {
  transition: transform var(--transition-speed) ease, 
              box-shadow var(--transition-speed) ease;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-icon {
  transition: transform var(--transition-speed) ease;
}

.service-card:hover .service-icon {
  transform: scale(1.2) rotate(5deg);
}

/* Animations and effects */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.floating {
  animation: float-short 3s ease-in-out infinite;
}

.floating-icon {
    animation: float 3s ease-in-out infinite;
}

/* Parallax effect */
.parallax {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.parallax-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Gradient buttons */
.gradient-bg {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

.contact-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.contact-button:hover:before {
    left: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-item {
    padding: 12px 16px;
  }
  
  .dropdown-content {
    position: static;
    box-shadow: none;
    display: block;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    min-width: auto;
    margin-left: 20px;
    border: none;
    backdrop-filter: none;
  }
  
  .dropdown-item {
    padding: 8px 0;
  }
  
  .hero-text h1 {
    font-size: 2.5rem;
  }
}

/* Animation classes for AOS */
.animate-slide-in-left {
  animation: slideInLeft 1s forwards;
}

.animate-slide-in-right {
  animation: slideInRight 1s forwards;
}

.animate-slide-in-up {
  animation: slideInUp 1s forwards;
}

.animate-fade-in {
  animation: fadeIn 1s forwards;
}

@keyframes slideInLeft {
  from { transform: translateX(-50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInUp {
  from { transform: translateY(50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Service items styling - Desktop */
.sdropdown {
    position: relative;
}

.dropdown-content-services {
    display: none;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    max-width: 1200px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    padding: 25px;
    z-index: 100;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
    top: 70px;
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.sdropdown.active .dropdown-content-services {
    display: grid;
    animation: fadeInDropdown 0.3s ease;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.service-item {
    display: block;
    padding: 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--dark-color);
    border: 1px solid transparent;
}

.service-item:hover {
    background: rgba(76, 201, 240, 0.05);
    border: 1px solid rgba(76, 201, 240, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.service-item::after {
    display: none;
}

.new-tag {
    background-color: var(--secondary-color);
    color: white;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    margin-left: 8px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.service-description {
    color: #4a5568;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.85;
    font-family: 'Inter', sans-serif;
}

/* Tablet styles */
@media (min-width: 768px) and (max-width: 1200px) {
    .dropdown-content-services {
        grid-template-columns: repeat(2, 1fr);
        width: 95vw;
    }
}

/* Enhanced scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(67, 97, 238, 0.5); /* Primary color slightly transparent */
    border-radius: 20px;
    transition: background 0.3s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(67, 97, 238, 0.8);
}
