@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
  --primary: #667eea;
  --secondary: #764ba2;
  --accent: #f093fb;
  --cyan: #4facfe;
  --dark: #0a0015;
  --purple-dark: #2d1b69;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Orbitron', 'Rajdhani', monospace, sans-serif;
  letter-spacing: 0.5px;
}

body {
  background: var(--dark);
  color: #ffffff;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
}

.abstract-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.abstract-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('abstract.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.6;
  filter: brightness(0.9) contrast(1.1);
}

.abstract-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(10, 0, 21, 0.3) 0%, 
    rgba(45, 27, 105, 0.2) 50%, 
    rgba(10, 0, 21, 0.3) 100%);
  opacity: 0.7;
}

.floating-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: rgba(240, 147, 251, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(240, 147, 251, 1);
}

.particle:nth-child(1) { left: 10%; top: 20%; }
.particle:nth-child(2) { left: 20%; top: 40%; }
.particle:nth-child(3) { left: 30%; top: 60%; }
.particle:nth-child(4) { left: 40%; top: 30%; }
.particle:nth-child(5) { left: 50%; top: 70%; }
.particle:nth-child(6) { left: 60%; top: 50%; }
.particle:nth-child(7) { left: 70%; top: 25%; }
.particle:nth-child(8) { left: 80%; top: 45%; }
.particle:nth-child(9) { left: 90%; top: 65%; }
.particle:nth-child(10) { left: 15%; top: 80%; }

.navbar {
  position: sticky;
  top: 0;
  height: 80px;
  z-index: 1000;
  background: rgba(10, 0, 21, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(240, 147, 251, 0.2);
  box-shadow: 0 4px 30px rgba(102, 126, 234, 0.1);
}

.nav-inner {
  max-width: 1200px;
  margin: auto;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-img {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(240, 147, 251, 0.5));
}

.brand-text {
  font-weight: 900;
  font-size: 22px;
  font-family: 'Orbitron', monospace;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.nav-links {
  display: flex;
  gap: 35px;
  align-items: center;
}

.nav-links a {
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Rajdhani', monospace;
  position: relative;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  border-radius: 2px;
  box-shadow: 0 0 10px var(--accent);
}

.cta {
  background: linear-gradient(135deg, var(--cyan), var(--accent));
  color: white;
  padding: 12px 24px;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.hamburger span {
  width: 26px;
  height: 3px;
  background: linear-gradient(90deg, var(--cyan), var(--accent));
  border-radius: 2px;
}

@media(max-width: 900px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(10, 0, 21, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding-top: 50px;
    border-left: 1px solid rgba(240, 147, 251, 0.2);
  }
  .nav-links.show { right: 0; }
  .nav-links a { font-size: 20px; }
}

.content {
  position: relative;
  z-index: 1;
}

.hero {
  min-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 50px;
  position: relative;
}

.hero h1 {
  font-size: 40px;
  margin-bottom: 24px;
  font-weight: 900;
  line-height: 1.2;
  font-family: 'Orbitron', monospace;
  text-shadow: 0 0 40px rgba(240, 147, 251, 0.8),
               0 2px 4px rgba(0, 0, 0, 0.8);
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero span {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(240, 147, 251, 0.6));
}

.hero p {
  opacity: 1;
  color: #ffffff;
  font-size: 22px;
  max-width: 800px;
  line-height: 1.7;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.9);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  letter-spacing: 0.8px;
}

.hero-actions {
  margin-top: 45px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 18px 40px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 17px;
  cursor: pointer;
  display: inline-block;
  position: relative;
  overflow: hidden;
  font-family: 'Rajdhani', monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: none;
}

.primary {
  background: linear-gradient(135deg, var(--cyan), var(--accent));
  color: #ffffff;
  box-shadow: 0 8px 30px rgba(240, 147, 251, 0.4);
}

.secondary {
  border: 2px solid rgba(240, 147, 251, 0.8);
  color: #ffffff;
  background: rgba(240, 147, 251, 0.05);
  backdrop-filter: blur(10px);
}

.section {
  padding: 80px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  font-size: 48px;
  margin-bottom: 24px;
  text-align: center;
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  color: #ffffff;
  text-shadow: 0 0 30px rgba(240, 147, 251, 0.8);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.section h3 {
  font-size: 36px;
  margin-bottom: 20px;
  font-family: 'Orbitron', monospace;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 20px rgba(240, 147, 251, 0.6);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.section p {
  font-size: 18px;
  line-height: 1.8;
  color: #ffffff;
  margin-bottom: 20px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.features {
  padding: 50px 40px 120px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  align-items: start;
  justify-items: center;
}

.card {
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.15), 
    rgba(240, 147, 251, 0.08));
  padding: 35px 30px;
  border-radius: 25px;
  text-align: center;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(240, 147, 251, 0.3);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 400px;
}

.card-content {
  position: relative;
  z-index: 1;
  transition: all 0.4s ease;
}

.card h3 {
  font-size: 20px;
  margin-bottom: 12px;
  font-weight: 700;
  font-family: 'Orbitron', monospace;
  color: #ffffff;
  text-shadow: 0 0 15px rgba(240, 147, 251, 0.6);
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: all 0.3s ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: none;
}

.card p {
  font-size: 15px;
  color: #ffffff;
  line-height: 1.6;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0.9;
  transition: all 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 3em;
}

.card-expanded-content {
  font-size: 14px;
  color: #ffffff;
  line-height: 1.7;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  margin-top: 0;
  transition: all 0.4s ease;
  padding: 0 10px;
}

@media(min-width: 600px) {
  .card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(240, 147, 251, 0.4);
    border-color: rgba(240, 147, 251, 0.6);
    background: linear-gradient(135deg, 
      rgba(102, 126, 234, 0.25), 
      rgba(240, 147, 251, 0.15));
    z-index: 10;
    min-height: auto;
  }

  .card:hover h3 {
    text-shadow: 0 0 25px rgba(240, 147, 251, 0.9);
    margin-bottom: 15px;
  }

  .card:hover p {
    -webkit-line-clamp: unset;
    max-height: none;
    margin-bottom: 15px;
  }

  .card:hover .card-expanded-content {
    opacity: 1;
    max-height: 500px;
    margin-top: 15px;
  }
}

@media(max-width: 768px) {
  /* Override all grid layouts for mobile - single column only */
  .features,
  .features:has(.card:nth-child(3):last-child),
  .features:has(.card:nth-child(4):last-child),
  .features:has(.card:nth-child(5):last-child),
  .features:has(.card:nth-child(6):last-child) {
    grid-template-columns: 1fr !important;
    padding: 40px 20px 80px;
    gap: 25px;
    max-width: 100%;
  }

  /* Reset all grid-column spans for mobile */
  .card,
  .features:has(.card:nth-child(5):last-child) .card:nth-child(1),
  .features:has(.card:nth-child(5):last-child) .card:nth-child(2),
  .features:has(.card:nth-child(5):last-child) .card:nth-child(3),
  .features:has(.card:nth-child(5):last-child) .card:nth-child(4),
  .features:has(.card:nth-child(5):last-child) .card:nth-child(5) {
    grid-column: auto !important;
    padding: 30px 25px;
    min-height: 160px;
    max-width: 100%;
  }

  .card h3 {
    font-size: 17px !important;
    letter-spacing: 0.8px !important;
    line-height: 1.4 !important;
    word-break: keep-all !important;
    white-space: normal !important;
  }

  .card p {
    font-size: 14px;
  }

  .card.expanded {
    background: linear-gradient(135deg, 
      rgba(102, 126, 234, 0.25), 
      rgba(240, 147, 251, 0.15));
    border-color: rgba(240, 147, 251, 0.6);
    box-shadow: 0 15px 50px rgba(240, 147, 251, 0.4);
    min-height: auto;
  }

  .card.expanded h3 {
    margin-bottom: 15px;
  }

  .card.expanded p {
    -webkit-line-clamp: unset;
    max-height: none;
    margin-bottom: 15px;
  }

  .card.expanded .card-expanded-content {
    opacity: 1;
    max-height: 500px;
    margin-top: 15px;
  }
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 30px 0;
}

.feature-list li {
  padding: 12px 0;
  font-size: 18px;
  position: relative;
  padding-left: 30px;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.8px;
}

.feature-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin: 50px 0;
}

.step {
  background: rgba(102, 126, 234, 0.1);
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(240, 147, 251, 0.3);
  backdrop-filter: blur(10px);
}

.step-number {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 15px;
}

.step h4 {
  font-size: 22px;
  margin-bottom: 10px;
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 15px rgba(240, 147, 251, 0.6);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.step p {
  font-size: 16px;
  color: #ffffff;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  margin: 60px 0;
}

@media(max-width: 768px) {
  .hero h1 {
    font-size: 32px;
    letter-spacing: 1px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    padding: 0 15px;
  }
  
  .hero p {
    font-size: 16px;
    padding: 0 20px;
    max-width: 100%;
  }
  
  .section h2 {
    font-size: 28px;
    letter-spacing: 1.5px;
    word-wrap: break-word;
    padding: 0 15px;
  }
  
  .section h3 {
    font-size: 24px;
    letter-spacing: 1px;
    word-wrap: break-word;
    padding: 0 15px;
  }
  
  /* Override all grid layouts for mobile - single column only */
  .features,
  .features:has(.card:nth-child(3):last-child),
  .features:has(.card:nth-child(4):last-child),
  .features:has(.card:nth-child(5):last-child),
  .features:has(.card:nth-child(6):last-child) {
    grid-template-columns: 1fr !important;
    padding: 40px 15px 80px !important;
    gap: 28px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Reset all grid-column spans for mobile */
  .card,
  .features .card,
  .features:has(.card:nth-child(5):last-child) .card:nth-child(1),
  .features:has(.card:nth-child(5):last-child) .card:nth-child(2),
  .features:has(.card:nth-child(5):last-child) .card:nth-child(3),
  .features:has(.card:nth-child(5):last-child) .card:nth-child(4),
  .features:has(.card:nth-child(5):last-child) .card:nth-child(5) {
    grid-column: auto !important;
    padding: 38px 28px !important;
    max-width: 100% !important;
    min-height: 160px;
  }

  .card h3 {
    font-size: 20px;
  }

  .card p {
    font-size: 14px;
  }

  .card.expanded {
    background: linear-gradient(135deg, 
      rgba(102, 126, 234, 0.25), 
      rgba(240, 147, 251, 0.15));
    border-color: rgba(240, 147, 251, 0.6);
    box-shadow: 0 15px 50px rgba(240, 147, 251, 0.4);
    min-height: auto;
  }

  .card.expanded h3 {
    margin-bottom: 15px;
  }

  .card.expanded p {
    -webkit-line-clamp: unset;
    max-height: none;
    margin-bottom: 15px;
  }

  .card.expanded .card-expanded-content {
    opacity: 1;
    max-height: 500px;
    margin-top: 15px;
  }
  
  .section {
    padding: 50px 15px;
    max-width: 100%;
  }
  
  .hero {
    padding: 60px 15px 40px;
    max-width: 100%;
  }
  
  .navbar {
    width: 100%;
  }
  
  .nav-inner {
    padding: 0 20px;
    width: 100%;
  }

  .logo-img { 
    height: 42px; 
  }
  
  .brand-text { 
    font-size: 18px; 
    letter-spacing: 1.5px; 
  }

  body {
    overflow-x: hidden;
  }
  
  * {
    max-width: 100%;
  }
}
}

@media(max-width: 480px) {
  .hero h1 {
    font-size: 28px;
    letter-spacing: 0.5px;
  }
  
  .hero p {
    font-size: 14px;
  }
  
  .card {
    padding: 25px 20px;
    min-height: 150px;
  }

  .card h3 {
    font-size: 18px;
    letter-spacing: 1px;
  }

  .card p {
    font-size: 13px;
  }

  .card-expanded-content {
    font-size: 13px;
  }
}

.back-to-home {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, var(--cyan), var(--accent));
  color: #ffffff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(240, 147, 251, 0.5);
  z-index: 999;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 2px solid rgba(240, 147, 251, 0.6);
}

.back-to-home:hover {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 12px 40px rgba(240, 147, 251, 0.7);
}

@media(max-width: 768px) {
  .back-to-home {
    width: 50px;
    height: 50px;
    font-size: 20px;
    bottom: 20px;
    right: 20px;
  }
}

@media (max-width: 900px) {
  .nav-links {
    right: -100% !important;
  }

  .nav-links.show {
    right: 0 !important;
  }
}

html, body {
  overflow-x: hidden;
  width: 100%;
}

@media(max-width: 900px) {
  .nav-links {
    position: fixed;
    top: 80px;
    right: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(10, 0, 21, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding-top: 50px;
    border-left: 1px solid rgba(240, 147, 251, 0.2);
    transition: right 0.3s ease;
    transform: translateX(0);
  }
  
  .nav-links.show {
    right: 0 !important;
  }
  
  .nav-links a {
    font-size: 20px;
  }
}

body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

@media(max-width: 768px) {
  .hero h1 {
    font-size: 32px;
    letter-spacing: 1px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    padding: 0 15px;
  }
  
  .hero p {
    font-size: 16px;
    padding: 0 20px;
    max-width: 100%;
  }
  
  .section h2 {
    font-size: 28px;
    letter-spacing: 1.5px;
    word-wrap: break-word;
    padding: 0 15px;
  }
  
  .section h3 {
    font-size: 24px;
    letter-spacing: 1px;
    word-wrap: break-word;
    padding: 0 15px;
  }
  
  .features {
    padding: 40px 15px 80px;
    gap: 28px;
    width: 100%;
  }
  
  .card {
    padding: 38px 28px;
    max-width: 100%;
  }
  
  .section {
    padding: 50px 15px;
    max-width: 100%;
  }
  
  .hero {
    padding: 60px 15px 40px;
    max-width: 100%;
  }
  
  .navbar {
    width: 100%;
  }
  
  .nav-inner {
    padding: 0 20px;
    width: 100%;
  }
}

@media(max-width: 480px) {
  .hero h1 {
    font-size: 26px;
    letter-spacing: 0.5px;
    line-height: 1.3;
  }
  
  .hero p {
    font-size: 14px;
    padding: 0 15px;
  }
  
  .brand-text {
    font-size: 16px;
    letter-spacing: 1px;
  }
  
  .logo-img {
    height: 38px;
  }
}

.content {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* FIXED: Arrow indicator with no pointer events to prevent flickering */
.card::after {
  content: '⌄';
  position: absolute;
  bottom: 15px;
  right: 20px;
  font-size: 20px;
  color: var(--accent);
  opacity: 0.5;
  transition: all 0.3s ease;
  pointer-events: none;
}

@media(min-width: 600px) {
  .card:hover::after {
    opacity: 0;
    transform: translateY(-5px);
  }
}

@media(max-width: 600px) {
  .card.expanded::after {
    transform: rotate(180deg);
    opacity: 0.8;
  }
}

/* FIXED: Better grid alignment for different card counts */

/* For 3 cards - single row of 3 */
.features:has(.card:nth-child(3):last-child) {
  grid-template-columns: repeat(3, minmax(280px, 400px));
  justify-content: center;
}

/* For 4 cards - 2x2 grid */
.features:has(.card:nth-child(4):last-child) {
  grid-template-columns: repeat(2, minmax(280px, 400px));
  justify-content: center;
}

/* For 5 cards - 3 on top, 2 centered on bottom */
.features:has(.card:nth-child(5):last-child) {
  grid-template-columns: repeat(6, 1fr);
  max-width: 1400px;
}

.features:has(.card:nth-child(5):last-child) .card:nth-child(1) {
  grid-column: 1 / 3;
}

.features:has(.card:nth-child(5):last-child) .card:nth-child(2) {
  grid-column: 3 / 5;
}

.features:has(.card:nth-child(5):last-child) .card:nth-child(3) {
  grid-column: 5 / 7;
}

.features:has(.card:nth-child(5):last-child) .card:nth-child(4) {
  grid-column: 2 / 4;
}

.features:has(.card:nth-child(5):last-child) .card:nth-child(5) {
  grid-column: 4 / 6;
}

/* For 6 cards - 3x2 grid */
.features:has(.card:nth-child(6):last-child) {
  grid-template-columns: repeat(3, minmax(280px, 400px));
  justify-content: center;
}