/* Custom CSS for Vigyam Website */

/* CSS Variables for consistent theming */
:root {
  --primary-orange: #f97316;
  --primary-orange-dark: #ea580c;
  --primary-orange-light: #fed7aa;
  --gradient-light-start: #f8fafc;
  --gradient-light-end: #e2e8f0;
  --gradient-dark-start: #0f172a;
  --gradient-dark-end: #1e293b;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-pink: #ec4899;
}

/* Enhanced Hero section gradients */
.hero-gradient-light {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.hero-gradient-light::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
  z-index: 1;
}

.hero-gradient-light .container {
  position: relative;
  z-index: 2;
}

.dark .hero-gradient-dark {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  position: relative;
  overflow: hidden;
}

.dark .hero-gradient-dark::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(30, 27, 75, 0.9) 0%, rgba(49, 46, 129, 0.9) 100%);
  z-index: 1;
}

.dark .hero-gradient-dark .container {
  position: relative;
  z-index: 2;
}

/* Floating particles animation */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

/* Remove floating emoji/mirror effects in hero */
.hero-gradient-light::after,
.dark .hero-gradient-dark::after {
  content: none;
}
.hero-gradient-light::before {
  /* keep overlay only, no emoji */
}
.dark .hero-gradient-dark::before {
  /* keep overlay only, no emoji */
}

/* Enhanced card hover effects */
.card-style {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card-style::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.1), transparent);
  transition: left 0.6s ease;
}

.card-style:hover::before {
  left: 100%;
}

.card-style:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(249, 115, 22, 0.1);
}

.dark .card-style:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(249, 115, 22, 0.2);
}

/* Course card specific animations */
.course-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.dark .course-card {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.course-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

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

.course-card:hover {
  transform: translateY(-8px) scale(1.03);
}

/* Enhanced team card animations */
.team-card {
  transition: all 0.4s ease;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.dark .team-card {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.team-card:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dark .team-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.team-card img {
  transition: all 0.4s ease;
  border: 3px solid transparent;
  background: linear-gradient(45deg, var(--primary-orange), var(--accent-blue)) border-box;
  background-clip: border-box;
}

.team-card:hover img {
  transform: scale(1.1) rotate(5deg);
  border-color: var(--primary-orange);
}

/* Enhanced FAQ Accordion styling */
.faq-item {
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.faq-item:hover {
  transform: translateX(5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dark .faq-item:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.faq-question {
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.dark .faq-question {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.faq-question:hover {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
}

.dark .faq-question:hover {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
}

/* Enhanced button styles */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary::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: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(249, 115, 22, 0.3);
}

/* Enhanced form inputs */
.form-input {
  transition: all 0.3s ease;
  border: 2px solid transparent;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.dark .form-input {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.form-input:focus {
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
  transform: translateY(-2px);
}

/* Enhanced testimonials */
.testimonial-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border-left: 4px solid var(--primary-orange);
  transition: all 0.3s ease;
}

.dark .testimonial-card {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.dark .testimonial-card:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* Enhanced services section */
.service-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid transparent;
  transition: all 0.4s ease;
}

.dark .service-card {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

.service-card:hover {
  border-color: var(--primary-orange);
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dark .service-card:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Enhanced social proof section */
.social-proof-item {
  transition: all 0.3s ease;
  opacity: 0.7;
}

.social-proof-item:hover {
    opacity: 1;
  transform: scale(1.1);
  color: var(--primary-orange);
}

/* Enhanced mobile menu animation */
#mobile-menu {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: top;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.dark #mobile-menu {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

#mobile-menu.hidden {
  transform: scaleY(0) translateY(-20px);
  opacity: 0;
}

#mobile-menu:not(.hidden) {
  transform: scaleY(1) translateY(0);
  opacity: 1;
}

/* Enhanced WhatsApp button */
.whatsapp-button {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.whatsapp-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: left 0.5s ease;
}

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

.whatsapp-button:hover {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 15px 35px rgba(37, 211, 102, 0.4);
}

/* Enhanced pulse animation for WhatsApp button */
@keyframes pulse-green {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-button {
  animation: pulse-green 2s infinite;
}

.whatsapp-button:hover {
  animation: none;
}

/* Enhanced scrollbar */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 6px;
}

.dark ::-webkit-scrollbar-track {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--accent-blue) 100%);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--primary-orange-dark) 0%, var(--accent-blue) 100%);
}

/* Enhanced focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--primary-orange);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Enhanced loading animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

.loading {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Enhanced responsive typography */
@media (max-width: 640px) {
  h1 {
    font-size: 1.75rem;
  }
  
  h2 {
    font-size: 2.25rem;
  }
  
  h3 {
    font-size: 2rem;
  }
}

/* Enhanced print styles */
@media print {
  .no-print,
  header,
  footer,
  nav,
  button,
  .whatsapp-button {
    display: none !important;
  }
  
  body {
    color: black !important;
    background: white !important;
  }
  
  a {
    text-decoration: underline !important;
    color: black !important;
  }
  
  .card-style {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* Enhanced reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Enhanced high contrast mode support */
@media (prefers-contrast: high) {
  .card-style {
    border: 3px solid currentColor;
  }
  
  button,
  a {
    border: 2px solid currentColor;
  }
  
  .form-input {
    border: 2px solid currentColor;
  }
}

/* Enhanced glassmorphism effect for cards */
.glass-effect {
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass-effect {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced gradient text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Enhanced section dividers */
.section-divider {
  height: 4px;
  background: linear-gradient(90deg, var(--primary-orange) 0%, var(--accent-blue) 50%, var(--accent-purple) 100%);
  border-radius: 2px;
  margin: 2rem auto;
  width: 100px;
}

/* Enhanced contact info icons */
.contact-icon {
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--accent-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 1.5rem;
}

/* Rounded button utilities */
.btn-rounded {
  border-radius: 9999px;
}

/* Textured backgrounds (subtle noise via gradients) */
.texture-surface {
  background-image: radial-gradient(rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 6px 6px;
}

.dark .texture-surface {
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
}

/* Bubble animation background */
.bubbles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.bubbles span {
  position: absolute;
  bottom: -120px;
  display: block;
  width: 20px;
  height: 20px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  animation: rise 12s linear infinite;
  filter: blur(0.5px);
}

.dark .bubbles span {
  background: rgba(255,255,255,0.08);
}

@keyframes rise {
  0% { transform: translateY(0) scale(1); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translateY(-120vh) scale(1.2); opacity: 0; }
}

/* Variations in size/delay will be set inline via styles */

/* Sliding nav indicator */
.nav-indicator {
  position: absolute;
  bottom: 0;
  height: 3px;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--primary-orange), var(--accent-blue));
  transition: left 0.3s ease, width 0.3s ease;
}

.dark .nav-indicator {
  background: linear-gradient(90deg, var(--primary-orange-light), var(--accent-purple));
}

/* Simplified saffron-tinted navbar surface (no texture/mirror) */
.nav-surface {
  background: rgba(255,153,51,0.08);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.dark .nav-surface {
  background: rgba(17,24,39,0.78);
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

/* Rounded sliding selector behind nav items */
.nav-selector {
  position: absolute;
  /* JS sets exact top based on link position */
  height: auto;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(255, 153, 51, 0.22), rgba(255, 111, 0, 0.22));
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) inset, 0 2px 6px rgba(0,0,0,0.06);
  transition: left 220ms cubic-bezier(0.4, 0, 0.2, 1), width 220ms cubic-bezier(0.4, 0, 0.2, 1), top 220ms cubic-bezier(0.4, 0, 0.2, 1), height 220ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.dark .nav-selector {
  background: linear-gradient(135deg, rgba(255, 153, 51, 0.26), rgba(139, 92, 246, 0.16));
  box-shadow: 0 8px 20px rgba(2,6,23,0.35) inset, 0 2px 10px rgba(0,0,0,0.25);
}

/* Ensure links render above selector */
.nav-links > a {
  position: relative;
  z-index: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 9999px;
  transition: color 180ms ease, background-color 180ms ease;
}

/* Soft active color on hover */
.nav-links > a:hover {
  color: var(--primary-orange);
}

/* Sticky header shadow when scrolled */
.header-stuck {
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.dark .header-stuck {
  box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}

/* Professional typography tweaks */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: -0.02em;
}

h1 { line-height: 1.1; }
h2 { line-height: 1.15; }
h3 { line-height: 1.2; }

p { line-height: 1.7; }

.small-caps { font-variant-caps: all-small-caps; letter-spacing: 0.06em; }

/* Mobile compatibility for navbar and buttons */
@media (max-width: 767px) {
  /* Hide desktop nav selector on small screens */
  .nav-selector { display: none !important; }

  /* Larger tap targets for mobile menu links */
  #mobile-menu a {
    padding: 0.75rem 0.25rem;
    font-size: 1.05rem;
  }

  /* Slightly larger mobile hamburger touch target */
  #mobile-menu-button { padding: 0.5rem; }

  /* Make primary CTAs full-width on small screens */
  .btn-primary.btn-rounded { width: 100%; }
  .glass-effect.btn-rounded { width: 100%; }

  /* Reduce hero bubble density perception by scaling down */
  .bubbles span { filter: blur(1px); opacity: 0.85; }
}

/* Disable shiny sweep (mirror-like) effects */
.card-style::before,
.btn-primary::before {
  content: none !important;
}

/* Ensure section anchors align well under fixed header */
#services, #courses, #testimonials, #for-business, #faq, #contact {
  scroll-margin-top: 90px;
}

/* Allow slight vertical offset control for selector */
.nav-selector { --selector-offset-y: 2px; }

/* Hero background image with matrix-style animation */
.hero-image {
  position: absolute;
  inset: 0;
  background-image: url('assets/hero-matrix.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  filter: saturate(1.1) contrast(1.05) brightness(0.95);
}

/* Animated color shifting for matrix effect */
.matrix-animate {
  animation: matrixHue 12s ease-in-out infinite;
}

@keyframes matrixHue {
  0% { filter: hue-rotate(0deg) saturate(1.1) contrast(1.05) brightness(0.95); }
  50% { filter: hue-rotate(-20deg) saturate(1.2) contrast(1.1) brightness(1.0); }
  100% { filter: hue-rotate(0deg) saturate(1.1) contrast(1.05) brightness(0.95); }
}

/* Dark mode: cooler tones and a touch darker */
.dark .hero-image {
  filter: hue-rotate(-30deg) saturate(1.1) contrast(1.1) brightness(0.85);
}
.dark .matrix-animate {
  animation: matrixHueDark 12s ease-in-out infinite;
}
@keyframes matrixHueDark {
  0% { filter: hue-rotate(-30deg) saturate(1.1) contrast(1.1) brightness(0.85); }
  50% { filter: hue-rotate(-50deg) saturate(1.2) contrast(1.15) brightness(0.8); }
  100% { filter: hue-rotate(-30deg) saturate(1.1) contrast(1.1) brightness(0.85); }
}

/* Ensure hero content sits above image */
#home > .container { position: relative; z-index: 2; }

/* Calm hypnotic motion: slow zoom and pan */
.hero-calm-motion {
  animation: calmZoomPan 45s ease-in-out infinite alternate;
  transform-origin: center;
}

@keyframes calmZoomPan {
  0%   { transform: scale(1) translate3d(0, 0, 0); }
  50%  { transform: scale(1.06) translate3d(1.5%, -1.5%, 0); }
  100% { transform: scale(1.1) translate3d(-1.5%, 1.5%, 0); }
}

/* Gentle gradient shimmer overlay for soothing effect */
.hero-calm-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(1200px 600px at 20% 30%, rgba(255, 153, 51, 0.08), transparent 60%),
              radial-gradient(900px 500px at 80% 70%, rgba(59, 130, 246, 0.07), transparent 60%);
  animation: calmShimmer 20s ease-in-out infinite alternate;
}

.dark .hero-calm-overlay {
  background: radial-gradient(1200px 600px at 20% 30%, rgba(255, 153, 51, 0.06), transparent 60%),
              radial-gradient(900px 500px at 80% 70%, rgba(139, 92, 246, 0.06), transparent 60%);
}

@keyframes calmShimmer {
  0%   { opacity: 0.65; filter: blur(0px); }
  50%  { opacity: 0.8;  filter: blur(0.5px); }
  100% { opacity: 0.65; filter: blur(0px); }
}

/* Tone down matrix hue animation for peace */
.matrix-animate {
  animation-duration: 24s;
}
.dark .matrix-animate {
  animation-duration: 24s;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-calm-motion,
  .hero-calm-overlay,
  .matrix-animate { animation: none !important; }
}

/* Global smoothness */
html, body {
  transition: background-color 200ms ease, color 200ms ease;
}
img { image-rendering: -webkit-optimize-contrast; backface-visibility: hidden; transform: translateZ(0); }

/* Improve header brand hover */
header a[aria-label="VIGYAM GBK home"] span { transition: color 160ms ease; }
header a[aria-label="VIGYAM GBK home"]:hover span { color: var(--primary-orange); }

