/* Prevent horizontal scroll on mobile */
body {
  overflow-x: hidden;
  max-width: 100%;
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

* {
  box-sizing: border-box;
}

/* Parallax Animation */
.parallax {
  transition: transform 0.1s ease-out;
}

/* Marquee Animation */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
}

.marquee-content {
  display: flex;
  animation: marquee 20s linear infinite;
  will-change: transform;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-content::after {
  content: "";
  display: flex;
  position: absolute;
  left: 100%;
  top: 0;
}

/* Duplicate content for seamless loop */
.marquee-content > * {
  flex-shrink: 0;
}

/* Island Navigation */
.island-nav {
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

/* Mobile Menu - Force solid background */
#mobile-menu {
  background: #000000 !important;
  background-color: #000000 !important;
  backdrop-filter: none !important;
  opacity: 1 !important;
}

#mobile-menu * {
  backdrop-filter: none !important;
}

#mobile-menu > div {
  background: #000000 !important;
  background-color: #000000 !important;
  opacity: 1 !important;
}

#mobile-menu nav {
  background: #000000 !important;
  background-color: #000000 !important;
}

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

/* Ensure containers don't overflow */
.container {
  max-width: 100%;
}

/* Ensure all images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Custom Prose Styling for Readability */
.prose-custom {
  line-height: 1.7;
}

.prose-custom p {
  margin-bottom: 1.25rem;
}

.prose-custom h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose-custom h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.prose-custom ul,
.prose-custom ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.prose-custom li {
  margin-bottom: 0.5rem;
}

/* Details/Summary Styling */
details summary {
  list-style: none;
}

details summary::-webkit-details-marker {
  display: none;
}

details summary::after {
  content: "+";
  float: right;
  font-size: 1.5rem;
  font-weight: bold;
  transition: transform 0.3s ease;
}

details[open] summary::after {
  transform: rotate(45deg);
}

/* Hover Effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

/* Focus Styles for Accessibility */
a:focus,
button:focus,
input:focus,
details:focus {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

/* Loading Animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  animation: shimmer 2s infinite;
  background: linear-gradient(to right, transparent 0%, rgba(212, 175, 55, 0.1) 50%, transparent 100%);
  background-size: 1000px 100%;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, #d4af37 0%, #f4d03f 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

::-webkit-scrollbar-track {
  background: #0a0a0a;
}

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

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

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mobile Responsive Fixes */
@media (max-width: 768px) {
  /* Prevent horizontal overflow on mobile */
  body, html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    position: relative;
  }
  
  /* Ensure all sections are mobile-friendly */
  section {
    overflow-x: hidden;
    max-width: 100vw;
  }
  
  /* Fix container padding on mobile */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Ensure grid items don't overflow */
  .grid {
    overflow-x: hidden;
  }
  
  /* Fix absolute positioned elements */
  .absolute {
    max-width: 100%;
  }
}
