/* Import Hedvig Letters Serif from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Hedvig+Letters+Serif:opsz@12..24&display=swap');

/* QualifyNation Brand Colors */
:root {
  --primary-orange: #F48426;
  --primary-blue: #002F50;
  --light-bg: #FBFAF7;
  --accent-blue: #006EDC;
  --dark-brown: #3A2012;
  --success-green: #17A787;
  --legacy-blue: #007cba; /* Keep for backward compatibility */
  
  /* Brand Fonts */
  --font-heading: 'Hedvig Letters Serif', Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Base styles - kept for app pages compatibility */
body {
  font-family: var(--font-body);
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background: #f5f5f5;
  line-height: 1.6;
}

/* Headers - Using Hedvig Letters Serif */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-blue);
  line-height: 1.2;
  font-weight: 400; /* Hedvig Letters Serif looks best at normal weight */
  margin-top: 0;
  margin-bottom: 1rem;
}

h1 { 
  font-size: 2.5rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1.1rem;
}

/* Optionally use serif for important text elements */
.serif-text,
.tagline,
.quote,
blockquote {
  font-family: var(--font-heading);
}

blockquote {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--dark-brown);
  border-left: 4px solid var(--primary-orange);
  padding-left: 1.5rem;
  margin: 2rem 0;
}

/* Links - updated to brand colors */
a { 
  color: var(--primary-orange); 
  text-decoration: none; 
  padding: 10px;
  transition: color 0.3s;
}

a:hover {
  color: #E07520; /* Darker orange on hover */
}

/* Forms - kept existing structure with subtle brand updates */
form { 
  background: white; 
  padding: 20px; 
  border-radius: 8px; 
  max-width: 400px;
  box-shadow: 0 2px 10px rgba(0,47,80,0.1);
}

form h2, form h3 {
  font-family: var(--font-heading);
  color: var(--primary-blue);
  margin-bottom: 1.5rem;
}

label {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--primary-blue);
  display: block;
  margin-bottom: 0.25rem;
}

input, select, textarea { 
  width: 100%; 
  padding: 10px; 
  margin: 10px 0; 
  border: 1px solid #ddd; 
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary-orange);
  box-shadow: 0 0 0 2px rgba(244, 132, 38, 0.1);
}

/* Buttons - updated to brand colors */
button, .btn { 
  background: var(--primary-orange); 
  color: white; 
  padding: 10px 20px; 
  border: none; 
  border-radius: 4px; 
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all 0.3s;
  font-size: 1rem;
}

button:hover, .btn:hover {
  background: #E07520;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(244, 132, 38, 0.3);
}

/* Secondary button style */
.btn-secondary {
  background: white;
  color: var(--primary-orange);
  border: 2px solid var(--primary-orange);
}

.btn-secondary:hover {
  background: var(--primary-orange);
  color: white;
}

/* Success button */
.btn-success {
  background: var(--success-green);
}

.btn-success:hover {
  background: #159571;
}

/* Navigation specific */
.logo-text {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--primary-blue);
}

/* Utility classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-serif { font-family: var(--font-heading); }
.font-sans { font-family: var(--font-body); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Cards */
.card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,47,80,0.1);
  margin-bottom: 1rem;
}

.card-header {
  border-bottom: 2px solid var(--primary-orange);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.card-header h1,
.card-header h2,
.card-header h3 {
  font-family: var(--font-heading);
  margin-bottom: 0;
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--primary-blue);
  margin-bottom: 0.5rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 2px 10px rgba(0,47,80,0.1);
}

th {
  background: var(--primary-blue);
  color: white;
  padding: 12px;
  text-align: left;
  font-family: var(--font-body);
  font-weight: 600;
}

td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  font-family: var(--font-body);
}

tr:hover {
  background: var(--light-bg);
}

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-family: var(--font-body);
}

.alert h4 {
  font-family: var(--font-heading);
  margin-top: 0;
}

.alert-success {
  background: #d4edda;
  border: 1px solid var(--success-green);
  color: #155724;
}

.alert-error, .alert-danger {
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.alert-warning {
  background: #fff3cd;
  border: 1px solid var(--primary-orange);
  color: #856404;
}

.alert-info {
  background: #d1ecf1;
  border: 1px solid var(--accent-blue);
  color: #0c5460;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,47,80,0.5);
}

.modal-content {
  background-color: white;
  margin: 10% auto;
  padding: 20px;
  border-radius: 8px;
  width: 80%;
  max-width: 500px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}

.modal-header {
  border-bottom: 2px solid var(--primary-orange);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.modal-header h2,
.modal-header h3 {
  font-family: var(--font-heading);
  margin: 0;
}

.modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--primary-orange);
}

/* Navigation menu (for app pages) */
.nav-menu {
  background: var(--primary-blue);
  padding: 1rem;
  margin: -20px -20px 20px -20px;
}

.nav-menu a {
  color: white;
  padding: 0.5rem 1rem;
  margin: 0 0.5rem;
  border-radius: 4px;
  font-family: var(--font-body);
}

.nav-menu a:hover {
  background: var(--accent-blue);
  color: white;
}

.nav-menu a.active {
  background: var(--primary-orange);
}

/* Dashboard widgets */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.widget {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,47,80,0.1);
  border-left: 4px solid var(--primary-orange);
}

.widget h3 {
  font-family: var(--font-heading);
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.widget-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-blue);
  font-family: var(--font-body);
}

.widget-label {
  color: var(--dark-brown);
  margin-top: 0.5rem;
  font-family: var(--font-body);
}

/* Page headers */
.page-header {
  background: linear-gradient(135deg, var(--primary-blue), var(--accent-blue));
  color: white;
  padding: 2rem;
  margin: -20px -20px 2rem -20px;
}

.page-header h1 {
  font-family: var(--font-heading);
  color: white;
  font-size: 2.5rem;
  margin: 0;
}

.page-subtitle {
  font-family: var(--font-body);
  opacity: 0.9;
  margin-top: 0.5rem;
}

/* Loading spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-orange);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  table {
    font-size: 0.9rem;
  }
  
  th, td {
    padding: 8px;
  }
  
  .page-header h1 {
    font-size: 2rem;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
    font-family: var(--font-body);
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
  }
  
  .nav-menu, .no-print {
    display: none;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}
