/* ==========================================================================
   MedTech Tree - Custom Styles
   Supplements Tailwind CSS with utility classes, animations, and component
   styles that mirror the React frontend.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. UTILITY CLASSES
   -------------------------------------------------------------------------- */

/* Gradient text used in headings and hero sections */
.gradient-text {
  background: linear-gradient(to right, #0284c7, #10b981, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Full-page gradient background */
.gradient-bg {
  background: linear-gradient(to bottom right, #f0f9ff, #ffffff, #ecfdf5);
}

/* Card hover lift effect */
.card-hover {
  transition: all 300ms;
}
.card-hover:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

/* Primary action button */
.btn-primary {
  padding: 0.75rem 1.5rem;
  background-color: #0284c7;
  color: white;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 200ms;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.5;
}
.btn-primary:hover {
  background-color: #0369a1;
}
.btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 2px #0ea5e9, 0 0 0 4px white;
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Secondary / outline button */
.btn-secondary {
  padding: 0.75rem 1.5rem;
  background-color: white;
  color: #0284c7;
  border-radius: 0.5rem;
  font-weight: 500;
  border: 2px solid #0284c7;
  transition: all 200ms;
  cursor: pointer;
  text-decoration: none;
  font-size: 1rem;
  line-height: 1.5;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-secondary:hover {
  background-color: #f0f9ff;
}
.btn-secondary:focus {
  outline: none;
  box-shadow: 0 0 0 2px #0ea5e9, 0 0 0 4px white;
}

/* Danger / destructive button */
.btn-danger {
  padding: 0.75rem 1.5rem;
  background-color: #dc2626;
  color: white;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 200ms;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: none;
  cursor: pointer;
}
.btn-danger:hover {
  background-color: #b91c1c;
}
.btn-danger:focus {
  outline: none;
  box-shadow: 0 0 0 2px #f87171, 0 0 0 4px white;
}

/* Small button variant */
.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

/* Large button variant */
.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
  line-height: 1.75rem;
}

/* Section vertical + horizontal padding */
.section-padding {
  padding: 4rem 1rem;
}
@media (min-width: 768px) {
  .section-padding {
    padding: 6rem 1.5rem;
  }
}
@media (min-width: 1024px) {
  .section-padding {
    padding: 6rem 2rem;
  }
}

/* Constrained centered container */
.container-custom {
  max-width: 80rem;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px) {
  .container-custom {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}
@media (min-width: 1024px) {
  .container-custom {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Text utilities */
.text-balance {
  text-wrap: balance;
}

.text-gradient-sky {
  background: linear-gradient(to right, #0284c7, #0ea5e9);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-emerald {
  background: linear-gradient(to right, #10b981, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Backdrop blur fallback */
.backdrop-blur-custom {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* Truncate multiline text */
.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;
}

/* Aspect ratio helper (for browsers that don't support aspect-ratio) */
.aspect-video {
  aspect-ratio: 16 / 9;
}
.aspect-square {
  aspect-ratio: 1 / 1;
}

/* --------------------------------------------------------------------------
   2. ANIMATIONS
   -------------------------------------------------------------------------- */

/* Fade in from below */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

/* Simple fade in */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.animate-fade-in {
  animation: fadeIn 0.5s ease-out forwards;
}

/* Slide down / expand */
@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 500px;
  }
}
.animate-slide-down {
  animation: slideDown 0.3s ease-out forwards;
  overflow: hidden;
}

/* Count-up / pop-in for stat numbers */
@keyframes countUp {
  from {
    opacity: 0;
    transform: scale(0.5);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.animate-count-up {
  animation: countUp 0.5s ease-out forwards;
}

/* Slow pulse for decorative elements */
@keyframes pulse-slow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}
.animate-pulse-slow {
  animation: pulse-slow 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Floating / levitation */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}
.animate-float {
  animation: float 6s ease-in-out infinite;
}

/* Horizontal gradient shift */
@keyframes gradient-x {
  0%, 100% {
    background-position: left center;
  }
  50% {
    background-position: right center;
  }
}
.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-x 15s ease infinite;
}

/* ECG / heartbeat trace for SVG paths */
@keyframes ecg-trace {
  0% {
    stroke-dashoffset: 1000;
    opacity: 1;
  }
  88% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}
.ecg-animate {
  stroke-dasharray: 1000;
  animation: ecg-trace 1.9s linear infinite;
}

/* Scroll-down indicator bounce */
@keyframes scrollBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(10px);
  }
}
.animate-scroll-bounce {
  animation: scrollBounce 1.5s ease-in-out infinite;
}

/* Cursor / indicator blink */
@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}
.animate-blink {
  animation: blink 1.5s ease-in-out infinite;
}

/* Heartbeat scale pulse */
@keyframes heartbeat {
  0%, 100% {
    transform: scale(1);
    opacity: 0.85;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}
.animate-heartbeat {
  animation: heartbeat 0.75s ease-in-out infinite;
}

/* Expanding ring / sonar effect */
@keyframes pulseRing {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}
.animate-pulse-ring {
  animation: pulseRing 2s ease-out infinite;
}

/* Spin (loading spinners) */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
.animate-spin-slow {
  animation: spin 3s linear infinite;
}

/* Slide in from left */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.animate-slide-in-left {
  animation: slideInLeft 0.5s ease-out forwards;
}

/* Slide in from right */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.animate-slide-in-right {
  animation: slideInRight 0.5s ease-out forwards;
}

/* Scale in */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.animate-scale-in {
  animation: scaleIn 0.4s ease-out forwards;
}

/* Staggered animation delays (use with any .animate-* class) */
.animation-delay-100 { animation-delay: 0.1s; }
.animation-delay-200 { animation-delay: 0.2s; }
.animation-delay-300 { animation-delay: 0.3s; }
.animation-delay-400 { animation-delay: 0.4s; }
.animation-delay-500 { animation-delay: 0.5s; }
.animation-delay-600 { animation-delay: 0.6s; }
.animation-delay-700 { animation-delay: 0.7s; }
.animation-delay-800 { animation-delay: 0.8s; }
.animation-delay-1000 { animation-delay: 1s; }
.animation-delay-1500 { animation-delay: 1.5s; }

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   3. SCROLL-BASED REVEAL (IntersectionObserver)
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal-scale.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered reveal delays */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* --------------------------------------------------------------------------
   4. CUSTOM SCROLLBAR
   -------------------------------------------------------------------------- */

/* Webkit browsers (Chrome, Safari, Edge) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 4px;
  border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

/* Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: #94a3b8 #f1f5f9;
}

/* Hide scrollbar on hero / horizontal scroll containers but keep scrollable */
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* --------------------------------------------------------------------------
   5. PRINT STYLES
   -------------------------------------------------------------------------- */

@media print {
  /* Hide non-essential UI chrome */
  nav,
  footer,
  .navbar,
  .site-header,
  .site-footer,
  .sticky,
  .fixed,
  .no-print,
  .btn-primary,
  .btn-secondary,
  .btn-danger,
  .back-to-top,
  .cookie-banner,
  .chat-widget,
  .scroll-indicator {
    display: none !important;
  }

  /* Reset backgrounds and colors for ink-friendly output */
  body {
    background: white !important;
    color: #000 !important;
    font-size: 12pt;
    line-height: 1.5;
  }

  .gradient-text {
    background: none !important;
    -webkit-text-fill-color: #000 !important;
    color: #000 !important;
  }

  .gradient-bg {
    background: white !important;
  }

  /* Force links to show their URL */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }
  a[href^="#"]::after,
  a[href^="javascript"]::after {
    content: "";
  }

  /* Avoid page breaks inside cards / key content */
  .card-hover,
  .stock-card,
  .testimonial-card,
  blockquote,
  table,
  img {
    page-break-inside: avoid;
  }

  /* Headings should keep their following content on the same page */
  h1, h2, h3, h4 {
    page-break-after: avoid;
  }
}

/* --------------------------------------------------------------------------
   6. FORM STYLES (Contact Form)
   -------------------------------------------------------------------------- */

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.form-input,
.form-textarea,
.form-select {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #1f2937;
  background-color: #ffffff;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: #9ca3af;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  outline: none;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.form-input:disabled,
.form-textarea:disabled,
.form-select:disabled {
  background-color: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Validation states */
.form-input.is-invalid,
.form-textarea.is-invalid,
.form-select.is-invalid {
  border-color: #dc2626;
}
.form-input.is-invalid:focus,
.form-textarea.is-invalid:focus,
.form-select.is-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.form-input.is-valid,
.form-textarea.is-valid,
.form-select.is-valid {
  border-color: #16a34a;
}
.form-input.is-valid:focus,
.form-textarea.is-valid:focus,
.form-select.is-valid:focus {
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.form-error {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: #dc2626;
}

.form-help {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

.form-textarea {
  min-height: 8rem;
  resize: vertical;
}

/* Custom select arrow */
.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

/* Checkbox and radio custom styles */
.form-checkbox,
.form-radio {
  width: 1.125rem;
  height: 1.125rem;
  color: #0284c7;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 150ms;
}
.form-radio {
  border-radius: 50%;
}
.form-checkbox:checked,
.form-radio:checked {
  background-color: #0284c7;
  border-color: #0284c7;
}
.form-checkbox:focus,
.form-radio:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Inline form row */
.form-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.form-row > * {
  flex: 1;
  min-width: 0;
}
@media (max-width: 640px) {
  .form-row {
    flex-direction: column;
  }
}

/* --------------------------------------------------------------------------
   7. TESTIMONIAL CAROUSEL
   -------------------------------------------------------------------------- */

.testimonial-carousel {
  position: relative;
  overflow: hidden;
}

.testimonial-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.testimonial-slide {
  min-width: 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

.testimonial-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
  border: 1px solid #f1f5f9;
  transition: box-shadow 300ms ease, transform 300ms ease;
}
.testimonial-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.testimonial-quote {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #374151;
  font-style: italic;
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 1.25rem;
  border-left: 3px solid #0284c7;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-avatar {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0f2fe;
}

.testimonial-name {
  font-weight: 600;
  color: #111827;
  font-size: 0.9375rem;
}

.testimonial-role {
  font-size: 0.8125rem;
  color: #6b7280;
}

/* Dot indicators */
.testimonial-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.testimonial-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 50%;
  background-color: #cbd5e1;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 300ms ease;
}
.testimonial-dot:hover {
  background-color: #94a3b8;
}
.testimonial-dot.active {
  background-color: #0284c7;
  width: 1.5rem;
  border-radius: 0.3125rem;
}

/* Navigation arrows */
.testimonial-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: white;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
  transition: all 200ms;
  z-index: 10;
}
.testimonial-nav:hover {
  background: #f8fafc;
  color: #0284c7;
  border-color: #0284c7;
}
.testimonial-nav--prev {
  left: 0;
}
.testimonial-nav--next {
  right: 0;
}

/* --------------------------------------------------------------------------
   8. STOCK CARD STYLES
   -------------------------------------------------------------------------- */

.stock-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  transition: all 300ms ease;
  position: relative;
  overflow: hidden;
}
.stock-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
  border-color: #bae6fd;
}

/* Colored top border accent */
.stock-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(to right, #0284c7, #10b981);
  opacity: 0;
  transition: opacity 300ms ease;
}
.stock-card:hover::before {
  opacity: 1;
}

.stock-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.stock-card-symbol {
  font-size: 1.125rem;
  font-weight: 700;
  color: #111827;
}

.stock-card-name {
  font-size: 0.8125rem;
  color: #6b7280;
  margin-top: 0.125rem;
}

.stock-card-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.stock-card-change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
}

.stock-card-change--up {
  background-color: #dcfce7;
  color: #16a34a;
}

.stock-card-change--down {
  background-color: #fef2f2;
  color: #dc2626;
}

.stock-card-change--neutral {
  background-color: #f3f4f6;
  color: #6b7280;
}

.stock-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f5f9;
}

.stock-card-meta dt {
  font-size: 0.75rem;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.stock-card-meta dd {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin: 0;
}

/* Stock mini-chart placeholder */
.stock-card-chart {
  height: 3rem;
  margin-top: 0.75rem;
  border-radius: 0.375rem;
  overflow: hidden;
}

/* Badge used for sector labels, tags, etc. */
.stock-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  background-color: #e0f2fe;
  color: #0369a1;
}

/* --------------------------------------------------------------------------
   9. ADDITIONAL COMPONENT STYLES
   -------------------------------------------------------------------------- */

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  transition: box-shadow 200ms ease;
}
.navbar.scrolled {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #475569;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: color 200ms, background-color 200ms;
}
.nav-link:hover {
  color: #0284c7;
  background-color: #f0f9ff;
}
.nav-link.active {
  color: #0284c7;
  font-weight: 600;
}

/* Mobile menu panel (legacy — actual mobile menu styles live in base.html) */
.mobile-menu-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 80%;
  max-width: 24rem;
  background: white;
  padding: 1.5rem;
  overflow-y: auto;
  animation: slideInRight 0.3s ease-out forwards;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(2, 132, 199, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
}

/* --- Feature / Service Cards --- */
.feature-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid #f1f5f9;
  transition: all 300ms ease;
}
.feature-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
  border-color: #e0f2fe;
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #e0f2fe, #ecfdf5);
  color: #0284c7;
  margin-bottom: 1rem;
}

/* --- Stat Counter --- */
.stat-item {
  text-align: center;
  padding: 1.5rem;
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(to right, #0284c7, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}
.stat-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* --- FAQ Accordion --- */
.faq-item {
  border-bottom: 1px solid #f1f5f9;
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #1f2937;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: color 200ms;
}
.faq-question:hover {
  color: #0284c7;
}
.faq-question-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  transition: transform 300ms ease;
  color: #94a3b8;
}
.faq-item.open .faq-question-icon {
  transform: rotate(45deg);
  color: #0284c7;
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
  opacity: 0;
}
.faq-item.open .faq-answer {
  max-height: 500px;
  opacity: 1;
  padding-bottom: 1.25rem;
}
.faq-answer p {
  color: #6b7280;
  line-height: 1.75;
}

/* --- Tooltip --- */
.tooltip {
  position: relative;
}
.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) scale(0.95);
  background: #1e293b;
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms, transform 200ms;
  z-index: 50;
}
.tooltip:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* --- Back to Top Button --- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: #0284c7;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 300ms, transform 300ms, background-color 200ms;
  z-index: 40;
}
.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
.back-to-top:hover {
  background: #0369a1;
}

/* --- Loading / Skeleton Placeholders --- */
.skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 0.375rem;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 1rem;
  margin-bottom: 0.5rem;
  width: 100%;
}
.skeleton-text:last-child {
  width: 60%;
}
.skeleton-heading {
  height: 1.5rem;
  width: 50%;
  margin-bottom: 1rem;
}
.skeleton-image {
  width: 100%;
  padding-top: 56.25%; /* 16:9 ratio */
}
.skeleton-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
}

/* --- Toast / Notification --- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  min-width: 18rem;
  padding: 1rem 1.25rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 9999;
  animation: slideInRight 0.3s ease-out forwards;
}
.toast--success { border-left: 4px solid #16a34a; }
.toast--error { border-left: 4px solid #dc2626; }
.toast--info { border-left: 4px solid #0284c7; }
.toast--warning { border-left: 4px solid #f59e0b; }

/* --- Modal / Dialog --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  animation: fadeIn 0.2s ease-out forwards;
}
.modal-content {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  max-width: 32rem;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: scaleIn 0.3s ease-out forwards;
}

/* --- Table Styles --- */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}
.data-table thead th {
  background: #f8fafc;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #475569;
  border-bottom: 2px solid #e2e8f0;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}
.data-table tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
}
.data-table tbody tr:hover {
  background-color: #f8fafc;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* --- Tabs --- */
.tabs {
  display: flex;
  border-bottom: 2px solid #e2e8f0;
  gap: 0;
  overflow-x: auto;
}
.tab {
  padding: 0.75rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #64748b;
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 200ms, border-color 200ms;
  white-space: nowrap;
}
.tab:hover {
  color: #0284c7;
}
.tab.active {
  color: #0284c7;
  border-bottom-color: #0284c7;
  font-weight: 600;
}
.tab-panel {
  display: none;
  padding: 1.5rem 0;
}
.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-out forwards;
}

/* --- Progress Bar --- */
.progress-bar {
  width: 100%;
  height: 0.5rem;
  background: #e2e8f0;
  border-radius: 9999px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(to right, #0284c7, #10b981);
  border-radius: 9999px;
  transition: width 0.6s ease-out;
}

/* --- Alert / Banner --- */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.alert--info {
  background-color: #e0f2fe;
  color: #075985;
  border: 1px solid #bae6fd;
}
.alert--success {
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.alert--warning {
  background-color: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde68a;
}
.alert--error {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* --- Divider --- */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #94a3b8;
  font-size: 0.8125rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* --- Tag / Chip --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  border-radius: 9999px;
  background-color: #f1f5f9;
  color: #475569;
  transition: background-color 200ms;
}
.tag:hover {
  background-color: #e2e8f0;
}
.tag--primary {
  background-color: #e0f2fe;
  color: #0369a1;
}
.tag--success {
  background-color: #dcfce7;
  color: #166534;
}
.tag--danger {
  background-color: #fef2f2;
  color: #991b1b;
}

/* --- Footer --- */
.site-footer {
  background-color: #0f172a;
  color: #cbd5e1;
  padding: 4rem 1rem 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
  max-width: 80rem;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
.footer-heading {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: white;
  margin-bottom: 1rem;
}
.footer-link {
  display: block;
  font-size: 0.9375rem;
  color: #94a3b8;
  text-decoration: none;
  padding: 0.25rem 0;
  transition: color 200ms;
}
.footer-link:hover {
  color: #e2e8f0;
}
.footer-bottom {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid #1e293b;
  text-align: center;
  font-size: 0.8125rem;
  color: #64748b;
}

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

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-duration: 200ms;
  transition-timing-function: ease;
}

.transition-all {
  transition: all 200ms ease;
}

.transition-transform {
  transition-property: transform;
  transition-duration: 200ms;
  transition-timing-function: ease;
}

.shadow-soft {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.shadow-elevated {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.ring-primary {
  box-shadow: 0 0 0 2px #0ea5e9, 0 0 0 4px white;
}
