/* Custom styles for II United website */

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

/* Container fluid responsive */
.container-fluid {
  width: 100%;
  padding-right: 1rem;
  padding-left: 1rem;
  margin-right: auto;
  margin-left: auto;
}

@media (min-width: 640px) {
  .container-fluid {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-fluid {
    padding-right: 2rem;
    padding-left: 2rem;
  }
}

/* Responsive grid improvements */
.grid-responsive {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-responsive {
    gap: 1.5rem;
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid-responsive {
    gap: 2rem;
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Fluid typography */
.text-fluid-xs { font-size: clamp(0.75rem, 2vw, 0.875rem); }
.text-fluid-sm { font-size: clamp(0.875rem, 2.5vw, 1rem); }
.text-fluid-base { font-size: clamp(1rem, 3vw, 1.125rem); }
.text-fluid-lg { font-size: clamp(1.125rem, 3.5vw, 1.25rem); }
.text-fluid-xl { font-size: clamp(1.25rem, 4vw, 1.5rem); }
.text-fluid-2xl { font-size: clamp(1.5rem, 4.5vw, 1.875rem); }
.text-fluid-3xl { font-size: clamp(1.875rem, 5vw, 2.25rem); }
.text-fluid-4xl { font-size: clamp(2.25rem, 6vw, 3rem); }
.text-fluid-5xl { font-size: clamp(3rem, 7vw, 3.75rem); }

/* Ripple effect keyframe */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Smooth transitions for reduced motion users */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Loading states */
.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  margin: auto;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

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

/* Form enhancements */
.form-group {
  position: relative;
}

.form-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-success {
  border-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

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

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

/* Navigation active states */
.nav-link {
  position: relative;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: currentColor;
}

/* Responsive images */
.responsive-img {
  max-width: 100%;
  height: auto;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  p, li {
    page-break-inside: avoid;
  }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Language selector styles */
.language-btn {
  transition: opacity 0.2s ease-in-out;
  border-radius: 4px;
  padding: 2px;
}

.language-btn:hover {
  opacity: 1 !important;
}

.language-btn.active {
  opacity: 1 !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

/* Slide viewer enhancements */
.slide-viewer {
  max-height: 80vh;
}

.slide-navigation {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
}

/* Progress indicators */
.progress-bar {
  background: linear-gradient(90deg, var(--primary-color, #3b82f6) 0%, var(--primary-color, #3b82f6) var(--progress, 0%), #e5e7eb var(--progress, 0%), #e5e7eb 100%);
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  max-width: 400px;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.notification.show {
  transform: translateX(0);
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  .auto-dark {
    color-scheme: dark;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .contrast-border {
    border: 2px solid;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
}