/* WebA — thay thế toàn bộ CSS tùy chỉnh cũ bằng tệp này. */
:root {
  --weba-primary: #0461db;
  --weba-primary-dark: #034cae;
  --weba-soft: #edf4ff;
  --weba-text: #243244;
  --weba-muted: #536277;
  --weba-border: #dce4ee;
  --weba-surface: #f7f9fc;
  --weba-radius: 12px;
}

/* Tiêu đề và nội dung */
.entry-content { padding-top: 0; }
.tieu-de-home {
  margin-bottom: 24px;
  color: var(--weba-primary);
  font-size: clamp(22px, 2.3vw, 30px);
  font-weight: 700;
  line-height: 1.35;
  text-transform: none;
}
h1.entry-title {
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.3;
  overflow-wrap: break-word;
}
.entry-content img {
  max-width: 100%;
  height: auto;
}
.single-date { border-bottom: 1px solid var(--weba-border); }
footer.entry-meta {
  padding-block: 12px;
  border-top: 0;
  border-bottom: 1px solid var(--weba-border);
  color: var(--weba-muted);
}
.article-inner,
.article-inner:hover { box-shadow: none !important; }
.article-inner.has-shadow .entry-header-text-top { padding-top: 0; }
.duong-line {
  height: 2px;
  margin: 20px 0;
  background: linear-gradient(90deg, var(--weba-primary), var(--weba-border));
}
.related-post h7,
.related-post h2,
.related-post h3 {
  display: block;
  float: none;
  margin: 0 0 16px;
  color: var(--weba-text);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.4;
}

/* Quy trình — cùng bố cục, khác màu nhấn từng bước */
.section-quy-trinh { padding-top: 0 !important; }
.row-quy-trinh > .col { padding-bottom: 20px; }
.row-quy-trinh > .col > .col-inner {
  height: 100%;
  padding-bottom: 24px;
  background: #fff;
  border-radius: var(--weba-radius);
  box-shadow: 0 4px 18px rgb(36 50 68 / 7%);
}
.quytrinh-1 { --weba-step: #c82d4c; }
.quytrinh-2 { --weba-step: #0461db; }
.quytrinh-3 { --weba-step: #936400; }
.quytrinh-4 { --weba-step: #157c7c; }
.quytrinh-1,
.quytrinh-2,
.quytrinh-3,
.quytrinh-4 { border-bottom: 4px solid var(--weba-step); }
.stt-1, .sott-1 { background: #c82d4c; }
.stt-2, .sott-2 { background: #0461db; }
.stt-3, .sott-3 { background: #936400; }
.stt-4, .sott-4 { background: #157c7c; }
.stt-1, .sott-1,
.stt-2, .sott-2,
.stt-3, .sott-3,
.stt-4, .sott-4 { color: #fff; }
.section-quy-trinh .icon-box { padding: 20px; }
.section-quy-trinh .icon-box p {
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 500;
}
.p-dem {
  margin-bottom: 12px;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.so-ttt {
  margin-bottom: 0;
  color: #fff;
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 700;
  line-height: 1.15;
}
.section-chuyen .icon-box-text h3 { color: var(--weba-primary); }

/* Accordion: chỉ đổi biểu tượng đóng/mở, không thay font mọi icon */
.accordion-item .accordion-title { line-height: 1.5; }
.accordion-item .accordion-title .icon-angle-down::before {
  content: "+";
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--weba-primary);
}
.accordion-item .accordion-title.active .icon-angle-down::before {
  content: "\2212";
}
.accordion-item .accordion-title.active > .toggle { transform: none; }

/* Form liên hệ */
.form-lien-he { margin-left: -10px; margin-right: -10px; }
.form-lien-he .large-6,
.form-lien-he .large-12 { padding-left: 10px; padding-right: 10px; }
.form-lien-he input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]),
.form-lien-he select,
.form-lien-he textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--weba-border);
  border-radius: 8px;
  box-shadow: none;
}
.form-lien-he textarea { min-height: 140px; resize: vertical; }
.form-lien-he input:focus,
.form-lien-he select:focus,
.form-lien-he textarea:focus { border-color: var(--weba-primary); }
.section-tin-tuc button,
.section-dich-vu button,
.form-lien-he input[type="submit"],
.form-lien-he button[type="submit"] {
  background: var(--weba-primary);
  border-color: var(--weba-primary);
  color: #fff;
  border-radius: 8px;
}
.section-tin-tuc button:hover,
.section-dich-vu button:hover,
.form-lien-he input[type="submit"]:hover,
.form-lien-he button[type="submit"]:hover { background: var(--weba-primary-dark); }

/* Sidebar — màu nhấn thống nhất và chừa chỗ cho mũi tên */
.custom-sidebar.large-3.col,
.post-sidebar,
.custom-sidebar .widget_nav_menu {
  padding: 16px !important;
  background: var(--weba-surface);
  border-radius: var(--weba-radius);
}
.custom-sidebar .widget_nav_menu { padding: 0 !important; }
.custom-sidebar .widget-title,
.post-sidebar .widget-title {
  display: block;
  margin-bottom: 16px;
  color: var(--weba-text);
}
.custom-sidebar .widget-title span,
.post-sidebar .widget-title span { font-size: 19px; color: inherit; }
.custom-sidebar ul.menu,
.post-sidebar ul.menu { margin: 0; }
.custom-sidebar ul.menu > li,
.post-sidebar ul.menu > li {
  margin: 0;
  background: transparent;
  border-color: var(--weba-border);
}
.custom-sidebar ul.menu > li > a,
.post-sidebar ul.menu > li > a {
  display: block;
  position: relative;
  padding: 11px 30px 11px 12px;
  color: var(--weba-text);
  font-size: 14px;
  line-height: 1.55;
  border-radius: 6px;
  transition: color .2s, background-color .2s;
}
.custom-sidebar ul.menu > li > a::before,
.post-sidebar ul.menu > li > a::before { content: none; }
.custom-sidebar ul.menu > li > a::after,
.post-sidebar ul.menu > li > a::after {
  content: "\203A";
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  font-family: Arial, sans-serif;
  font-size: 22px;
  line-height: 1;
  color: inherit;
}
.custom-sidebar ul.menu > li > a:hover,
.post-sidebar ul.menu > li > a:hover,
.custom-sidebar ul.menu > li > a:focus-visible,
.post-sidebar ul.menu > li > a:focus-visible {
  background: var(--weba-soft);
  color: var(--weba-primary);
}
.custom-sidebar .menu-item.current-menu-item > a,
.post-sidebar .menu-item.current-menu-item > a {
  background: var(--weba-primary);
  color: #fff;
}

/* Bảng nội dung — không áp dụng cho toàn bộ bảng của website */
.entry-content table,
#content .col-inner > table {
  width: 100%;
  margin: 24px 0;
  border-collapse: collapse;
  border: 1px solid var(--weba-border);
  font-size: 15px;
  line-height: 1.6;
}
.entry-content table th,
.entry-content table td,
#content .col-inner > table th,
#content .col-inner > table td {
  padding: 12px 14px;
  border: 1px solid var(--weba-border);
  text-align: left;
  vertical-align: top;
  color: var(--weba-text);
  text-transform: none;
  letter-spacing: normal;
}
.entry-content table th,
#content .col-inner > table th {
  background: var(--weba-soft);
  font-weight: 700;
}

/* Footer — đường nhấn bằng CSS, không cần ảnh bên ngoài */
.footer .widget-title { display: block; width: 100%; }
.footer .widget-title::after {
  content: "";
  display: block;
  width: 48px;
  height: 3px;
  margin-top: 12px;
  background: var(--weba-primary);
  border-radius: 2px;
}
.ft-sidebar .widget-title { display: none; }
.ft-col-2 .section-title-container { margin-bottom: 12px; }
.ft-col-2 ul.menu > li > a { color: var(--weba-text); }
.ft-col-2 ul.menu > li > a:hover { color: var(--weba-primary); }

/* Nút mạng xã hội — màu nền riêng, icon trắng */
.social-icons .button.facebook { --weba-social: #1877f2; }
.social-icons .button.twitter { --weba-social: #2478ba; }
.social-icons .button.email { --weba-social: #243244; }
.social-icons .button.pinterest { --weba-social: #bd081c; }
.social-icons .button.google-plus { --weba-social: #c43a23; }
.social-icons .button.linkedin { --weba-social: #0a66c2; }
.social-icons .button.facebook:not(.is-outline),
.social-icons .button.twitter:not(.is-outline),
.social-icons .button.email:not(.is-outline),
.social-icons .button.pinterest:not(.is-outline),
.social-icons .button.google-plus:not(.is-outline),
.social-icons .button.linkedin:not(.is-outline) {
  background-color: var(--weba-social) !important;
  border-color: var(--weba-social) !important;
  color: #fff !important;
}
.social-icons .button.icon:hover { filter: brightness(.92); }

/* Khối liên hệ và hồ sơ chuyên gia — cùng tông trắng/xanh */
#main .wrapper-info-content,
#main .expert-profile {
  margin: 32px 0;
  padding: clamp(20px, 3vw, 32px);
  background: var(--weba-surface);
  color: var(--weba-text);
  border: 1px solid var(--weba-border);
  border-radius: var(--weba-radius);
  line-height: 1.75;
  overflow-wrap: anywhere;
}
#main .wrapper-info-content h2,
#main .expert-profile h2 {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  color: var(--weba-primary);
  font-size: clamp(23px, 2.5vw, 30px);
  line-height: 1.35;
}
#main .expert-profile h3 {
  margin: 24px 0 12px;
  color: var(--weba-text);
  font-size: 19px;
  line-height: 1.45;
}
#main .wrapper-info-content p,
#main .expert-profile p { margin-bottom: 12px; color: var(--weba-muted); }
#main .wrapper-info-content strong,
#main .expert-profile strong { color: var(--weba-text); }
#main .wrapper-info-content a,
#main .expert-profile a {
  color: var(--weba-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}
#main .wrapper-info-content a:hover,
#main .expert-profile a:hover { color: var(--weba-primary-dark); }
#main .expert-profile .expert-header { display: flex; align-items: center; gap: 24px; }
#main .expert-profile .expert-avatar {
  width: 120px;
  height: 120px;
  max-width: 100%;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid var(--weba-border);
  border-radius: var(--weba-radius);
}
#main .expert-info .expert-job-title { margin-bottom: 0; }
#main .expert-bio ul { margin: 16px 0 20px 22px; }
#main .expert-bio li { margin-bottom: 8px; }
#main .expert-bio li::marker { color: var(--weba-primary); }
#main .wrapper-info-content p:last-child,
#main .expert-bio > :last-child { margin-bottom: 0; }
#main .wrapper-info-content a:focus-visible,
#main .expert-profile a:focus-visible,
.custom-sidebar ul.menu a:focus-visible,
.post-sidebar ul.menu a:focus-visible {
  outline: 2px solid var(--weba-primary);
  outline-offset: 3px;
}

/* Desktop — submenu Thiết Kế Website: 3 cột × 10 hàng */
@media (min-width: 850px) {
  #header .header-inner { position: relative; }
  #header .header-inner > .flex-left,
  #header .header-nav { position: static !important; }
  #header #menu-item-1100 {
    position: static !important;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
    margin-top: -20px !important;
    margin-bottom: -20px !important;
  }
  #header #menu-item-1100 > .nav-dropdown {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(10, auto);
    grid-auto-flow: column;
    gap: 4px 16px;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: min(960px, calc(100vw - 40px));
    min-width: 0 !important;
    max-width: calc(100vw - 40px);
    box-sizing: border-box;
    margin: 0 !important;
    padding: 16px !important;
    background: #fff;
    border: 1px solid var(--weba-border);
    border-radius: var(--weba-radius);
    box-shadow: 0 10px 30px rgb(36 50 68 / 12%);
    z-index: 9999;
    overflow: visible !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: auto !important;
    transition: opacity .15s ease .3s, visibility 0s linear .45s !important;
  }
  #header #menu-item-1100 > .nav-dropdown::before {
    content: "" !important;
    position: absolute !important;
    top: -16px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: 100% !important;
    height: 16px !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    pointer-events: auto;
  }
  #header #menu-item-1100:hover > .nav-dropdown,
  #header #menu-item-1100:focus-within > .nav-dropdown,
  #header #menu-item-1100.current-dropdown > .nav-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    transition-delay: 0s !important;
  }
  #header #menu-item-1100 > .nav-dropdown > li {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    list-style: none;
  }
  #header #menu-item-1100 > .nav-dropdown > li > a {
    display: flex;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
    margin: 0 !important;
    padding: 9px 12px !important;
    color: var(--weba-text);
    font-size: 14px;
    line-height: 1.5;
    text-transform: none;
    white-space: normal;
    border: 0 !important;
    border-radius: 6px;
    transition: background-color .2s, color .2s;
  }
  #header #menu-item-1100 > .nav-dropdown > li > a:hover,
  #header #menu-item-1100 > .nav-dropdown > li > a:focus-visible,
  #header #menu-item-1100 > .nav-dropdown > li.current-menu-item > a {
    background: var(--weba-soft);
    color: var(--weba-primary);
  }
  #header #menu-item-1100 > .nav-dropdown > li > a:focus-visible {
    outline: 2px solid var(--weba-primary);
    outline-offset: -2px;
  }
}

/* Màn hình thấp: cuộn bên trong dropdown để luôn chọn được mục cuối */
@media (min-width: 850px) and (max-height: 650px) {
  #header #menu-item-1100 > .nav-dropdown {
    max-height: calc(100vh - 110px);
    max-height: calc(100dvh - 110px);
    overflow-y: auto !important;
  }
}

/* Tablet và điện thoại */
@media (max-width: 849px) {
  .tieu-de-home { margin-bottom: 20px; }
  .section-quy-trinh .icon-box { padding: 16px; }
  .custom-sidebar.large-3.col,
  .post-sidebar { margin-bottom: 24px; }
}
@media (max-width: 549px) {
  .row-quy-trinh > .col { padding-bottom: 16px; }
  .form-lien-he { margin-left: -6px; margin-right: -6px; }
  .form-lien-he .large-6,
  .form-lien-he .large-12 { padding-left: 6px; padding-right: 6px; }
  #main .expert-profile .expert-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  #main .wrapper-info-content,
  #main .expert-profile { margin: 24px 0; padding: 20px; }
  .entry-content table,
  #content .col-inner > table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    font-size: 14px;
  }
  .entry-content table th,
  .entry-content table td,
  #content .col-inner > table th,
  #content .col-inner > table td { padding: 10px; }
}

/* Giảm chuyển động khi người dùng có thiết lập tương ứng */
@media (prefers-reduced-motion: reduce) {
  #header #menu-item-1100 > .nav-dropdown {
    transition: visibility 0s linear .3s !important;
  }
  #header #menu-item-1100 > .nav-dropdown > li > a,
  .custom-sidebar ul.menu > li > a,
  .post-sidebar ul.menu > li > a { transition: none; }
}
