@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  
  /* Vibrant Accents */
  --accent-1: #4f46e5; /* Indigo */
  --accent-2: #ec4899; /* Pink/Magenta */
  --accent-3: #14b8a6; /* Teal */
  --accent-4: #f59e0b; /* Amber */
  
  --accent-gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --accent-gradient-alt: linear-gradient(135deg, var(--accent-3), var(--accent-4));
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.8);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 20px 40px -10px rgba(79, 70, 229, 0.15);
  --shadow-color: rgba(236, 72, 153, 0.2);
}

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

body, html {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

/* Vibrant Background Blobs */
.bg-glow {
  position: absolute;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, rgba(255, 255, 255, 0) 60%);
  top: -200px;
  left: -200px;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.bg-glow-right {
  position: absolute;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.15) 0%, rgba(255, 255, 255, 0) 60%);
  bottom: -100px;
  right: -200px;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  transition: all 0.3s ease;
}

nav.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding: 1rem 5%;
  box-shadow: var(--shadow-sm);
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-primary);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent-1);
}

/* Buttons */
.btn {
  padding: 0.85rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  display: inline-block;
}

.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 15px var(--shadow-color);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--accent-1);
  border: 2px solid var(--accent-1);
}

.btn-secondary:hover {
  background: rgba(79, 70, 229, 0.05);
  transform: translateY(-3px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8rem 5% 4rem;
  position: relative;
}

.hero-content {
  flex: 1;
  max-width: 650px;
}

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}

.hero-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.hero-image {
  flex: 1;
  position: relative;
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.video-mockup-wrapper {
  position: relative;
  width: 100%;
  max-width: 650px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 4px solid white;
  background: white;
  padding-top: 40px;
  animation: float 6s ease-in-out infinite;
}

.video-mockup-wrapper::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f56;
  box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
  z-index: 10;
}

.hero-image img, .hero-image video {
  width: 106%;
  height: auto;
  display: block;
  margin-top: -7%;
  margin-left: -3%;
  margin-bottom: -3%;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* Stats Section */
.stats {
  padding: 4rem 5%;
  display: flex;
  justify-content: space-around;
  background: white;
  box-shadow: var(--shadow-sm);
  position: relative;
  z-index: 10;
  border-radius: 24px;
  margin: -3rem 5% 4rem;
}

.stat-item {
  text-align: center;
}

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

.stat-label {
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.95rem;
}

/* Features Section */
.features {
  padding: 6rem 5%;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 5rem;
  max-width: 700px;
  margin-inline: auto;
}

.section-header h2 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.15rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
}

.feature-card {
  background: var(--bg-secondary);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.03);
}

.feature-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--accent-gradient);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-15px);
  box-shadow: var(--shadow-lg);
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-icon {
  width: 70px;
  height: 70px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(236, 72, 153, 0.1));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
  font-size: 1.8rem;
  color: var(--accent-1);
}

.feature-card h3 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

/* Platform Tour Section */
.tour-section {
  padding: 8rem 5%;
  background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.tour-block {
  display: flex;
  align-items: center;
  gap: 5rem;
  margin-bottom: 8rem;
}

.tour-block.reverse {
  flex-direction: row-reverse;
}

.tour-block.mobile-focused {
  flex-direction: column;
  align-items: stretch;
}

.tour-content {
  flex: 1;
}

.tour-content.text-center {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.tour-content h3 {
  font-size: 2.2rem;
  margin-bottom: 1.5rem;
  color: var(--accent-1);
}

.tour-content p {
  color: var(--text-secondary);
  font-size: 1.15rem;
  line-height: 1.8;
}

.tour-gallery {
  flex: 1.5;
  display: flex;
  gap: 2rem;
  justify-content: center;
}

.tour-gallery.stacked {
  flex-direction: column;
}

.tour-gallery.align-center {
  align-items: center;
}

.mt-4 {
  margin-top: 2rem;
}

.tour-img-wrap {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 4px solid white;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--bg-primary);
}

.tour-gallery.two-col {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.tour-gallery.two-col .tour-img-wrap:not(.mobile-mockup) {
  flex: 4;
  min-width: 0;
}

.tour-gallery.two-col .mobile-mockup {
  flex: 1;
  max-width: 180px;
  min-width: 0;
}

.tour-img-wrap:not(.mobile-mockup):not(.id-mockup) {
  padding-top: 40px;
  background: white;
  border: none;
}

.tour-img-wrap:not(.mobile-mockup):not(.id-mockup)::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f56;
  box-shadow: 20px 0 0 #ffbd2e, 40px 0 0 #27c93f;
  z-index: 10;
}

.tour-img-wrap:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--shadow-lg);
  z-index: 10;
}

.tour-img-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.mobile-mockup {
  max-width: 300px;
  border-radius: 30px;
  border: 12px solid #f1f5f9;
  background: white;
  transform: translateZ(0);
  box-shadow: var(--shadow-md), inset 0 0 0 2px white;
}

.id-mockup {
  max-width: 100%;
  border-radius: 12px;
}

.img-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.tour-img-wrap:hover .img-caption {
  opacity: 1;
  transform: translateY(0);
}

/* Pricing Section */
.pricing {
  padding: 8rem 5%;
  background: var(--bg-primary);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 30px;
  padding: 3.5rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
  position: relative;
  transition: transform 0.4s ease;
}

.pricing-card.popular {
  border: 2px solid var(--accent-1);
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.pricing-card.popular::before {
  content: 'Most Popular';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gradient);
  color: white;
  padding: 0.5rem 1.5rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(236, 72, 153, 0.3);
}

.pricing-card:hover {
  transform: translateY(-10px);
}

.pricing-card.popular:hover {
  transform: scale(1.05) translateY(-10px);
}

.pricing-card h1 {
  margin-bottom: 1rem;
}

.pricing-card h3 {
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 3rem;
  text-align: left;
}

.pricing-features li {
  margin-bottom: 1.2rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.05rem;
}

.pricing-features li i {
  color: var(--accent-3);
  font-size: 1.2rem;
}

/* CTA Section */
.cta-section {
  padding: 6rem 5% 8rem;
  text-align: center;
}

.cta-box {
  background: var(--accent-gradient);
  border-radius: 40px;
  padding: 6rem 3rem;
  max-width: 1000px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.3);
}

.cta-box::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 60%);
  z-index: 0;
  pointer-events: none;
}

.cta-box h2 {
  color: white;
  font-size: 3.5rem;
  position: relative;
  z-index: 1;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.2rem;
  position: relative;
  z-index: 1;
}

#demo-form {
  position: relative;
  z-index: 1;
}

.form-input {
  flex: 1;
  padding: 1.2rem 1.5rem;
  border-radius: 50px;
  border: none;
  background: white;
  color: var(--text-primary);
  outline: none;
  font-size: 1.05rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-input::placeholder {
  color: #94a3b8;
}

/* Footer */
footer {
  background: white;
  padding: 5rem 5% 2rem;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 4rem;
  margin-bottom: 4rem;
}

.footer-col h4 {
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.85rem;
}

.footer-col ul li a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.footer-col ul li a:hover {
  color: var(--accent-1);
}

.footer-bottom {
  text-align: center;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(0,0,0,0.05);
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* Utilities for JS Animation */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Custom Features Grid */
.features-grid-8 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-box {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
  padding: 1.5rem;
  border-radius: 16px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  background: white;
}

.feature-icon-wrapper {
  background: #f3e8ff;
  color: var(--accent-1);
  min-width: 50px;
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.feature-content h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.dotted-divider {
  border-bottom: 2px dashed rgba(0,0,0,0.1);
  margin: 4rem auto;
  max-width: 1200px;
}

/* Built For Everyone Roles Grid */
.roles-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.role-box {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.role-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease;
}

.role-box:hover .role-circle {
  transform: scale(1.1);
}

.role-box h4 {
  font-size: 1.2rem;
  margin-bottom: 0.8rem;
}

.role-box p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Why Choose Shikshashila List */
.why-list-styled {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  max-width: fit-content;
  margin: 3rem auto 0;
}

.why-list-styled li {
  display: flex;
  align-items: center;
  gap: 20px;
  background: white;
  padding: 1.2rem 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 500;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0,0,0,0.05);
}

.why-list-styled li:hover {
  transform: translateX(10px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.2);
}

.why-list-styled li i {
  color: var(--accent-1);
  font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    text-align: center;
  }
  
  .tour-block {
    flex-direction: column;
    text-align: left;
    gap: 3rem;
  }
  
  .hero-content, .tour-content {
    margin-bottom: 2rem;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-content h1 {
    font-size: 3.2rem;
  }
  
  .pricing-card.popular {
    transform: none;
  }
  
  .pricing-card.popular:hover {
    transform: translateY(-10px);
  }
  
  .tour-gallery {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  
  .features-grid-8 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .roles-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }
  
  .hero {
    padding: 7rem 5% 2rem;
  }

  .tour-section {
    padding: 4rem 5%;
  }
  
  .tour-block {
    margin-bottom: 4rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
    word-wrap: break-word;
  }
  
  .stats {
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
  }
  
  .pricing-card {
    padding: 2.5rem 1.5rem;
  }
  
  .features-grid-8 {
    grid-template-columns: 1fr;
  }
  
  .roles-grid-4 {
    grid-template-columns: 1fr;
  }
  
  .why-list-styled li {
    font-size: 1rem;
    padding: 1rem 1.5rem;
  }
  
  .cta-box {
    padding: 3rem 1.5rem;
  }
  
  .cta-box h2 {
    font-size: 2.2rem;
  }
  
  #demo-form {
    flex-direction: column;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    text-align: center;
  }
  
  .footer-content {
    gap: 2.5rem;
  }
}

/* Ultimate Mobile Safety Overrides */
@media (max-width: 768px) {
  body, html {
    max-width: 100vw;
  }
  .bg-glow, .bg-glow-right {
    display: none !important; /* Hide massive absolute elements on mobile */
  }
  .pricing-grid, .features-grid {
    grid-template-columns: 1fr !important; /* Force single column on mobile */
  }
  .logo {
    font-size: 1.2rem !important;
  }
  nav .btn {
    padding: 0.6rem 1rem !important;
    font-size: 0.9rem !important;
  }
  .section-header h2 {
    font-size: 2.2rem !important;
  }
  .tour-content h3 {
    font-size: 1.8rem !important;
  }
  .hero-content p, .tour-content p {
    font-size: 1rem !important;
  }
  ul {
    font-size: 1rem !important;
  }
  .stat-number {
    font-size: 2.5rem !important;
  }
  .mobile-mockup {
    max-width: 250px !important; /* Shrink mockups to definitely fit */
  }
  .id-mockup {
    max-width: 100% !important; /* Ensure ID card shrinks */
  }
  .pricing-card {
    padding: 2rem 1.5rem !important;
  }
}

/* CRITICAL FIXES FOR REVERSE BLOCKS AND OVERFLOWING BUTTONS */
@media (max-width: 992px) {
  .tour-block, .tour-block.reverse, .tour-block.mobile-focused {
    flex-direction: column !important;
    align-items: center !important;
  }
  .tour-block.reverse .tour-content {
    text-align: left;
  }
}

@media (max-width: 768px) {
  .hero-actions {
    flex-direction: column !important;
    width: 100%;
    gap: 1rem;
  }
  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }
  
  nav {
    padding: 1rem 1rem !important; /* Smaller padding on mobile */
  }
  
  nav .logo {
    font-size: 1.1rem !important;
  }
  
  nav .btn {
    padding: 0.5rem 0.8rem !important;
    font-size: 0.8rem !important;
    white-space: nowrap;
  }
  
  /* Ensure images in tour blocks take proper width instead of being tiny */
  .tour-gallery, .tour-img-wrap, .tour-gallery img {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Except specific mockups which shouldn't be 100% width on mobile */
  .mobile-mockup {
    max-width: 200px !important;
    margin: 0 auto;
  }
  .id-mockup {
    max-width: 250px !important;
    margin: 0 auto;
  }
}
