/* TrustHub Design System */

/* ===== CSS Variables ===== */
:root {
  --brand-blue: #3b82f6;
  --brand-blue-dark: #1e40af;
  --brand-blue-light: #60a5fa;
  --dark-navy: #0f172a;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --success-green: #10b981;
  --success-green-dark: #059669;
  --error-red: #ef4444;
  --error-red-dark: #dc2626;
  --warning-yellow: #f59e0b;
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
  --transition: all 0.2s ease;
}

/* ===== Base Resets ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: #fff;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--brand-blue-dark);
  text-decoration: underline;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--dark-navy);
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===== Navigation ===== */
.navbar {
  background-color: #fff;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.nav-brand {
  flex: 0 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-blue);
  text-decoration: none;
}

.logo:hover {
  color: var(--brand-blue-dark);
  text-decoration: none;
}

.logo-text {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  flex: 1;
  justify-content: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--gray-700);
}

.nav-links a:hover {
  color: var(--brand-blue);
  text-decoration: none;
}

.messages-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.unread-badge {
  background: var(--brand-blue);
  color: white;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
  display: inline-block;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 auto;
}

.username {
  font-weight: 500;
  color: var(--gray-700);
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--brand-blue);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--brand-blue-dark);
  box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
}

.btn-secondary {
  background-color: var(--gray-200);
  color: var(--gray-800);
}

.btn-secondary:hover {
  background-color: var(--gray-300);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-block {
  width: 100%;
  display: block;
}

/* ===== Cards ===== */
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--gray-300);
}

.card-header {
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.card-title {
  margin: 0;
  font-size: 1.25rem;
}

.card-body {
  margin-bottom: 1rem;
}

.card-footer {
  border-top: 1px solid var(--gray-200);
  padding-top: 1rem;
  margin-top: 1rem;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input[type="checkbox"],
input[type="radio"] {
  margin-right: 0.5rem;
}

/* ===== Flash Messages ===== */
.flash-container {
  margin-bottom: 1.5rem;
}

.flash {
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  border-left: 4px solid;
  animation: slideInDown 0.3s ease;
}

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

.flash-success {
  background-color: #d1fae5;
  border-color: var(--success-green);
  color: var(--success-green-dark);
}

.flash-error {
  background-color: #fee2e2;
  border-color: var(--error-red);
  color: var(--error-red-dark);
}

/* ===== Verified Badge ===== */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.75rem;
  background-color: #dbeafe;
  color: var(--brand-blue-dark);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
}

.verified-badge svg {
  width: 14px;
  height: 14px;
}

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.7), rgba(30, 64, 175, 0.5));
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 600px;
  padding: 2rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-tagline {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-cta .btn {
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
}

/* ===== Features Section ===== */
.features {
  padding: 4rem 0;
}

.features h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--gray-600);
}

/* ===== Page Content & Footer ===== */
.page-content {
  min-height: 400px;
  padding: 2rem 0;
}

.footer {
  background-color: var(--gray-100);
  border-top: 1px solid var(--gray-200);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
  color: var(--gray-600);
}

.footer a {
  color: var(--gray-600);
}

.footer a:hover {
  color: var(--brand-blue);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .nav-container {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .hero {
    min-height: 400px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-tagline {
    font-size: 1.125rem;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .container {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .nav-links {
    gap: 0.5rem;
    font-size: 0.9rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }

  .btn-lg {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}
