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

/* Enhanced animations with tweakable values */
.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}
.logo{
  
 width: 300px;
 width: 300px;
} 
.text-logo{
  margin-left: 100px;
  width: 20rem;
  width: 20rem;
  justify-content: center;
  align-items: center;
  text-align: center

}
.recommended-plans img{
  max-width: 100%;
  width: 80px;
  height: 40px;
  border-radius: 0;

 
}
@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}
/* Enhanced shake animation with improved timing */
.animate-shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90% {
    transform: translate3d(-1px, 0, 0);
  }
  
  20%, 80% {
    transform: translate3d(2px, 0, 0);
  }

  30%, 50%, 70% {
    transform: translate3d(-4px, 0, 0);
  }

  40%, 60% {
    transform: translate3d(4px, 0, 0);
  }
}

/* Enhanced hover effects for plan cards */
.plan-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: center;
}

.plan-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

.plan-card:hover .plan-header {
  background: linear-gradient(135deg, #1e3a8a, #1e40af, #3730a3);
}

/* Enhanced skeleton loading with smooth animation */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out infinite;
  border-radius: 12px;
}

@keyframes shimmer {
  0% { 
    background-position: 200% 0; 
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  100% { 
    background-position: -200% 0; 
    opacity: 1;
  }
}

/* Enhanced modal system with fluid transitions */
.modal {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  height: 100vh;
  min-width: 0;
  min-height: 0;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  z-index: 1000;
  transition: background 0.4s cubic-bezier(0.23, 1, 0.320, 1), backdrop-filter 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.modal.active {
  display: flex !important;
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(8px) !important;
  animation: modalBackdropFadeIn 0.4s cubic-bezier(0.23, 1, 0.320, 1) forwards;
}

@keyframes modalBackdropFadeIn {
  from {
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
  }
  to {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
  }
}

.modal-content {
  position: relative;
  background-color: white;
  border-radius: 20px;
  width: 90vw;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  margin: auto;
  left: 0; top: 0; right: 0; bottom: 0;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: none !important;
  opacity: 1 !important;
  transition: none;
}

@media (max-width: 768px) {
  .modal-content {
    width: 98vw;
    max-width: 99vw;
    max-height: 97vh;
    margin: 0; /* Remove margin for smaller screens */
    border-radius: 14px;
  }
}

.modal.active .modal-content {
  transform: none !important;
  opacity: 1 !important;
}

/* Enhanced modal header with gradient */
.modal-header {
  padding: 24px;
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 20px 20px 0 0;
  position: relative;
}

.modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
}

.modal-header h3 {
  font-weight: 600;
  font-size: 1.25rem;
  color: #1f2937;
  margin: 0;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 24px;
  border-top: 1px solid rgba(229, 231, 235, 0.8);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border-radius: 0 0 20px 20px;
}

/* Enhanced z-index management for modal stacking */
#customer-form-modal {
  z-index: 1100;
}

#plan-details-modal {
  z-index: 1050;
}

#loading-modal {
  z-index: 1200;
}

#success-modal {
  z-index: 1150;
}

/* Enhanced loading spinner with smooth rotation */
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  border-top-color: #3b82f6;
  animation: smoothSpin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
  position: relative;
}

.loading-spinner::after {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 4px solid transparent;
  border-top-color: rgba(59, 130, 246, 0.2);
  border-radius: 50%;
  animation: smoothSpin 2s linear infinite reverse;
}

@keyframes smoothSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Enhanced button loading states */
.loading-state {
  pointer-events: none;
  opacity: 0.8;
  position: relative;
  overflow: hidden;
}

.loading-state::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.loading-spinner-inline {
  animation: smoothSpin 1s linear infinite;
}

/* Enhanced speed indicators with glowing effect */
.speed-indicator {
  height: 8px;
  background-color: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.speed-bar {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
  border-radius: 4px;
  transition: width 2s cubic-bezier(0.23, 1, 0.320, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.speed-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  animation: speedShine 3s infinite;
}

@keyframes speedShine {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(0%); }
  100% { transform: translateX(100%); }
}

/* Enhanced error states with smooth transitions */
.error-message {
  animation: slideInError 0.5s cubic-bezier(0.23, 1, 0.320, 1);
  border-left: 4px solid #ef4444;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.05));
}

@keyframes slideInError {
  0% { 
    transform: translateX(-100%);
    opacity: 0;
  }
  60% {
    transform: translateX(10px);
    opacity: 1;
  }
  100% {
    transform: translateX(0);
  }
}

/* Enhanced invalid field styling */
.invalid-field {
  border-color: #ef4444 !important;
  box-shadow: 
    0 0 0 3px rgba(239, 68, 68, 0.1) !important,
    0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  animation: fieldErrorPulse 0.6s ease-in-out;
}

@keyframes fieldErrorPulse {
  0%, 100% { 
    transform: scale(1);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  }
  50% { 
    transform: scale(1.02);
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.15);
  }
}

.error-text {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  animation: fadeInError 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@keyframes fadeInError {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced button hover effects */
.get-plan-btn {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  transform-origin: center;
}

.get-plan-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
}

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

.get-plan-btn:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 20px 40px rgba(251, 146, 60, 0.4);
}

.get-plan-btn:active {
  transform: translateY(-2px) scale(1.02);
}

/* WhatsApp Plan Card Button Style */
.btn-whatsapp-plan {
  background: linear-gradient(90deg, #25D366 0%, #128C7E 100%);
  transition: background 0.22s cubic-bezier(0.4,0.14,0.3,1.13), transform 0.21s cubic-bezier(0.51,1.05,0.32,1.28);
  color: #fff !important;
  font-weight: 700; font-size: 1rem;
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(37,211,102,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.9em 1.3em;
  margin-top: 10px;
  margin-bottom: 0;
  width: 100%;
  cursor: pointer;
}

.btn-whatsapp-plan:hover, .btn-whatsapp-plan:focus-visible {
  background: linear-gradient(90deg, #128C7E 0%, #25D366 100%);
  color: #fff;
  transform: scale(1.03);
  box-shadow: 0 8px 28px rgba(18,140,126,0.18);
}

.btn-whatsapp-plan .fa-whatsapp {
  color: #fff;
  font-size: 1.25em;
  margin-right: 0.4em;
}

/* Enhanced scroll to top button */
#scroll-to-top {
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: none;
  box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
  position: relative;
  overflow: hidden;
}

#scroll-to-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

#scroll-to-top:hover::before {
  transform: translateX(100%);
}

#scroll-to-top:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(59, 130, 246, 0.6);
}

#scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Enhanced form styling with focus states */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 
    0 0 0 3px rgba(59, 130, 246, 0.1),
    0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
  transform: translateY(-1px);
}

/* Enhanced loading bar animation */
.loading-bar {
  height: 4px;
  background-color: #e5e7eb;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.loading-bar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, #3b82f6, #1d4ed8, #3b82f6);
  animation: loadingProgress 2.5s infinite cubic-bezier(0.23, 1, 0.320, 1);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

@keyframes loadingProgress {
  0% { 
    left: -50%; 
    opacity: 0;
    width: 30%;
  }
  50% {
    opacity: 1;
    width: 50%;
  }
  100% { 
    left: 100%; 
    opacity: 0;
    width: 30%;
  }
}

/* Enhanced filter buttons */
.filter-btn {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.filter-btn:hover::before {
  transform: translateX(100%);
}

.filter-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.filter-btn.active {
  background: linear-gradient(135deg, #3f51b5, #5c6bc0);
  color: white;
  border-color: #3f51b5;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(63, 81, 181, 0.4);
}

/* Enhanced responsive design */
@media (max-width: 768px) {
  .modal-content {
    width: 98vw;
    max-width: 99vw;
    max-height: 97vh;
    margin: 0; /* Remove margin for smaller screens */
    border-radius: 14px;
  }
  
  .modal-header, .modal-body, .modal-footer {
    padding: 20px;
  }
  
  .plan-card .plan-body {
    flex-direction: column;
  }
  
  .plan-card .plan-price {
    border-left: none;
    border-top: 1px solid #e5e7eb;
    padding-left: 0;
    padding-top: 1.5rem;
    width: 100%;
    margin-top: 1.5rem;
  }
  
  .get-plan-btn:hover {
    transform: translateY(-2px) scale(1.02);
  }
}

/* Enhanced success states */
#success-modal .modal-content {
  max-width: 400px;
  text-align: center;
}

#success-modal .fas.fa-check-circle {
  background: linear-gradient(135deg, #10b981, #059669);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.3));
  animation: successPulse 2s infinite;
}

@keyframes successPulse {
  0%, 100% { 
    transform: scale(1);
    filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.3));
  }
  50% { 
    transform: scale(1.1);
    filter: drop-shadow(0 6px 12px rgba(16, 185, 129, 0.5));
  }
}

/* Enhanced mobile menu */
#mobile-menu {
  background: linear-gradient(135deg, #1e3a8a, #312e81);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

/* Enhanced recommended plans section */
.py-12.bg-gray-100 {
  background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

#recommended-plans .bg-white {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

#recommended-plans .bg-white::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  transform: translateX(-100%);
  transition: transform 0.8s ease;
}

#recommended-plans .bg-white:hover::before {
  transform: translateX(100%);
}

#recommended-plans .bg-white:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Performance optimizations */
* {
  backface-visibility: hidden;
  perspective: 1000px;
}

.plan-card, .modal-content, .get-plan-btn {
  will-change: transform;
}

/* Reduced motion for accessibility */
@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;
  }
}