/* jobspage.css */

/* --- GENERAL & HEADER --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Desktopda hamburger gizli */
#openSidebar {
  display: none;
}

.header-search-btn {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  gap: 6px;
  transition: 0.3s;
  font-size: 1rem;
}

/* Desktopda Axtarış düyməsi gizli */
.header-search-btn {
  display: none;
}

.header-search-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* SIDEBAR BALANS DÜZƏLİŞİ (YENİ) */
.sidebar-balance-box {
  background: #f8fafc;
  padding: 12px 20px;
  margin: 0 0 20px 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
}

.bal-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.bal-label {
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 2px;
  font-weight: 500;
}

.sidebar-amount {
  font-weight: 800;
  color: #1e293b;
  font-size: 1.1rem;
  margin: 0;
}

.sidebar-add-btn {
  background: #f59e0b;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
  transition: 0.3s;
}

.sidebar-add-btn:hover {
  background: #d97706;
  transform: scale(1.1);
}

/* --- SEARCH WRAPPER --- */
.search-wrapper {
  background: #ffffff;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  margin-bottom: 30px;
  border: 1px solid #e2e8f0;
  position: relative;
}

.search-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.main-search-box {
  position: relative;
}
.main-search-box i {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  z-index: 2;
}
.main-search-box input {
  padding-left: 40px;
}

input,
select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.95rem;
  color: #1e293b;
  background-color: #f8fafc;
  outline: none;
  box-sizing: border-box;
  height: 48px;
}
input:focus,
select:focus {
  border-color: #1e293b;
  background-color: #fff;
}

.search-filters {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 15px;
  align-items: center;
  padding-top: 15px;
  border-top: 1px solid #f1f5f9;
}

button[type="submit"] {
  background-color: #1e293b;
  color: white;
  border: none;
  padding: 0 30px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  height: 48px;
}

.close-search-btn {
  display: none;
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  z-index: 10;
}

/* --- CHIPS --- */
.quick-categories {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 40px;
}
.cat-chip {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 10px 20px;
  border-radius: 50px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: 0.3s;
}
.cat-chip:hover,
.cat-chip.active {
  border-color: #3b82f6;
  color: #1e293b;
}
.cat-chip i {
  color: #3b82f6;
}

/* --- JOB CARDS --- */
.listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #f1f5f9;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: 0.3s;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.company-logo {
  width: 50px;
  height: 50px;
  background: #eff6ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #3b82f6;
  margin-right: 15px;
  flex-shrink: 0;
}

.company-logo-img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 15px;
  flex-shrink: 0;
  border: 1px solid #e2e8f0;
}

.job-type-badge {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 700;
  margin-top: 35px;
  text-transform: uppercase;
}
.badge-vacancy {
  background: #dbeafe;
  color: #1d4ed8;
}
.badge-cv {
  background: #fce7f3;
  color: #be185d;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin: 10px 0 5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-subtitle {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.card-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}
.tag {
  background: #f1f5f9;
  color: #475569;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
}

.card-price {
  margin-top: auto;
  font-size: 1.1rem;
  font-weight: 700;
  color: #10b981;
}

.load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}
.btn-outline {
  background: transparent;
  border: 2px solid #1e293b;
  color: #1e293b;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s;
}
.btn-outline:hover {
  background: #1e293b;
  color: white;
}

.skeleton {
  background: #e2e8f0;
  height: 200px;
  border-radius: 12px;
  animation: pulse 1.5s infinite ease-in-out;
}
@keyframes pulse {
  0% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.6;
  }
}

/* --- VIP STYLE (Homepage-dən uyğunlaşdırıldı) --- */

/* Kartın VİP Görünüşü */
.card-vip-style {
  border: 2px solid #f59e0b !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.15) !important;
  position: relative; /* Badge-in düzgün durması üçün vacibdir */
}

/* VİP Etiketi (Sağ üst künc) */
.status-badge.vip-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(45deg, #f59e0b, #d97706);
  color: white;
  padding: 5px 12px;
  border-radius: 20px; /* Tam oval olması üçün */
  font-weight: 800;
  font-size: 0.75rem;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  gap: 5px;
  animation: popIn 0.3s ease;
}

/* Animasiya effekti */
@keyframes popIn {
  from {
    transform: scale(0);
  }
  to {
    transform: scale(1);
  }
}

/* Mobildə düzəliş */
@media (max-width: 768px) {
  .status-badge.vip-badge {
    top: 8px;
    right: 8px;
    padding: 4px 8px;
    font-size: 0.65rem;
  }
}

/* =========================================
     RESPONSIVE (MOBIL) HİSSƏSİ
     ========================================= */
@media (max-width: 768px) {
  /* 1. Header Düzəlişi */
  header {
    justify-content: space-between;
    padding: 0 15px;
    height: 60px;
    position: sticky;
    top: 0;
    z-index: 1000;
  }

  /* Hamburger Solda */
  #openSidebar {
    display: flex !important;
    background: transparent;
    border: none;
    font-size: 1.4rem;
    padding: 0;
    margin: 0 !important;
    order: 1;
  }

  /* --- LOGO MƏRKƏZDƏ (YAZINI GİZLƏT) --- */
  .logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    order: 2;
    z-index: 5;
  }
  .logo h1 {
    font-size: 0 !important; /* Yazını gizlət */
    gap: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
  }
  .logo h1 i {
    font-size: 1.8rem !important; /* İkonu göstər */
    display: block;
    color: #f59e0b;
    line-height: 1;
  }

  /* Header Sağ Tərəf */
  .header-actions {
    gap: 12px;
    order: 3;
  }

  /* Balansı və adı gizlət (mobildə) */
  .mobile-hide,
  #userNameDisplay {
    display: none !important;
  }

  /* Sıralama: Search -> Profile */
  #mobileSearchBtn {
    order: 1;
  }
  .header-actions .user-dropdown {
    order: 2;
  }

  .profile-btn {
    border: none;
    padding: 0;
    background: transparent;
    font-size: 1.3rem;
  }
  .profile-btn:hover {
    background: transparent;
  }

  .header-search-btn {
    display: flex;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 1.3rem;
  }

  /* 2. Kart Grid (2 Sütun) */
  .listings {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  /* Kartların Mobildə Görünüşü */
  .card {
    padding: 12px;
  }

  .card-header {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Elementləri sağa və sola yayır */
  }

  .company-logo {
    width: 35px;
    height: 35px;
    font-size: 1rem;
    margin-right: 0;
  }

  .company-logo-img {
    width: 35px;
    height: 35px;
    margin-right: 0;
  }

  .job-type-badge {
    position: static !important; /* Absolute olmasın */
    margin-left: auto; /* Sağa yaslansın */
    font-size: 0.65rem;
    padding: 4px 8px;
    transform: none !important; /* Hər hansı sürüşməni ləğv et */
  }
  .card-title {
    font-size: 0.9rem;
    margin: 15px 0 5px 0;
    line-height: 1.3;
  }

  .card-subtitle {
    font-size: 0.75rem;
    margin-bottom: 8px;
  }

  .card-tags {
    display: none;
  }

  .card-price {
    font-size: 0.9rem;
  }

  .section-title {
    text-align: center;
  }

  .container {
    padding: 0 10px;
  }

  /* Search Panel Mobile */
  .search-wrapper {
    display: none;
    padding: 20px;
  }
  .search-wrapper.active {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    overflow-y: auto;
    background: white;
  }
  .search-top,
  .search-filters {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .search-filters {
    border-top: none;
    padding-top: 0;
  }
  button[type="submit"] {
    width: 100%;
    margin-top: 10px;
  }
  .close-search-btn {
    display: block;
  }
}
.ad-banner-section .container {
  padding: 0; /* Konteyner paddingini sıfırla ki, şəkil tam görünsün */
}

/* Mobildə reklamın kənarlardan azca aralı qalması üçün */
@media (max-width: 768px) {
  .ad-banner-section .ad-box {
    border-radius: 12px;
  }
}
/* =========================================
   5. STORIES (TƏCİLİ) BÖLMƏSİ - DÜZƏLİŞ
   ========================================= */

/* Konteynerin özü */
.stories-container {
  padding: 20px 0;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 30px;
}

/* --- STORIES (TƏCİLİ) HİSSƏSİ --- */
.stories-container {
  background: white;
  padding: 15px 0;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 20px;
}

.stories-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.stories-header h4 {
  margin: 0;
  color: #ef4444; /* Qırmızı rəng */
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.stories-link {
  font-size: 0.9rem;
  color: #64748b;
  text-decoration: none;
  font-weight: 500;
}

.stories-wrapper {
  display: flex;
  gap: 15px;
  overflow-x: auto; /* Yana sürüşdürmə */
  padding-bottom: 10px;
  scrollbar-width: none; /* Firefox-da skrollu gizlət */
}

/* Chrome/Safari-də skrollu gizlət */
.stories-wrapper::-webkit-scrollbar {
  display: none;
}

/* Tək element (Story) */
.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  min-width: 72px; /* Sıxılmasın deyə minimum ölçü */
}

/* Şəklin çərçivəsi */
.story-ring {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  padding: 3px;
  border: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

/* Aktiv (Təcili) halda qırmızı çərçivə */
.story-ring.active {
  border-color: #ef4444;
}

.story-item:hover .story-ring {
  transform: scale(1.05);
}

/* Şəklin özü */
.story-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover; /* Şəkli dairəyə sığdırır */
  background-color: #f1f5f9;
}

/* Qiymət yazısı */
.story-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e293b;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

/* SKELETON (Yüklənəndə görünən boz dairələr) */
.story-skeleton {
  min-width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
