/* ============================================================
   IN-SITU TENDER TRADE — Theme Stylesheet (Full Complete Version)
   ============================================================ */

*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%;}
body{
  margin:0;
  font-family:'Inter','Plus Jakarta Sans',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  font-size:15px;
  line-height:1.6;
  color:#0F172A;
  background:#F1F5F9;
}
a{color:inherit;text-decoration:none;}
img{max-width:100%;display:block;}
h1,h2,h3{font-family:'Plus Jakarta Sans','Inter',sans-serif;letter-spacing:-.02em;line-height:1.2;margin:0;}
.container{width:100%;max-width:1240px;margin:0 auto;padding:0 20px;}

/* ---------- HEADER ---------- */
.site-header{
  position:sticky;
  top:0;
  z-index:999;
  background:rgba(15,23,42,.92);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(255,255,255,.06);
  width:100%;
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:72px;
  gap:24px;
  position:relative;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  z-index:2;
}
.brand-mark{
  display:inline-flex;
  filter:drop-shadow(0 0 12px rgba(14,165,233,.35));
}
.brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}
.brand-name{
  font-family:'Plus Jakarta Sans', sans-serif;
  font-weight:800;
  font-size:15px;
  letter-spacing:.06em;
  color:#fff;
  margin:0;
}
.brand-sub{
  font-size:11px;
  color:#7DD3FC;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin-top:2px;
}
.primary-nav{
  display:flex;
  align-items:center;
  gap:20px;
  z-index:2;
}
.nav-links{
  display:flex;
  gap:24px;
  list-style:none;
  margin:0;
  padding:0;
}
.nav-links a{
  color:#CBD5E1;
  font-weight:500;
  font-size:14px;
  transition:color .2s;
  text-decoration:none;
}
.nav-links a:hover{
  color:#38BDF8;
}
.btn-nav{
  background:linear-gradient(135deg,#0EA5E9,#0284C7);
  color:#fff;
  padding:10px 18px;
  border-radius:8px;
  font-weight:600;
  font-size:13px;
  letter-spacing:.03em;
  box-shadow:0 4px 16px rgba(14,165,233,.35);
  transition:transform .2s,box-shadow .2s;
  text-decoration:none;
  display:inline-block;
}
.btn-nav:hover{
  transform:translateY(-1px);
  box-shadow:0 6px 22px rgba(14,165,233,.5);
  color:#fff;
}
.nav-toggle{
  display:none;
  background:none;
  border:0;
  padding:8px;
  cursor:pointer;
  flex-direction:column;
  gap:5px;
  z-index:2;
}
.nav-toggle span{
  width:24px;
  height:2px;
  background:#fff;
  border-radius:2px;
  transition:.3s;
}

/* ---------- HERO ---------- */
.hero{
  position:relative;
  overflow:hidden;
  background:radial-gradient(ellipse at 20% 0%,rgba(14,165,233,.18),transparent 55%),radial-gradient(ellipse at 80% 100%,rgba(56,189,248,.1),transparent 55%),#0F172A;
  color:#fff;
  padding:88px 0 72px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.hero-inner{max-width:960px;margin:0 auto;padding:0 20px;text-align:center;}
.eyebrow{
  display:inline-block;
  padding:6px 14px;
  border-radius:999px;
  background:rgba(14,165,233,.12);
  border:1px solid rgba(14,165,233,.35);
  color:#7DD3FC;
  font-size:12px;
  font-weight:600;
  letter-spacing:.1em;
  text-transform:uppercase;
  margin-bottom:20px;
}
.hero-title{font-size:clamp(32px,5vw,56px);font-weight:800;margin-bottom:18px;}
.grad{
  background:linear-gradient(135deg,#38BDF8,#0EA5E9 55%,#0284C7);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}
.hero-sub{font-size:16px;color:#94A3B8;max-width:640px;margin:0 auto 32px;line-height:1.65;}
.hero-search{
  display:flex;
  gap:8px;
  background:#1E293B;
  border:1px solid rgba(255,255,255,.08);
  border-radius:12px;
  padding:8px;
  max-width:640px;
  margin:0 auto;
  box-shadow:0 20px 60px rgba(0,0,0,.35);
}
.hero-search input{
  flex:1;
  border:0;
  background:transparent;
  color:#fff;
  padding:12px 16px;
  font-size:14px;
  outline:none;
  font-family:inherit;
}
.hero-search input::placeholder{color:#64748B;}
.btn-primary{
  display:inline-flex;
  align-items:center;
  gap:8px;
  background:linear-gradient(135deg,#0EA5E9,#0284C7);
  color:#fff;
  border:0;
  padding:12px 22px;
  border-radius:8px;
  font-weight:600;
  font-size:14px;
  cursor:pointer;
  font-family:inherit;
  transition:transform .2s,box-shadow .2s;
  box-shadow:0 4px 18px rgba(14,165,233,.4);
}
.btn-primary:hover{transform:translateY(-1px);box-shadow:0 8px 26px rgba(14,165,233,.55);}
.hero-stats{display:flex;justify-content:center;gap:56px;margin-top:48px;flex-wrap:wrap;}
.hero-stats div{display:flex;flex-direction:column;align-items:center;}
.hero-stats strong{font-family:'Plus Jakarta Sans';font-size:28px;font-weight:800;color:#38BDF8;}
.hero-stats span{font-size:12px;color:#94A3B8;text-transform:uppercase;letter-spacing:.08em;margin-top:4px;}

/* ---------- LAYOUT ---------- */
.layout{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:32px;
  padding:56px 20px 56px;
  align-items:start;
}
.sidebar{
  background:#F8FAFC;
  border:1px solid #E2E8F0;
  border-radius:14px;
  padding:22px;
  position:sticky;
  top:96px;
  box-shadow:0 1px 3px rgba(15,23,42,.04);
}
.sidebar-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;}
.sidebar-head h2{font-size:14px;text-transform:uppercase;letter-spacing:.1em;color:#475569;}
.sidebar-close{display:none;background:none;border:0;font-size:24px;cursor:pointer;color:#64748B;line-height:1;}

/* ---------- CATEGORY CHIPS — 2-COLUMN GRID ---------- */
.chip-list{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  width:100%;
}
.chip{
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:8px 10px;
  border-radius:999px;
  background:#fff;
  border:1px solid #E2E8F0;
  font-size:12px;
  font-weight:500;
  color:#475569;
  line-height:1.25;
  transition:all .18s;
  cursor:pointer;
  min-height:36px;
  word-break:break-word;
  white-space:normal;
}
.chip:hover{
  border-color:#0EA5E9;
  color:#0284C7;
  background:#F0F9FF;
}
.chip.is-active{
  background:#0F172A;
  color:#fff;
  border-color:#0F172A;
}
.chip.is-active:hover{
  background:#1E293B;
  color:#fff;
}
/* "All Tenders" spans both columns */
.chip-list .chip:first-child{
  grid-column:1 / -1;
  background:#E0F2FE;
  border-color:#BAE6FD;
  color:#0369A1;
  font-weight:700;
  letter-spacing:.02em;
  text-transform:uppercase;
  font-size:11px;
}
.chip-list .chip:first-child:hover{
  background:#BAE6FD;
  border-color:#7DD3FC;
  color:#075985;
}
.chip-list .chip:first-child.is-active{
  background:#0F172A;
  border-color:#0F172A;
  color:#fff;
}

/* ---------- CONTENT ---------- */
.content-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;}
.content-head h2{font-size:20px;font-weight:700;color:#0F172A;}
.sidebar-open{
  display:none;
  align-items:center;
  gap:6px;
  background:#fff;
  border:1px solid #E2E8F0;
  color:#0F172A;
  padding:8px 14px;
  border-radius:8px;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  font-family:inherit;
}
.tender-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:20px;}
.empty{color:#64748B;padding:40px;text-align:center;background:#F8FAFC;border:1px dashed #CBD5E1;border-radius:12px;}

/* ---------- TENDER CARD ---------- */
.tender-card{
  background:#F8FAFC;
  border:1px solid #E2E8F0;
  border-radius:14px;
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:14px;
  transition:transform .25s,box-shadow .25s,border-color .25s;
  position:relative;
}
.tender-card:hover{
  transform:translateY(-3px);
  border-color:#0EA5E9;
  box-shadow:0 14px 40px rgba(14,165,233,.14);
}
.tender-card.is-urgent{border-left:3px solid #EF4444;}
.tender-card.is-closed{opacity:.6;}
.card-top{display:flex;justify-content:space-between;align-items:center;gap:10px;}
.tag{
  font-size:10.5px;
  font-weight:700;
  letter-spacing:.06em;
  text-transform:uppercase;
  padding:4px 10px;
  border-radius:6px;
  background:#E0F2FE;
  color:#0369A1;
}
.badge{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:4px 10px;border-radius:6px;}
.badge-urgent{background:#FEE2E2;color:#B91C1C;}
.badge-closed{background:#E2E8F0;color:#475569;}
.card-title{
  font-size:15.5px;
  font-weight:600;
  color:#0F172A;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  line-height:1.45;
  min-height:66px;
}

/* ---------- TENDER CARD META (STACKED, 1 PER ROW) ---------- */
.card-meta{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:14px 0;
  border-top:1px solid #E2E8F0;
  border-bottom:1px solid #E2E8F0;
}
.meta-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  font-size:13px;
  color:#475569;
  line-height:1.5;
  width:100%;
}
.meta-row svg{
  color:#0EA5E9;
  flex-shrink:0;
  margin-top:2px;
}
.meta-row strong{
  color:#0F172A;
  font-weight:600;
  margin-right:4px;
}
.meta-row .mono{
  font-family:'JetBrains Mono','Courier New',monospace;
  font-size:12px;
  letter-spacing:.02em;
  color:#0F172A;
}
.meta-row.text-danger{color:#DC2626;font-weight:600;}
.meta-row.text-danger strong{color:#B91C1C;}

.btn-card{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:linear-gradient(135deg,#0EA5E9,#0284C7);
  color:#fff;
  padding:11px 16px;
  border-radius:8px;
  font-weight:600;
  font-size:13.5px;
  letter-spacing:.02em;
  transition:transform .2s,box-shadow .2s;
  box-shadow:0 4px 14px rgba(14,165,233,.3);
}
.btn-card:hover{
  transform:translateY(-1px);
  box-shadow:0 8px 22px rgba(14,165,233,.5);
}

/* ---------- DISCLAIMER ---------- */
.disclaimer{
  background:#F8FAFC;
  border:1px solid #E2E8F0;
  border-left:4px solid #0EA5E9;
  border-radius:10px;
  padding:20px 24px;
  font-size:12.5px;
  line-height:1.65;
  color:#475569;
  margin-bottom:56px;
}
.disclaimer strong{color:#0F172A;}

/* ---------- PAGINATION ---------- */
.pagination{margin-top:32px;text-align:center;}
.pagination .page-numbers{
  display:inline-block;
  padding:8px 14px;
  margin:0 3px;
  border:1px solid #E2E8F0;
  border-radius:8px;
  font-size:13px;
  font-weight:500;
  color:#475569;
  background:#fff;
  transition:all .18s;
}
.pagination .page-numbers:hover{border-color:#0EA5E9;color:#0284C7;}
.pagination .page-numbers.current{background:#0F172A;border-color:#0F172A;color:#fff;}

/* ---------- FOOTER ---------- */
.site-footer{
  background:#0F172A;
  color:#94A3B8;
  padding:48px 0 24px;
  border-top:1px solid rgba(255,255,255,.06);
  margin-top:48px;
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:32px;
  flex-wrap:wrap;
  padding-bottom:24px;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.footer-brand{display:flex;gap:14px;align-items:flex-start;max-width:460px;}
.footer-brand strong{
  color:#fff;
  font-family:'Plus Jakarta Sans';
  font-weight:800;
  letter-spacing:.04em;
  font-size:14px;
  display:block;
  margin-bottom:6px;
}
.footer-brand p{font-size:12.5px;line-height:1.6;margin:0;color:#94A3B8;}
.footer-links ul{display:flex;gap:24px;list-style:none;padding:0;margin:0;flex-wrap:wrap;}
.footer-links a{color:#CBD5E1;font-size:13px;transition:color .2s;}
.footer-links a:hover{color:#38BDF8;}
.footer-bottom{padding-top:20px;text-align:center;}
.footer-bottom p{font-size:11.5px;color:#64748B;margin:0;}

/* ---------- MOBILE ---------- */
@media (max-width:960px){
  .layout{grid-template-columns:1fr;padding:32px 20px 40px;}
  .sidebar{
    position:fixed;
    top:0;
    left:0;
    bottom:0;
    width:82%;
    max-width:320px;
    z-index:1000;
    border-radius:0;
    transform:translateX(-100%);
    transition:transform .3s;
    overflow-y:auto;
    box-shadow:4px 0 24px rgba(0,0,0,.2);
  }
  .sidebar.is-open{transform:translateX(0);}
  .sidebar-close{display:block;}
  .sidebar-open{display:inline-flex;}
  .hero{padding:64px 0 56px;}
  .hero-stats{gap:28px;}
  .tender-grid{grid-template-columns:1fr;}
}

@media (max-width:768px){
  .nav-toggle{display:flex;}
  .primary-nav{
    position:absolute;
    top:72px;
    left:0;
    right:0;
    background:#0F172A;
    flex-direction:column;
    align-items:stretch;
    padding:16px 20px 24px;
    gap:12px;
    border-bottom:1px solid rgba(255,255,255,.08);
    display:none;
    box-shadow:0 10px 30px rgba(0,0,0,.5);
  }
  .primary-nav.is-open{display:flex;}
  .nav-links{flex-direction:column;gap:14px;}
  .btn-nav{text-align:center;padding:12px;}
  .hero-search{flex-direction:column;}
  .hero-search input{text-align:center;}
  .footer-inner{flex-direction:column;align-items:flex-start;}
  .footer-links ul{flex-direction:column;gap:12px;}
}

/* ==========================================
   SUBSCRIBER POPUP
   ========================================== */
.popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #F8FAFC;
    padding: 36px 32px;
    border-radius: 16px;
    max-width: 440px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    text-align: center;
    border-top: 4px solid #0EA5E9;
}

.popup-overlay.is-active .popup-content {
    transform: translateY(0);
}

.popup-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #94A3B8;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}
.popup-close:hover { color: #0F172A; }

.popup-icon {
    margin-bottom: 12px;
}

.popup-content h3 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 8px;
}

.popup-content p {
    font-size: 14px;
    color: #64748B;
    margin-bottom: 24px;
    line-height: 1.5;
}

#subscriber-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
#subscriber-form input:focus { border-color: #0EA5E9; }

.popup-actions {
    display: flex;
    gap: 12px;
}

.btn-cancel, .btn-submit {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    border: none;
    transition: all 0.2s;
}

.btn-cancel {
    background: #E2E8F0;
    color: #475569;
}
.btn-cancel:hover { background: #CBD5E1; }

.btn-submit {
    background: linear-gradient(135deg,#0EA5E9,#0284C7);
    color: #fff;
    box-shadow: 0 4px 14px rgba(14,165,233,.3);
}
.btn-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(14,165,233,.5);
}
.btn-submit:disabled {
    background: #CBD5E1;
    color: #94A3B8;
    box-shadow: none;
    cursor: not-allowed;
}

.popup-message {
    margin-top: 16px;
    font-size: 13px;
    font-weight: 600;
    display: none;
}
.popup-message.success { color: #10B981; display: block; }
.popup-message.error { color: #EF4444; display: block; }