/* ============================================
   CORSAIN — Modern UX Enhancer
   Add-on to style.css — Glassmorphism, 
   advanced animations, gradient overlays
   ============================================ */

:root {
  --glass-bg: rgba(255,255,255,0.12);
  --glass-border: rgba(255,255,255,0.18);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.08);
  --gradient-primary: linear-gradient(135deg, #03163f 0%, #09225b 40%, #1a5276 100%);
  --gradient-accent: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-green: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
  --gradient-ocean: linear-gradient(135deg, #0f4c81 0%, #00b4d8 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8faff 100%);
}

/* ===== GLASSMORPHISM ===== */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.glass-dark {
  background: rgba(3,22,63,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
}
.glass-card {
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 8px 32px rgba(0,0,0,0.06);
}

/* ===== ADVANCED GRADIENTS ===== */
.gradient-hero {
  background: var(--gradient-primary);
  position: relative;
}
.gradient-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(102,126,234,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0,180,216,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.gradient-overlay {
  position: relative;
}
.gradient-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3,22,63,0.6) 0%, transparent 50%);
  pointer-events: none;
}

/* Gradient text */
.gradient-text-blue {
  background: linear-gradient(135deg, #03163f, #2980b9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-warm {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-green {
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gradient cards */
.card-gradient-primary {
  background: linear-gradient(135deg, #03163f, #1a5276);
  color: #fff;
}
.card-gradient-primary .card-title,
.card-gradient-primary h3,
.card-gradient-primary h4,
.card-gradient-primary h5 { color: #fff; }
.card-gradient-primary p { color: rgba(255,255,255,0.8); }

.card-gradient-accent {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
}
.card-gradient-accent h3,
.card-gradient-accent h4,
.card-gradient-accent h5 { color: #fff; }
.card-gradient-accent p { color: rgba(255,255,255,0.8); }

.card-gradient-warm {
  background: linear-gradient(135deg, #f093fb, #f5576c);
  color: #fff;
}
.card-gradient-warm h3,
.card-gradient-warm h4 { color: #fff; }
.card-gradient-warm p { color: rgba(255,255,255,0.8); }

/* ===== ENHANCED CARDS ===== */
.card-modern {
  border: none;
  border-radius: 16px;
  background: var(--gradient-card);
  box-shadow: 0 4px 24px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.02);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #03163f, #2980b9, #667eea);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.card-modern:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(3,22,63,0.1), 0 8px 20px rgba(0,0,0,0.04);
}
.card-modern:hover::before {
  opacity: 1;
}

/* Service card modern */
.service-card-modern {
  background: var(--gradient-card);
  border: 1px solid rgba(0,0,0,0.04);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.service-card-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, transparent 0%, rgba(102,126,234,0.03) 100%);
  pointer-events: none;
}
.service-card-modern:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(3,22,63,0.08);
  border-color: rgba(3,22,63,0.1);
}
.service-card-modern .icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #03163f, #1a5276);
  color: #fff;
  margin-bottom: 1rem;
  transition: all 0.35s ease;
}
.service-card-modern:hover .icon-circle {
  border-radius: 12px;
  transform: scale(1.05);
}

/* ===== ANIMATED HERO ===== */
.hero-animated {
  position: relative;
  overflow: hidden;
}
.hero-animated .orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.4;
  animation: orbFloat 20s ease-in-out infinite;
}
.hero-animated .orb-1 {
  width: 500px;
  height: 500px;
  background: rgba(102,126,234,0.3);
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}
.hero-animated .orb-2 {
  width: 400px;
  height: 400px;
  background: rgba(0,180,216,0.2);
  bottom: -15%;
  left: -5%;
  animation-delay: -7s;
}
.hero-animated .orb-3 {
  width: 300px;
  height: 300px;
  background: rgba(243,156,18,0.15);
  top: 30%;
  left: 40%;
  animation-delay: -14s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 30px) scale(1.02); }
}

/* ===== SHIMMER LOADING ===== */
.shimmer {
  background: linear-gradient(90deg, 
    rgba(255,255,255,0) 0%, 
    rgba(255,255,255,0.4) 50%, 
    rgba(255,255,255,0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ===== COUNTER ANIMATION ===== */
.counter-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}
.counter-animate.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== GRID PATTERN OVERLAY ===== */
.pattern-grid {
  background-image: 
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ===== FLOATING ELEMENTS ===== */
.float-element {
  animation: float 6s ease-in-out infinite;
}
.float-element-delay-1 { animation-delay: -2s; }
.float-element-delay-2 { animation-delay: -4s; }

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

/* ===== MODERN NAVIGATION ===== */
.navbar-modern .nav-link {
  position: relative;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
}
.navbar-modern .nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: linear-gradient(90deg, #fff, rgba(255,255,255,0.3));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 2px;
}
.navbar-modern .nav-link:hover::after,
.navbar-modern .nav-link.active::after {
  transform: scaleX(1);
}

/* ===== MODERN DROPDOWN ===== */
.dropdown-modern {
  border: none;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.04);
  padding: 0.5rem;
  overflow: hidden;
}
.dropdown-modern .dropdown-item {
  border-radius: 10px;
  padding: 0.55rem 1rem;
  transition: all 0.2s ease;
}
.dropdown-modern .dropdown-item:hover {
  background: linear-gradient(135deg, #f0f7ff, #f8fbff);
  transform: translateX(4px);
}

/* ===== MODERN BUTTONS ===== */
.btn-gradient {
  background: linear-gradient(135deg, #03163f, #1a5276);
  border: none;
  color: #fff;
  transition: all 0.35s ease;
}
.btn-gradient:hover {
  background: linear-gradient(135deg, #1a5276, #2980b9);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(3,22,63,0.3);
}
.btn-gradient-accent {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  color: #fff;
  transition: all 0.35s ease;
}
.btn-gradient-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(102,126,234,0.3);
  color: #fff;
}

.btn-3d {
  transform: translateY(0);
  transition: all 0.15s ease;
  box-shadow: 0 4px 0 rgba(0,0,0,0.15), 0 4px 16px rgba(0,0,0,0.1);
}
.btn-3d:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.1);
}

/* ===== PULSE DOT ===== */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27ae60;
  position: relative;
}
.pulse-dot::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: rgba(39,174,96,0.3);
  animation: pulseRing 2s ease infinite;
}
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2); opacity: 0; }
}

/* ===== SECTION DIVIDERS ===== */
.divider-wave {
  position: relative;
}
.divider-wave::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0,0 C300,100 700,0 1200,60 L1200,120 L0,120 Z' fill='%23ffffff'/%3E%3C/svg%3E");
  background-size: cover;
  background-position: center top;
}

/* ===== PRICING TOGGLE ===== */
.pricing-toggle {
  display: inline-flex;
  background: #f0f4f8;
  border-radius: 50px;
  padding: 4px;
}
.pricing-toggle .btn {
  border-radius: 50px;
  border: none;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}
.pricing-toggle .btn.active {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  color: #03163f;
}
.pricing-toggle .btn:not(.active) {
  background: transparent;
  color: #6c757d;
}

/* ===== STEP INDICATOR ===== */
.steps {
  display: flex;
  gap: 0;
  counter-reset: step;
}
.step-item {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 1rem;
}
.step-item::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: #e9ecef;
  z-index: 0;
}
.step-item:last-child::before { display: none; }
.step-item.completed::before { background: linear-gradient(90deg, #03163f, #1a5276); }
.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: #e9ecef;
  color: #6c757d;
  position: relative;
  z-index: 1;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}
.step-item.active .step-number {
  background: #03163f;
  color: #fff;
  box-shadow: 0 4px 12px rgba(3,22,63,0.3);
}
.step-item.completed .step-number {
  background: #27ae60;
  color: #fff;
}

/* ===== NOTIFICATION BELL ANIMATION ===== */
.notification-bell {
  position: relative;
  animation: bellRing 2s ease infinite;
}
@keyframes bellRing {
  0%, 100% { transform: rotate(0); }
  10% { transform: rotate(12deg); }
  20% { transform: rotate(-12deg); }
  30% { transform: rotate(6deg); }
  40% { transform: rotate(-6deg); }
  50%, 100% { transform: rotate(0); }
}

/* ===== SIDEBAR MODERN ===== */
.sidebar-modern {
  background: linear-gradient(180deg, #212529 0%, #1a1e21 100%);
  position: relative;
}
.sidebar-modern .nav-link {
  border-radius: 10px;
  margin: 2px 6px;
  transition: all 0.2s ease;
}
.sidebar-modern .nav-link:hover {
  background: rgba(255,255,255,0.06);
}
.sidebar-modern .nav-link.active {
  background: linear-gradient(135deg, rgba(3,22,63,0.8), rgba(26,82,118,0.6));
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ===== AOS OVERRIDES ===== */
[data-aos].aos-animate {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== TYPOGRAPHY ENHANCEMENTS ===== */
.text-balance {
  text-wrap: balance;
}
.leading-relaxed {
  line-height: 1.8;
}
.tracking-wide {
  letter-spacing: 0.02em;
}

/* ===== HOVER UNDERLINE ANIMATION ===== */
.hover-underline {
  display: inline-block;
  position: relative;
}
.hover-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-underline:hover::after {
  width: 100%;
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 575.98px) {
  .steps { flex-direction: column; gap: 0.5rem; }
  .step-item::before { display: none; }
  .gradient-text-blue,
  .gradient-text-warm,
  .gradient-text-green { font-size: 0.9em; }
}

/* ===== PAGE TRANSITIONS ===== */
.page-enter {
  animation: pageEnter 0.3s ease both;
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== COUNTER UP ANIMATION ===== */
@keyframes countUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.count-up {
  animation: countUp 0.6s ease forwards;
}

/* ===== MODERN CARD GRID LAYOUT ===== */
.card-grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ===== IMAGE OVERLAY EFFECTS ===== */
.img-overlay-gradient {
  position: relative;
}
.img-overlay-gradient::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(3,22,63,0.7) 0%, transparent 60%);
  border-radius: inherit;
}
.img-overlay-gradient > * {
  position: relative;
  z-index: 1;
}

/* ===== SCROLL-BASED REVEAL ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease infinite;
  border-radius: 8px;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== TOAST NOTIFICATION ===== */
.toast-modern {
  border: none;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  backdrop-filter: blur(12px);
}
.toast-modern .toast-header {
  background: transparent;
  border: none;
}

/* ===== CHATBOT ENHANCEMENTS ===== */
.chatbot-widget.modern {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.1);
}
.chatbot-widget.modern .chatbot-header {
  background: linear-gradient(135deg, #03163f, #1a5276);
  padding: 16px 20px;
}
.chatbot-widget.modern .chatbot-messages {
  background: #f8faff;
}

/* ===== STAT CARD WITH ICON BACKGROUND ===== */
.stat-card-icon-bg {
  position: relative;
  overflow: hidden;
}
.stat-card-icon-bg .icon-bg {
  position: absolute;
  right: -10px;
  bottom: -10px;
  font-size: 5rem;
  opacity: 0.06;
  pointer-events: none;
  line-height: 1;
}

/* ===== BORDER GRADIENT EFFECT ===== */
.border-gradient {
  border: 2px solid transparent;
  background-clip: padding-box;
  position: relative;
}
.border-gradient::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg, #03163f, #667eea, #2980b9);
  z-index: -1;
}
