/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Base styles */
:root {
  --color-primary: #1a56db;
  --color-secondary: #7e3af2;
  --color-accent: #ff9800;
  --color-success: #0e9f6e;
  --color-danger: #e02424;
  --color-warning: #ff5a1f;
  --color-gray-dark: #4b5563;
  --color-gray-medium: #6b7280;
  --color-gray-light: #9ca3af;
}

/* Keep Rails validation wrappers transparent to compound controls and expose invalid fields. */
.field_with_errors {
  display: contents;
}

.field_with_errors .form-control,
.field_with_errors .form-select,
.field_with_errors .form-check-input {
  border-color: var(--color-danger) !important;
  box-shadow: 0 0 0 0.2rem rgba(224, 36, 36, 0.12);
}

body, html {
  background: #000;
  color: #fff;
  font-family: 'Inter', 'Inter var', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
  letter-spacing: 0.01em;
  min-height: 100vh;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.7;
}

/* Utility classes */
.bg-warning { background-color: var(--color-warning); }
.bg-info { background-color: var(--color-info); }
.bg-light { background-color: #ffffff; }
.bg-neutral-50 { background-color: #f9fafb; }
.bg-neutral-100 { background-color: #f3f4f6; }

.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-accent { color: #ffd580; /* lighter accent for better contrast on dark bg */ }
.text-white { color: #ffffff; }
.text-neutral-500 { color: #6b7280; }
.text-neutral-600 { color: #4b5563; }
.text-neutral-700 { color: #374151; }

.font-body { font-family: 'Inter', system-ui, sans-serif; }
.font-heading { font-family: 'Inter', system-ui, sans-serif; font-weight: 700; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-start { justify-content: flex-start; }
.space-x-3 > * + * { margin-left: 0.75rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }

.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-2 { margin-top: 0.5rem; }
.ml-1 { margin-left: 0.25rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

.rounded-md { border-radius: 0.375rem; }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.border-t { border-top-width: 1px; border-top-style: solid; border-top-color: #e5e7eb; }
.border-l-4 { border-left-width: 4px; border-left-style: solid; }
.border-green-500 { border-color: #0e9f6e; }
.border-red-500 { border-color: #e02424; }

.relative { position: relative; }
.absolute { position: absolute; }
.right-0 { right: 0; }
.top-0 { top: 0; }
.bottom-0 { bottom: 0; }
.z-10 { z-index: 10; }

.hidden { display: none; }
.block { display: block; }
.group:hover .group-hover\:block { display: block; }

.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:text-accent:hover { color: var(--color-accent); }
.transition { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

/* Responsive utilities */
@media (min-width: 768px) {
  .md\:flex { display: flex; }
  .md\:hidden { display: none; }
  .md\:text-2xl { font-size: 1.5rem; }
  .md\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

/* Animation classes for the landing page */
.animate-fade-in {
  animation: fadeIn 1s ease-in-out;
}

.animate-slide-up {
  animation: slideUp 0.8s ease-out;
}

.animate-count-up {
  animation: countUp 2s ease-out forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes countUp {
  from { opacity: 0.5; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Gradient background */
.bg-gradient {
  background: linear-gradient(135deg, #10204b 0%, #4b267e 100%); /* darker blue-purple gradient */
  position: relative;
  z-index: 1;
}

/* Hero section */
.hero-container {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 2;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 75, 0.60); /* semi-transparent dark overlay */
  z-index: 1;
  pointer-events: none;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
}

.hero-subtitle {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  color: #e5e7eb;
  text-shadow: 0 1px 4px rgba(0,0,0,0.32);
}

.text-accent {
  color: #ffd580; /* lighter accent for better contrast on dark bg */
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto 2rem;
  color: var(--color-gray-medium);
}

/* Stats section */
.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 3rem 0;
}

.stat-item {
  text-align: center;
  padding: 1.5rem;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  min-width: 200px;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--color-gray-dark);
  font-size: 1rem;
}

/* How it works section */
.steps-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.step-item {
  display: flex;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.step-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-right: 1rem;
  min-width: 2rem;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.step-description {
  color: var(--color-gray-medium);
}

/* Value proposition section */
.value-prop-container {
  background-color: #f9fafb;
  padding: 3rem 1rem;
  margin: 3rem 0;
}

.value-prop-item {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding: 1.5rem;
}

.value-prop-icon {
  min-width: 56px;
  min-height: 56px;
  max-width: 56px;
  max-height: 56px;
  background-color: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1.5rem;
}
.value-prop-icon svg {
  width: 2.2rem;
  height: 2.2rem;
  color: #fff;
}

.value-prop-text {
  flex: 1;
}

/* Stat cards */
.stats-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  margin: 3rem 0;
}
.stat-item {
  text-align: center;
  padding: 1.5rem;
  background-color: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  min-width: 180px;
  max-width: 220px;
  flex: 1 1 180px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--color-gray-dark);
  font-size: 1rem;
}


/* CTA buttons */
.cta-button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-align: center;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  margin: 0.5rem;
  text-decoration: none;
  box-shadow: none;
}

.cta-button:visited,
.cta-button:active,
.cta-button:focus,
.cta-button:hover {
  text-decoration: none;
  outline: none;
}

.cta-primary {
  background-color: var(--color-primary);
  color: white;
  border: none;
}

.cta-secondary {
  background-color: var(--color-accent);
  color: #10204b;
  border: none;
}

.cta-button svg {
  color: #ffd580;
  width: 1.25em;
  height: 1.25em;
  vertical-align: middle;
}

/* Default light theme. Dark colours must be scoped behind a future theme toggle. */
.bg-light, .bg-neutral-50, .bg-neutral-100 {
  background-color: #f8f9fa !important;
}

.card {
  background: #ffffff;
  border-radius: 1.25rem;
  box-shadow: 0 6px 24px rgba(15, 23, 42, 0.08);
  border: 1px solid #e5e7eb;
  padding: 2rem 1.5rem;
  color: #212529;
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.card h2, .card h3 {
  color: #1f2937;
}

.card p, .card .stat-label {
  color: #495057;
}

.card svg {
  color: var(--color-primary);
  fill: currentColor;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.5rem;
}

.card label,
.card .form-label,
.card .form-check-label,
.card .detail-label,
.card .detail-value,
.card .proposal-value,
.card .professional-bio,
.card .project-description-text,
.card .project-requirements-text {
  color: #212529 !important;
}

.stat-item, .value-prop-item {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 1.5rem 0;
  color: #fff;
}

.value-prop-item {
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 2rem 1.5rem;
  color: #fff;
}

.value-heading {
  color: #ffd580 !important;
}

.value-icon {
  background: #ffd580;
  color: #18244a;
  font-weight: bold;
}

.value-text {
  color: #e5e7eb !important;
}

.value-list {
  color: #e5e7eb;
}


.stat-item h2, .stat-item h3, .value-prop-item h2, .value-prop-item h3 {
  color: #ffd580;
}

.stat-item p, .stat-item .stat-label, .value-prop-item p {
  color: #e5e7eb;
}

.stat-item svg, .value-prop-item svg {
  color: #ffd580;
  fill: #ffd580;
  width: 1.5rem;
  height: 1.5rem;
  margin-bottom: 0.5rem;
}


/* Section Divider */
.section-divider {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ffd58055 50%, transparent);
  margin: 3rem 0 2.5rem 0;
  border: none;
}

/* CTA Button Enhancements */
.cta-button, .cta-primary, .cta-secondary {
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, transform 0.18s;
  outline: none;
  position: relative;
}
.cta-button:hover, .cta-primary:hover, .cta-secondary:hover {
  box-shadow: 0 0 0 4px #ffd58044;
  transform: scale(1.045);
  filter: brightness(1.08);
}
.cta-button:focus-visible {
  outline: 2.5px solid #ffd580;
  outline-offset: 2px;
  box-shadow: 0 0 0 6px #ffd58033;
}

/* Icon Animation for Value Props */
.value-icon.icon-animate {
  animation: icon-bounce 1.6s infinite alternate cubic-bezier(.66,0,.34,1);
}
@keyframes icon-bounce {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-7px) scale(1.08); }
  100% { transform: translateY(0) scale(1); }
}

/* Responsive Typography */
.value-heading, .section-title, .hero-title, h2, h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.2;
}
.value-text, .value-list, .hero-subtitle, p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.7;
}

/* Ensure all SVGs on landing page are styled for contrast */
.landing-page svg {
  color: #ffd580;
  fill: #ffd580;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
}


.cta-primary {
  background-color: var(--color-primary);
  color: white;
}

.cta-primary:hover {
  background-color: #1e429f;
  transform: translateY(-2px);
}

.cta-secondary {
  background-color: var(--color-accent);
  color: white;
}

.cta-secondary:hover {
  background-color: #e67e00;
  transform: translateY(-2px);
}

.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }

/* Import UI readability improvements */
@import url("/assets/ui_readability_improvements-556677ec.css");

/* Import authentication form improvements */
@import url("/assets/authentication_forms-9838be91.css");

/* Import matching system styles */
@import url("/assets/matching_system-0d4a97de.css");

/* Skills Tag Input Styles */
.autocomplete-dropdown {
  max-height: 200px;
  overflow-y: auto;
  background-color: #ffffff !important;
}

.autocomplete-item {
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: background-color 0.2s;
  color: #212529 !important;
  background-color: #ffffff;
}

.autocomplete-item:hover,
.autocomplete-item.bg-light {
  background-color: #f8f9fa !important;
  color: #212529 !important;
}

[data-skills-tags] .badge {
  cursor: default;
  user-select: none;
}

[data-skills-tags] .btn-close {
  cursor: pointer;
}

.cursor-pointer {
  cursor: pointer;
}

/* Shared marketplace design primitives */
.tb-role-badge,
.tb-status-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 0.75rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.tb-role-badge {
  padding: 0.45rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
}

.tb-role-badge--provider { color: #4338ca; background: #eef2ff; border-color: #c7d2fe; }
.tb-role-badge--seeker { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.tb-role-badge--admin { color: #7c3aed; background: #f5f3ff; border-color: #ddd6fe; }
.tb-role-badge--both { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.tb-role-badge--platform,
.tb-role-badge--neutral { color: #475569; background: #f8fafc; border-color: #cbd5e1; }

.tb-status-badge {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}

.tb-status-badge--positive { color: #047857; background: #d1fae5; }
.tb-status-badge--pending { color: #92400e; background: #fef3c7; }
.tb-status-badge--negative { color: #b91c1c; background: #fee2e2; }
.tb-status-badge--neutral { color: #475569; background: #e2e8f0; }

.tb-segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid #dbe3ef;
  border-radius: 0.75rem;
  background: #f8fafc;
}

.tb-segmented-control__item {
  padding: 0.55rem 0.9rem;
  border: 0;
  border-radius: 0.55rem;
  color: #475569;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.tb-segmented-control__item:hover { color: #4338ca; background: #eef2ff; }
.tb-segmented-control__item.is-active,
.tb-segmented-control__item.active { color: #fff; background: #4f46e5; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12); }

.tb-file-upload {
  display: flex;
  align-items: stretch;
  padding: 0.25rem;
  gap: 0.25rem;
  border: 1px solid #dbe3ef;
  border-radius: 0.65rem;
  background: #f8fafc;
}

.tb-file-upload .form-control { border: 0; background: transparent; }

.tb-date-input { min-height: 2.75rem; accent-color: #4f46e5; }

.form-switch .form-check-input {
  border: 1px solid #94a3b8;
  background-color: #cbd5e1;
}

.form-switch .form-check-input:checked {
  border-color: #4f46e5;
  background-color: #4f46e5;
}

.tb-security-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  color: #4338ca;
  background: #eef2ff;
  font-size: 1.5rem;
}
