/*!
 * Advanced UI Animations & Gradients
 * Gayatri Hi-Tech Nursery Management System
 * 
 * Beautiful animations, gradients, and micro-interactions
 */

/* ============================================================
   GRADIENT CARDS & INFO BOXES
   ============================================================ */

.info-box {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: none !important;
}

/* Gradient overlays for info boxes */
.info-box.bg-info {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.info-box.bg-success {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%) !important;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.info-box.bg-warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.info-box.bg-danger {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.info-box.bg-primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Shimmer effect on info boxes */
.info-box::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;
}

.info-box:hover::before {
  left: 100%;
}

/* Hover effect - lift and glow */
.info-box:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Animated icon in info box */
.info-box-icon {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-box:hover .info-box-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Pulse animation for icons */
@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.info-box-icon i {
  animation: iconPulse 2s ease-in-out infinite;
}

/* ============================================================
   CARD ENHANCEMENTS
   ============================================================ */

.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Gradient card headers */
.card-primary .card-header {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

.card-success .card-header {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%) !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}

.card-warning .card-header {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
  box-shadow: 0 2px 10px rgba(243, 156, 18, 0.3);
}

.card-danger .card-header {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
  box-shadow: 0 2px 10px rgba(231, 76, 60, 0.3);
}

.card-info .card-header {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  box-shadow: 0 2px 10px rgba(52, 152, 219, 0.3);
}

/* Card header icon animation */
.card-header .card-title {
  animation: fadeInLeft 0.5s ease-out;
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================================
   BUTTON ENHANCEMENTS
   ============================================================ */

.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
}

/* Gradient buttons */
.btn-primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-success {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%) !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
  box-shadow: 0 4px 12px rgba(243, 156, 18, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.btn-info {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

/* Ripple effect for all buttons */
.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
}

.btn:active {
  transform: translateY(0);
}

/* ============================================================
   PAGE LOAD ANIMATIONS
   ============================================================ */

/* Fade in content on page load */
.content-wrapper {
  animation: fadeIn 0.5s ease-out;
}

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

/* Stagger animation for rows */
.row > div {
  animation: slideUpStagger 0.6s ease-out backwards;
}

.row > div:nth-child(1) { animation-delay: 0.1s; }
.row > div:nth-child(2) { animation-delay: 0.2s; }
.row > div:nth-child(3) { animation-delay: 0.3s; }
.row > div:nth-child(4) { animation-delay: 0.4s; }

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

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

/* Skeleton loading for tables */
.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

/* Spinner with gradient */
.spinner-border {
  border-color: transparent;
  border-top-color: #10B981;
  border-right-color: #047857;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   FORM ENHANCEMENTS
   ============================================================ */

.form-control {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid #e0e0e0;
}

.form-control:focus {
  border-color: #10B981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
  transform: scale(1.01);
}

/* Floating label effect */
.form-group {
  position: relative;
}

.form-control:focus + label,
.form-control:not(:placeholder-shown) + label {
  transform: translateY(-25px) scale(0.85);
  color: #10B981;
}

/* ============================================================
   NAVBAR & SIDEBAR ENHANCEMENTS
   ============================================================ */

/* Gradient header */
.main-header {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%) !important;
  box-shadow: 0 2px 15px rgba(16, 185, 129, 0.3);
}

/* Animated menu items */
.nav-sidebar .nav-item {
  transition: all 0.3s ease;
}

.nav-sidebar .nav-item:hover {
  transform: translateX(5px);
}

.nav-sidebar .nav-link {
  transition: all 0.3s ease;
}

.nav-sidebar .nav-link:hover {
  background: rgba(16, 185, 129, 0.1);
}

.nav-sidebar .nav-link.active {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%) !important;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
  animation: slideInRight 0.3s ease-out;
}

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

/* ============================================================
   TABLE ENHANCEMENTS
   ============================================================ */

.table {
  animation: fadeIn 0.5s ease-out;
}

.table thead th {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: none;
  font-weight: 600;
  color: #2c3e50;
  transition: all 0.3s ease;
}

.table tbody tr {
  transition: all 0.3s ease;
}

.table tbody tr:hover {
  background: rgba(16, 185, 129, 0.05);
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ============================================================
   BADGE ENHANCEMENTS
   ============================================================ */

.badge {
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.badge:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.badge-success {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%) !important;
}

.badge-primary {
  background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
}

.badge-warning {
  background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%) !important;
}

.badge-danger {
  background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%) !important;
}

/* ============================================================
   ALERT ENHANCEMENTS
   ============================================================ */

.alert {
  border: none;
  border-radius: 8px;
  animation: slideDown 0.5s ease-out;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

.alert-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #047857;
  border-left: 4px solid #10B981;
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border-left: 4px solid #dc2626;
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
  border-left: 4px solid #f59e0b;
}

.alert-info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
  border-left: 4px solid #3b82f6;
}

/* ============================================================
   PROGRESS BAR ENHANCEMENTS
   ============================================================ */

.progress {
  height: 8px;
  border-radius: 10px;
  overflow: visible;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress-bar {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%);
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.3);
  border-radius: 10px;
  animation: progressSlide 1s ease-out;
  position: relative;
  overflow: hidden;
}

@keyframes progressSlide {
  from {
    width: 0;
  }
}

/* Animated stripes */
.progress-bar-striped {
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 1rem 1rem;
  animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
  0% {
    background-position: 1rem 0;
  }
  100% {
    background-position: 0 0;
  }
}

/* ============================================================
   TOOLTIP ENHANCEMENTS
   ============================================================ */

[data-toggle="tooltip"] {
  position: relative;
  cursor: help;
}

/* ============================================================
   MODAL ENHANCEMENTS
   ============================================================ */

.modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalZoomIn 0.3s ease-out;
}

@keyframes modalZoomIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-header {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%);
  color: white;
  border-radius: 12px 12px 0 0;
}

/* ============================================================
   DROPDOWN ENHANCEMENTS
   ============================================================ */

.dropdown-menu {
  border: none;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  animation: dropdownSlide 0.3s ease-out;
}

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

.dropdown-item {
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%);
  color: white;
  transform: translateX(5px);
}

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

/* Smooth scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #10B981 0%, #047857 100%);
  border-radius: 10px;
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
}

/* ============================================================
   MICRO-INTERACTIONS
   ============================================================ */

/* Icon bounce on hover */
.fas, .far, .fab {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover .fas,
a:hover .far,
a:hover .fab {
  transform: scale(1.2) rotate(5deg);
}

/* Button icon spin on hover */
.btn:hover i {
  animation: iconSpin 0.5s ease;
}

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

/* ============================================================
   DASHBOARD STATS COUNTER ANIMATION
   ============================================================ */

.info-box-number {
  font-weight: bold;
  animation: numberPop 0.5s ease-out;
}

@keyframes numberPop {
  0% {
    transform: scale(0.5);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================================
   GLOW EFFECTS
   ============================================================ */

.glow-on-hover {
  transition: all 0.3s ease;
}

.glow-on-hover:hover {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.6),
              0 0 40px rgba(16, 185, 129, 0.4),
              0 0 60px rgba(16, 185, 129, 0.2);
}

/* ============================================================
   FLOATING ACTION BUTTON
   ============================================================ */

.fab-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10B981 0%, #047857 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1000;
  animation: fabFloat 3s ease-in-out infinite;
}

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

.fab-button:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.6);
}

/* ============================================================
   PULSE EFFECT FOR NOTIFICATIONS
   ============================================================ */

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ============================================================
   RESPONSIVE ENHANCEMENTS
   ============================================================ */

@media (max-width: 768px) {
  .info-box:hover {
    transform: translateY(-2px) scale(1.01);
  }
  
  .card:hover {
    transform: translateY(-2px);
  }
  
  .btn:hover {
    transform: translateY(-1px);
  }
}

/* ============================================================
   ACCESSIBILITY - RESPECT REDUCED MOTION
   ============================================================ */

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

