/* THENCF Theme Styles */

/* Google Fonts - Space Grotesk */
/* @import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap'); */

/* Base typography */
/* body {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

.font-display {
  font-family: 'Space Grotesk', system-ui, sans-serif;
} */

/* Prose styling for content pages */
.prose {
  color: #374151;
  max-width: 65ch;
}

.prose h2 {
  color: #1f2937;
  font-weight: 800;
  font-size: 1.5em;
  margin-top: 2em;
  margin-bottom: 1em;
  line-height: 1.3333333;
}

.prose h3 {
  color: #1f2937;
  font-weight: 600;
  font-size: 1.25em;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.6;
}

.prose a {
  color: #6366f1;
  text-decoration: underline;
  font-weight: 500;
}

.prose a:hover {
  color: #4f46e5;
}

.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose img {
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose article {
  margin-top: 2em;
  margin-bottom: 2em;
}

.prose.lg\:prose-xl {
  font-size: 1.125rem;
  line-height: 1.7777778;
}

.prose.lg\:prose-xl h2 {
  font-size: 1.8em;
  margin-top: 1.5555556em;
  margin-bottom: 0.8888889em;
  line-height: 1.1111111;
}

.prose.lg\:prose-xl h3 {
  font-size: 1.5em;
  margin-top: 1.6em;
  margin-bottom: 0.6666667em;
  line-height: 1.3333333;
}

@media (min-width: 1024px) {
  .lg\:prose-xl {
    font-size: 1.125rem;
    line-height: 1.7777778;
  }

  .lg\:prose-xl h2 {
    font-size: 1.8em;
    margin-top: 1.5555556em;
    margin-bottom: 0.8888889em;
    line-height: 1.1111111;
  }

  .lg\:prose-xl h3 {
    font-size: 1.5em;
    margin-top: 1.6em;
    margin-bottom: 0.6666667em;
    line-height: 1.3333333;
  }
}

/* Navigation gradient */
.nav-gradient {
  background: linear-gradient(135deg, #9333ea 0%, #ec4899 50%, #f97316 100%);
}

/* Navigation links */
.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 0.5rem;
  transition: all 0.15s ease;
}

.nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown menu */
.dropdown-menu {
  display: none;
  position: absolute;
  left: 0;
  margin-top: 0.5rem;
  min-width: 12rem;
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  z-index: 50;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #374151;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover {
  background-color: #f3f4f6;
}

/* Mobile navigation */
.mobile-nav-link {
  display: block;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  border-radius: 0.5rem;
  transition: all 0.15s ease;
}

.mobile-nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Primary button */
.btn-primary {
  background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(147, 51, 234, 0.4);
}

/* Secondary button */
.btn-secondary {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  font-weight: 500;
  color: #374151;
  transition: all 0.15s ease;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

/* Card component */
.card {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Link accent color */
.link-accent {
  color: #9333ea;
  transition: color 0.2s ease;
}

.link-accent:hover {
  color: #ec4899;
}

/* Form styling */
.form-input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.625rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  background-color: white;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: #9333ea;
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.form-input::placeholder {
  color: #9ca3af;
}

textarea.form-input {
  resize: vertical;
}

select.form-input {
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  appearance: none;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.form-file {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.form-file::file-selector-button {
  margin-right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  background: linear-gradient(135deg, #f3e8ff 0%, #fce7f3 100%);
  color: #7c3aed;
  cursor: pointer;
  transition: all 0.15s ease;
}

.form-file::file-selector-button:hover {
  background: linear-gradient(135deg, #ede9fe 0%, #fce7f3 100%);
}

.form-checkbox {
  width: 1rem;
  height: 1rem;
  border-radius: 0.25rem;
  border: 1px solid #d1d5db;
  color: #9333ea;
}

.form-checkbox:focus {
  ring: 2px;
  ring-color: #9333ea;
}

.form-hint {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

.form-error {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.75rem;
  padding: 1rem;
  color: #991b1b;
}

.form-error h2, .form-error h3 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Homepage specific */
.homepage-bg {
  background-color: #1a1a2e;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.menu-highlight {
  background: rgba(59, 130, 246, 0.7);
  padding: 0.1em 0.3em;
  transition: all 0.2s ease;
}

.menu-highlight:hover {
  background: rgba(236, 72, 153, 0.8);
  transform: translateX(8px);
}

.logo-highlight {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.85), rgba(147, 51, 234, 0.85));
  padding: 0.2em 0.4em;
}

/* Thredded forum overrides */
.thredded--main-container {
  /* font-family: 'Space Grotesk', system-ui, sans-serif; */
  max-width: none;
  padding: 0;
}

/* Brand color overrides for Thredded */
.thredded--link,
.thredded--topics--title a,
.thredded--navigation--main-link,
.thredded--navigation--sub-link {
  color: #9333ea;
}

.thredded--link:hover,
.thredded--topics--title a:hover,
.thredded--navigation--main-link:hover,
.thredded--navigation--sub-link:hover {
  color: #ec4899;
}

.thredded--navigation--main-link.is-current,
.thredded--navigation--sub-link.is-current {
  border-bottom-color: #9333ea;
}

.thredded--button,
.thredded--form--submit {
  background: #9333ea;
}

.thredded--button:hover,
.thredded--button:focus,
.thredded--form--submit:hover,
.thredded--form--submit:focus {
  background: #7c3aed;
}

/* Make messageboards full width and borders more visible */
.thredded--messageboards-group {
  display: block;
}

.thredded--messageboard {
  flex-basis: 100%;
  border-color: #d1d5db;
}

/* Topics list - visible borders, keep absolute positioning for badge/icon */
.thredded--topics--topic {
  border: 1px solid #d1d5db;
  padding: 1rem 2.5rem 1rem 3.5rem;
  margin-bottom: 0;
  position: relative;
}

.thredded--topics--topic + .thredded--topics--topic {
  border-top: none;
}

/* Posts count badge - positioned inside border */
.thredded--topics--posts-count {
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Follow icon - positioned inside border */
.thredded--topics--follow-icon {
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Fix navigation alignment */
.thredded--user-navigation {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.thredded--user-navigation--item {
  display: inline-flex;
  align-items: center;
}

.thredded--unread-topics--followed-count,
.thredded--user-navigation--unread-topics--followed-count {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

/* Pagy pagination styling */
.pagy,
.pagy.nav,
.pagy-nav,
nav.pagy {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.pagy a,
.pagy span,
.pagy-nav a,
.pagy-nav span {
  display: inline-block;
  padding: 0.5rem 0.875rem;
  text-decoration: none;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}

.pagy a:hover,
.pagy-nav a:hover {
  background-color: #f3f4f6;
  border-color: #9ca3af;
}

.pagy .current,
.pagy-nav .current {
  background-color: #374151;
  color: white;
  border-color: #374151;
}

.pagy .gap,
.pagy-nav .gap {
  border: none;
  padding: 0.5rem 0.25rem;
  color: #9ca3af;
}

.pagy .disabled,
.pagy-nav .disabled {
  color: #d1d5db;
  pointer-events: none;
  cursor: default;
}
