/* ========================================
   OTXHire - Teacher Recruitment Platform
   Modern, Responsive Design System
   ======================================== */

/* ========== CSS VARIABLES ========== */
:root {
  /* Brand Colors - STRICT */
  --primary: #1447E6;
  --secondary: #4F39F6;
  --accent: #1A3E49;
  
  /* UI Colors */
  --white: #FFFFFF;
  --light-bg: #F8F9FA;
  --border: #E5E7EB;
  --gray-text: #6B7280;
  --dark-text: #111827;
  --success: #10B981;
  --error: #EF4444;
  --warning: #F59E0B;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  --spacing-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Typography */
  --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Segoe UI', system-ui, sans-serif;
}

/* ========== GLOBAL RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark-text);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--accent);
  margin-bottom: var(--spacing-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-sm);
  color: var(--gray-text);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary);
}

/* ========== LAYOUT ========== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-wide {
  max-width: 1400px;
}

.container-narrow {
  max-width: 800px;
}

/* ========== HEADER & NAVIGATION ========== */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) 0;
  position: relative;
}

.logo {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--accent);
}

.logo-img {
  height: 60px;
  width: auto;
  object-fit: contain;
  display: block;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-menu li a {
  color: var(--accent);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--accent);
  margin: 5px 0;
  transition: all 0.3s ease;
  border-radius: var(--radius-sm);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: #0E36B8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.btn-secondary {
  background-color: var(--secondary);
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
  background-color: #3D2AC4;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--white);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--white);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-block {
  display: block;
  width: 100%;
}

/* ========== CARDS ========== */
.card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: var(--spacing-lg);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-header {
  margin-bottom: var(--spacing-md);
  padding-bottom: var(--spacing-sm);
  border-bottom: 2px solid var(--border);
}

.card-title {
  font-size: 1.25rem;
  color: var(--accent);
  margin: 0;
}

.card-body {
  margin-bottom: var(--spacing-md);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--border);
}

/* ========== HERO SECTION ========== */
.hero {
  background: linear-gradient(135deg, #1447E6 0%, #4F39F6 100%);
  color: var(--white);
  padding: var(--spacing-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"><path fill="%23ffffff" fill-opacity="0.05" d="M0,0 L1200,0 L1200,60 Q900,100 600,60 T0,60 Z"></path></svg>') no-repeat bottom center;
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero-tagline {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-xl);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-buttons .btn {
  min-width: 180px;
}

/* ========== SECTIONS ========== */
.section {
  padding: var(--spacing-2xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-title {
  font-size: 2.25rem;
  color: var(--accent);
  margin-bottom: var(--spacing-sm);
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--gray-text);
  max-width: 600px;
  margin: 0 auto;
}

.section-bg {
  background-color: var(--light-bg);
}

/* ========== GRID SYSTEM ========== */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ========== FEATURE CARDS ========== */
.feature-card {
  text-align: center;
  padding: var(--spacing-lg);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--spacing-md);
  font-size: 2.5rem;
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.feature-title {
  font-size: 1.25rem;
  color: var(--accent);
  margin-bottom: var(--spacing-sm);
}

.feature-description {
  color: var(--gray-text);
}

/* ========== CATEGORY CARDS ========== */
.category-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  text-align: center;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
}

.category-title {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: var(--spacing-sm);
}

/* ========== FORMS ========== */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-label-required::after {
  content: ' *';
  color: var(--error);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background-color: var(--white);
  transition: all 0.3s ease;
  font-family: var(--font-base);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 71, 230, 0.1);
}

.form-control:disabled {
  background-color: var(--light-bg);
  cursor: not-allowed;
  opacity: 0.6;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

select.form-control {
  cursor: pointer;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 20 20"><path stroke="%236B7280" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6 8l4 4 4-4"/></svg>');
  background-position: right 0.75rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
  appearance: none;
}

.form-error {
  color: var(--error);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.form-control.error {
  border-color: var(--error);
}

.form-control.error + .form-error {
  display: block;
}

.form-helper {
  font-size: 0.875rem;
  color: var(--gray-text);
  margin-top: 0.25rem;
}

/* ========== ALERTS ========== */
.alert {
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius);
  margin-bottom: var(--spacing-md);
  border: 1px solid;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.alert-success {
  background-color: #D1FAE5;
  border-color: #10B981;
  color: #065F46;
}

.alert-error {
  background-color: #FEE2E2;
  border-color: #EF4444;
  color: #991B1B;
}

.alert-warning {
  background-color: #FEF3C7;
  border-color: #F59E0B;
  color: #92400E;
}

.alert-info {
  background-color: #DBEAFE;
  border-color: #3B82F6;
  color: #1E40AF;
}

/* ========== JOB CARDS ========== */
.job-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}

.job-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: var(--spacing-md);
}

.job-title {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.job-company {
  color: var(--gray-text);
  font-size: 0.95rem;
}

.job-badge {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
}

.badge-school {
  background-color: #DBEAFE;
  color: #1E40AF;
}

.badge-college {
  background-color: #E0E7FF;
  color: #4338CA;
}

.badge-parent {
  background-color: #FCE7F3;
  color: #9F1239;
}

.job-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  color: var(--gray-text);
  font-size: 0.95rem;
}

.job-detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.job-description {
  color: var(--gray-text);
  margin-bottom: var(--spacing-md);
  line-height: 1.6;
}

.job-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-sm);
  border-top: 1px solid var(--border);
}

.job-salary {
  font-weight: 600;
  color: var(--primary);
  font-size: 1.125rem;
}

/* ========== FILTERS ========== */
.filter-bar {
  background: var(--white);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: var(--spacing-lg);
  display: flex;
  gap: var(--spacing-md);
  flex-wrap: wrap;
  align-items: end;
}

.filter-group {
  flex: 1;
  min-width: 200px;
}

/* ========== TESTIMONIALS ========== */
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow);
  position: relative;
}

.testimonial-quote {
  font-size: 1.125rem;
  color: var(--gray-text);
  font-style: italic;
  margin-bottom: var(--spacing-md);
  line-height: 1.7;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1.25rem;
}

.testimonial-info h4 {
  font-size: 1rem;
  margin: 0;
}

.testimonial-info p {
  font-size: 0.875rem;
  color: var(--gray-text);
  margin: 0;
}

/* ========== FOOTER ========== */
.footer {
  background-color: var(--accent);
  color: var(--white);
  padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
  color: var(--white);
  margin-bottom: var(--spacing-md);
  font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
}

.footer-section a:hover {
  color: var(--white);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-company {
  line-height: 1.8;
}

.footer-company strong {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: var(--spacing-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-block { display: inline-block; }

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 992px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  
  .hero h1 { font-size: 2.25rem; }
  .hero-tagline { font-size: 1.25rem; }
  
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  
  .section { padding: var(--spacing-xl) 0; }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--white);
    width: 100%;
    text-align: center;
    transition: left 0.3s ease;
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-lg) 0;
    gap: 0;
  }
  
  .nav-menu li {
    width: 100%;
  }
  
  .nav-menu li a {
    display: block;
    padding: var(--spacing-sm) 0;
    border-bottom: none;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
  }
  
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
  
  .filter-bar {
    flex-direction: column;
  }
  
  .filter-group {
    width: 100%;
  }
  
  .job-header {
    flex-direction: column;
    gap: var(--spacing-sm);
  }
  
  .job-footer {
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: start;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  
  .hero h1 { font-size: 1.75rem; }
  .hero-tagline { font-size: 1.125rem; }
  .hero { padding: var(--spacing-xl) 0; }
  
  .section-title { font-size: 1.75rem; }
  
  .btn {
    padding: 0.625rem 1.25rem;
  }
  
  .btn-large {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .card {
    padding: var(--spacing-md);
  }
}

/* ========== MODALS ========== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-md);
  overflow-y: auto;
}

.modal.hidden {
  display: none;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9998;
}

.modal-content {
  position: relative;
  background-color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 9999;
  box-shadow: var(--shadow-xl);
}

.modal-close {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: var(--gray-text);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  transition: all 0.3s ease;
}

.modal-close:hover {
  background-color: var(--light-bg);
  color: var(--accent);
}

/* ========== PRINT STYLES ========== */
@media print {
  .header,
  .nav-menu,
  .hero-buttons,
  .btn,
  .footer {
    display: none;
  }
  
  body {
    font-size: 12pt;
  }
  
  .section {
    padding: 1rem 0;
  }
}
