/* Condensed from legacy includes/header.php + footer.php for homepage shell */
:root {
  --safety-orange: #ff6b00;
  --safety-orange-hover: #e65100;
  --industrial-black: #111827;
  --steel-gray: #374151;
  --concrete: #f3f4f6;
  --pure-white: #ffffff;
  --error-red: #ef4444;
  --success-green: #10b981;
  --employer-blue: #2563eb;
  --staff-purple: #7c3aed;
  --font-main: 'Inter', sans-serif;
  --header-height: 80px;
}

body.legacy-wpd {
  margin: 0;
  font-family: var(--font-main);
  background-color: var(--pure-white);
  color: var(--industrial-black);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.legacy-wpd main {
  flex: 1;
}

body.legacy-wpd * {
  box-sizing: border-box;
}

body.legacy-wpd a {
  text-decoration: none;
  color: inherit;
}

body.legacy-wpd .site-header {
  background: var(--industrial-black);
  color: white;
  height: var(--header-height);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-bottom: 3px solid var(--safety-orange);
}

body.legacy-wpd .header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

body.legacy-wpd .logo {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: white;
  flex-shrink: 0;
}

body.legacy-wpd .logo-img {
  display: block;
  height: calc(var(--header-height) - 2px);
  width: auto;
}

body.legacy-wpd .main-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

body.legacy-wpd .header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

body.legacy-wpd .btn-header {
  padding: 0.6rem 1.25rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

body.legacy-wpd .btn-login {
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: none;
  padding: 0.6rem 0.5rem;
}

body.legacy-wpd .btn-login:hover {
  color: var(--safety-orange);
}

body.legacy-wpd .btn-post {
  background: var(--safety-orange);
  color: white;
  border: 2px solid var(--safety-orange);
}

body.legacy-wpd .btn-post:hover {
  background: var(--safety-orange-hover);
  border-color: var(--safety-orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(255, 107, 0, 0.3);
}

body.legacy-wpd .btn-resume {
  background: transparent;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

body.legacy-wpd .btn-resume:hover {
  border-color: var(--safety-orange);
  color: var(--safety-orange);
}

body.legacy-wpd .login-dropdown {
  position: relative;
}

body.legacy-wpd .login-dropdown-menu {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease;
  z-index: 1001;
  overflow: hidden;
}

body.legacy-wpd .login-dropdown:hover .login-dropdown-menu,
body.legacy-wpd .login-dropdown.active .login-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

body.legacy-wpd .login-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
  border-top: 1px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
}

body.legacy-wpd .login-dropdown-header {
  padding: 1rem;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  font-size: 0.7rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

body.legacy-wpd .login-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  color: var(--industrial-black);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.15s;
  border-bottom: 1px solid #f3f4f6;
}

body.legacy-wpd .login-dropdown-item:last-child {
  border-bottom: none;
}

body.legacy-wpd .login-dropdown-item:hover {
  background: #f3f4f6;
  color: var(--safety-orange);
}

body.legacy-wpd .login-dropdown-item i {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

body.legacy-wpd .login-dropdown-item.worker i {
  background: #fff7ed;
  color: var(--safety-orange);
}

body.legacy-wpd .login-dropdown-item.employer i {
  background: #eff6ff;
  color: var(--employer-blue);
}

body.legacy-wpd .user-menu {
  position: relative;
}

body.legacy-wpd .user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.5rem;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  transition: opacity 0.2s;
}

body.legacy-wpd .user-menu-trigger:hover {
  opacity: 0.8;
}

body.legacy-wpd .user-avatar {
  width: 36px;
  height: 36px;
  background: var(--safety-orange);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

body.legacy-wpd .user-avatar.staff {
  background: var(--staff-purple);
}

body.legacy-wpd .user-avatar.employer {
  background: var(--employer-blue);
}

body.legacy-wpd .user-name {
  font-weight: 600;
  font-size: 0.95rem;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.legacy-wpd .user-menu-dropdown {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s;
  z-index: 1001;
  overflow: hidden;
}

body.legacy-wpd .user-menu-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 20px;
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
  border-top: 1px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
}

body.legacy-wpd .user-menu.active .user-menu-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

body.legacy-wpd .user-menu-header {
  padding: 1rem;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

body.legacy-wpd .user-menu-header .name {
  font-weight: 700;
  color: var(--industrial-black);
  font-size: 0.95rem;
}

body.legacy-wpd .user-menu-header .email {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

body.legacy-wpd .user-menu-links {
  padding: 0.5rem 0;
}

body.legacy-wpd .user-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--steel-gray);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.15s;
}

body.legacy-wpd .user-menu-link:hover {
  background: #f3f4f6;
  color: var(--safety-orange);
}

body.legacy-wpd .user-menu-link i {
  width: 20px;
  text-align: center;
  color: #9ca3af;
}

body.legacy-wpd .user-menu-link:hover i {
  color: var(--safety-orange);
}

body.legacy-wpd .user-menu-link.logout {
  border-top: 1px solid #e5e7eb;
  color: var(--error-red);
}

body.legacy-wpd .user-menu-link.logout i {
  color: var(--error-red);
}

body.legacy-wpd .user-menu-link.logout:hover {
  background: #fef2f2;
}

body.legacy-wpd .mobile-toggle {
  display: none;
  color: white;
  font-size: 1.6rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-right: -0.5rem;
}

body.legacy-wpd .mobile-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background: var(--industrial-black);
  padding: 0;
  max-height: 0;
  overflow-y: auto;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  border-bottom: 3px solid var(--safety-orange);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

body.legacy-wpd .mobile-nav.active {
  max-height: 80vh;
}

body.legacy-wpd .mobile-nav-inner {
  padding: 1rem 1.5rem 2rem;
}

body.legacy-wpd .mobile-nav-section {
  padding: 1.5rem 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9ca3af;
}

body.legacy-wpd .mobile-user-info {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.legacy-wpd .mobile-user-info .name {
  font-weight: 700;
  color: white;
  font-size: 1.1rem;
}

body.legacy-wpd .mobile-user-info .role {
  font-size: 0.8rem;
  color: var(--safety-orange);
  text-transform: uppercase;
  margin-top: 0.25rem;
}

body.legacy-wpd .mobile-nav-inner > a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}

body.legacy-wpd .mobile-nav-inner > a:last-child {
  border-bottom: none;
}

body.legacy-wpd .mobile-nav-inner > a:hover {
  color: var(--safety-orange);
  padding-left: 0.5rem;
}

body.legacy-wpd .mobile-nav-inner > a i {
  width: 24px;
  text-align: center;
  color: var(--safety-orange);
}

body.legacy-wpd .mobile-nav-inner > a.employer-link i {
  color: var(--employer-blue);
}

body.legacy-wpd .mobile-nav-inner > a.staff-link i {
  color: var(--staff-purple);
}

body.legacy-wpd main.legacy-php-main {
  flex: 1;
  padding: 0;
  margin: 0;
}

/* Footer (from footer.php) */
body.legacy-wpd .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

body.legacy-wpd .site-footer {
  background: linear-gradient(180deg, #1c1c1e 0%, #111827 100%);
  color: #9ca3af;
  padding: 60px 0 0 0;
  margin-top: auto;
}

body.legacy-wpd .footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.legacy-wpd .footer-brand {
  padding-right: 30px;
}

body.legacy-wpd .footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  margin-bottom: 16px;
}

body.legacy-wpd .footer-logo i {
  color: #ff6b00;
  font-size: 1.5rem;
}

body.legacy-wpd .footer-logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

body.legacy-wpd .footer-logo-text .highlight {
  color: #ff6b00;
}

body.legacy-wpd .footer-tagline {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 24px;
  color: #9ca3af;
}

body.legacy-wpd .footer-social {
  display: flex;
  gap: 12px;
}

body.legacy-wpd .social-icon {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 16px;
  transition: all 0.2s ease;
  text-decoration: none;
}

body.legacy-wpd .social-icon:hover {
  background: #ff6b00;
  color: #fff;
  transform: translateY(-3px);
}

body.legacy-wpd .footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #ff6b00;
  display: inline-block;
}

body.legacy-wpd .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

body.legacy-wpd .footer-links li {
  margin-bottom: 12px;
}

body.legacy-wpd .footer-links a {
  color: #9ca3af;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.legacy-wpd .footer-links a:hover {
  color: #ff6b00;
  transform: translateX(4px);
}

body.legacy-wpd .footer-links a.staff-link {
  color: #7c3aed;
}

body.legacy-wpd .footer-links a.staff-link:hover {
  color: #8b5cf6;
}

body.legacy-wpd .footer-newsletter {
  padding: 30px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.legacy-wpd .newsletter-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

body.legacy-wpd .newsletter-text h4 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

body.legacy-wpd .newsletter-text h4 i {
  color: #ff6b00;
}

body.legacy-wpd .newsletter-text p {
  margin: 0;
  font-size: 0.9rem;
  color: #9ca3af;
}

body.legacy-wpd .newsletter-form {
  display: flex;
  gap: 0.75rem;
  flex: 1;
  max-width: 450px;
}

body.legacy-wpd .newsletter-input {
  flex: 1;
  padding: 0.9rem 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  font-size: 0.95rem;
}

body.legacy-wpd .newsletter-btn {
  padding: 0.9rem 1.5rem;
  background: #ff6b00;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

body.legacy-wpd .newsletter-btn:hover {
  background: #e65100;
}

body.legacy-wpd .footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  flex-wrap: wrap;
  gap: 1rem;
}

body.legacy-wpd .footer-bottom-left p {
  margin: 0;
  font-size: 0.875rem;
  color: #9ca3af;
}

body.legacy-wpd .footer-bottom-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

body.legacy-wpd .footer-bottom-right a {
  color: #9ca3af;
}

body.legacy-wpd .footer-bottom-right a:hover {
  color: #ff6b00;
}

body.legacy-wpd .sep {
  color: #4b5563;
}

@media (max-width: 1024px) {
  body.legacy-wpd .main-nav {
    display: none;
  }

  body.legacy-wpd .header-actions {
    display: none;
  }

  body.legacy-wpd .mobile-toggle {
    display: block;
  }

  body.legacy-wpd .mobile-nav {
    top: var(--header-height);
  }

  body.legacy-wpd :root {
    --header-height: 70px;
  }

  body.legacy-wpd .footer-top {
    grid-template-columns: 1fr;
  }

  body.legacy-wpd .toast-container {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }

  body.legacy-wpd .toast {
    min-width: auto;
  }

  body.legacy-wpd .back-to-top {
    width: 44px;
    height: 44px;
    left: 16px;
    bottom: 16px;
  }
}

/* Toast + back-to-top (legacy footer.php) */
body.legacy-wpd .toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

body.legacy-wpd .toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  min-width: 300px;
  max-width: 450px;
  animation: wpd-slide-in-right 0.3s ease;
}

@keyframes wpd-slide-in-right {
  from {
    opacity: 0;
    transform: translateX(100px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

body.legacy-wpd .toast.removing {
  animation: wpd-slide-out-right 0.3s ease forwards;
}

@keyframes wpd-slide-out-right {
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

body.legacy-wpd .toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

body.legacy-wpd .toast.success .toast-icon {
  background: #dcfce7;
  color: #22c55e;
}

body.legacy-wpd .toast.error .toast-icon {
  background: #fee2e2;
  color: #ef4444;
}

body.legacy-wpd .toast.warning .toast-icon {
  background: #fef3c7;
  color: #f59e0b;
}

body.legacy-wpd .toast.info .toast-icon {
  background: #dbeafe;
  color: #3b82f6;
}

body.legacy-wpd .toast-content {
  flex: 1;
}

body.legacy-wpd .toast-title {
  font-weight: 600;
  color: #1f2937;
  font-size: 14px;
  margin-bottom: 2px;
}

body.legacy-wpd .toast-message {
  color: #6b7280;
  font-size: 13px;
}

body.legacy-wpd .toast-close {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px;
  font-size: 16px;
  line-height: 1;
}

body.legacy-wpd .toast-close:hover {
  color: #4b5563;
}

body.legacy-wpd .back-to-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 48px;
  height: 48px;
  background: #ff6b00;
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.4);
  z-index: 99;
  font-size: 18px;
}

body.legacy-wpd .back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

body.legacy-wpd .back-to-top:hover {
  background: #e65100;
  transform: translateY(-3px);
}
