/* Job Portal - Main CSS (Fresh UI) */

*{
  margin:0;
  padding:0;
  box-sizing:border-box;
}

:root{
  --primary-color:#1a5f7a;
  --primary-dark:#134a5e;
  --secondary-color:#2a7a99;
  --danger-color:#ef4444;
  --warning-color:#f59e0b;

  --text-dark:#1f2937;
  --text-light:#6b7280;

  --bg-light:#f9fafb;
  --bg-white:#ffffff;
  --border-color:#e5e7eb;

  --shadow-sm:0 1px 2px 0 rgba(0,0,0,0.05);
  --shadow-md:0 4px 6px -1px rgba(0,0,0,0.1);
  --shadow-lg:0 10px 15px -3px rgba(0,0,0,0.1);
  
  --nav-height:80px;
  --nav-offset:24px;
  
}

body{
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height:1.6;
  color:var(--text-dark);
  background-color:var(--bg-light);
}

.container{
  max-width:1200px;
  margin:0 auto;
  padding:0 20px;
}

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
}

/* Header */
header{
  background:var(--bg-white);
  box-shadow:var(--shadow-sm);
  position:sticky;
  top:0;
  z-index:1000;
}

.header-content{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:1rem 0;
}

.logo{
  font-size:1.5rem;
  font-weight:700;
  color:var(--primary-color);
  text-decoration:none;
}

nav ul{
  display:flex;
  list-style:none;
  gap:2rem;
}

nav a{
  text-decoration:none;
  color:var(--text-dark);
  font-weight:500;
  transition:color .25s ease;
}

nav a:hover{
  color:var(--primary-color);
}

.mobile-menu-btn{
  display:none;
  background:none;
  border:none;
  font-size:1.5rem;
  cursor:pointer;
  color:var(--text-dark);
}

/* Breadcrumb */
.breadcrumb{
  background:var(--bg-white);
  padding:1rem 0;
  margin-bottom:2rem;
  border-bottom:1px solid var(--border-color);
}

.breadcrumb-list{
  display:flex;
  list-style:none;
  gap:.5rem;
  flex-wrap:wrap;
  align-items:center;
}

.breadcrumb-list li{
  display:flex;
  align-items:center;
  gap:.5rem;
  color:var(--text-light);
}

.breadcrumb-list li a{
  color:var(--primary-color);
  text-decoration:none;
}

.breadcrumb-list li a:hover{
  text-decoration:underline;
}

/* Hero */
.hero{
  background:linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color:#fff;
  padding:6rem 0;
  text-align:center;
}

.hero h1{
  font-size:2.5rem;
  margin-bottom:1rem;
}

.hero p{
  font-size:1.2rem;
  margin-bottom:0;
  opacity:.92;
}

/* Forms / Buttons */
.form-group{
  display:flex;
  flex-direction:column;
}

.form-group label{
  margin-bottom:.5rem;
  font-weight:600;
  color:var(--text-dark);
}

.form-control{
  padding:.75rem;
  border:1px solid var(--border-color);
  border-radius:10px;
  font-size:1rem;
  transition:border-color .25s ease, box-shadow .25s ease;
  background:var(--bg-white);
}

.form-control:focus{
  outline:none;
  border-color:var(--primary-color);
  box-shadow:0 0 0 3px rgba(37, 99, 235, 0.12);
}

.btn{
  padding:.75rem 1.25rem;
  border:none;
  border-radius:10px;
  font-size:1rem;
  font-weight:600;
  cursor:pointer;
  transition:all .25s ease;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  text-align:center;
  user-select:none;
}

.btn-sm{
  padding:.55rem .9rem;
  font-size:.9rem;
  border-radius:10px;
}

.btn-primary{
  background:var(--primary-color);
  color:#fff;
}

.btn-primary:hover{
  background:var(--primary-dark);
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
}

.btn-success{
  background:var(--secondary-color);
  color:#fff;
}

.btn-success:hover{
  filter:brightness(.95);
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
}

.btn-danger{
  background:var(--danger-color);
  color:#fff;
}

.btn-secondary{
  background:#eef2ff;
  color:var(--primary-dark);
  border:1px solid #dbeafe;
}

.btn-secondary:hover{
  background:#e0e7ff;
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
}

/* Search panel (merged) */
.search-panel{
  background:var(--bg-white);
  border:1px solid var(--border-color);
  border-radius:14px;
  padding:1.25rem;
  box-shadow:var(--shadow-md);
  margin:-3.25rem auto 2.5rem;
  max-width:1100px;
}

.search-panel-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
  margin-bottom:1rem;
}

.search-panel-title{
  font-size:1.2rem;
  margin:0 0 .25rem;
}

.search-panel-subtitle{
  margin:0;
  color:var(--text-light);
  font-size:.95rem;
}

.search-panel-form .sp-grid{
  display:grid;
  grid-template-columns:2fr 1fr 1fr auto;
  gap:1rem;
  align-items:end;
}

.sp-actions .btn{
  white-space:nowrap;
}

.active-filters{
  margin-top:.85rem;
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
  align-items:center;
}

.active-filters-label{
  color:var(--text-light);
  font-size:.9rem;
}

.filter-chip{
  background:#f3f4f6;
  border:1px solid var(--border-color);
  padding:.35rem .6rem;
  border-radius:999px;
  font-size:.875rem;
  color:var(--text-dark);
}

/* Job listing */
.section-title{
  font-size:2rem;
  margin-bottom:1.25rem;
  color:var(--text-dark);
  display:flex;
  align-items:center;
  gap:.6rem;
}

.job-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(320px, 1fr));
  gap:1.25rem;
  margin-bottom:2.5rem;
}

.job-card{
  background:var(--bg-white);
  border-radius:14px;
  padding:1.1rem;
  box-shadow:var(--shadow-sm);
  transition:all .25s ease;
  border:1px solid var(--border-color);
  overflow:hidden;
}

.job-card:hover{
  transform:translateY(-6px);
  box-shadow:var(--shadow-lg);
}

.job-card--fresh{
  position:relative;
}

.job-card-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
  margin-bottom:.9rem;
}

.company-mark{
  width:44px;
  height:44px;
  border-radius:14px;
  background:linear-gradient(135deg, rgba(37,99,235,.14), rgba(16,185,129,.12));
  border:1px solid rgba(37,99,235,.18);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  color:var(--primary-dark);
  flex:0 0 auto;
  overflow:hidden;
}

.company-mark img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.job-badges{
  display:flex;
  gap:.45rem;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.job-badge{
  padding:.25rem .65rem;
  border-radius:999px;
  font-size:.8rem;
  font-weight:700;
  line-height:1.2;
}

.badge-ready{
  background:#d1fae5;
  color:#065f46;
}

.badge-featured{
  background:#fef3c7;
  color:#92400e;
}

.job-title{
  font-size:1.15rem;
  margin:0 0 .35rem;
  color:var(--text-dark);
}

.job-title a{
  color:inherit;
  text-decoration:none;
}

.job-title a:hover{
  color:var(--primary-color);
}

.job-company{
  color:var(--text-light);
  margin:0 0 1rem;
  font-size:.95rem;
  display:flex;
  align-items:center;
  gap:.5rem;
}

.job-info-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:.55rem .75rem;
  margin-bottom:.9rem;
}

.job-info-item{
  display:flex;
  align-items:center;
  gap:.5rem;
  color:var(--text-light);
  font-size:.9rem;
  min-width:0;
}

.job-info-item i{
  color:var(--primary-color);
  flex:0 0 auto;
}

.job-salary{
  font-weight:700;
  color:var(--secondary-color);
}

.job-actions{
  display:flex;
  gap:.5rem;
  margin-top:.25rem;
}

.job-actions--split{
  justify-content:flex-start;
}

/* Job detail */
.job-detail{
  background:var(--bg-white);
  border-radius:14px;
  padding:1.5rem;
  box-shadow:var(--shadow-sm);
  margin-bottom:2rem;
  border:1px solid var(--border-color);
}

.job-detail--fresh{
  overflow:hidden;
}

.job-detail-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:1rem;
  flex-wrap:wrap;
  border-bottom:1px solid var(--border-color);
  padding-bottom:1rem;
  margin-bottom:1rem;
}

.job-detail-title{
  font-size:2rem;
  margin:0;
}

.job-detail-company{
  display:inline-flex;
  align-items:center;
  gap:.5rem;
  color:var(--text-light);
  margin-top:.35rem;
}

.job-detail-badges{
  display:flex;
  gap:.5rem;
  flex-wrap:wrap;
}

.job-meta-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:.75rem;
  margin:1rem 0 1.25rem;
}

.job-meta-item{
  display:flex;
  gap:.6rem;
  align-items:flex-start;
  color:var(--text-light);
  background:var(--bg-light);
  border:1px solid var(--border-color);
  border-radius:12px;
  padding:.8rem;
}

.job-meta-item i{
  color:var(--primary-color);
  margin-top:.15rem;
}

.job-meta-item strong{
  color:var(--text-dark);
  font-weight:800;
}

.job-meta-salary{
  color:#065f46;
}

.job-detail-layout{
  display:grid;
  grid-template-columns:2fr 1fr;
  gap:1.25rem;
  align-items:start;
}

.job-section{
  background:var(--bg-white);
  border:1px solid var(--border-color);
  border-radius:14px;
  padding:1.1rem;
  box-shadow:var(--shadow-sm);
  margin-bottom:1rem;
}

.job-section h3{
  margin:0 0 .75rem;
  font-size:1.1rem;
  display:flex;
  align-items:center;
  gap:.5rem;
}

.job-section-content{
  color:#4b5563;
  line-height:1.85;
  word-wrap:break-word;
}

.job-detail-side{
  position:sticky;
  top:90px;
}

.side-card{
  background:var(--bg-white);
  border:1px solid var(--border-color);
  border-radius:14px;
  padding:1.1rem;
  box-shadow:var(--shadow-sm);
  margin-bottom:1rem;
}

.side-card h3{
  margin:0 0 .5rem;
}

.side-card .muted{
  color:var(--text-light);
  margin:0 0 1rem;
}

.side-apply-actions{
  display:grid;
  gap:.75rem;
}

.side-list{
  margin:0;
  padding-left:1.1rem;
  color:var(--text-light);
}

.side-list li{
  margin:.4rem 0;
}

.job-detail-footer{
  margin-top:.75rem;
  display:flex;
  justify-content:flex-start;
}

/* Alerts */
.alert{
  padding:1rem;
  border-radius:12px;
  margin-bottom:1rem;
  border:1px solid var(--border-color);
}

.alert-success{
  background:#d1fae5;
  color:#065f46;
  border-left:4px solid var(--secondary-color);
}

.alert-danger{
  background:#fee2e2;
  color:#991b1b;
  border-left:4px solid var(--danger-color);
}

.alert-info{
  background:#dbeafe;
  color:#1e40af;
  border-left:4px solid var(--primary-color);
}

/* Spinner */
.spinner{
  border:3px solid var(--border-color);
  border-top:3px solid var(--primary-color);
  border-radius:50%;
  width:40px;
  height:40px;
  animation:spin 1s linear infinite;
  margin:2rem auto;
}

@keyframes spin{
  0%{ transform:rotate(0deg); }
  100%{ transform:rotate(360deg); }
}

/* Footer */
footer{
  background:var(--text-dark);
  color:#fff;
  padding:2rem 0;
  margin-top:3rem;
  text-align:center;
}

/* Responsive */
@media (max-width: 900px){
  .search-panel{
    margin:-2.25rem auto 2rem;
  }

  .search-panel-form .sp-grid{
    grid-template-columns:1fr;
  }

  .job-meta-grid{
    grid-template-columns:1fr;
  }

  .job-detail-layout{
    grid-template-columns:1fr;
  }

  .job-detail-side{
    position:static;
  }
}

@media (max-width: 768px){
  .header-content nav{
    display:none;
    position:absolute;
    top:100%;
    left:0;
    right:0;
    background:var(--bg-white);
    box-shadow:var(--shadow-md);
    border-top:1px solid var(--border-color);
  }

  .header-content nav.active{
    display:block;
  }

  .header-content nav ul{
    flex-direction:column;
    padding:1rem;
    gap:0;
  }

  .header-content nav ul li{
    border-bottom:1px solid var(--border-color);
    padding:.75rem 0;
  }

  .mobile-menu-btn{
    display:block;
  }

  .hero h1{
    font-size:1.85rem;
  }

  .hero p{
    font-size:1rem;
  }

  .job-grid{
    grid-template-columns:1fr;
  }
}

@media (max-width: 480px){
  .container{
    padding:0 15px;
  }

  .job-detail-title{
    font-size:1.5rem;
  }

  .section-title{
    font-size:1.4rem;
  }

  .job-info-grid{
    grid-template-columns:1fr;
  }
}

.page{
  padding-top: calc(var(--nav-height) + var(--nav-offset) + 16px);
}
