/* Custom styles for MutualCalc */

:root {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #eff6ff;
  --success-color: #22c55e;
  --danger-color: #ef4444;
  --warning-color: #f59e0b;
  --gray-dark: #1f2937;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom focus styles */
*:focus {
  outline: none;
}

/* Custom utility classes */
.text-success {
  color: var(--success-color);
}

.text-danger {
  color: var(--danger-color);
}

.bg-success-light {
  background-color: rgba(34, 197, 94, 0.1);
}

.bg-danger-light {
  background-color: rgba(239, 68, 68, 0.1);
}

/* Live data section styles */
.pulse-animation {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.category-filter {
  transition: all 0.2s ease;
}

.category-filter.active {
  background-color: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 500;
}

/* Fund card animations */
.fund-card {
  transition: all 0.3s ease;
  transform: translateY(0);
}

.fund-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.price-up {
  color: var(--success-color);
  position: relative;
}

.price-down {
  color: var(--danger-color);
  position: relative;
}

.price-up::after {
  content: "▲";
  font-size: 0.7em;
  position: relative;
  top: -1px;
  margin-left: 2px;
}

.price-down::after {
  content: "▼";
  font-size: 0.7em;
  position: relative;
  top: -1px;
  margin-left: 2px;
}

/* Visual data refresh animation */
@keyframes dataRefresh {
  0% {
    background-color: rgba(59, 130, 246, 0.1);
  }
  100% {
    background-color: transparent;
  }
}

.data-refresh {
  animation: dataRefresh 1s ease;
}

/* Fund detail modal animations */
#fund-details-modal {
  transition: opacity 0.3s ease;
}

#fund-details-modal:not(.hidden) {
  animation: modalFadeIn 0.3s ease forwards;
}

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

#fund-details-modal .bg-white {
  transition: transform 0.3s ease;
}

#fund-details-modal:not(.hidden) .bg-white {
  animation: modalSlideIn 0.3s ease forwards;
}

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

/* Calculator Results Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#calculation-results:not(.hidden) {
  animation: fadeIn 0.5s ease forwards;
}

/* Card hover effects */
.hover-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Mobile menu transitions */
#mobile-menu {
  transition: all 0.3s ease;
}

#mobile-menu.hidden {
  display: none;
}

/* Better form styling */
input, textarea, select {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

button {
  transition: all 0.2s ease;
}

/* Footer links hover effect */
footer a {
  transition: color 0.2s ease;
}

/* Return percentage styling */
.positive-return {
  color: var(--success-color);
  display: inline-flex;
  align-items: center;
}

.negative-return {
  color: var(--danger-color);
  display: inline-flex;
  align-items: center;
}

.positive-return::before {
  content: "↑";
  margin-right: 2px;
}

.negative-return::before {
  content: "↓";
  margin-right: 2px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-text h1 {
    font-size: 2.5rem;
  }
  
  .calculator-card {
    max-width: 100%;
  }
}