/* Custom styles beyond Tailwind */

/* Enhanced prose styles for terms and privacy pages */
.prose-enhanced h2 {
  font-family: 'League Spartan', sans-serif;
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.3;
  color: #057371;
  margin-top: 2rem;
  margin-bottom: 1rem;
  position: relative;
}

.prose-enhanced h2::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.5rem;
  width: 3rem;
  height: 3px;
  background: linear-gradient(90deg, #057371, #23838A);
  border-radius: 2px;
}

.prose-enhanced p {
  font-family: 'Tahoma', sans-serif;
  font-size: 1.125rem;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 1.5rem;
  text-align: justify;
}

.prose-enhanced p:last-child {
  margin-bottom: 0;
}

/* Gradient animations */
.gradient-animation {
  background: linear-gradient(-45deg, #132938, #057371, #23838A, #BA9B7B);
  background-size: 400% 400%;
  animation: gradient 15s ease infinite;
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

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

/* Custom focus styles */
*:focus {
  outline: 2px solid #23838A;
  outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #EFEBDA;
}

::-webkit-scrollbar-thumb {
  background: #23838A;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #057371;
}

/* Hover effects for cards */
.card-hover {
  transition: all 0.3s ease;
}

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

/* Membership cards fix */
.grid.md\:grid-cols-3 > div {
  display: flex;
  flex-direction: column;
}

.grid.md\:grid-cols-3 > div > div:last-child {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.grid.md\:grid-cols-3 > div > div:last-child > a {
  margin-top: auto;
}

/* Custom animations */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slow pulse animation for hero spheres */
.slow-pulse {
  animation: slowPulse 4s ease-in-out infinite;
}

@keyframes slowPulse {
  0%, 100% {
    opacity: 0.1;
  }
  50% {
    opacity: 0.3;
  }
}

/* Dropdown menu styles */
.group {
  position: relative;
}
.group .group-hover\:opacity-100,
.group .group-hover\:visible {
  pointer-events: auto;
  margin-top: 0.5rem;
}
.group:hover .group-hover\:opacity-100 {
  opacity: 1;
  transition-delay: 0s;
}
.group .group-hover\:opacity-100 {
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
  transition-delay: 0.15s;
}
.group:hover .group-hover\:visible {
  visibility: visible;
  transition-delay: 0s;
}
.group .group-hover\:visible {
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  transition-delay: 0.15s;
}

/* Larger hover area using a pseudo element */
.group .dropdown-hover-area {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 32px;
  z-index: 40;
  background: transparent;
  pointer-events: auto;
}

/* Delay hiding dropdown for smoother mouse movement */
.group .group-hover\:opacity-100,
.group .group-hover\:visible {
  transition-delay: 0.15s;
}

@media (hover: hover) {
  .group:hover .group-hover\:opacity-100,
  .group:hover .group-hover\:visible,
  .group:focus-within .group-hover\:opacity-100,
  .group:focus-within .group-hover\:visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }
}


/* Mobile side menu styles - Enhanced for smooth animations */
#mobile-menu {
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

#mobile-menu.open {
  transform: translateX(0);
}

/* Mobile menu overlay */
#mobile-menu-overlay {
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Mobile dropdown styles */
.mobile-dropdown-menu {
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
  height: 100vh;
  position: fixed;
  width: 100%;
}

/* Smooth menu button animations */
#mobile-menu-button,
#mobile-menu-close {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), 
              background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu-button:active,
#mobile-menu-close:active {
  transform: scale(0.95);
}

/* Menu items base styles for stagger animation */
#mobile-menu nav > a,
#mobile-menu nav > div {
  will-change: opacity, transform;
}

/* Mobile viewport fixes */
html, body {
  width: 100%;
  overflow-x: hidden;
}

/* Fix mobile hero pulsing spheres - hide on mobile for better performance */
@media (max-width: 768px) {
  .hero-bg-sphere-1,
  .hero-bg-sphere-2,
  .hero-bg-sphere-3 {
    display: none;
  }
}

/* Responsive font sizes */
@media (max-width: 640px) {
  h1 {
    font-size: 2.5rem !important;
  }
  h2 {
    font-size: 2rem !important;
  }
  h3 {
    font-size: 1.5rem !important;
  }
  
  /* Fix for mobile padding */
  .px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Ensure content doesn't overflow on small screens */
  .overflow-hidden {
    overflow: hidden !important;
  }
}
