/* ============================================
   CBNA Custom Styles
   Brand Colors, Animations, Custom Components
   ============================================ */

/* ---- Global overflow prevention ---- */
html, body { overflow-x: hidden; }

/* ---- Mobile body scroll lock (when menu is open) ---- */
body.menu-open { overflow: hidden; position: fixed; width: 100%; }

/* ---- Marquee Animation ---- */
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
.marquee-track {
  display: flex;
  width: max-content;
}
.marquee-track:hover .marquee-content {
  animation-play-state: paused;
}
.marquee-content {
  display: flex;
  flex-shrink: 0;
}
.animate-marquee {
  animation: marquee-scroll 20s linear infinite;
}
.animate-marquee-fast {
  animation: marquee-scroll 12s linear infinite;
}

/* ---- Hero Slideshow ---- */
@keyframes fadeSlide {
  0%, 30% { opacity: 1; }
  33%, 97% { opacity: 0; }
  100% { opacity: 1; }
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero-slide.active {
  opacity: 1;
}

/* ---- Accordion / Benefits Expand ---- */
.benefit-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
.benefit-card.open .benefit-content {
  max-height: 500px;
}
.benefit-card.open .benefit-arrow {
  transform: rotate(180deg);
}
.benefit-arrow {
  transition: transform 0.3s ease;
}

/* ---- Scroll Animations ---- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Testimonial Carousel ---- */
.testimonial-track {
  display: flex;
  transition: transform 0.5s ease;
}

/* ---- Sponsor Carousel ---- */
@keyframes sponsor-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.sponsor-track {
  display: flex;
  width: max-content;
  animation: sponsor-scroll 25s linear infinite;
}
.sponsor-track:hover {
  animation-play-state: paused;
}

/* ---- Mobile Menu Slide Animation ---- */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
#mobile-menu.open {
  max-height: 100vh;
  overflow-y: auto;
  padding-bottom: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ---- Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 28rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}
@media (min-width: 640px) {
  .modal-box {
    padding: 2rem;
  }
}
.modal-overlay.active .modal-box {
  transform: scale(1);
}

/* ---- Dashboard Sidebar ---- */
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  color: #64748b;
  font-weight: 500;
  transition: all 0.15s ease;
}
.sidebar-link:hover {
  background: #f1f5f9;
  color: #1e3a5f;
}
.sidebar-link.active {
  background: #003075;
  color: white;
}

/* ---- Inquiry Status Badges ---- */
.badge-new { background: #dcfce7; color: #166534; }
.badge-contacted { background: #dbeafe; color: #1e40af; }
.badge-booked { background: #e0f2fe; color: #075985; }
.badge-lost { background: #fef3c7; color: #92400e; }

/* ---- Tabs ---- */
.tab-btn {
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-size: 0.8125rem;
  border-radius: 0.375rem;
  transition: all 0.15s ease;
  color: #64748b;
}
@media (min-width: 640px) {
  .tab-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }
}
.tab-btn:hover {
  background: #f1f5f9;
}
.tab-btn.active {
  background: white;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* ---- Utility ---- */
.section-padding {
  padding: 3rem 0;
}
@media (min-width: 640px) {
  .section-padding {
    padding: 4rem 0;
  }
}
@media (min-width: 768px) {
  .section-padding {
    padding: 6rem 0;
  }
}
.gold-shadow {
  box-shadow: 0 4px 14px hsla(47, 100%, 60%, 0.4);
}
.blue-shadow {
  box-shadow: 0 4px 14px hsla(216, 98%, 22%, 0.3);
}

/* ---- Mobile Touch & Usability ---- */
@media (max-width: 639px) {
  /* Ensure tap targets are at least 44px */
  .hero-dot,
  .testimonial-dot {
    min-width: 44px;
    min-height: 44px;
  }

  /* Fix filter button wrapping */
  .filter-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  .filter-wrap::-webkit-scrollbar { display: none; }

  /* Prevent text from creating horizontal scroll */
  h1, h2, h3, h4, p { word-break: break-word; }

  /* Smaller form card padding on mobile */
  .form-card-mobile { padding: 1.25rem; }

  /* Show hover actions on touch devices (no hover capability) */
  .group .group-hover\:opacity-100 { opacity: 1; }
}
