/* =========================
   KampusList Base Styles
   ========================= */

/* ====== Page background ====== */
body {
  background:
    radial-gradient(1200px circle at 20% 10%, rgba(13,110,253,.10), transparent 45%),
    radial-gradient(1200px circle at 80% 20%, rgba(25,135,84,.08), transparent 50%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 45%, #f8fafc 100%);
}

/* =========================================================
   NAVBAR (Bootstrap-safe)
   - Sticky
   - BELOW modals
   - ABOVE page content
   ========================================================= */
.kl-navbar {
  position: sticky;
  top: 0;
  z-index: 1030; /* BELOW modal/backdrop (1050+) */
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Allow dropdowns to escape navbar layout */
.kl-navbar,
.kl-navbar .container,
.kl-navbar .container-fluid,
.kl-navbar .navbar-collapse,
.kl-navbar .navbar-nav {
  overflow: visible !important;
}

/* Dropdown above navbar, below modal */
.kl-navbar .dropdown { position: relative; }
.kl-navbar .dropdown-menu {
  z-index: 1040 !important;
}

/* =========================================================
   NAVBAR POLISH
   ========================================================= */
.kl-brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
}

.kl-brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg,
    rgba(13,110,253,.95) 0%,
    rgba(124,58,237,.90) 55%,
    rgba(6,182,212,.90) 100%);
  box-shadow: 0 10px 25px rgba(13,110,253,.20);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  letter-spacing: .3px;
  user-select: none;
}

.kl-brand-name {
  font-weight: 900;
  letter-spacing: .2px;
  color: #0f172a;
  line-height: 1;
  white-space: nowrap;
}

.kl-brand-arrow {
  color: rgba(15,23,42,.45);
  font-weight: 700;
}

.kl-brand-campus {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .18rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(13,110,253,.20);
  background: rgba(13,110,253,.07);
  color: #0b5ed7;
  font-weight: 700;
  font-size: .85rem;
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ====== Center slogan ====== */
.kl-nav-center {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 .9rem;
  min-width: 0;
}

.kl-campus-slogan {
  font-style: italic;
  font-size: .95rem;
  color: rgba(15,23,42,.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: min(760px, 70vw);
  text-align: center;
}

/* =========================================================
   NAV LINKS / ADMIN
   ========================================================= */
.navbar .nav-link { color: rgba(15,23,42,.80); }
.navbar .nav-link:hover { color: #0d6efd; }

.kl-admin-link {
  color: #dc3545 !important;
  font-weight: 800;
}
.kl-admin-link:hover { color: #b02a37 !important; }

/* =========================================================
   NAV CTA (Post Ad) — professional pill link
   ========================================================= */
.kl-navbar .nav-link.kl-nav-cta{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .42rem .85rem;
  border-radius: 999px;
  border: 1px solid rgba(13,110,253,.22);
  background: rgba(13,110,253,.07);
  color: #0d6efd !important;
  font-weight: 700;
  line-height: 1.1;
  transition:
    transform .12s ease,
    background .12s ease,
    border-color .12s ease,
    box-shadow .12s ease,
    color .12s ease;
}

.kl-navbar .nav-link.kl-nav-cta:hover,
.kl-navbar .nav-link.kl-nav-cta:focus{
  color: #0b5ed7 !important;
  background: rgba(13,110,253,.12);
  border-color: rgba(13,110,253,.42);
  box-shadow: 0 10px 22px rgba(13,110,253,.12);
  transform: translateY(-1px);
  text-decoration: none;
}

.kl-navbar .nav-link.kl-nav-cta:active{
  transform: translateY(0);
  box-shadow: none;
}

/* Optional: if you ever add aria-current="page" to the link */
.kl-navbar .nav-link.kl-nav-cta[aria-current="page"]{
  background: rgba(13,110,253,.14);
  border-color: rgba(13,110,253,.55);
}

/* =========================================================
   LAYOUT / CONTAINERS
   ========================================================= */
.kl-top-container { max-width: 1120px; }

main,
.kl-top-container,
.kl-alert,
.kl-footer {
  position: relative;
  z-index: auto; /* keep BELOW navbar/dropdown */
}

/* =========================================================
   ALERTS
   ========================================================= */
.kl-alert {
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,.06);
}

/* =========================================================
   FOOTER
   ========================================================= */
.kl-footer {
  background: linear-gradient(180deg, rgba(255,255,255,.90) 0%, #f8fafc 100%);
  border-top: 1px solid rgba(0,0,0,.08);
}

.kl-footer::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #0d6efd 0%, #7c3aed 55%, #06b6d4 100%);
  opacity: .85;
}

.kl-footer-brand {
  font-weight: 900;
  letter-spacing: .2px;
  color: #111827;
  line-height: 1.1;
}

.kl-footer-muted { color: rgba(17,24,39,.58); }

.kl-footer-pill {
  display: inline-flex;
  align-items: center;
  padding: .35rem .7rem;
  border-radius: 999px;
  font-size: .875rem;
  text-decoration: none;
  color: rgba(17,24,39,.72);
  background: rgba(255,255,255,.75);
  border: 1px solid rgba(0,0,0,.06);
  transition: transform .12s ease, box-shadow .12s ease, color .12s ease;
}

.kl-footer-pill:hover {
  color: #0d6efd;
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(0,0,0,.06);
}

.kl-footer-legal {
  font-size: 0.75em;
  opacity: 0.55;
  font-weight: 400;
}

/* =========================================================
   CREDIT CHIP
   ========================================================= */
.kl-credit-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .65rem;
  border-radius: 999px;
  border: 1px solid rgba(13,110,253,.20);
  background: rgba(13,110,253,.08);
  font-weight: 800;
  font-size: .85rem;
}
.kl-credit-num { color: #0b5ed7; font-weight: 900; }

/* =========================================================
   FEATURED STRIP UI
   Used by: _featured_ad_cards.html
   ========================================================= */
.kl-fimg { position: relative; }

.kl-fcard-wrap{
  position: relative; /* stacking root */
  z-index: 0;

  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 10px 26px rgba(0,0,0,.07);
  overflow: hidden;

  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.kl-fstrip-item:hover .kl-fcard-wrap{
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(0,0,0,.10);
  border-color: rgba(0,0,0,.10);
}

/* =========================================================
   SHINY GOLD STAR ONLY (Tier 3+)
   Works with: <div class="kl-badge kl-badge-star"><span class="kl-star">★</span></div>
   ========================================================= */
.kl-badge{
  position:absolute;
  top: 10px;
  left: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Remove badge container visuals when used as star */
.kl-badge.kl-badge-star{
  padding: 0 !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Star glyph */
.kl-badge-star .kl-star{
  font-size: 22px;
  line-height: 1;

  color: transparent !important;

  background: linear-gradient(135deg,
    #fff7cc 0%,
    #fde047 20%,
    #facc15 45%,
    #f59e0b 70%,
    #fde047 100%
  );
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;

  text-shadow:
    0 0 6px rgba(255,215,0,.60),
    0 0 14px rgba(245,158,11,.45),
    0 1px 0 rgba(255,255,255,.60);

  animation:
    klStarFloat 3.8s ease-in-out infinite,
    klStarSweep 4.5s linear infinite,
    klStarPulse 2.8s ease-in-out infinite;
}

@keyframes klStarFloat{
  0%{ transform: translateY(0); }
  50%{ transform: translateY(-3px); }
  100%{ transform: translateY(0); }
}
@keyframes klStarSweep{
  0%{ background-position: 0% 50%; }
  100%{ background-position: 200% 50%; }
}
@keyframes klStarPulse{
  0%{ filter: brightness(1); }
  50%{ filter: brightness(1.35); }
  100%{ filter: brightness(1); }
}

/* =========================================================
   PREMIUM HIGHLIGHTED CARD (active highlight_until)
   ========================================================= */
.kl-fcard-wrap.kl-highlighted{
  border: 1px solid transparent;
  box-shadow:
    0 14px 38px rgba(0,0,0,.12),
    0 0 0 2px rgba(34,197,94,.18),
    0 0 0 8px rgba(59,130,246,.10);
}

/* animated gradient border */
.kl-fcard-wrap.kl-highlighted::before{
  content:"";
  position:absolute;
  inset:0;
  padding: 2px;
  border-radius: 18px;

  background: linear-gradient(135deg, #22c55e, #3b82f6, #22c55e);
  background-size: 300% 300%;

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  pointer-events:none;
  z-index: 1;
  animation: klHighlightBorder 6s ease-in-out infinite;
}

/* soft moving light sweep */
.kl-fcard-wrap.kl-highlighted::after{
  content:"";
  position:absolute;
  top:-60%;
  left:-80%;
  width: 70%;
  height: 220%;

  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: rotate(18deg);
  opacity:.6;

  pointer-events:none;
  z-index: 1;
  animation: klHighlightSweep 3.8s ease-in-out infinite;
}

/* hover = slightly stronger presence */
.kl-fstrip-item:hover .kl-fcard-wrap.kl-highlighted{
  box-shadow:
    0 18px 48px rgba(0,0,0,.16),
    0 0 0 2px rgba(34,197,94,.28),
    0 0 0 10px rgba(59,130,246,.16);
}

@keyframes klHighlightBorder{
  0%   { background-position:   0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position:   0% 50%; }
}
@keyframes klHighlightSweep{
  0%   { transform: translateX(0) rotate(18deg); opacity:0; }
  20%  { opacity:.55; }
  60%  { opacity:.55; }
  100% { transform: translateX(260%) rotate(18deg); opacity:0; }
}

/* =========================================================
   FEATURED CARD INFO AREA — FLAT & INTEGRATED
   ========================================================= */
.kl-fcard{
  position: relative;
  z-index: 2;           /* above border pseudo-elements */
  display: block;

  background: transparent;
  border: 0;
  border-radius: 0 !important;
  box-shadow: none;
}

.kl-fcard *{
  position: relative;
  z-index: 3;
}

.kl-fbody{
  padding: 8px 10px 10px;
  border-top: 1px solid rgba(0,0,0,.05);
  border-radius: 0 !important;
}

.kl-ftitle{
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.2;
}

.kl-fmeta{
  font-size: .75rem;
  margin-top: 2px;
}

.kl-fprice{
  margin-top: 4px;
  font-size: .85rem;
  font-weight: 800;
}