/* =============================================
   GIANT FREIGHT — Master Stylesheet
   ============================================= */

/* ---------- CSS Variables / Brand Tokens ---------- */
:root {
  --gf-black:      #1A1A1A;
  --gf-black-light:#2A2A2A;
  --gf-navy:       #1A1A1A;
  --gf-navy-light: #2A2A2A;
  --gf-accent:     #C8A96E;
  --gf-accent-hover:#B8964E;
  --gf-orange:     #C8A96E;
  --gf-orange-hover:#B8964E;
  --gf-gold:       #C8A96E;
  --gf-white:      #FFFFFF;
  --gf-light-grey: #F4F5F7;
  --gf-mid-grey:   #6B7280;
  --gf-dark-grey:  #374151;
  --gf-green:      #10B981;
  --gf-red:        #EF4444;
  --gf-shadow:     0 4px 24px rgba(11,29,58,.12);
  --gf-radius:     8px;
  --gf-transition: .25s ease;
  --gf-max-width:  1200px;
  --gf-font:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--gf-font);
  color: var(--gf-dark-grey);
  background: var(--gf-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ---------- Utility ---------- */
.container   { max-width: var(--gf-max-width); margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.sr-only     { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { color: var(--gf-navy); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin-bottom: 16px; }
h3 { font-size: 1.25rem; margin-bottom: 8px; }
p  { margin-bottom: 16px; }
.section-subtitle {
  color: var(--gf-mid-grey);
  font-size: 1.1rem;
  max-width: 640px;
  margin: 0 auto 40px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px;
  border: none; border-radius: var(--gf-radius);
  font-size: 1rem; font-weight: 600;
  cursor: pointer;
  transition: background var(--gf-transition), transform var(--gf-transition);
}
.btn:hover   { transform: translateY(-2px); }
.btn-primary { background: var(--gf-orange); color: var(--gf-white); }
.btn-primary:hover { background: var(--gf-orange-hover); }
.btn-secondary { background: var(--gf-white); color: var(--gf-navy); border: 2px solid var(--gf-navy); }
.btn-secondary:hover { background: var(--gf-navy); color: var(--gf-white); }
.btn-small { padding: 10px 20px; font-size: .9rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
  background: var(--gf-navy);
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  transition: background var(--gf-transition);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-text {
  font-size: 1.5rem; font-weight: 800; color: var(--gf-white);
  letter-spacing: 1px;
}
.logo-text span { color: var(--gf-orange); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  color: rgba(255,255,255,.85); font-weight: 500; font-size: .95rem;
  transition: color var(--gf-transition);
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--gf-orange); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 2px; background: var(--gf-orange);
  transition: width var(--gf-transition);
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-cta { margin-left: 16px; }
.nav-links a.btn.btn-primary { color: var(--gf-white); background: var(--gf-orange); }
.nav-links a.btn.btn-primary:hover { color: var(--gf-white); background: var(--gf-orange-hover); }
.nav-links a.btn.btn-primary::after { display: none; }
.nav-links a.btn.btn-secondary { color: var(--gf-white); border: 2px solid rgba(255,255,255,.5); background: transparent; }
.nav-links a.btn.btn-secondary:hover { background: rgba(255,255,255,.1); color: var(--gf-white); }
.nav-links a.btn.btn-secondary::after { display: none; }

/* Mobile nav */
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 26px; height: 3px; background: var(--gf-white); border-radius: 2px; transition: var(--gf-transition); }

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .nav-links {
    position: fixed; top: 72px; right: -100%; width: 280px; height: calc(100vh - 72px);
    background: var(--gf-navy-light); flex-direction: column; align-items: flex-start;
    padding: 32px 24px; gap: 24px;
    transition: right var(--gf-transition);
    overflow-y: auto;
  }
  .nav-links.open { right: 0; }
  .nav-cta { margin-left: 0; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 160px 0 100px;
  background: var(--gf-navy);
  color: var(--gf-white);
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(26,26,26,.85) 0%, rgba(26,26,26,.5) 100%);
  z-index: 0;
}
.hero::after {
  display: none;
}
/* Hero image variants — applied via inline style on each page */
.hero-home  { background-image: url('../img/hero-road.png'); }
.hero-freight { background-image: url('../img/hero-motorway.png'); }
.hero-recruit { background-image: url('../img/warehouse-worker.png'); }
.hero-about { background-image: url('../img/handshake.webp'); }
.hero-apply { background-image: url('../img/lorry-driver.webp'); }
.hero-contact { background-image: url('../img/curtainsider.webp'); }
.hero-content { position: relative; z-index: 1; max-width: 640px; }
.hero h1 { color: var(--gf-white); margin-bottom: 20px; }
.hero h1 span { color: var(--gf-orange); }
.hero p  { font-size: 1.15rem; color: rgba(255,255,255,.8); margin-bottom: 32px; max-width: 520px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-alt { background: var(--gf-light-grey); }

/* ---------- Service Cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.card {
  background: var(--gf-white);
  border-radius: var(--gf-radius);
  padding: 32px 24px;
  box-shadow: var(--gf-shadow);
  transition: transform var(--gf-transition), box-shadow var(--gf-transition);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(11,29,58,.18); }
.card-icon {
  width: 56px; height: 56px; border-radius: 12px;
  background: rgba(232,101,26,.1);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; font-size: 1.6rem;
}

/* ---------- Stats Row ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px; text-align: center;
}
.stat-number { font-size: 2.5rem; font-weight: 800; color: var(--gf-orange); }
.stat-label  { font-size: .95rem; color: var(--gf-mid-grey); margin-top: 4px; }

/* ---------- CTA Band ---------- */
.cta-band {
  padding: 60px 0;
  background: linear-gradient(135deg, var(--gf-orange) 0%, var(--gf-orange-hover) 100%);
  color: var(--gf-white); text-align: center;
}
.cta-band h2 { color: var(--gf-white); margin-bottom: 12px; }
.cta-band p  { font-size: 1.1rem; margin-bottom: 28px; opacity: .9; }
.cta-band .btn-secondary { border-color: var(--gf-white); color: var(--gf-white); background: transparent; }
.cta-band .btn-secondary:hover { background: var(--gf-white); color: var(--gf-orange); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--gf-navy);
  color: rgba(255,255,255,.7);
  padding: 48px 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 32px;
}
.footer-grid h4 { color: var(--gf-white); margin-bottom: 16px; font-size: 1rem; }
.footer-grid a { display: block; margin-bottom: 8px; font-size: .9rem; transition: color var(--gf-transition); }
.footer-grid a:hover { color: var(--gf-orange); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 20px; text-align: center; font-size: .85rem;
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Forms (Application) ---------- */
.form-section { max-width: 780px; margin: 0 auto; }
.form-step { display: none; }
.form-step.active { display: block; }
.form-progress {
  display: flex; justify-content: space-between; margin-bottom: 40px;
  position: relative;
}
.form-progress::before {
  content: ''; position: absolute; top: 20px; left: 0; right: 0;
  height: 3px; background: #e5e7eb; z-index: 0;
}
.progress-step {
  position: relative; z-index: 1; text-align: center; flex: 1;
}
.progress-circle {
  width: 40px; height: 40px; border-radius: 50%;
  background: #e5e7eb; color: var(--gf-mid-grey);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem;
  transition: background var(--gf-transition), color var(--gf-transition);
}
.progress-step.active .progress-circle,
.progress-step.done .progress-circle {
  background: var(--gf-orange); color: var(--gf-white);
}
.progress-step.done .progress-circle { background: var(--gf-green); }
.progress-label {
  display: block; margin-top: 8px; font-size: .8rem; color: var(--gf-mid-grey);
}

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; margin-bottom: 6px;
  font-weight: 600; font-size: .9rem; color: var(--gf-navy);
}
.form-group label .required { color: var(--gf-red); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 16px;
  border: 2px solid #e5e7eb; border-radius: var(--gf-radius);
  font-size: 1rem; font-family: var(--gf-font);
  transition: border-color var(--gf-transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--gf-orange);
}
.form-group input.error { border-color: var(--gf-red); }
.form-error { color: var(--gf-red); font-size: .8rem; margin-top: 4px; display: none; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.file-upload-area {
  border: 2px dashed #d1d5db; border-radius: var(--gf-radius);
  padding: 32px; text-align: center; cursor: pointer;
  transition: border-color var(--gf-transition), background var(--gf-transition);
}
.file-upload-area:hover { border-color: var(--gf-orange); background: rgba(232,101,26,.03); }
.file-upload-area .upload-icon { font-size: 2rem; margin-bottom: 8px; }
.file-upload-area p { margin: 0; color: var(--gf-mid-grey); font-size: .9rem; }
.file-list { margin-top: 12px; }
.file-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; background: var(--gf-light-grey); border-radius: 6px;
  margin-bottom: 6px; font-size: .85rem;
}
.file-item .remove-file {
  background: none; border: none; color: var(--gf-red); cursor: pointer; font-weight: 700;
}

.form-nav {
  display: flex; justify-content: space-between; margin-top: 32px; padding-top: 24px;
  border-top: 1px solid #e5e7eb;
}

/* ---------- Portal (Worker Area) ---------- */
.portal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 72px);
  margin-top: 72px;
}
.portal-sidebar {
  background: var(--gf-navy);
  padding: 32px 0;
  color: var(--gf-white);
}
.portal-sidebar .user-info {
  padding: 0 20px 24px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 16px;
}
.portal-sidebar .user-info h3 { color: var(--gf-white); font-size: 1rem; }
.portal-sidebar .user-info p  { color: rgba(255,255,255,.5); font-size: .8rem; margin: 0; }
.portal-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; color: rgba(255,255,255,.7); font-size: .9rem;
  transition: background var(--gf-transition), color var(--gf-transition);
}
.portal-nav a:hover, .portal-nav a.active {
  background: rgba(255,255,255,.08); color: var(--gf-white);
}
.portal-nav a.active { border-left: 3px solid var(--gf-orange); }
.portal-main { padding: 32px 40px; background: var(--gf-light-grey); }
.portal-card {
  background: var(--gf-white); border-radius: var(--gf-radius);
  padding: 28px; box-shadow: var(--gf-shadow); margin-bottom: 24px;
}
.portal-card h2 { font-size: 1.3rem; margin-bottom: 16px; }

.doc-list-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid #f0f0f0;
  transition: background var(--gf-transition);
}
.doc-list-item:hover { background: var(--gf-light-grey); }
.doc-list-item:last-child { border-bottom: none; }
.doc-info { display: flex; align-items: center; gap: 12px; }
.doc-icon { font-size: 1.5rem; }
.doc-name { font-weight: 600; font-size: .95rem; }
.doc-meta { font-size: .8rem; color: var(--gf-mid-grey); }
.doc-actions .btn { padding: 8px 16px; font-size: .8rem; }

/* Status badges */
.badge {
  display: inline-block; padding: 4px 12px;
  border-radius: 20px; font-size: .75rem; font-weight: 600;
}
.badge-success { background: rgba(16,185,129,.1); color: var(--gf-green); }
.badge-warning { background: rgba(240,168,48,.1); color: var(--gf-gold); }
.badge-danger  { background: rgba(239,68,68,.1);  color: var(--gf-red); }
.badge-info    { background: rgba(59,130,246,.1);  color: #3B82F6; }

/* Portal responsive */
@media (max-width: 768px) {
  .portal-layout { grid-template-columns: 1fr; }
  .portal-sidebar { display: none; }
  .portal-main { padding: 20px 16px; }
}

/* ---------- Login Page ---------- */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--gf-navy) 0%, var(--gf-navy-light) 100%);
}
.login-card {
  background: var(--gf-white); border-radius: 12px; padding: 48px 40px;
  width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  text-align: center;
}
.login-card h2 { margin-bottom: 8px; }
.login-card .subtitle { color: var(--gf-mid-grey); margin-bottom: 32px; }
.login-card .form-group { text-align: left; }
.login-card .btn { width: 100%; justify-content: center; }
.login-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0; color: var(--gf-mid-grey); font-size: .85rem;
}
.login-divider::before, .login-divider::after {
  content: ''; flex: 1; height: 1px; background: #e5e7eb;
}

/* ---------- Landscape Mobile ---------- */
/* On phones rotated to landscape the viewport is short — tighten vertical spacing */
@media (orientation: landscape) and (max-height: 560px) {
  .toast-container { top: 60px; right: 12px; }
}

/* ---------- Toast Notifications ---------- */
.toast-container { position: fixed; top: 88px; right: 24px; z-index: 9999; }
.toast {
  background: var(--gf-white); border-radius: var(--gf-radius);
  padding: 16px 20px; margin-bottom: 12px; box-shadow: 0 8px 32px rgba(0,0,0,.15);
  display: flex; align-items: center; gap: 12px; min-width: min(300px, calc(100vw - 48px));
  transform: translateX(120%); transition: transform .3s ease;
}
.toast.show { transform: translateX(0); }
.toast-success { border-left: 4px solid var(--gf-green); }
.toast-error   { border-left: 4px solid var(--gf-red); }
.toast-info    { border-left: 4px solid #3B82F6; }

/* ---------- Loading / Spinner ---------- */
.spinner {
  width: 36px; height: 36px; border: 3px solid #e5e7eb;
  border-top-color: var(--gf-orange); border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay {
  position: fixed; inset: 0; background: rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center; z-index: 10000;
}
