/* ==================================================
   1. Animations (Ticker, Hero, Chatbot, Pulse)
================================================== */
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@keyframes scroll-fast {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
.animate-scroll { animation: scroll 30s linear infinite; }
.animate-scroll-fast { animation: scroll-fast 20s linear infinite; }

.hero-slide { transition: opacity 1s ease-in-out; }
.hero-slide.active { opacity: 1 !important; }
.hero-text { transition: all 1s ease-out; }

#chatbot-toggle { animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* ==================================================
   2. Navigation (Links Only)
================================================== */
.nav-link {
  font-size: 1rem;
  font-weight: 600;
  color: #002f5e;
  transition: all 0.3s ease;
}
.nav-link:hover { color: #dc2626; }

/* ==================================================
   3. Buttons
================================================== */
.btn-primary {
  background: #dc2626;
  color: #fff;
  padding: 0.6rem 1.5rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.3s ease;
}
.btn-primary:hover {
  background: #b91c1c;
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(220,38,38,0.3);
}

/* ==================================================
   4. Mobile Navigation
================================================== */
.mobile-link {
  display: block;
  padding: 0.5rem 0;
  font-weight: 600;
  color: #002f5e;
  transition: all 0.3s ease;
}
.mobile-link:hover { color: #f59e0b; }
.mobile-heading {
  display: block;
  padding: 0.5rem 0;
  font-weight: 700;
  color: #002f5e;
}
.mobile-sublink {
  display: block;
  font-size: 0.9rem;
  padding: 0.25rem 0;
  color: #374151;
  transition: all 0.3s ease;
}
.mobile-sublink:hover {
  color: #f59e0b;
  padding-left: 0.25rem;
}

/* ==================================================
   5. Global / Misc Utilities
================================================== */
.feature-card:hover { transform: translateY(-8px); }
html { scroll-behavior: smooth; }
input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(242,101,34,0.1);
}

/* ==================================================
   6. Responsive Adjustments
================================================== */
@media (max-width: 768px) {
  .hero-slide h1 { font-size: 2.5rem; }
  .hero-slide p { font-size: 1rem; }
  .logo-block h1 { font-size: 1.5rem; }
  .logo-block h2 { font-size: 0.95rem; }
  .logo-block p { font-size: 0.7rem; }
}

/* ==================================================
   7. States (Loading, Accessibility, Print)
================================================== */
.loading { opacity: 0.7; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .animate-scroll, .animate-scroll-fast, #chatbot-toggle { animation: none; }
  .hero-slide { transition: none; }
}
@media print {
  .fixed, nav, footer, #chatbot-toggle, #chatbot-panel {
    display: none !important;
  }
}

/* ==================================================
   8. Logo + Auth Slot
================================================== */
.logo-block {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
}
.logo-block h1 { line-height: 1.1; }
.logo-block h2 { margin-top: -0.1rem; }
.logo-block p { margin-top: 0.15rem; }

/* Align logo + text inline */
nav a.flex.items-center.space-x-3 img {
  height: 48px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}

/* Fix excessive space between Patient Portal and Login */
#auth-slot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: auto;
  min-width: 100px;
  height: 48px;
  gap: 0.75rem;
}

/* ==================================================
   Flash Messages (Dynamic)
================================================== */
.flash-container,
.flash-container-mobile {
  z-index: 9999;
}

.flash-msg {
  padding: 0.6rem 1rem;
  border-radius: 0.5rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
  animation: fadeInOut 5s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(-10px); }
  10% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* ==================================================
   9. Desktop Navigation Layout Fix
================================================== */
nav .hidden.lg\:flex {
  margin-left: 3rem;
}
@media (max-width: 1366px) {
  nav .hidden.lg\:flex { margin-left: 2rem; }
}
@media (max-width: 1150px) {
  nav .hidden.lg\:flex { margin-left: 1.5rem; }
}

/* ==================================================
   10. Hero Buttons (Responsive Adjustment)
================================================== */
.hero-buttons {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}
.hero-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  font-weight: 600;
  padding: 0.6rem 1.5rem;
  min-width: 180px;
  max-width: 220px;
  text-align: center;
  white-space: nowrap;
}
.hero-buttons a.btn-primary {
  background: #dc2626;
  color: white;
}
.hero-buttons a.btn-outline {
  border: 2px solid #002F5E;
  color: #002F5E;
  background: white;
}
.hero-buttons a:hover { transform: translateY(-2px); }

/* Force proper mobile stacking */
@media (max-width: 768px) {
  .hero-buttons {
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
  }
  .hero-buttons a {
    width: 85%;
    max-width: 260px;
    font-size: 0.95rem;
    padding: 0.55rem 1rem;
  }
}
