/* ============================================================
   Public CSS — anasayfa, ilan listeleme, ilan detay
   ============================================================ */

/* ===== Favori butonu (kartlar üstünde) ===== */
.listing-card-wrap { position: relative; }
.fav-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 0.5px solid var(--n-200);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--n-400);
  transition: all 0.15s;
  z-index: 5;
  padding: 0;
}
.fav-btn:hover {
  border-color: var(--c-error-fg);
  color: var(--c-error-fg);
}
.fav-btn.is-favorited {
  color: var(--c-error-fg);
  border-color: var(--c-error-fg);
  background: var(--c-error-bg);
}
.fav-btn svg { display: block; }

/* Detay sayfasındaki favori butonu */
.btn-favorite {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  background: #FFFFFF;
  border: 0.5px solid var(--n-200);
  border-radius: var(--radius-md);
  color: var(--n-800);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.btn-favorite:hover {
  border-color: var(--c-error-fg);
  color: var(--c-error-fg);
}
.btn-favorite.is-favorited {
  color: var(--c-error-fg);
  border-color: var(--c-error-fg);
  background: var(--c-error-bg);
}
.btn-favorite.is-favorited svg { fill: currentColor; }

/* ----- Anasayfa hero ----- */
.hero {
  background: linear-gradient(135deg, var(--m-800) 0%, var(--m-900) 100%);
  color: var(--n-50);
  padding: 56px 16px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(28px, 5vw, 38px);
  color: var(--n-50);
  margin: 0 0 12px;
  font-weight: 500;
}
.hero p {
  font-size: 15px;
  color: var(--m-100);
  max-width: 540px;
  margin: 0 auto 24px;
  font-weight: 300;
  line-height: 1.6;
}
.hero-search {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  background: #FFFFFF;
  padding: 6px;
  border-radius: var(--radius-lg);
}
.hero-search input {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  border: none;
  background: transparent;
  font-family: inherit;
  color: var(--n-800);
  min-width: 0;
}
.hero-search input:focus { outline: none; }
.hero-search button {
  background: var(--t-600);
  color: var(--n-50);
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 28px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--m-200);
}
.hero-stats b {
  display: block;
  font-size: 22px;
  color: var(--n-50);
  font-weight: 500;
}

.section {
  padding: 36px 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}
.section-head h2 {
  font-size: 18px;
  margin: 0;
}
.section-head a {
  font-size: 13px;
  color: var(--t-600);
}

/* ----- İlan kart grid ----- */
.listings-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .listings-grid { grid-template-columns: repeat(3, 1fr); }
}

.listing-card {
  background: #FFFFFF;
  border: 0.5px solid var(--n-200);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s, transform 0.15s;
}
.listing-card.has-thumb {
  flex-direction: row;
  gap: 14px;
  padding: 14px;
  align-items: stretch;
}
.lc-thumb {
  width: 110px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background: var(--n-100);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.lc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lc-thumb-icon {
  font-size: 38px;
  opacity: 0.6;
}
.lc-thumb-avatar {
  background: var(--m-50);
}
.lc-thumb-icon-wrap, .lc-thumb-icon {
  background: linear-gradient(135deg, var(--m-50), var(--t-50));
}

.detail-hero-img {
  width: 100%;
  max-height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 14px 0 18px;
  background: var(--n-100);
}
.detail-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-height: 400px;
}
.lc-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (max-width: 480px) {
  .listing-card.has-thumb { flex-direction: column; }
  .lc-thumb { width: 100%; height: 140px; }
}
.listing-card:hover {
  border-color: var(--t-600);
  transform: translateY(-1px);
  text-decoration: none;
  color: inherit;
}
.lc-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.lc-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: 3px;
}
.lc-tag-employer { background: var(--t-50); color: var(--t-800); }
.lc-tag-seeker   { background: var(--c-info-bg); color: var(--c-info-text); }
.lc-tag-transfer { background: var(--m-50); color: var(--m-600); }
.lc-tag-product  { background: #FFF7E0; color: #8C6D00; }
.lc-tag-other    { background: var(--n-100); color: var(--n-600); }
.lc-tag-featured { background: var(--c-warning-bg); color: var(--c-warning-text); }
.lc-tag-urgent   { background: var(--c-error-bg); color: var(--c-error-text); }

.lc-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--m-800);
  line-height: 1.3;
  margin: 0;
}
.lc-desc {
  font-size: 13px;
  color: var(--n-600);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lc-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 0.5px solid var(--n-100);
  font-size: 12px;
  color: var(--n-600);
}
.lc-author {
  font-weight: 500;
  color: var(--n-800);
}
.lc-verified {
  display: inline-flex;
  color: var(--t-600);
  margin-left: 2px;
}
.lc-meta {
  font-size: 11px;
}

/* ----- Listeleme sayfası: filtreler + sonuçlar ----- */
.listings-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 24px 0;
}
@media (min-width: 1024px) {
  .listings-page { grid-template-columns: 260px 1fr; }
}

.filters-panel {
  background: #FFFFFF;
  border: 0.5px solid var(--n-200);
  border-radius: var(--radius-lg);
  padding: 18px;
  align-self: start;
}
.filters-panel h3 {
  font-size: 13px;
  font-weight: 500;
  color: var(--n-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 14px;
}
.filter-group {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 0.5px solid var(--n-100);
}
.filter-group:last-of-type { border-bottom: none; padding-bottom: 0; }
.filter-group label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--m-800);
  margin-bottom: 6px;
}

.results-head {
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--n-600);
}
.results-head b { color: var(--m-800); }

.no-results {
  text-align: center;
  padding: 48px 16px;
  color: var(--n-400);
  background: #FFFFFF;
  border: 0.5px solid var(--n-200);
  border-radius: var(--radius-lg);
}
.no-results .ico-big {
  font-size: 36px;
  display: block;
  margin-bottom: 10px;
  opacity: 0.5;
}
.no-results b { color: var(--m-800); }

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  padding: 6px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  border: 0.5px solid var(--n-200);
  background: #FFFFFF;
  color: var(--n-800);
  text-decoration: none;
}
.pagination .current {
  background: var(--m-800);
  color: var(--n-50);
  border-color: var(--m-800);
}
.pagination a:hover {
  border-color: var(--t-600);
  color: var(--t-600);
  text-decoration: none;
}

/* ----- İlan detay sayfası ----- */
.detail-page {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  padding: 20px 0 80px;
}
@media (min-width: 1024px) {
  .detail-page { grid-template-columns: 1fr 320px; }
}

.detail-main {
  background: #FFFFFF;
  border: 0.5px solid var(--n-200);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.detail-tags { margin-bottom: 12px; }
.detail-title {
  font-size: clamp(20px, 4vw, 26px);
  margin: 0 0 8px;
  line-height: 1.3;
}
.detail-meta {
  font-size: 13px;
  color: var(--n-600);
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 0.5px solid var(--n-100);
}
.detail-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 14px;
}
.detail-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
.detail-info-item {
  background: var(--n-50);
  padding: 10px 12px;
  border-radius: var(--radius-md);
}
.detail-info-label {
  font-size: 11px;
  color: var(--n-600);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 3px;
}
.detail-info-value {
  font-size: 14px;
  color: var(--m-800);
  font-weight: 500;
}

.detail-body {
  font-size: 14px;
  color: var(--n-800);
  line-height: 1.7;
}

/* Sticky iletişim kartı */
.contact-card {
  background: #FFFFFF;
  border: 0.5px solid var(--n-200);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: sticky;
  top: 80px;
}
.cc-author {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 0.5px solid var(--n-100);
}
.cc-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--m-800);
  color: var(--n-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  flex-shrink: 0;
  overflow: hidden;
}
.cc-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cc-author-info { min-width: 0; }
.cc-author-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--m-800);
  margin-bottom: 2px;
}
.cc-author-type {
  font-size: 11px;
  color: var(--n-600);
}

.cc-phone {
  background: var(--n-50);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 14px;
  font-weight: 500;
  color: var(--m-800);
  text-align: center;
  margin-bottom: 8px;
  cursor: pointer;
  border: 0.5px dashed var(--n-200);
}
.cc-phone-revealed {
  background: var(--t-50);
  border: 0.5px solid var(--t-200);
  color: var(--t-800);
  cursor: text;
}

.cc-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cc-info {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 0.5px solid var(--n-100);
  font-size: 12px;
  color: var(--n-600);
  line-height: 1.6;
}

/* Mobilde sticky iletişim alta sabit bar */
@media (max-width: 1023px) {
  .contact-card {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
    border-top: 0.5px solid var(--n-200);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
    z-index: 30;
    padding: 12px 16px;
  }
  .cc-author { display: none; }
  .cc-info { display: none; }
}
