/* ===== BASE ===== */
.ttj-directory {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin: 40px 0;
}

.ttj-card {
  background: #fff;
  border-radius: 18px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.04);
}

/* ===== AVATAR ===== */
.ttj-avatar img {
  width: 110px;
  height: 140px;
  object-fit: cover;
  border-radius: 14px !important;
}

/* ===== INFO ===== */
.ttj-info {
  flex: 1;
}

.ttj-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ttj-name-row h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.ttj-name-badge i {
  color: #2563eb;
  font-size: 14px;
  font-weight: 900;
}

.ttj-trade {
  font-size: 14px;
  color: #6b7280;
  margin-top: 2px;
}

.ttj-rating {
  margin-top: 6px;
  font-size: 14px;
  color: #2563eb;
}

.ttj-rating i {
  color: #facc15;
  margin-right: 4px;
}

.ttj-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: #374151;
}

.ttj-meta i {
  margin-right: 6px;
  color: #6b7280;
}

.ttj-meta .divider {
  color: #d1d5db;
  gap: 20px;
}

/* ===== ACTIONS ===== */
.ttj-actions-pro {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ttj-actions-pro a {
  text-decoration: none !important;
  font-size: 14px;
  padding: 7px 22px;
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
}

.btn-outline {
  border: 2px solid #2563eb;
  color: #2563eb;
  background: #fff;
  font-weight: 600;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 6px 22px;
    border-radius: 30px;

    border: 2px solid #2563eb;
    color: #2563eb;
    background: #fff;

    text-decoration: none;
    font-weight: 600;
    font-size: 14px;

    transition: all 0.2s ease;
}

.btn-outline:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 6px 22px;
    border-radius: 30px;
    border: 2px solid #2563eb;

    background: linear-gradient(135deg, #1e3caa, #2563eb);
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;

    transition: all 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.15);
    color: #ffffff;
}

/* ===== TABLET VIEW (EXACT MATCH) ===== */
@media (max-width: 900px) {

  .ttj-card {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: 20px;
    row-gap: 14px;
    align-items: center; /* avatar + info + actions same row */
    box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.08),
    0 2px 6px rgba(0, 0, 0, 0.04);
  }

  /* Avatar: left, row 1 */
  .ttj-avatar {
    grid-column: 1;
    grid-row: 1;
  }

  /* Info: right of avatar, row 1 */
  .ttj-info {
    grid-column: 2;
    grid-row: 1;
  }

  /* Actions: row 2, right aligned */
  .ttj-actions-pro {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
  }

  .ttj-actions-pro a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-width: 140px;     /* sawa kwa zote */
    padding: 7px 18px;

    white-space: nowrap;
    text-decoration: none !important;

    flex: 0 0 auto;
  }
}

/* ===== MOBILE – ONE COLUMN, TRUE CENTER ===== */
@media (max-width: 725px) {

  .ttj-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 16px;
    box-shadow:
      0 10px 28px rgba(0,0,0,0.10),
      0 4px 10px rgba(0,0,0,0.06);
  }

  .ttj-avatar {
    display: none;
  }

  /* INFO WRAPPER */
  .ttj-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* NAME */
  .ttj-name-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
  }

  .ttj-name-row h3 {
    text-align: center;
    word-break: break-word;
  }

  /* RATING */
  .ttj-rating {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  /* META – FORCE COLUMN */
  .ttj-meta {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
  }

  .ttj-meta-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
  }

  /* DIVIDER OFF */
  .ttj-meta .divider {
    display: none !important;
  }

  /* VERIFIED BADGES */
  .ttj-meta .verified {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: 4px;
  }

  /* ACTIONS */
  .ttj-actions-pro {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 15px;
  }

  .ttj-actions-pro a {
    width: 220px;
    max-width: 100%;
    text-align: center;
    justify-content: center;
  }
}

/* VERIFIED PILL – GLOBAL */
.verified {
  background: #e6f4ea;
  color: #137333;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 999px;
}

/* ===============================
   HARD SVG CONTAINMENT FIX
   =============================== */

/* Hakikisha hakuna SVG yoyote inatoka nje ya card */
.ttj-card svg {
  position: static !important;
  float: none !important;
}

/* Meta row */
.ttj-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Kila item ya meta */
.ttj-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  position: relative;
  white-space: nowrap;
}

/* SVG icon – FORCE IT TO STAY INSIDE */
.ttj-meta svg.ttj-icon {
  width: 16px;
  height: 16px;

  display: inline-block;
  flex-shrink: 0;

  position: relative !important;
  left: 0 !important;
  top: 0 !important;

  vertical-align: middle;
  pointer-events: none;
}

/* Divider | */
.ttj-meta .divider {
  display: inline-block;
  margin: 0 6px;
  color: #cbd5e1;
}

/* =========================
   SVG ICON FIX (ONLY)
========================= */

.ttj-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.ttj-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* SVG container */
.ttj-icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* SVG itself */
.ttj-icon-wrap svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =================================================
   TTJ HERO SEARCH SECTION
================================================= */

.tp-hero{
    background:linear-gradient(135deg,#1f73e8 0%,#1558b0 100%);
    padding:80px 20px 100px;
}

.tp-hero-inner{
    max-width:1200px;
    margin:auto;
    text-align:center;
    color:#fff;
}

.tp-hero h1{
    font-size:clamp(34px,4.8vw,48px);
    font-weight:800;
    margin-bottom:12px;
    letter-spacing:-0.02em;
    color: #fff;
}

.tp-hero p{
    font-size:18px;
    max-width:680px;
    margin:0 auto 42px;
    color:rgba(255,255,255,.92);
}

/* Search Card */
.tp-search-card{
    background:#ffffff;
    padding:20px;
    border-radius:18px;
    box-shadow:0 30px 70px rgba(0,0,0,.30);
    max-width:720px;
    margin:auto;
}

.tp-search-form{
    display:flex;
    align-items:stretch;
    gap:12px;
}

.input-wrap{
    position:relative;
    flex:1;
}

.input-wrap i{
    position:absolute;
    top:50%;
    left:14px;
    transform:translateY(-50%);
    color:#9ca3af;
    font-size:15px;
}

.input-wrap input{
    width:100%;
    padding:15px 16px 15px 40px;
    border:1px solid #e5e7eb;
    border-radius:12px;
    font-size:15px;
    outline:none;
    transition:.2s ease;
}

.input-wrap input:focus{
    border-color:#1f73e8;
    box-shadow:0 0 0 3px rgba(31,115,232,.15);
}

.searchb{
    background:linear-gradient(135deg,#1f73e8,#1558b0);
    color:#fff;
    padding:0 32px;
    border:none;
    border-radius:12px;
    font-size:15px;
    cursor:pointer;
    transition:.25s ease;
    white-space:nowrap;
}

.searchb:hover{
    filter:brightness(1.08);
}

@media(max-width:768px){
    .tp-search-form{
        flex-direction:column;
    }

    .searchb{
        width:100%;
        padding:14px;
    }
}

/* ================================
   TRUE FULL WIDTH HERO FIX
================================ */

/* Ondoa spacing ya page content */
.entry-content,
.site-content,
.content-area {
    padding-top:0 !important;
}

/* HERO full viewport width */
.tp-hero{
    position:relative;
    left:50%;
    right:50%;
    margin-left:-50vw;
    margin-right:-50vw;

    width:100vw;
    max-width:100vw;

    padding:100px 20px 120px;
    background:linear-gradient(135deg,#1f73e8 0%,#1558b0 100%);
}

/* Ondoa white gap juu */
.tp-hero{
    margin-top:0 !important;
}

/* Kama theme ina page title juu */
.page-header,
.entry-header{
    display:none;
}

.searchb:disabled{
    opacity:0.6;
    cursor:not-allowed;
}

#ttj_trade{
    width:100%;
    padding:14px;
    border-radius:12px;
    border:1px solid #e5e7eb;
    font-size:15px;
    background:#fff;
    color:#111;
}

#ttj_trade option{
    background:#fff;
    color:#111;
}

.tp-reset-btn{
    display:inline-block;
    margin-top:10px;
    font-size:14px;
    color:#111 !important;
    font-weight:500;
    text-decoration: none !important;
}

.tp-reset-btn:hover{
    color:#1f73e8 !important;
    text-decoration: none !important;
}

.ttj-trade-wrap{
    position:relative;
}

.ttj-trade-dropdown{
    position:absolute;
    top:100%;
    left:0;
    right:0;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:12px;
    margin-top:6px;
    max-height:220px;
    overflow-y:auto;
    display:none;
    z-index:50;
    color:#111 !important;
    text-align:left !important;
}

.ttj-trade-item{
    color:#111 !important;
    background:#fff !important;
    text-align:left !important;
    padding:10px 14px;
    cursor:pointer;
}

.ttj-trade-item:hover{
    background:#f1f5f9 !important;
}

/* ===== Empty State UI ===== */

.ttj-empty-state{
    display:flex;
    justify-content:center;
    align-items:center;
    padding:80px 20px;
}

.ttj-empty-box{
    background:#fff;
    border-radius:16px;
    padding:40px 35px;
    max-width:420px;
    text-align:center;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.ttj-empty-icon{
    font-size:42px;
    color:#1f73e8;
    margin-bottom:15px;
}

.ttj-empty-box h3{
    margin-bottom:10px;
    font-size:20px;
    font-weight:600;
    color:#111;
}

.ttj-empty-box p{
    font-size:14px;
    color:#555;
    margin-bottom:18px;
}

.ttj-reset-link{
    display:inline-block;
    font-size:14px;
    color:#1f73e8;
    text-decoration:none !important;
    font-weight:500;
}

.ttj-reset-link:hover{
    text-decoration:underline !important;
}

.ttj-avatar {
    width: 120px;
    height: 120px;
    border-radius: 18px;
    overflow: hidden;
    flex-shrink: 0;
}

.ttj-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;   /* MUHIMU */
    display: block;
}
