/* ========================================
   CUSTOM ANIMATIONS & KEYFRAMES
   ======================================== */

/* Parallax Background Effect */
.parallax-bg {
  will-change: transform;
  animation: parallaxFloat 20s ease-in-out infinite;
}

@keyframes parallaxFloat {
  0%, 100% {
    transform: translateY(0) scale(1.1);
  }
  50% {
    transform: translateY(-20px) scale(1.15);
  }
}

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

.marquee-content {
  display: flex;
  gap: 1.5rem;
  animation: marquee 40s linear infinite;
  width: max-content;
}

.marquee-item {
  flex-shrink: 0;
  width: 280px;
}

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

@media (max-width: 768px) {
  .marquee-item {
    width: 220px;
  }
}

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

/* Table Responsive Wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-responsive table {
  min-width: 600px;
}

/* ========================================
   PROSE STYLING FOR MARKDOWN CONTENT
   ======================================== */

.prose {
  color: #e4e4e7;
  line-height: 1.6;
}

/* Headings */
.prose h2 {
  color: #fbbf24;
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.3;
  position: relative;
  padding-bottom: 0.75rem;
}

.prose h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 4rem;
  height: 0.25rem;
  background-color: #fbbf24;
}

.prose h3 {
  color: #fde047;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .prose h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
  }
  
  .prose h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
  }
}

/* Paragraphs */
.prose p {
  color: #d4d4d8;
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .prose p {
    font-size: 1rem;
    margin-bottom: 1.25rem;
  }
}

/* Links */
.prose a {
  color: #fbbf24;
  text-decoration: underline;
  text-decoration-thickness: 0.125rem;
  text-underline-offset: 0.25rem;
  transition: color 0.2s ease;
}

.prose a:hover {
  color: #fde047;
}

/* Lists */
.prose ul,
.prose ol {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding-left: 1.75rem;
}

.prose ul {
  list-style-type: none;
}

.prose ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: #d4d4d8;
  line-height: 1.6;
}

.prose ul li::before {
  content: '▪';
  position: absolute;
  left: 0;
  color: #fbbf24;
  font-weight: 700;
}

.prose ol {
  list-style-type: decimal;
  list-style-position: outside;
}

.prose ol li {
  padding-left: 0.5rem;
  margin-bottom: 0.75rem;
  color: #d4d4d8;
  line-height: 1.6;
}

.prose ol li::marker {
  color: #fbbf24;
  font-weight: 700;
}

@media (max-width: 768px) {
  .prose ul,
  .prose ol {
    padding-left: 1.25rem;
  }
  
  .prose ul li {
    padding-left: 1.25rem;
  }
}

/* Strong/Bold Text */
.prose strong {
  color: #fafafa;
  font-weight: 700;
}

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
  margin-bottom: 2rem;
  background-color: #18181b;
  border: 0.0625rem solid rgba(251, 191, 36, 0.2);
  overflow-x: auto;
  display: block;
}

@media (min-width: 768px) {
  .prose table {
    display: table;
  }
}

.prose table thead {
  background-color: #27272a;
  border-bottom: 0.0625rem solid rgba(251, 191, 36, 0.2);
}

.prose table th {
  padding: 1rem;
  text-align: left;
  color: #fafafa;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

.prose table td {
  padding: 1rem;
  color: #d4d4d8;
  border-bottom: 0.0625rem solid rgba(251, 191, 36, 0.1);
  font-size: 0.9375rem;
}

.prose table tbody tr:last-child td {
  border-bottom: none;
}

.prose table tbody tr:hover {
  background-color: rgba(251, 191, 36, 0.05);
}

@media (max-width: 768px) {
  .prose table th,
  .prose table td {
    padding: 0.75rem;
    font-size: 0.875rem;
  }
}

/* Blockquotes */
.prose blockquote {
  border-left: 0.25rem solid #fbbf24;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #a1a1aa;
  background-color: rgba(251, 191, 36, 0.05);
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.prose blockquote p {
  margin-bottom: 0;
}

/* Images */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
  margin: 2.5rem 0;
  border: 0.125rem solid rgba(251, 191, 36, 0.2);
}

@media (max-width: 768px) {
  .prose img {
    margin: 1.5rem 0;
  }
}

/* Code */
.prose code {
  background-color: #27272a;
  color: #fbbf24;
  padding: 0.125rem 0.375rem;
  border-radius: 0;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.prose pre {
  background-color: #18181b;
  color: #e4e4e7;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 2rem 0;
  border: 0.0625rem solid rgba(251, 191, 36, 0.2);
  line-height: 1.5;
}

.prose pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.875rem;
}

/* Horizontal Rule */
.prose hr {
  border: 0;
  border-top: 0.0625rem solid rgba(251, 191, 36, 0.2);
  margin: 3rem 0;
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */

@media (max-width: 1024px) {
  .marquee-content {
    animation-duration: 30s;
  }
}

@media (max-width: 640px) {
  .marquee-content {
    animation-duration: 25s;
    gap: 1rem;
  }
}

/* Ensure table scrolling on small devices */
@media (max-width: 768px) {
  .table-responsive {
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
