/* ========================================
   PUBLIC WEBSITE - STYLES
   ======================================== */

:root {
  --pub-primary: #6366f1;
  --pub-primary-dark: #4f46e5;
  --pub-primary-light: #eef2ff;
  --pub-secondary: #0ea5e9;
  --pub-accent: linear-gradient(135deg, #6366f1, #0ea5e9);
  --pub-text: #0f172a;
  --pub-muted: #64748b;
  --pub-border: #e2e8f0;
  --pub-border-strong: #d8dee9;
  --pub-bg: #f8fafc;
  --pub-card: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(15,23,42,.06);
  --shadow-hover: 0 12px 36px rgba(15,23,42,.14);
  --shadow-soft: 0 12px 24px rgba(79,70,229,.08);
  --transition: all .2s ease;
  --section-y: 64px;
  --card-gap: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--pub-text);
  font-size: 15px;
  line-height: 1.65;
  background: #fff;
  letter-spacing: -.01em;
}

a { color: var(--pub-primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--pub-primary-dark); }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -.02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--pub-primary);
  background: var(--pub-primary-light);
  padding: 6px 10px;
  border-radius: 999px;
}

.section-title { font-size: clamp(24px, 2vw, 32px); font-weight: 800; margin-bottom: 6px; }
.section-subtitle { color: var(--pub-muted); font-size: 15px; margin-bottom: 24px; }
.section { padding: var(--section-y) 0; }

/* NAVBAR */
.pub-navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  padding: 12px 0;
  transition: var(--transition);
}
.pub-navbar.nav-scrolled {
  box-shadow: var(--shadow);
  border-bottom-color: var(--pub-border);
}

.pub-navbar .navbar-brand {
  font-size: 20px; font-weight: 800;
  color: var(--pub-primary);
  display: flex; align-items: center; gap: 8px;
}

.pub-nav-link {
  color: var(--pub-muted); font-weight: 600; font-size: 14px;
  padding: 8px 14px !important;
  border-radius: 10px;
  transition: var(--transition);
}

.pub-nav-link:hover, .pub-nav-link.active {
  color: var(--pub-primary);
  background: var(--pub-primary-light);
}

.btn-post-ad {
  background: var(--pub-primary);
  color: #fff;
  padding: 8px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  transition: var(--transition);
  display: inline-flex; align-items: center; gap: 6px;
}

.btn-post-ad:hover { background: var(--pub-primary-dark); color: #fff; transform: translateY(-1px); }

.btn-soft {
  background: var(--pub-primary-light);
  color: var(--pub-primary);
  border: 1px solid rgba(99,102,241,.15);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--pub-border);
  color: var(--pub-text);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--pub-bg);
  color: var(--pub-muted);
  font-size: 12px;
}

/* HERO */
.hero-section {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 45%, #0ea5e9 100%);
  padding: calc(var(--section-y) + 8px) 0 calc(var(--section-y) + 16px);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content { position: relative; z-index: 2; }

.hero-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 18px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 17px; color: rgba(255,255,255,.86);
  margin-bottom: 30px; max-width: 620px;
}

/* SEARCH BOX */
.hero-search {
  background: #fff;
  border-radius: 16px;
  padding: 10px;
  display: flex; gap: 8px;
  flex-wrap: wrap;
  box-shadow: 0 20px 60px rgba(0,0,0,.16);
  max-width: 760px;
}

.hero-search .search-input {
  flex: 1; min-width: 200px;
  border: 1px solid var(--pub-border);
  border-radius: 12px;
  padding: 12px 14px 12px 40px;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748b' class='bi bi-search' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001q.044.06.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1 1 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0'/%3E%3C/svg%3E") no-repeat 14px center;
}

.hero-search .search-input:focus { border-color: var(--pub-primary); }

.hero-search .search-select {
  min-width: 150px;
  border: 1px solid var(--pub-border);
  border-radius: 12px;
  padding: 12px;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.hero-search .btn-search {
  background: var(--pub-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 22px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: var(--shadow-soft);
}

.hero-search .btn-search:hover { background: var(--pub-primary-dark); }

/* HERO STATS */
.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 24px; }
.hero-stat-value { font-size: 26px; font-weight: 800; color: #fff; }
.hero-stat-label { font-size: 13px; color: rgba(255,255,255,.7); }


/* SECTIONS */
.section { padding: var(--section-y) 0; }
.section-alt { background: var(--pub-bg); }

.section-title {
  font-size: 28px; font-weight: 800;
  color: var(--pub-text); margin-bottom: 6px;
}

.section-subtitle { color: var(--pub-muted); font-size: 15px; margin-bottom: 32px; }

/* CATEGORY CARDS */
.cat-card {
  background: var(--pub-card);
  border: 1px solid var(--pub-border);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  text-decoration: none;
  color: var(--pub-text);
  display: block;
  transition: all .2s;
}

.cat-card:hover {
  border-color: var(--pub-primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  color: var(--pub-primary);
}

.cat-card-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  background: var(--pub-primary-light);
  color: var(--pub-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin: 0 auto 14px;
  transition: all .2s;
}

.cat-card:hover .cat-card-icon {
  background: var(--pub-primary);
  color: #fff;
}

.cat-card-name { font-weight: 700; font-size: 14px; }
.cat-card-count { font-size: 12px; color: var(--pub-muted); margin-top: 3px; }

/* CARD PRIMITIVES */
.card-plain {
  background: #fff;
  border: 1px solid var(--pub-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-glow {
  background: #fff;
  border: 1px solid rgba(99,102,241,.15);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

/* LISTING CARDS (public) */
.pub-listing-card {
  background: var(--pub-card);
  border: 1px solid var(--pub-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  height: 100%;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
}

.pub-listing-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: rgba(99,102,241,.3);
}

.pub-listing-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--pub-bg);
}

.pub-listing-body { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pub-listing-category { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--pub-primary); }
.pub-listing-title { font-size: 16px; font-weight: 700; color: var(--pub-text); margin: 0; }
.pub-listing-title a { color: inherit; }
.pub-listing-title a:hover { color: var(--pub-primary); }
.pub-listing-desc { font-size: 13px; color: var(--pub-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.pub-listing-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--pub-muted); flex-wrap: wrap; }
.pub-listing-meta i { font-size: 13px; }
.pub-listing-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--pub-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.pub-listing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pub-listing-actions .btn {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: 8px;
  line-height: 1.3;
}

@media (min-width: 992px) {
  .pub-listing-footer { align-items: center; }
  .pub-listing-actions { flex-wrap: nowrap; gap: 6px; }
}

.badge-featured {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: .5px;
}

/* FILTER BAR */
.filter-bar {
  background: #fff;
  border: 1px solid var(--pub-border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.filter-bar .form-select, .filter-bar .form-control {
  border-radius: 10px; font-size: 13.5px;
}

.filter-sticky { position: sticky; top: 90px; }

/* PAGINATION */
.pub-pagination .page-link {
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--pub-primary);
  border-color: var(--pub-border);
  margin: 0 2px;
}

.pub-pagination .page-item.active .page-link {
  background: var(--pub-primary);
  border-color: var(--pub-primary);
  color: #fff;
}

/* PROFILE DETAIL */
.profile-hero {
  background: linear-gradient(135deg, #1e293b, #334155);
  padding: 48px 0;
  color: #fff;
}

.profile-gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.contact-card {
  background: #fff;
  border: 1px solid var(--pub-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 80px;
}

/* FOOTER */
.pub-footer {
  background: #1e293b;
  color: rgba(255,255,255,.7);
  padding: 60px 0 30px;
}

.footer-brand { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 12px; display: block; }
.footer-heading { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: rgba(255,255,255,.4); margin-bottom: 16px; }
.footer-link { display: block; color: rgba(255,255,255,.6); font-size: 14px; margin-bottom: 8px; transition: color .2s; }
.footer-link:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 24px; margin-top: 40px; font-size: 13px; }
.footer-social {
  width: 38px; height: 38px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.75);
  transition: var(--transition);
}
.footer-social:hover { background: rgba(255,255,255,.16); color: #fff; }

/* LOGIN / AUTH PAGES */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  width: 100%; max-width: 460px;
  box-shadow: 0 25px 60px rgba(0,0,0,.15);
  border: 1px solid rgba(99,102,241,.16);
}

.auth-title { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.auth-subtitle { color: var(--pub-muted); font-size: 14px; margin-bottom: 28px; }

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  color: var(--pub-muted); font-size: 13px; margin: 20px 0;
}

.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--pub-border);
}

/* RESPONSIVE */
@media (max-width: 767px) {
  .hero-section { padding: 44px 0 56px; }
  .hero-search { flex-direction: column; }
  .hero-search .btn-search { width: 100%; }
  .section { padding: 40px 0; }
  .auth-card { padding: 28px 20px; }
}
