/* =========================
   BRAND BASE — Duoc Binh Dong
   v4 | load: ALL pages
   ========================= */

/* ── Tokens ── */
:root {
  --color-primary:   #0A7A37;
  --color-secondary: #0FA523;
  --color-accent:    #FF8A00;
  --color-accent-2:  #E67A00;
  --color-text:      #333333;
  --color-text-weak: #666666;
  --color-bg:        #FAFAFA;
  --color-card:      #FFFFFF;
  --color-border:    #E0E0E0;
  --color-dark:      #1A1A1A;
  --color-heading:   var(--color-primary);
  --color-success:   #4CAF50;
  --color-error:     #E53935;
  --color-warning:   #FFC107;
  --color-info:      #2196F3;
  /* Type scale */
  --h1-d:36px; --h1-t:28px; --h1-m:24px;
  --h2-d:30px; --h2-t:24px; --h2-m:20px;
  --h3-d:24px; --h3-t:20px; --h3-m:18px;
  --h4-d:20px; --h4-t:18px; --h4-m:16px;
  --h5-d:18px; --h5-t:16px; --h5-m:15px;
  --h6-d:16px; --h6-t:15px; --h6-m:14px;
  --body-d:16px;    --body-t:15px;    --body-m:14px;
  --body-lg-d:18px; --body-lg-t:17px; --body-lg-m:16px;
  --caption-d:14px; --caption-t:13px; --caption-m:12px;
  /* Line-heights */
  --lh-tight: 1.3;
  --lh-h:     1.3;
  --lh-h2:    1.25;
  --lh-body:  1.6;
  --lh-cap:   1.5;
  /* Spacing */
  --mb-h1:24px; --mb-h2:20px; --mb-h3:16px;
  --mb-h4:12px; --mb-h5:10px; --mb-h6:8px;
  --mb-paragraph-d:16px; --mb-paragraph-t:16px; --mb-paragraph-m:16px;
  --ls-tight: 0.5px;
  --ls-0:     0;
  --ws-strong: 2px;
  --ws-weak:   1.2px;
  /* Lists */
  --list-indent-d:   12px;
  --list-indent-m:   12px;
  --list-gap:        8px;
  --list-top-attach: 8px;
  --list-bottom:     16px;
  /* Buttons */
  --btn-radius:  8px;
  --btn-pad-d-y: 12px; --btn-pad-d-x: 24px;
  --btn-pad-t-y: 10px; --btn-pad-t-x: 20px;
  --btn-pad-m-y: 8px;  --btn-pad-m-x: 16px;
  /* Tabs */
  --tab-border: #E6E9F0;
  --tab-bg:     #F8FAFC;
}

/* ── Base reset ── */
body {
  background:  var(--color-bg) !important;
  color:       var(--color-text) !important;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif !important;
  font-size:   var(--body-d);
  line-height: var(--lh-body);
}
::selection { background: var(--color-secondary); color: #fff; text-shadow: none; }
hr  { background: var(--color-border); height: 1px; border: 0; }
img { max-width: 100%; height: auto; border: 0; vertical-align: top; }

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
  margin-top:  0 !important;
  color:       var(--color-heading);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif !important;
}
h1 { font-size: var(--h1-d); line-height: var(--lh-tight); margin: 0 0 var(--mb-h1); letter-spacing: var(--ls-tight); word-spacing: var(--ws-strong); }
h2 { font-size: var(--h2-d); line-height: var(--lh-h);     margin: 0 0 var(--mb-h2); letter-spacing: var(--ls-tight); word-spacing: var(--ws-strong); }
h3 { font-size: var(--h3-d); line-height: var(--lh-h2);    margin: 0 0 var(--mb-h3); letter-spacing: var(--ls-0);     word-spacing: var(--ws-strong); }
h4 { font-size: var(--h4-d); line-height: var(--lh-h2);    margin: 0 0 var(--mb-h4); letter-spacing: var(--ls-0);     word-spacing: var(--ws-weak); }
h5 { font-size: var(--h5-d); line-height: var(--lh-h2);    margin: 0 0 var(--mb-h5); letter-spacing: var(--ls-0);     word-spacing: var(--ws-weak); }
h6 { font-size: var(--h6-d); line-height: var(--lh-h2);    margin: 0 0 var(--mb-h6); letter-spacing: var(--ls-0);     word-spacing: var(--ws-weak); }
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
  color: inherit; text-decoration: none; font-family: inherit;
}

/* ── Body text ── */
.body-large { font-size: var(--body-lg-d); line-height: var(--lh-body); }
small, .caption, figcaption {
  font-size: var(--caption-d); line-height: var(--lh-cap);
  letter-spacing: 0.2px; color: var(--color-text-weak);
}

/* ── Lists (toàn site) ── */
article ul, .post ul,
article ol, .post ol {
  list-style-position: outside;
  padding-left: var(--list-indent-d);
  margin:       -8px 0 var(--list-bottom) !important;
  line-height:  var(--lh-body);
  color:        var(--color-text);
  font-size:    var(--body-d);
}
article li, .post li { margin: var(--list-gap) 0; }
article p + ul, article p + ol,
.post    p + ul, .post    p + ol {
  margin-top: calc(var(--list-top-attach) * -1) !important;
}
article ul li::marker, .post ul li::marker       { color: var(--color-primary); }
article ul ul li::marker, .post ul ul li::marker { color: var(--color-secondary); list-style-type: circle; }
article ol li::marker, .post ol li::marker       { color: var(--color-primary); font-weight: 600; }

/* ── Buttons ── */
.wp-element-button, .button, button, input[type="submit"] {
  font-family:   system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-weight:   600;
  line-height:   1.2;
  border-radius: var(--btn-radius);
}
.wp-element-button,
.button.primary, button.primary, input[type="submit"].primary {
  background: var(--color-primary); color: #fff;
  border: 1px solid var(--color-primary);
  padding: var(--btn-pad-d-y) var(--btn-pad-d-x);
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.wp-element-button:hover,
.button.primary:hover, button.primary:hover, input[type="submit"].primary:hover {
  background: var(--color-secondary); border-color: var(--color-secondary); color: #fff;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  body { font-size: var(--body-t); }
  h1 { font-size: var(--h1-t); } h2 { font-size: var(--h2-t); }
  h3 { font-size: var(--h3-t); } h4 { font-size: var(--h4-t); }
  h5 { font-size: var(--h5-t); } h6 { font-size: var(--h6-t); }
  .wp-element-button, .button, button:not(.dl-trigger), input[type="submit"] {
    padding: var(--btn-pad-t-y) var(--btn-pad-t-x);
  }
  article ul, .post ul,
  article ol, .post ol { padding-left: var(--list-indent-d); }
}
@media (max-width: 767px) {
  body { font-size: var(--body-m); }
  h1 { font-size: var(--h1-m); } h2 { font-size: var(--h2-m); }
  h3 { font-size: var(--h3-m); } h4 { font-size: var(--h4-m); }
  h5 { font-size: var(--h5-m); } h6 { font-size: var(--h6-m); }
  .wp-element-button, .button, button:not(.dl-trigger), input[type="submit"] {
    padding: var(--btn-pad-m-y) var(--btn-pad-m-x);
  }
  article ul, .post ul,
  article ol, .post ol { padding-left: var(--list-indent-m); margin-bottom: 12px; }
  article li, .post li { margin: 6px 0; }
}

/* ── Category label ── */
a.rh-cat-label, a.rh-cat-label-title {
  background-color: var(--color-primary) !important;
  color: #fff !important; border-radius: 4px;
  padding: 3px 6px !important; font-weight: 500;
  font-size: 13px; line-height: 1.4; letter-spacing: 0.3px;
  transition: background .2s ease;
}
a.rh-cat-label:hover,
a.rh-cat-label-title:hover { background-color: var(--color-secondary) !important; }

/* ── Header ── */
#main_header {
  --menu-h:     54px;
  --pad-y:      10px;
  --pad-x:      16px;
  --gap-d:      26px;
  --hover-bg:   rgba(255,255,255,.12);
  --text:       #fff;
  --sub-shadow: 0 8px 24px rgba(0,0,0,.12);
  --sub-radius: 8px;
}
#main_header .sticky-wrapper { height: auto !important; }
#main_header,
#main_header .rh-container,
#main_header .main-nav { overflow: visible; }
#main_header .menu li { position: relative; }

#main_header .main-nav {
  display: flex; align-items: center; justify-content: center;
  min-height: var(--menu-h); padding: 8px 0;
  border-bottom: 1px solid rgba(0,0,0,.06);
}
#main_header .main-nav ul.menu > li.menu-item-has-children > a::after {
  margin-left: 16px !important; position: static !important; display: inline-block;
}

@media (min-width: 993px) {
  #main_header .main-nav ul.menu {
    display: flex; align-items: center; justify-content: center;
    gap: var(--gap-d); margin: 0; padding: 0; list-style: none; white-space: nowrap;
  }
  #main_header .main-nav ul.menu > li { position: relative; display: flex; align-items: center; }
  #main_header .main-nav ul.menu > li > a {
    display: block; padding: var(--pad-y) var(--pad-x);
    line-height: 1.2; font-size: 16px; font-weight: 600;
    color: var(--text); border-radius: 6px; text-decoration: none;
    transition: background .2s, box-shadow .2s;
  }
  #main_header .main-nav ul.menu > li > a:hover,
  #main_header .main-nav ul.menu > li.current-menu-item > a,
  #main_header .main-nav ul.menu > li.current-menu-ancestor > a {
    background: var(--hover-bg); box-shadow: 0 1px 2px rgba(0,0,0,.08);
  }
  #main_header .main-nav ul.menu > li > a:focus-visible {
    outline: 2px solid rgba(255,255,255,.7); outline-offset: 2px;
  }
  #main_header .menu > li.menu-item-has-children > .sub-menu,
  #main_header .menu .sub-menu .sub-menu {
    position: absolute; display: none;
    min-width: 200px; max-width: min(320px, calc(100vw - 24px));
    padding: 8px 0; background: #fff;
    border-radius: var(--sub-radius); box-shadow: var(--sub-shadow);
    overflow: visible; white-space: normal; word-break: break-word; overflow-wrap: anywhere;
  }
  #main_header .menu > li.menu-item-has-children > .sub-menu {
    top: 100%; left: 0; flex-direction: column; z-index: 10000;
  }
  #main_header .menu > li:hover > .sub-menu,
  #main_header .menu > li:focus-within > .sub-menu { display: flex; }
  #main_header .menu .sub-menu .sub-menu {
    top: -8px; left: calc(100% + 2px); z-index: 10001;
  }
  #main_header .menu .sub-menu li:hover > .sub-menu,
  #main_header .menu .sub-menu li:focus-within > .sub-menu { display: block; }
  #main_header .menu .sub-menu a {
    display: block; color: #2D2A4A; padding: 10px 16px;
    background: transparent; white-space: normal; word-break: break-word; overflow-wrap: anywhere;
  }
  #main_header .menu .sub-menu a:hover { background: rgba(0,0,0,.05); }
  #main_header .responsive_nav_wrap.rh_mobile_menu { display: none !important; }
}

#main_header .menu .menu-item-more > a::after {
  content: "▾"; margin-left: 8px; font-size: 12px; opacity: .8;
}
@media (max-width: 992px) {
  #main_header .dl-trigger {
    min-width: 44px !important; min-height: 44px !important; box-sizing: border-box !important;
  }
}

.logo-section .logo.hideontablet   { flex: 0 0 180px; max-width: 180px; }
.logo-section .rh-hotline          { flex: 0 0 auto; }
.logo-section .search.head_search  { flex: 1 1 auto; max-width: 420px; }
.logo-section .rh-flex-right-align { flex: 0 0 auto; }

/* ── Breadcrumb ── */
nav.breadcrumb    { font-size: 14px; margin: 12px 0 !important; }
nav.breadcrumbs a { text-decoration: none; }
nav.breadcrumbs a:hover { text-decoration: underline; }

/* ── Misc ── */
.re-search-result-title {
  font-size: 14px !important; font-weight: 500 !important;
  line-height: 1.4 !important; margin: 0 !important; color: #333 !important;
}
.content_step span { font-size: 14px; display: inline-block; }