/* Modern Job Listing Website - Design System */
:root {
  /* Colors - Inspired by premium job boards */
  --primary-color: #166534;
  /* Dark Green */
  --primary-dark: #14532d;
  --primary-light: #22c55e;
  --secondary-color: #0f172a;
  /* Slate 900 */
  --accent-color: #f59e0b;
  /* Amber 500 */
  --success-color: #10b981;
  --danger-color: #ef4444;

  --bg-color: #f8fafc;
  /* Slate 50 */
  --card-bg: #ffffff;
  --text-main: #1e293b;
  /* Slate 800 */
  --text-muted: #64748b;
  /* Slate 500 */
  --border-color: #e2e8f0;
  /* Slate 200 */

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 3rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

  /* Transitions */
  --transition: all 0.3s ease;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* Reset & Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font-family: inherit;
}

/* Typography Utility */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--secondary-color);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
}

h2 {
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
}

h3 {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-sm);
}

.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.text-primary {
  color: var(--primary-color);
}

/* Layout Components */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Navbar - Colorful & Modern */
.navbar {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.75rem 0;
  /* Slightly tighter for premium feel */
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.75rem;
  font-weight: 800;
  color: white;
  /* White on colored bg */
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo span {
  color: var(--accent-color);
}

/* Pop of color */

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
  margin: 0;
}

.nav-item {
  position: relative;
}

/* For dropdown positioning */

.nav-links a {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: white;
}

/* Underline animation */
.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 1001;
}

.nav-item:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex !important;
  align-items: center;
  padding: 0.75rem 1.25rem !important;
  color: var(--text-main) !important;
  transition: background 0.2s;
}

.dropdown-item i {
  width: 20px;
  color: var(--primary-color);
}

.dropdown-item:hover {
  background: #f8fafc;
  color: var(--primary-color) !important;
}

.dropdown-item::after {
  display: none !important;
}

/* No underline for dropdown items */

/* Buttons in Navbar */
.nav-actions .btn {
  border: none;
  box-shadow: var(--shadow-sm);
}

.nav-actions .btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-actions .btn-outline:hover {
  background: white;
  color: var(--primary-color);
}

.nav-actions .btn-primary {
  background: var(--accent-color);
  color: var(--secondary-color);
}

.nav-actions .btn-primary:hover {
  background: #fbbf24;
  /* Lighter Amber */
  transform: translateY(-1px);
}

.lang-switch {
  color: white;
  opacity: 0.9;
}

/* Buttons - Modern & Interactive */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  /* Pillow shape for modern feel */
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
  letter-spacing: 0.3px;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2), 0 2px 4px -1px rgba(37, 99, 235, 0.1);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3), 0 4px 6px -2px rgba(37, 99, 235, 0.1);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: rgba(22, 101, 52, 0.05);
  font-weight: 600;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(22, 101, 52, 0.3);
  transform: translateY(-2px);
  border-color: var(--primary-color);
}

/* Edit Button - Blue */
.btn-edit {
  border: 2px solid #3b82f6 !important;
  color: #3b82f6 !important;
  background: rgba(59, 130, 246, 0.08) !important;
  font-weight: 600;
}

.btn-edit:hover {
  background: #3b82f6 !important;
  color: white !important;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px);
}

/* Delete Button - Red */
.btn-delete {
  border: 2px solid #ef4444 !important;
  color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  font-weight: 600;
}

.btn-delete:hover {
  background: #ef4444 !important;
  color: white !important;
  box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.4);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}

/* Icon-only Action Buttons - Modern Circular Style */
.btn-icon {
  min-width: 36px;
  height: 36px;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-icon:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.btn-icon:active {
  transform: translateY(0) scale(0.98);
}

/* Edit Icon Button - Blue Gradient */
.btn-icon-edit {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-icon-edit:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* View Icon Button - Green Gradient */
.btn-icon-view {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-icon-view:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Delete Icon Button - Red Gradient */
.btn-icon-delete {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-icon-delete:hover {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* Activate/Play Icon Button - Success Green */
.btn-icon-activate {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

.btn-icon-activate:hover {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.4);
}

/* Pause Icon Button - Warning Orange */
.btn-icon-pause {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-icon-pause:hover {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}


/* Search Hero */
.hero-section {
  background-color: var(--secondary-color);
  /* Darker blue bg */
  padding: 5rem 0;
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content h1 {
  color: white;
  margin-bottom: 1rem;
}

.hero-content p {
  color: var(--primary-light);
  font-size: 1.125rem;
  margin-bottom: 2rem;
}

/* Advanced Search Bar */
.search-box {
  background: white;
  padding: 1rem;
  border-radius: var(--radius-lg);
  display: flex;
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  flex-wrap: wrap;
  /* Mobile friendly */
}

.input-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 200px;
  position: relative;
}

.input-group label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 0.25rem;
  text-align: left;
}

.form-control {
  border: 1px solid var(--border-color);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  width: 100%;
  font-size: 1rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.search-btn {
  padding: 0 2rem;
  padding: 0.75rem 2rem;
  background-color: var(--primary-color);
  color: var(--text-on-primary, #fff);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
  align-self: flex-end;
  margin-bottom: 1px;
}

/* Job Cards (Grid) */
.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.job-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.job-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.company-logo-placeholder {
  width: 50px;
  height: 50px;
  background: var(--bg-color);
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: var(--primary-color);
}

.company-logo {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
}

.job-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--secondary-color);
}

.company-name {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.job-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--bg-color);
  color: var(--text-muted);
  border-radius: 100px;
  font-weight: 500;
}

.job-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.salary {
  font-weight: 700;
  color: var(--text-main);
}

.posted-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Ad Placeholders */
.ad-container {
  background: #f1f5f9;
  border: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.875rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.ad-container::after {
  content: 'Ad Space';
  font-weight: 600;
  letter-spacing: 1px;
}

.ad-banner {
  width: 100%;
  height: 90px;
  /* Leaderboard */
  max-width: 728px;
  margin: 2rem auto;
}

.ad-sidebar {
  width: 100%;
  height: 250px;
  /* Rectangle */
  margin-bottom: 2rem;
}

.ad-label {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 0.65rem;
  border: 1px solid #cbd5e1;
  padding: 2px 4px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Trusted By Section */
.trusted-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  flex-wrap: wrap;
  opacity: 0.6;
}

.trusted-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  filter: grayscale(100%);
  transition: var(--transition);
}

.trusted-logo:hover {
  filter: grayscale(0%);
  transform: scale(1.05);
  opacity: 1;
  color: var(--primary-color);
}

/* Footer */
footer {
  background: var(--secondary-color);
  color: #bdc3c7;
  /* Light grey text on dark */
  padding: 4rem 0 2rem;
  margin-top: 5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: white;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

/* Mobile Menu Components (Desktop Default: Hidden) */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -300px;
  /* Hidden off-screen right */
  width: 280px;
  height: 100%;
  background: white;
  z-index: 10001;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
}

.mobile-logo {
  color: var(--secondary-color);
  font-size: 1.25rem;
}

.mobile-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.mobile-close:hover {
  background: #e2e8f0;
  color: var(--danger-color);
}

.mobile-menu-content {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.mobile-nav-list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  color: var(--text-main);
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: background 0.2s;
}

.mobile-nav-list a:hover,
.mobile-nav-list a.active {
  background: #f1f5f9;
  color: var(--primary-color);
}

.mobile-nav-list a i {
  color: var(--primary-color);
  width: 20px;
  text-align: center;
}

.mobile-sub-link {
  padding-left: 2.75rem !important;
  /* Indent sub items */
  color: var(--text-muted) !important;
  font-size: 0.9rem !important;
}

.mobile-auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

.btn-full {
  width: 100%;
}

/* Responsive Breakpoints */
@media (max-width: 992px) {

  .nav-links,
  .nav-actions {
    display: none !important;
  }

  .mobile-toggle {
    display: block;
  }

  .search-box {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .input-group {
    min-width: 100%;
    margin-bottom: 0.5rem;
  }

  .search-btn {
    width: 100%;
    margin-top: 0.5rem;
  }

  h1 {
    font-size: 2rem;
  }

  .hero-section {
    padding: 3rem 0;
  }
}

@media (max-width: 640px) {
  .logo {
    font-size: 1.5rem;
  }

  .job-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .content-with-sidebar {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }
}

/* Sidebar Layout */
.content-with-sidebar {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.main-content {
  flex: 1;
  min-width: 0;
}

.sidebar {
  width: 320px;
  flex-shrink: 0;
}

.sidebar-section {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.sidebar-section h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}