/**
 * EngliSure - Smooth Transitions CSS
 * Adds smooth animations and transitions across the entire site
 */



/* ==========================================
   GLOBAL SMOOTH TRANSITIONS
   ========================================== */

/* All links and buttons */
a, button {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

/* All interactive elements */
input, textarea, select {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

/* Hover effects for links - subtle lift only */
a:hover {
  transform: translateY(-1px);
}

/* Button hover effects */
button:not(.no-transition):hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Input focus effects - subtle scale only */
input:focus, textarea:focus, select:focus {
  transform: scale(1.01);
}

/* ==========================================
   CARD AND CONTAINER ANIMATIONS
   ========================================== */

/* Cards and containers with shadow */
.shadow, .shadow-lg, .shadow-2xl, .shadow-xl {
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

.shadow:hover, .shadow-lg:hover, .shadow-2xl:hover, .shadow-xl:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Rounded containers - ONLY transform */
.rounded, .rounded-lg {
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

/* ==========================================
   MENU AND DROPDOWN ANIMATIONS
   ========================================== */

/* Dropdown menus */
[id*="menu"], [class*="dropdown"] {
  transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

/* ==========================================
   PAGE LOAD FADE-IN ANIMATION
   ========================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Apply fade-in to main content areas */
body > main,
body > header,
body > footer {
  animation: fadeIn 0.5s ease-in-out;
}

/* Stagger animations for multiple elements */
.stagger-animation > * {
  opacity: 0;
  animation: fadeInUp 0.6s ease-in-out forwards;
}

.stagger-animation > *:nth-child(1) { animation-delay: 0.1s; }
.stagger-animation > *:nth-child(2) { animation-delay: 0.2s; }
.stagger-animation > *:nth-child(3) { animation-delay: 0.3s; }
.stagger-animation > *:nth-child(4) { animation-delay: 0.4s; }
.stagger-animation > *:nth-child(5) { animation-delay: 0.5s; }

/* ==========================================
   IMAGE TRANSITIONS
   ========================================== */

img {
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

img:hover {
  transform: scale(1.02); /* Reduced from 1.05 to be more subtle */
  /* Removed brightness filter - no color changes */
}

/* Prevent transition on logo images */
.live-logo img, 
header img,
.no-transition {
  transition: none !important;
  transform: none !important;
}

/* ==========================================
   FORM ELEMENT SMOOTH TRANSITIONS
   ========================================== */

/* Form containers */
form {
  transition: opacity 0.3s ease-in-out;
}

/* Input fields - ONLY transform, box-shadow, and border-color */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  /* border-color change is allowed as it's minimal */
}

/* ==========================================
   BUTTON TRANSITIONS
   ========================================== */

/* Primary buttons */
.bg-blue-600,
.bg-green-600,
.bg-red-600,
.bg-purple-600 {
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out;
  position: relative;
  overflow: hidden;
}

/* Button ripple effect - subtle opacity change only */
.bg-blue-600::before,
.bg-green-600::before,
.bg-red-600::before,
.bg-purple-600::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease-out, height 0.6s ease-out;
}

.bg-blue-600:active::before,
.bg-green-600:active::before,
.bg-red-600:active::before,
.bg-purple-600:active::before {
  width: 300px;
  height: 300px;
}

/* ==========================================
   TABLE TRANSITIONS
   ========================================== */

table tr {
  transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

table tr:hover {
  background-color: rgba(59, 130, 246, 0.05);
  transform: scale(1.005); /* Reduced from 1.01 for subtlety */
}

/* ==========================================
   MODAL AND OVERLAY TRANSITIONS
   ========================================== */

/* Modal overlays */
[id*="modal"] {
  transition: opacity 0.3s ease-in-out;
}

/* Modal content */
[id*="modal"] > div {
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==========================================
   LOADING ANIMATIONS
   ========================================== */

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ==========================================
   SCROLL ANIMATIONS
   ========================================== */

/* Smooth scrolling for the entire page */
html {
  scroll-behavior: smooth;
}

/* ==========================================
   TAB TRANSITIONS
   ========================================== */

/* Tab buttons */
[id*="tab"] {
  transition: all 0.3s ease-in-out;
  position: relative;
}

/* Active tab indicator slide */
[id*="tab"].border-blue-600::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #3b82f6;
  animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* ==========================================
   GRADIENT ANIMATIONS - DISABLED
   ========================================== */

/* Removed gradient background animations to prevent color changes */
/* Gradients remain static - no color shifting on hover */

/* ==========================================
   ACCESSIBILITY
   ========================================== */

/* Respect user's motion preferences */
@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;
  }
}

/* ==========================================
   MOBILE OPTIMIZATIONS
   ========================================== */

@media (max-width: 768px) {
  /* Reduce animation complexity on mobile */
  button:hover,
  a:hover {
    transform: none;
  }
  
  .shadow:hover,
  .shadow-lg:hover,
  .shadow-2xl:hover {
    transform: translateY(-2px);
  }
}
