/* ============================================================
   BARS Security Knowledge Centre — shared styles
   Used by knowledge-centre.php and knowledge-centre-search.php
============================================================= */
:root{
  --navy:        #dd5a00;
  --navy-deep:   #dd5a00;
  --gold:        #d4a017;
  --gold-light:  #e8c14c;
  --ink:         #14213d;
  --grey-600:    #5b6472;
  --grey-300:    #d7dce3;
  --grey-100:    #f4f6f9;
  --white:       #ffffff;
  --radius:      10px;
  --shadow-card: 0 1px 3px rgba(11,31,63,0.08), 0 1px 2px rgba(11,31,63,0.06);
  --shadow-card-hover: 0 8px 24px rgba(11,31,63,0.12);
}

.bars-kc{
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
}
.bars-kc *{ box-sizing: border-box; }
.bars-kc h1, .bars-kc h2, .bars-kc h3{ margin: 0; font-weight: 800; letter-spacing: -0.01em; }
.bars-kc p{ margin: 0; }
.bars-kc a{ text-decoration: none; color: inherit; color:#000}
.bars-kc button{ cursor: pointer; }

.bars-kc__container{ margin: 0 auto; padding: 0}

/* ---------- HERO ---------- */
.bars-hero{
  padding: 20px 0 0;
  overflow: hidden;
}
.bars-hero__grid{ display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.bars-hero__eyebrow{
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.bars-hero__eyebrow::before{ content: ""; width: 22px; height: 2px; background: var(--gold); display: inline-block; }
.bars-hero h1{ font-size: clamp(32px, 4vw, 44px); line-height: 1.08; color: var(--navy); }
.bars-hero h1 span{ color: var(--gold); display: block; }
.bars-hero__sub{ margin-top: 16px; font-size: 17px; color: var(--navy); font-weight: 600; }
.bars-hero__desc{ margin-top: 12px; font-size: 15.5px; color: var(--grey-600); }
.bars-hero__rto{ margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--ink); }
.bars-hero__image{
  position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3;
  background: linear-gradient(160deg, rgba(11,31,63,0.35), rgba(11,31,63,0.05)), linear-gradient(135deg, #1c2f52, #0b1f3f);
  display: flex; align-items: flex-end; justify-content: center;
}
.bars-hero__image-note{ color: rgba(255,255,255,0.75); font-size: 12px; padding: 10px; }

/* ---------- SEARCH ---------- */
.bars-search-band{
  margin-top: 40px; background: var(--navy);
  border-radius: var(--radius); padding: 34px 40px 30px;
}
.bars-search-band h2{ color: var(--white); font-size: 19px; text-align: center; margin-bottom: 18px; }
.bars-search-form{
  display: flex; max-width: 760px; margin: 0 auto;
  background: var(--white); border-radius: 8px; overflow: hidden; position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.bars-search-form input{
  flex: 1; border: none; padding: 16px 18px; font-size: 15px;
  font-family: inherit; outline: none; color: var(--ink);
}
.bars-search-form input::placeholder{ color: #9aa3b2; }
.bars-search-form button{
  background: var(--gold); border: none; padding: 0 22px;
  display: flex; align-items: center; justify-content: center; transition: background 0.15s ease;
}
.bars-search-form button:hover{ background: var(--gold-light); }
.bars-search-form button svg{ width: 19px; height: 19px; stroke: var(--navy-deep); }

/* live search dropdown */
.bars-search-results{
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--white); border-radius: 8px; box-shadow: 0 14px 34px rgba(0,0,0,0.22);
  overflow: hidden; z-index: 20; display: none;
}
.bars-search-results.is-open{ display: block; }
.bars-search-results a{
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 18px; border-bottom: 1px solid var(--grey-300); font-size: 14px;
}
.bars-search-results a:last-child{ border-bottom: none; }
.bars-search-results a:hover, .bars-search-results a.is-active{ background: var(--grey-100); }
.bars-search-results small{ color: var(--grey-600); font-weight: 500; }
.bars-search-results__empty{ padding: 16px 18px; font-size: 13.5px; color: var(--grey-600); }
.bars-search-results__viewall{
  display: block; text-align: center; padding: 12px; font-size: 13px; font-weight: 700;
  color: var(--navy); background: var(--grey-100);
}

.bars-popular{ max-width: 760px; margin: 16px auto 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; justify-content: center; }
.bars-popular__label{ color: rgba(255,255,255,0.65); font-size: 12.5px; font-weight: 600; margin-right: 4px; }
.bars-chip{
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); color: var(--white)!important;
  font-size: 13px; padding: 6px 14px; border-radius: 999px; transition: background 0.15s ease, border-color 0.15s ease;
}
.bars-chip:hover{ background: rgba(255,255,255,0.16); border-color: rgba(255,255,255,0.35); }

/* ---------- SECTION HEADINGS ---------- */
.bars-section{ padding: 5px 0; }
.bars-section--tight{ padding-top: 0; }
.bars-section__head{ display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 26px; gap: 16px; flex-wrap: wrap; }
.bars-section__head h2{ font-size: 20px; font-weight:normal}
.bars-section__head p{ color: var(--grey-600); font-size: 14.5px; margin-top: 4px; }
.bars-section__link{ font-size: 14px; font-weight: 700; color: var(--navy); white-space: nowrap; }
.bars-section__link:hover{ color: var(--gold); }

/* ---------- CATEGORY GRID ---------- */
.bars-cat-grid{ display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.bars-cat-card{
  background: var(--white); border: 1px solid var(--grey-300); border-radius: var(--radius); min-height: 160px;
  padding: 22px 20px; box-shadow: var(--shadow-card);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease; display: block;
}
.bars-cat-card:hover{ box-shadow: var(--shadow-card-hover); transform: translateY(-2px); border-color: var(--gold); }
.bars-cat-card:focus-visible{ outline: 2px solid var(--gold); outline-offset: 2px; }
.bars-cat-card__top{ display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.bars-cat-card__icon{ width: 42px; height: 42px; border-radius: 8px; background: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.bars-cat-card__icon svg{ width: 21px; height: 21px; stroke: var(--gold); fill: none; }
.bars-cat-card__chev{ width: 16px; height: 16px; stroke: var(--grey-300); transition: stroke 0.15s ease, transform 0.15s ease; }
.bars-cat-card:hover .bars-cat-card__chev{ stroke: var(--gold); transform: translateX(2px); }
.bars-cat-card h3{ font-size: 15px; color: var(--ink); margin-bottom: 6px; line-height: 1.3; font-weight:600  }
.bars-cat-card p{ font-size: 13.5px; color: var(--grey-600); line-height: 1.45; }

.bars-view-all{
  display: block; width: fit-content; margin: 30px auto 0; background: var(--navy); color: var(--white)!important;
  font-size: 13.5px; font-weight: 700; letter-spacing: 0.03em; padding: 13px 30px; border-radius: 6px;
  transition: background 0.15s ease;
}
.bars-view-all:hover{ background: var(--navy-deep); }

/* ---------- POPULAR QUESTIONS ---------- */
.bars-q-columns{ display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.bars-q-list{ list-style: none; margin: 0; padding: 0; }
.bars-q-item a{
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 4px; border-bottom: 1px solid var(--grey-300); font-size: 14.5px; font-weight: 500;
  color: var(--ink); transition: color 0.15s ease, padding-left 0.15s ease;
}
.bars-q-item a:hover{ color: var(--navy); padding-left: 6px; }
.bars-q-item a:hover .bars-q-chev{ stroke: var(--gold); transform: translateX(2px); }
.bars-q-chev{ width: 15px; height: 15px; stroke: var(--grey-300); flex-shrink: 0; transition: stroke 0.15s ease, transform 0.15s ease; }

/* ---------- STATS / CTA BANNER ---------- */
.bars-cta-band{
  background: var(--navy); border-radius: var(--radius); padding: 40px 44px;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px;
}
.bars-stats{ display: flex; gap: 44px; }
.bars-stat{ display: flex; align-items: center; gap: 12px; }
.bars-stat__icon{ width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.bars-stat__icon svg{ width: 30px; height: 30px; stroke: var(--gold); fill: none; }
.bars-stat__num{ font-size: 22px; font-weight: 800; color: var(--white); line-height: 1.1; }
.bars-stat__label{ font-size: 12.5px; color: rgba(255,255,255,0.65); }

.bars-cta-band__right{ text-align: right; }
.bars-cta-band__right h3{ color: var(--white); font-size: 18px; margin-bottom: 4px; }
.bars-cta-band__right p{ color: rgba(255,255,255,0.7); font-size: 13.5px; margin-bottom: 16px; }
.bars-cta-buttons{ display: flex; gap: 10px; justify-content: flex-end; }
.bars-btn{ padding: 12px 22px; border-radius: 6px; font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.bars-btn--gold{ background: var(--gold); color: var(--navy-deep); }
.bars-btn--gold:hover{ background: var(--gold-light); }
.bars-btn--outline{ border: 1px solid rgba(255,255,255,0.4); color: var(--white); }
.bars-btn--outline:hover{ border-color: var(--white); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px){
  .bars-hero__grid{ grid-template-columns: 1fr; }
  .bars-hero__image{ order: -1; aspect-ratio: 16/9; }
  .bars-cat-grid{ grid-template-columns: repeat(2, 1fr); }
  .bars-q-columns{ grid-template-columns: 1fr; }
  .bars-cta-band{ grid-template-columns: 1fr; text-align: center; }
  .bars-cta-band__right{ text-align: center; }
  .bars-cta-buttons{ justify-content: center; }
  .bars-stats{ justify-content: center; flex-wrap: wrap; row-gap: 16px; }
}
@media (max-width: 600px){
  .bars-kc__container{ padding: 0 16px; }
  .bars-cat-grid{ grid-template-columns: 1fr; }
  .bars-search-band{ padding: 26px 18px 24px; }
  .bars-search-form{ flex-direction: column; box-shadow: none; border: 1px solid var(--grey-300); }
  .bars-search-form button{ padding: 12px; justify-content: center; }
  .bars-stats{ gap: 24px; }
  .bars-cta-band{ padding: 30px 22px; }
}

/* ---------- BREADCRUMB ---------- */
.bars-breadcrumb{
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  font-size: 13px; color: var(--grey-600); margin-bottom: 22px;
}
.bars-breadcrumb a{ color: var(--grey-600); }
.bars-breadcrumb a:hover{ color: var(--navy); }
.bars-breadcrumb span[aria-current]{ color: var(--navy); font-weight: 600; }
.bars-breadcrumb__sep{ color: var(--grey-300); }

/* ---------- CATEGORY HEADER ---------- */
.bars-cat-header{
  display: flex; align-items: flex-start; gap: 18px; margin-bottom: 40px;
  padding-bottom: 28px; border-bottom: 1px solid var(--grey-300);
}
.bars-cat-header__icon{
  width: 56px; height: 56px; border-radius: 10px; background: var(--navy);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.bars-cat-header__icon svg{ width: 28px; height: 28px; stroke: var(--gold); fill: none; }
.bars-cat-header h1{ font-size: 28px; color: var(--ink); margin-bottom: 8px; }
.bars-cat-header p{ font-size: 15px; color: var(--grey-600); }

/* ---------- SUBCATEGORY BLOCKS ---------- */
.bars-subcat{ margin-bottom: 40px; }
.bars-subcat h2{ font-size: 18px; color: var(--ink); margin-bottom: 4px; }
.bars-subcat__desc{ font-size: 13.5px; color: var(--grey-600); margin-bottom: 14px; }
.bars-subcat__empty{ font-size: 13.5px; color: var(--grey-600); font-style: italic; padding: 10px 4px; }

/* ---------- QUESTION DETAIL ---------- */
.bars-question-header{ margin-bottom: 8px; }
.bars-question-header h1{ font-size: 27px; color: var(--ink); line-height: 1.25; max-width: 46ch; }
.bars-question-meta{
  display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--grey-600);
  margin: 14px 0 28px;
}
.bars-answer-body{
  font-size: 15.5px; color: var(--ink); line-height: 1.7;
}
.bars-answer-body p{ margin-bottom: 14px; }
.bars-answer-body ul, .bars-answer-body ol{ margin: 0 0 14px 22px; }
.bars-answer-body li{ margin-bottom: 6px; }
.bars-answer-body strong{ color: var(--navy); }

.bars-course-cta{
  margin-top: 34px; max-width: 68ch; background: var(--grey-100);
  border: 1px solid var(--grey-300); border-radius: var(--radius);
  padding: 22px 24px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.bars-course-cta__label{ font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold); margin-bottom: 4px; }
.bars-course-cta h3{ font-size: 16px; color: var(--navy); }

.bars-related{ margin-top: 25px; padding-top: 12px; border-top: 1px solid var(--grey-300); }
.bars-related h2{ font-size: 18px; color: var(--navy); margin-bottom: 14px; }

.bars-back-link{
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600;
  color: var(--navy); margin-top: 40px;
}
.bars-back-link:hover{ color: var(--gold); }
.bars-back-link svg{ width: 15px; height: 15px; stroke: currentColor; }

.bars-404{ text-align: center; padding: 60px 0; }
.bars-404 h1{ font-size: 26px; color: var(--navy); margin-bottom: 10px; }
.bars-404 p{ color: var(--grey-600); font-size: 14.5px; margin-bottom: 22px; }

@media (max-width: 600px){
  .bars-course-cta{ flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce){
  .bars-kc *{ transition: none !important; }
}
