/* CSS Custom Properties for Theme System */
:root {
  /* Light Theme Colors - Clean, Professional, Airy */
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --bg-card: #ffffff;
  --bg-header: rgba(255, 255, 255, 0.95);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;

  --border-primary: #e2e8f0;
  --border-secondary: #cbd5e1;

  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-card-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

  --gradient-overlay: linear-gradient(to top, rgba(255, 255, 255, 1), transparent);
  --gradient-image: linear-gradient(to top, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4), transparent);

  --hero-gradient: radial-gradient(circle at top right, rgba(108, 181, 228, 0.08), transparent 50%),
    radial-gradient(circle at bottom left, rgba(46, 115, 181, 0.08), transparent 60%);
}

/* Dark Theme Colors - Deep, Rich, Sophisticated */
.dark {
  --bg-primary: #0a0f1e;
  --bg-secondary: #1a202c;
  --bg-tertiary: #1a1f2e;
  --bg-card: #1a1f2e;
  --bg-header: rgba(10, 15, 30, 0.85);

  --text-primary: #ffffff;
  --text-secondary: #ffffff;
  --text-tertiary: #e5e7eb;
  --text-muted: #d1d5db;

  --border-primary: #2d3748;
  --border-secondary: #4a5568;

  --shadow-card: 0 0 0 transparent;
  --shadow-card-hover: 0 0 0 transparent;

  --gradient-overlay: linear-gradient(to top, rgba(10, 15, 30, 1), transparent);
  --gradient-image: linear-gradient(to top, rgba(10, 15, 30, 0.9), rgba(10, 15, 30, 0.4), transparent);

  --hero-gradient: radial-gradient(circle at top right, rgba(46, 115, 181, 0.2), transparent 40%),
    radial-gradient(circle at bottom left, rgba(108, 181, 228, 0.2), transparent 50%);
}

/* Base Styles */
html {
  scroll-behavior: smooth;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
}

body {
  font-family: 'Helvetica', Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  overscroll-behavior: none;
  overscroll-behavior-y: none;
}

/* Prevent header bounce on scroll */
header {
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* All headings use bold Helvetica */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Helvetica', Arial, sans-serif;
  font-weight: 700;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(to right, #6cb5e4, #2e73b5);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Animated gradient text */
.gradient-text-animated {
  background: linear-gradient(135deg, #6cb5e4 0%, #2e73b5 50%, #1d3d68 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
  padding-bottom: 0.15em;
  display: inline-block;
}

/* Rotating text animation */
#rotating-question {
  margin-bottom: 0.25rem;
}

#rotating-answer {
  display: inline-block;
  transition: opacity 0.5s ease-in-out;
}

#rotating-answer.fade-out {
  opacity: 0;
}

#rotating-answer.fade-in {
  opacity: 1;
}

/* Research Carousel */
.research-carousel-wrapper {
  position: relative;
  padding: 0 3rem 1rem 3rem; /* Added bottom padding */
  overflow-x: hidden; /* Hide horizontal overflow only */
  overflow-y: clip; /* Clip vertical overflow without scrollbar */
}

.research-carousel {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.research-carousel-item {
  min-height: 200px;
  width: calc(50% - 0.5rem); /* Show 2 cards at a time with gap */
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .research-carousel-item {
    width: calc(50% - 0.5rem);
  }
}

.research-carousel-btn {
  opacity: 1;
  border: 2px solid var(--border-primary);
  background: var(--bg-card);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.research-carousel-btn:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
  border-color: #6cb5e4;
  box-shadow: 0 10px 15px -3px rgba(108, 181, 228, 0.3), 0 4px 6px -2px rgba(108, 181, 228, 0.2);
}

.research-carousel-btn svg {
  color: var(--text-primary);
}

.research-carousel-prev:hover {
  transform: translateY(-50%) translateX(-4px) scale(1.1);
}

.research-carousel-next:hover {
  transform: translateY(-50%) translateX(4px) scale(1.1);
}

.research-dot {
  cursor: pointer;
}

.research-dot.active {
  background: linear-gradient(135deg, #6cb5e4, #2e73b5);
  width: 2.5rem;
}

.research-dot:hover {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .research-carousel-wrapper {
    padding: 0 2.5rem;
  }
  
  .research-carousel-item {
    width: 100%; /* Show 1 card at a time on mobile */
  }
  
  .research-carousel-btn {
    padding: 0.5rem;
  }
  
  .research-carousel-btn svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

/* Hero animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.animate-fade-in-down {
  animation: fadeInDown 0.8s ease-out;
}

.animate-fade-in {
  animation: fadeIn 1s ease-out 0.2s both;
}

.animate-fade-in-up {
  animation: fadeInUp 1s ease-out 0.4s both;
}

/* Hero badge */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(108, 181, 228, 0.1), rgba(46, 115, 181, 0.1));
  border: 1px solid rgba(46, 115, 181, 0.3);
  backdrop-filter: blur(10px);
  color: #2e73b5;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark .hero-badge {
  background: linear-gradient(135deg, rgba(108, 181, 228, 0.15), rgba(46, 115, 181, 0.15));
  border-color: rgba(108, 181, 228, 0.4);
  color: #6cb5e4;
}

/* Hero dot pattern texture */
.hero-dots {
  background-image: radial-gradient(circle, rgba(46, 115, 181, 0.15) 1px, transparent 1px);
  background-size: 20px 20px;
  animation: dotMove 20s linear infinite;
}

.dark .hero-dots {
  background-image: radial-gradient(circle, rgba(108, 181, 228, 0.2) 1px, transparent 1px);
}

@keyframes dotMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 20px 20px;
  }
}

/* Floating circles in hero */
.hero-circle {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(108, 181, 228, 0.1), rgba(46, 115, 181, 0.1));
  filter: blur(60px);
  animation: float 20s ease-in-out infinite;
}

.hero-circle-1 {
  width: 400px;
  height: 400px;
  top: -100px;
  left: -100px;
  animation-delay: 0s;
}

.hero-circle-2 {
  width: 300px;
  height: 300px;
  top: 50%;
  right: -50px;
  animation-delay: 5s;
}

.hero-circle-3 {
  width: 350px;
  height: 350px;
  bottom: -100px;
  left: 50%;
  animation-delay: 10s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -30px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

/* Hero Background with Animated Gradient */
.hero-bg {
  background: linear-gradient(-45deg,
      rgba(108, 181, 228, 0.05),
      rgba(46, 115, 181, 0.06),
      rgba(29, 61, 104, 0.04),
      rgba(108, 181, 228, 0.07),
      rgba(46, 115, 181, 0.04));
  background-size: 400% 400%;
  animation: gradientShift 30s ease-in-out infinite;
}

/* Fixed height for hero section to prevent jumping */
.hero-section {
  min-height: 700px;
}

@media (min-width: 768px) {
  .hero-section {
    min-height: 800px;
  }
}

.dark .hero-bg {
  background: linear-gradient(-45deg,
      rgba(46, 115, 181, 0.15),
      rgba(108, 181, 228, 0.18),
      rgba(29, 61, 104, 0.12),
      rgba(46, 115, 181, 0.2),
      rgba(108, 181, 228, 0.15));
  background-size: 400% 400%;
  animation: gradientShift 30s ease-in-out infinite;
}

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

  25% {
    background-position: 50% 75%;
  }

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

  75% {
    background-position: 50% 25%;
  }

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

/* Header */
header {
  background-color: var(--bg-header) !important;
  border-color: var(--border-primary) !important;
  backdrop-filter: blur(16px);
  font-size: 1rem !important;
}

header * {
  font-size: inherit !important;
}

/* Fix tablet breakpoint (768px-1023px) spacing issues */
@media (min-width: 768px) and (max-width: 1023px) {
  header .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  header img {
    height: 1.5rem !important;
  }

  nav.space-x-8 {
    gap: 0.75rem !important;
  }

  nav a {
    font-size: 0.8rem !important;
    padding: 0.25rem 0.5rem !important;
  }

  /* Hide contact and signup buttons on tablet to save space */
  #contact-btn,
  #signup-btn {
    display: none !important;
  }

  /* Adjust controls spacing */
  header .flex.items-center.gap-4 {
    gap: 0.75rem !important;
  }
}

/* Navigation */
nav a {
  color: var(--text-tertiary) !important;
  transition: color 0.3s ease;
  position: relative;
}

nav a:hover {
  color: var(--text-primary) !important;
}

.dark nav a:hover {
  color: #60a5fa !important;
}

/* Sections with Animated Backgrounds */
.hero-section,
.bg-white.dark\:bg-gray-950 {
  position: relative;
  background-color: var(--bg-primary) !important;
}

/* Add gradient fade at bottom of hero section */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.08) 100%);
  pointer-events: none;
  z-index: 10;
}

.dark .hero-section::after {
  background: linear-gradient(to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.4) 100%);
}

.features-section,
.bg-gray-50.dark\:bg-gray-900\/50 {
  position: relative;
  background-color: var(--bg-secondary) !important;
  overflow: hidden;
}

/* Animated gradient background */
.features-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg,
      rgba(108, 181, 228, 0.04),
      rgba(29, 61, 104, 0.02),
      transparent 50%,
      rgba(46, 115, 181, 0.04),
      rgba(108, 181, 228, 0.03));
  background-size: 300% 300%;
  animation: gradientFlow 40s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.dark .features-section::before {
  background: linear-gradient(135deg,
      rgba(108, 181, 228, 0.1),
      rgba(29, 61, 104, 0.06),
      transparent 50%,
      rgba(46, 115, 181, 0.1),
      rgba(108, 181, 228, 0.08));
  background-size: 300% 300%;
}

@keyframes gradientFlow {

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

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

/* Gradient fades for features section */
.features-section>.container {
  position: relative;
  z-index: 20;
}

.features-section::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.08) 0%,
      transparent 100%);
  pointer-events: none;
  z-index: 10;
}

.dark .features-section::after {
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.4) 0%,
      transparent 100%);
}

.about-section {
  position: relative;
  background-color: var(--bg-primary) !important;
  overflow: hidden;
}

.about-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 20% 50%,
      rgba(46, 115, 181, 0.06),
      rgba(108, 181, 228, 0.03),
      transparent 60%);
  animation: pulseGlow 25s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.dark .about-section::before {
  background: radial-gradient(ellipse at 20% 50%,
      rgba(46, 115, 181, 0.18),
      rgba(108, 181, 228, 0.1),
      transparent 60%);
}

@keyframes pulseGlow {

  0%,
  100% {
    opacity: 0.6;
    transform: scale(1) translateX(0);
  }

  33% {
    opacity: 0.9;
    transform: scale(1.15) translateX(5%);
  }

  66% {
    opacity: 0.7;
    transform: scale(1.05) translateX(-3%);
  }
}

/* Top gradient fade */
.about-section::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.08) 0%,
      transparent 100%);
  pointer-events: none;
  z-index: 10;
  display: none;
}

.dark .about-section::after {
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.4) 0%,
      transparent 100%);
}

.about-section>.container {
  position: relative;
  z-index: 20;
}

/* Section 5 mobile fixes */
@media (max-width: 1023px) {
  #research .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  #research h2,
  #research p {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  #research h2 {
    margin-top: 0;
  }
}

.clients-section {
  position: relative;
  background-color: var(--bg-secondary) !important;
  overflow: hidden;
}

.clients-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg,
      transparent 30%,
      rgba(108, 181, 228, 0.04),
      rgba(29, 61, 104, 0.03),
      transparent 70%);
  background-size: 300% 300%;
  animation: gradientSlide 35s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.dark .clients-section::before {
  background: linear-gradient(45deg,
      transparent 30%,
      rgba(108, 181, 228, 0.1),
      rgba(29, 61, 104, 0.08),
      transparent 70%);
  background-size: 300% 300%;
}

@keyframes gradientSlide {

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

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

/* Top gradient fade */
.clients-section::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.08) 0%,
      transparent 100%);
  pointer-events: none;
  z-index: 10;
}

.dark .clients-section::after {
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.4) 0%,
      transparent 100%);
}

.clients-section>.container {
  position: relative;
  z-index: 20;
}

.connect-section {
  position: relative;
  background-color: var(--bg-primary) !important;
  overflow: hidden;
}

.connect-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 80% 50%,
      rgba(108, 181, 228, 0.06),
      rgba(46, 115, 181, 0.03),
      transparent 60%);
  animation: pulseGlow 25s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.dark .connect-section::before {
  background: radial-gradient(ellipse at 80% 50%,
      rgba(108, 181, 228, 0.15),
      rgba(46, 115, 181, 0.1),
      transparent 60%);
}

/* Top gradient fade */
.connect-section::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 200px;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.08) 0%,
      transparent 100%);
  pointer-events: none;
  z-index: 10;
}

.dark .connect-section::after {
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.4) 0%,
      transparent 100%);
}

.connect-section>.container {
  position: relative;
  z-index: 20;
}

.footer-section,
.bg-gray-100.dark\:bg-gray-900 {
  background-color: var(--bg-tertiary) !important;
  border-color: var(--border-primary) !important;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6,
.text-gray-900,
.dark .dark\:text-white {
  color: var(--text-primary) !important;
  font-weight: 600;
}

p,
.text-gray-600,
.dark .dark\:text-gray-400,
.text-gray-700,
.dark .dark\:text-gray-300 {
  color: var(--text-secondary) !important;
  line-height: 1.7;
}

.text-gray-500,
.dark .dark\:text-gray-400 {
  color: var(--text-tertiary) !important;
}

/* Cards */
.card-glow,
.bg-white.dark\:bg-gray-900 {
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: var(--bg-card) !important;
  box-shadow: var(--shadow-card);
}

.card-glow:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-4px);
}

.card-glow:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background: linear-gradient(135deg, rgba(108, 181, 228, 0.5), rgba(46, 115, 181, 0.5)) border-box;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: destination-out;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.dark .card-glow:hover:before {
  opacity: 0.6;
}

.card-glow {
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.card-glow:hover {
  border-color: var(--border-secondary);
}

.card-glow h3 {
  color: var(--text-primary) !important;
}

.card-glow p {
  color: var(--text-secondary) !important;
}

/* Buttons */
.btn-gradient {
  background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: 200% auto;
  transition: background-position 0.4s ease;
}

.btn-gradient:hover {
  background-position: right center;
}

/* Theme Toggle */
#theme-toggle {
  color: var(--text-tertiary) !important;
}

#theme-toggle:hover {
  background-color: var(--bg-secondary) !important;
}

/* Mobile Menu */
.md\:hidden button {
  color: var(--text-tertiary) !important;
}

/* Footer */
footer h4 {
  color: var(--text-primary) !important;
  font-weight: 600;
}

footer a {
  color: var(--text-tertiary) !important;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--text-primary) !important;
}

.dark footer a:hover {
  color: #60a5fa !important;
}

footer .text-gray-500 {
  color: var(--text-muted) !important;
}

footer svg {
  transition: transform 0.2s ease;
}

footer a:hover svg {
  transform: translateY(-2px);
}

/* Research Items */
.research-item {
  background-color: var(--bg-card);
  transition: all 0.3s ease;
}

.research-item:hover {
  background-color: var(--bg-secondary);
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(46, 115, 181, 0.15);
}

.dark .research-item:hover {
  box-shadow: 0 4px 12px rgba(46, 115, 181, 0.25);
}

/* Logo switching */
html:not(.dark) img[src*="Light"] {
  display: block !important;
}

html:not(.dark) img[src*="Dark"] {
  display: none !important;
}

.dark img[src*="Light"] {
  display: none !important;
}

.dark img[src*="Dark"] {
  display: block !important;
}

/* Gradients and Overlays */
.bg-gradient-to-t {
  background-image: var(--gradient-overlay) !important;
}

.absolute.inset-0.rounded-lg {
  background-image: var(--gradient-image) !important;
}

/* Client logos */
.opacity-60 {
  opacity: 0.6;
}

.dark .opacity-60 {
  opacity: 0.4;
}

.opacity-60:hover {
  opacity: 1 !important;
}

/* Case Study Cards */
.case-study-card {
  transition: all 0.3s ease;
}

.case-study-card:hover {
  transform: translateY(-4px);
}

.case-study-card:hover .flex svg {
  transform: translateX(4px);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-card);
  border-radius: 1rem;
  max-width: 48rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: 2.5rem;
}

@media (max-width: 768px) {
  .modal-body {
    padding: 1.5rem;
  }

  .modal-close {
    top: 1rem;
    right: 1rem;
  }
}

/* Modal scrollbar styling */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 0 1rem 1rem 0;
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}


/* Case Study Cards */
.case-study-card {
  transition: all 0.3s ease;
}

.case-study-card:hover {
  transform: translateY(-4px);
}

.case-study-card:hover .flex svg {
  transform: translateX(4px);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-card);
  border-radius: 1rem;
  max-width: 48rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: 2.5rem;
}

@media (max-width: 768px) {
  .modal-body {
    padding: 1.5rem;
  }

  .modal-close {
    top: 1rem;
    right: 1rem;
  }
}

/* Modal scrollbar styling */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 0 1rem 1rem 0;
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* Case Study Cards */
.case-study-card {
  transition: all 0.3s ease;
}

.case-study-card:hover {
  transform: translateY(-4px);
}

.case-study-card:hover .flex svg {
  transform: translateX(4px);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background-color: var(--bg-card);
  border-radius: 1rem;
  max-width: 48rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 10;
}

.modal-close:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: 2.5rem;
}

@media (max-width: 768px) {
  .modal-body {
    padding: 1.5rem;
  }

  .modal-close {
    top: 1rem;
    right: 1rem;
  }
}

/* Modal scrollbar styling */
.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 0 1rem 1rem 0;
}

.modal-content::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

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

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

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Elements start hidden and animate in when visible */
.card-glow,
.research-item,
.case-study-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
    transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-glow.visible,
.research-item.visible,
.case-study-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth transitions for all interactive elements */
a,
button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* User Menu Dropdown */
.user-menu {
  position: fixed;
  top: 70px;
  right: 1rem;
  width: 240px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.dark .user-menu {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.user-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-content {
  position: relative;
}

.user-menu-link {
  display: block;
  padding: 0.75rem 1rem;
  transition: all 0.2s ease;
  font-size: 0.95rem;
}

.user-menu-link:hover {
  background-color: var(--bg-secondary);
}

/* User menu overlay */
.user-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: transparent;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 70px;
  right: 1rem;
  width: 280px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: 1rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.dark .mobile-menu {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-menu-content {
  position: relative;
  padding: 0.75rem;
}

.mobile-menu-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-secondary);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-tertiary);
  z-index: 10;
}

.mobile-menu-close:hover {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
}

.mobile-menu-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.mobile-menu-link:hover {
  background-color: var(--bg-secondary);
}

.mobile-menu-cta {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

@media (min-width: 768px) {
  .mobile-menu {
    display: none;
  }

  .mobile-menu-overlay {
    display: none;
  }
}
/* T
ry It Out CTA Animations */
@keyframes blob {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.animate-blob {
  animation: blob 7s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}


/* Force input text visibility in modals - CRITICAL FIX */
#login-modal input,
#signup-modal input,
#contact-modal input,
#login-modal textarea,
#signup-modal textarea,
#contact-modal textarea {
  background-color: #f9fafb !important;
  color: #111827 !important;
  -webkit-text-fill-color: #111827 !important;
}

.dark #login-modal input,
.dark #signup-modal input,
.dark #contact-modal input,
.dark #login-modal textarea,
.dark #signup-modal textarea,
.dark #contact-modal textarea {
  background-color: #1f2937 !important;
  color: #f3f4f6 !important;
  -webkit-text-fill-color: #f3f4f6 !important;
}

/* Placeholder visibility - faded appearance */
#login-modal input::placeholder,
#signup-modal input::placeholder,
#contact-modal input::placeholder,
#login-modal textarea::placeholder,
#signup-modal textarea::placeholder,
#contact-modal textarea::placeholder {
  color: #9ca3af !important;
  opacity: 0.7 !important;
  font-style: normal !important;
}

.dark #login-modal input::placeholder,
.dark #signup-modal input::placeholder,
.dark #contact-modal input::placeholder,
.dark #login-modal textarea::placeholder,
.dark #signup-modal textarea::placeholder,
.dark #contact-modal textarea::placeholder {
  color: #6b7280 !important;
  opacity: 0.6 !important;
  font-style: normal !important;
}

/* Mobile modal fix - prevent close button overlapping title */
@media (max-width: 768px) {
  .modal-body {
    padding-top: 3.5rem;
  }
}

/* Ensure modal width is consistent across all pages */
.modal-content {
  max-width: 48rem !important;
  width: 100% !important;
}
