/* Custom styles matching the React project */

html {
  scroll-behavior: smooth;
}

:root {
  --inx-surface: #f8fafc;
  --inx-brand-700: #0f766e;
  --inx-brand-800: #115e59;
  --inx-brand-900: #134e4a;
  --inx-text-on-dark: #f0fdfa;
}

::selection {
  background: rgba(20, 184, 166, 0.3);
  color: #134e4a;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d6d3d1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a29e;
}

/* Page transitions */
.page-transition {
  animation: pageIn 0.2s ease-out;
}

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

/* Stagger animation for cards */
.stagger-item {
  opacity: 0;
  transform: translateY(20px);
  animation: staggerIn 0.4s ease-out forwards;
}

@keyframes staggerIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Row animation for tables */
.row-animate {
  opacity: 0;
  transform: translateY(10px);
  animation: rowIn 0.3s ease-out forwards;
}

@keyframes rowIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Toast animations */
.toast-enter {
  animation: toastIn 0.3s ease-out;
}

.toast-exit {
  animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Modal animations handled via JS classes */
.modal-overlay-show {
  opacity: 1 !important;
}

.modal-content-show {
  opacity: 1 !important;
  transform: scale(1) translateY(0) !important;
}

/* Mobile sidebar transitions */
.mobile-sidebar-open {
  transform: translateX(0) !important;
}

.mobile-overlay-show {
  opacity: 1 !important;
}

/* Active nav indicator */
.nav-active-indicator {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background-color: #14b8a6;
  border-radius: 0 9999px 9999px 0;
}

/* Spinner for loading buttons */
.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
}

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

/* Chart canvas responsive */
canvas {
  max-width: 100%;
}

/* Hero scroll indicator animation */
.scroll-indicator-bounce {
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% {
    opacity: 1;
    transform: translateY(0);
  }
  40% {
    opacity: 0.5;
    transform: translateY(8px);
  }
  60% {
    opacity: 0.5;
    transform: translateY(4px);
  }
}

/* Scroll indicator dot animation */
.scroll-dots {
  animation: dotsFloat 3s ease-in-out infinite;
}

@keyframes dotsFloat {
  0%, 100% {
    opacity: 0.4;
    transform: translateY(-2px);
  }
  50% {
    opacity: 1;
    transform: translateY(2px);
  }
}

/* Scroll-triggered animations */
.scroll-fade-in {
  opacity: 0;
  transform: translateY(30px);
}

.scroll-fade-in.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Public page layout guards + footer system */
.public-hero {
  background-color: var(--inx-brand-800);
  overflow-x: clip;
}

.public-footer {
  color: var(--inx-text-on-dark);
  background:
    radial-gradient(60rem 60rem at 90% 110%, rgba(34, 211, 238, 0.16), transparent 58%),
    radial-gradient(48rem 48rem at 0% 0%, rgba(20, 184, 166, 0.2), transparent 55%),
    linear-gradient(140deg, var(--inx-brand-900) 0%, var(--inx-brand-800) 45%, var(--inx-brand-700) 100%);
}

.footer-feature-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(240, 253, 250, 0.24);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 0.75rem;
  padding: 0.65rem 0.75rem;
  backdrop-filter: blur(2px);
}

.institute-section-wrap {
  position: relative;
}

.institute-section-card {
  border-radius: 1rem;
  border: 1px solid rgba(20, 184, 166, 0.25);
  background:
    radial-gradient(42rem 22rem at 8% 0%, rgba(20, 184, 166, 0.1), transparent 70%),
    linear-gradient(180deg, #ffffff 0%, #f8fffd 100%);
  box-shadow: 0 10px 30px rgba(15, 118, 110, 0.08);
}

.institute-logo {
  filter: drop-shadow(0 10px 18px rgba(20, 184, 166, 0.22));
}

.image-lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(12, 28, 33, 0.82);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.image-lightbox-content {
  max-width: min(1100px, 96vw);
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-lightbox-img {
  max-width: 100%;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 0.75rem;
}
