/* ===== JAcoworks Website — Custom Styles ===== */

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

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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #d4d4d8;
  border-radius: 3px;
}

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

/* ===== Hero Animations ===== */
.hero-fade-in {
  animation: fadeInUp 0.6s ease-out both;
}

.hero-fade-in-delay {
  animation: fadeInUp 0.6s ease-out 0.15s both;
}

.hero-fade-in-delay-2 {
  animation: fadeInUp 0.6s ease-out 0.3s both;
}

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

/* ===== Prose / Markdown Content ===== */
.prose-custom h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.prose-custom h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.prose-custom h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose-custom p {
  margin-bottom: 1rem;
  line-height: 1.75;
  color: #4b5563;
}

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

.prose-custom ul {
  list-style-type: disc;
}

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

.prose-custom li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
  color: #4b5563;
}

.prose-custom a {
  color: #C4724A;
  text-decoration: underline;
  text-decoration-color: #C4724A40;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s;
}

.prose-custom a:hover {
  text-decoration-color: #C4724A;
}

.prose-custom blockquote {
  border-left: 3px solid #C4724A;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #6b7280;
  font-style: italic;
}

.prose-custom hr {
  border: none;
  border-top: 1px solid #EDE5DC;
  margin: 2rem 0;
}

.prose-custom table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.875rem;
}

.prose-custom th {
  text-align: left;
  font-weight: 600;
  color: #374151;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #EDE5DC;
}

.prose-custom td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: #4b5563;
}

.prose-custom img {
  max-width: 100%;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}

/* ===== Code Blocks ===== */
.prose-custom code {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', monospace;
  font-size: 0.875em;
  background: #F5F0EB;
  padding: 0.15em 0.4em;
  border-radius: 0.375rem;
  color: #C4724A;
}

.prose-custom pre {
  background: #1a1a2e;
  color: #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.prose-custom pre code {
  background: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ===== Admin Sidebar Transitions ===== */
aside nav a {
  transition: background-color 0.15s ease, color 0.15s ease;
}

/* ===== HTMX Loading States ===== */
.htmx-request {
  opacity: 0.6;
  pointer-events: none;
  transition: opacity 0.2s;
}

.htmx-request::after {
  content: '';
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid #C4724A;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-left: 0.5rem;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Toast Notifications ===== */
.toast {
  padding: 0.75rem 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: toastIn 0.3s ease-out both;
  max-width: 24rem;
}

.toast-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.toast-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.toast-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(1rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-out {
  animation: toastOut 0.2s ease-in both;
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(1rem);
  }
}

/* ===== Responsive helpers ===== */
@media (max-width: 768px) {
  .prose-custom pre {
    border-radius: 0;
    margin-left: -1rem;
    margin-right: -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
}
