/* ============================================================
   PC28 AI Predict - Shared Stylesheet
   Tailwind CSS CDN + Custom Styles
   ============================================================ */

/* ============ CSS Variables ============ */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #818cf8;
  --secondary: #06b6d4;
  --accent: #8b5cf6;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --dark: #0f172a;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --white: #ffffff;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ Scrollbar ============ */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--gray-100);
}
::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* ============ Base ============ */
html {
  scroll-behavior: smooth;
}
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--gray-800);
  background-color: var(--white);
  overflow-x: hidden;
  line-height: 1.6;
}

/* ============ Glass Navbar ============ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: var(--transition);
  backdrop-filter: blur(0px);
  background: transparent;
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-md);
  padding: 0.65rem 0;
}
.navbar .logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: var(--transition);
}
.navbar .nav-link {
  color: var(--white);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: var(--transition);
  position: relative;
}
.navbar.scrolled .nav-link {
  color: var(--gray-700);
}
.navbar .nav-link:hover {
  color: var(--primary-light);
}
.navbar.scrolled .nav-link:hover {
  color: var(--primary);
}
.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}
.navbar .nav-link:hover::after {
  width: 60%;
}
.navbar .nav-link.active {
  color: var(--primary-light) !important;
  font-weight: 600;
}
.navbar.scrolled .nav-link.active {
  color: var(--primary) !important;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 280px;
  height: 100vh;
  background: var(--white);
  box-shadow: var(--shadow-xl);
  z-index: 1100;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 2rem;
}
.mobile-menu.open {
  right: 0;
}
.mobile-menu .mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--gray-700);
  font-weight: 500;
  border-radius: 0.5rem;
  transition: var(--transition);
}
.mobile-menu .mobile-nav-link:hover {
  background: var(--gray-100);
  color: var(--primary);
}
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.mobile-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1200;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 26px;
  height: 2.5px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}
.navbar.scrolled .hamburger span {
  background: var(--gray-700);
}
.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ============ Hero Gradient ============ */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 30%, #4338ca 60%, #6366f1 100%);
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-section::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.25) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-mega-title {
  background: linear-gradient(to right, #ffffff, #c7d2fe, #e0e7ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 3s ease-in-out infinite alternate;
}
@keyframes titleGlow {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.15); }
}

/* ============ Card Hover Animations ============ */
.feature-card {
  transition: var(--transition);
  cursor: default;
}
.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}
.feature-card:hover .feature-icon {
  transform: scale(1.15) rotate(-5deg);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}
.feature-card:hover .feature-icon i {
  color: var(--white) !important;
}
.feature-icon {
  transition: var(--transition);
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
}

/* Team card */
.team-card {
  transition: var(--transition);
}
.team-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}
.team-card:hover .team-img {
  transform: scale(1.05);
}
.team-img {
  transition: transform 0.5s ease;
}

/* Testimonial card */
.testimonial-card {
  transition: var(--transition);
}
.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

/* ============ Button Effects ============ */
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.4);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.55);
}
.btn-outline {
  border: 2px solid var(--white);
  color: var(--white);
  padding: 0.75rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}
.btn-submit {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--white);
  padding: 0.85rem 2.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  transition: var(--transition);
  width: 100%;
  box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.35);
}
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.5);
}
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ============ FAQ Accordion Transitions ============ */
.faq-item {
  border: 1px solid var(--gray-200);
  border-radius: 1rem;
  overflow: hidden;
  transition: var(--transition);
  margin-bottom: 0.75rem;
}
.faq-item:hover {
  border-color: var(--primary-light);
}
.faq-question {
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: var(--gray-800);
  user-select: none;
}
.faq-question i {
  transition: transform 0.35s ease;
  color: var(--gray-400);
  font-size: 0.875rem;
}
.faq-item.active .faq-question i {
  transform: rotate(180deg);
  color: var(--primary);
}
.faq-item.active {
  border-color: var(--primary);
  box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.1);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
}
.faq-item.active .faq-answer {
  max-height: 300px;
}
.faq-answer-content {
  padding: 0 1.5rem 1.25rem;
  color: var(--gray-600);
  line-height: 1.7;
}

/* ============ Stats Counter ============ */
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============ Page Header ============ */
.page-header {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
  padding-top: 8rem;
  padding-bottom: 4rem;
  position: relative;
  overflow: hidden;
}
.page-header::before {
  content: '';
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 250px;
  height: 250px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.25) 0%, transparent 70%);
  border-radius: 50%;
}
.page-header .breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}
.page-header .breadcrumb a:hover {
  color: var(--white);
}

/* ============ Timeline ============ */
.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 2px;
}
.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 2rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.45rem;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 3px var(--primary-light);
}

/* ============ Contact Form ============ */
.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
  font-size: 0.925rem;
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-200);
  border-radius: 0.75rem;
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
  color: var(--gray-800);
}
.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}
.form-input.error {
  border-color: var(--danger);
}
.form-input.success {
  border-color: var(--success);
}
.form-error-msg {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: none;
}
.form-error-msg.visible {
  display: block;
}

/* ============ Map Placeholder ============ */
.map-placeholder {
  background: linear-gradient(135deg, var(--gray-200) 0%, var(--gray-300) 100%);
  border-radius: 1rem;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--gray-500);
  border: 2px dashed var(--gray-400);
}

/* ============ CTA Banner ============ */
.cta-banner {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 50%, #6366f1 100%);
  border-radius: 1.5rem;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

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

/* ============ Custom Animations ============ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-fade-in-up {
  animation: fadeInUp 0.7s ease forwards;
  opacity: 0;
}
.animate-fade-in-left {
  animation: fadeInLeft 0.7s ease forwards;
  opacity: 0;
}
.animate-fade-in-right {
  animation: fadeInRight 0.7s ease forwards;
  opacity: 0;
}
.animate-scale-in {
  animation: scaleIn 0.5s ease forwards;
  opacity: 0;
}
.animate-float {
  animation: float 4s ease-in-out infinite;
}

/* Intersection Observer reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger delay helpers */
.delay-100 { animation-delay: 0.1s; transition-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; transition-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; transition-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; transition-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; transition-delay: 0.5s; }

/* ============ Loading shimmer ============ */
.shimmer {
  background: linear-gradient(90deg, var(--gray-200) 0%, var(--gray-100) 50%, var(--gray-200) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ============ Value cards ============ */
.value-card {
  transition: var(--transition);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
}
.value-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}
.value-card .value-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  transition: var(--transition);
}
.value-card:hover .value-icon {
  transform: scale(1.1) rotate(-3deg);
}

/* ============ Footer ============ */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
}
.footer a {
  color: var(--gray-400);
  transition: var(--transition);
}
.footer a:hover {
  color: var(--primary-light);
}
.footer h5 {
  color: var(--white);
  font-weight: 700;
  margin-bottom: 1.25rem;
}

/* Social icon */
.social-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--gray-400);
  transition: var(--transition);
}
.social-icon:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-3px);
}

/* ============ Responsive Tweaks ============ */
@media (max-width: 1024px) {
  .hero-mega-title {
    font-size: 2.5rem !important;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  .nav-links-desktop {
    display: none !important;
  }
  .hero-mega-title {
    font-size: 2rem !important;
  }
  .hero-section {
    text-align: center;
  }
  .hero-section img {
    margin-top: 2rem;
  }
  .hero-buttons {
    justify-content: center;
  }
  .stat-number {
    font-size: 2rem;
  }
  .page-header {
    padding-top: 6rem;
    padding-bottom: 3rem;
  }
  .footer .footer-grid > div {
    margin-bottom: 2rem;
  }
}

@media (max-width: 640px) {
  .hero-mega-title {
    font-size: 1.6rem !important;
  }
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  section {
    padding: 3rem 0;
  }
}

/* ============ Back to Top ============ */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 900;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  cursor: pointer;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}
.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ============ Toast Notification ============ */
.toast {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 2000;
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  color: var(--white);
  font-weight: 500;
  box-shadow: var(--shadow-xl);
  animation: fadeInRight 0.4s ease forwards;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }

/* ============ Form loading spinner ============ */
.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============ Info sidebar list ============ */
.info-list-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-200);
}
.info-list-item:last-child {
  border-bottom: none;
}
.info-list-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.75rem;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

/* ============ Testimonial stars ============ */
.stars {
  color: var(--warning);
  font-size: 0.9rem;
  letter-spacing: 2px;
}

/* ============ Counter animation pulse ============ */
.counter-pulse {
  animation: pulse 0.5s ease;
}
