/* ==========================================================================
   OSHAA - OCCUPATIONAL SAFETY & HEALTH AMERICAN ASSOCIATION
   Core Custom Styles & Animations
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --primary-navy: #1e3a5f;
  --primary-navy-dark: #152a45;
  --primary-navy-deep: #0a1628;
  --accent-gold: #f39c12;
  --accent-gold-dark: #e67e22;
  --brand-red: #dc2626;
  --brand-indigo: #4f46e5;
  --brand-indigo-light: #6366f1;
}

html {
  scroll-behavior: smooth;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  margin: 0;
  padding: 0;
  color: #1f2937;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Text Selection */
::selection {
  background: #f39c12;
  color: #ffffff;
}

/* Line Clamp Utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Navigation Dropdowns */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 16rem;
  background-color: #ffffff;
  border: 1px solid #f3f4f6;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  z-index: 50;
}
.group:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mobile Drawer */
.mobile-menu-drawer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-menu-drawer.open {
  visibility: visible;
  opacity: 1;
}
.mobile-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}
.mobile-menu-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  max-height: 90vh;
  background: #ffffff;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}
.mobile-menu-drawer.open .mobile-menu-content {
  transform: translateY(0);
}

/* Hero Carousel */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}

/* Accordion Transitions */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  opacity: 0;
}
.accordion-item.active .accordion-content {
  max-height: 500px;
  opacity: 1;
}

/* Verification Card Animations */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
  20%, 40%, 60%, 80% { transform: translateX(6px); }
}
.animate-shake {
  animation: shake 0.5s ease-in-out;
}

@keyframes seal {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  70% { transform: scale(1.2) rotate(10deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.animate-seal {
  animation: seal 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(34, 197, 94, 0.4); }
  50% { box-shadow: 0 0 40px rgba(34, 197, 94, 0.8); }
}
.animate-glow-pulse {
  animation: glow-pulse 2s infinite;
}

@keyframes border-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.animate-border-flow {
  background-size: 200% 200%;
  animation: border-flow 4s ease infinite;
}

@keyframes scan-line {
  0% { top: 0%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}
.animate-scan-line {
  position: absolute;
  width: 100%;
  height: 2px;
  animation: scan-line 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes hologram {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}
.animate-hologram {
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.15) 100%);
  background-size: 200% 200%;
  animation: hologram 6s ease infinite;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast {
  background: #1e3a5f;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}
.toast.toast-success {
  background: #059669;
}
.toast.toast-error {
  background: #dc2626;
}
