/* =====================================================================
   ชุดสีแบรนด์ TaradTeedin — โหลดหลัง Bootstrap ในทุกหน้าฝั่งผู้ใช้ (init_assets.php)
   สีหลักเอามาจากโลโก้: กรมท่า #00304a (TARAD) + เหลืองมะกอก #c8b800 (TEEDIN)
   สีเน้นปุ่มสำคัญ (ลงประกาศ / ค้นหา) = ส้ม-เหลือง เดิมของเว็บ
   ===================================================================== */
:root {
  --tt-brand: #00304a;
  --tt-brand-600: #0a4a73;
  --tt-brand-700: #002437;
  --tt-brand-50: #e9f1f7;
  --tt-brand-100: #d3e2ee;
  --tt-olive: #c8b800;
  --tt-accent-1: #FDC830;
  --tt-accent-2: #F37335;
  --tt-accent-grad: linear-gradient(135deg, var(--tt-accent-1), var(--tt-accent-2));

  /* ให้ class ของ Bootstrap (bg-primary, text-primary, ลิงก์) เป็นสีแบรนด์ทั้งเว็บ */
  --bs-primary: #00304a;
  --bs-primary-rgb: 0, 48, 74;
  --bs-link-color: #0a4a73;
  --bs-link-hover-color: #00304a;
}

.btn-primary {
  --bs-btn-bg: #00304a;
  --bs-btn-border-color: #00304a;
  --bs-btn-hover-bg: #0a4a73;
  --bs-btn-hover-border-color: #0a4a73;
  --bs-btn-focus-shadow-rgb: 0, 48, 74;
  --bs-btn-active-bg: #002437;
  --bs-btn-active-border-color: #002437;
  --bs-btn-disabled-bg: #00304a;
  --bs-btn-disabled-border-color: #00304a;
}
.btn-outline-primary {
  --bs-btn-color: #00304a;
  --bs-btn-border-color: #00304a;
  --bs-btn-hover-bg: #00304a;
  --bs-btn-hover-border-color: #00304a;
  --bs-btn-focus-shadow-rgb: 0, 48, 74;
  --bs-btn-active-bg: #00304a;
  --bs-btn-active-border-color: #00304a;
  --bs-btn-disabled-color: #00304a;
  --bs-btn-disabled-border-color: #00304a;
}
.form-control:focus,
.form-select:focus {
  border-color: #6f9cbd;
  box-shadow: 0 0 0 .2rem rgba(0, 48, 74, .15);
}
.form-check-input:checked { background-color: #00304a; border-color: #00304a; }

/* =====================================================================
   Hero (box_searchbar.php) — หัวข้อหน้า (H1) + ช่องค้นหา
   ===================================================================== */
.tt-hero {
  position: relative;
  background:
    radial-gradient(1200px 300px at 85% -20%, rgba(200, 184, 0, .18), transparent 60%),
    linear-gradient(135deg, #00304a 0%, #0a4a73 100%);
  color: #fff;
  padding: 34px 16px 30px;
  overflow: hidden;
}
.tt-hero::after { /* เส้นสีเหลืองมะกอกบาง ๆ ใต้ hero ล้อกับโลโก้ */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--tt-olive), transparent);
  opacity: .7;
}
.tt-hero__inner { max-width: 760px; margin: 0 auto; text-align: center; }
.tt-hero__title {
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 6px;
  color: #fff;
}
.tt-hero__sub { margin: 0 0 18px; font-size: .98rem; color: rgba(255, 255, 255, .78); }
.tt-hero__sub b { color: var(--tt-accent-1); font-weight: 700; }

.tt-hero__search {
  position: relative;
  z-index: 11; /* อยู่เหนือ #overlay ตอนกำลังพิมพ์ค้นหา */
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 14px;
  padding: 6px 6px 6px 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.tt-hero__search > i { color: #94a3b8; font-size: 1rem; }
.tt-hero__search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 6px;
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 1.05rem;
  color: var(--tt-brand);
}
.tt-hero__search input::placeholder { color: #9aa5b1; }
.tt-hero__search input::-webkit-search-cancel-button { cursor: pointer; }
.tt-hero__btn {
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  padding: 10px 26px;
  background: var(--tt-accent-grad);
  color: #1c1c1c;
  font-family: 'Noto Sans Thai', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(243, 115, 53, .35);
  transition: filter .2s ease, transform .15s ease;
}
.tt-hero__btn:hover { filter: brightness(1.06); transform: translateY(-1px); }

@media (max-width: 767px) {
  .tt-hero { padding: 16px 12px 16px; }
  .tt-hero__title { font-size: 1.05rem; margin-bottom: 10px; }
  .tt-hero__search { padding: 4px 4px 4px 12px; border-radius: 12px; }
  .tt-hero__search input { font-size: 1rem; padding: 8px 4px; }
  .tt-hero__btn { padding: 8px 14px; font-size: .95rem; }
}

/* =====================================================================
   เมนูบนสุดฝั่งคอม (topSectionPC.php)
   ===================================================================== */
.ts-nav { display: flex; align-items: center; gap: 4px; margin-left: 28px; }
.ts-nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 10px;
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
.ts-nav a:hover { background: var(--tt-brand-50); color: var(--tt-brand); }
.ts-nav a.is-active { color: var(--tt-brand); }
.ts-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 14px; right: 14px; bottom: 2px;
  height: 3px;
  border-radius: 3px;
  background: var(--tt-olive);
}
.ts-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 4px;
  padding: 9px 18px;
  border: 1.5px solid var(--tt-brand);
  border-radius: 12px;
  font-family: 'Noto Sans Thai', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--tt-brand);
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.ts-login:hover { background: var(--tt-brand); color: #fff; }

/* ยังไม่ login: เมนูข้อความแสดงครบแล้ว จึงซ่อนปุ่ม ☰ — แต่จอคอมแคบ (เช่น แท็บเล็ตแนวนอน)
   ซ่อนเมนูข้อความแล้วกลับไปใช้ปุ่ม ☰ แทน */
.ts-menubtn.ts-menubtn--guest { display: none; }
@media (max-width: 1100px) {
  .ts-nav { display: none; }
  .ts-menubtn.ts-menubtn--guest { display: flex !important; }
}
