/* Bổ sung nhỏ cho bản Next: giữ nguyên style.min.css của theme cũ, chỉ vá vài chỗ WordPress từng xử lý bằng JS/PHP */
.content_detail img, .the-content img { max-width: 100%; height: auto; }
.content_detail iframe, .the-content iframe { max-width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text { text-align: center; font-size: 14px; color: #666; margin-top: 6px; }
.content_detail table, .the-content table { border-collapse: collapse; max-width: 100%; }
.content_detail td, .content_detail th, .the-content td, .the-content th { border: 1px solid #ddd; padding: 6px 10px; }
.search_list .item { animation: none; }


/* Menu thả xuống (2–3 cấp): thẻ bo tròn, bóng mềm, hiệu ứng mở mượt */
@media (min-width: 1025px) {
  header .header-main .menu-main .menu li .sub-menu {
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    top: 100%;
    left: -14px;
    min-width: 250px;
    padding: 8px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 22px 48px -18px rgba(18, 22, 60, 0.35), 0 0 0 1px rgba(18, 22, 60, 0.06);
  }
  header .header-main .menu-main .menu li:hover > .sub-menu,
  header .header-main .menu-main .menu li:focus-within > .sub-menu {
    visibility: visible;
    opacity: 1;
    transform: none;
  }
  header .header-main .menu-main .menu li:hover .sub-menu .sub-menu { visibility: hidden; }
  header .header-main .menu-main .menu li .sub-menu li:hover > .sub-menu,
  header .header-main .menu-main .menu li .sub-menu li:focus-within > .sub-menu { visibility: visible; }
  header .header-main .menu-main .menu li .sub-menu .sub-menu {
    top: -8px;
    left: calc(100% + 8px);
    transform: translateX(-8px);
  }
  header .header-main .menu-main .menu li .sub-menu li:hover > .sub-menu { transform: none; }
  header .header-main .menu-main .menu li .sub-menu .sub-menu::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: -12px;
    width: 12px;
  }
  header .header-main .menu-main .menu li .sub-menu li,
  header .header-main .menu-main .menu li .sub-menu li.menu-item-has-children {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }
  header .header-main .menu-main .menu li .sub-menu li.menu-item-has-children::after,
  header .header-main .menu-main .menu li .sub-menu li.menu-item-has-children > div { display: none; }
  header .header-main .menu-main .menu li .sub-menu li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
    color: #2b2f45;
    transition: background-color 0.18s ease, color 0.18s ease;
  }
  header .header-main .menu-main .menu li .sub-menu li:hover > a,
  header .header-main .menu-main .menu li .sub-menu li:focus-within > a {
    background: #fdf1ef;
    color: #b21300;
  }
  header .header-main .menu-main .menu li .sub-menu li:hover a { color: inherit; }
  header .header-main .menu-main .menu li .sub-menu li:hover > a { color: #b21300; }
  header .header-main .menu-main .menu li .sub-menu li.menu-item-has-children > a::after {
    content: '';
    flex: none;
    width: 7px;
    height: 7px;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(-45deg);
    opacity: 0.6;
  }
}
@media (min-width: 1025px) and (prefers-reduced-motion: reduce) {
  header .header-main .menu-main .menu li .sub-menu { transition: none; transform: none; }
}
@media (max-width: 1024px) {
  header .header-main .menu-main { flex: 1 1 auto; min-height: 0; height: auto; max-height: calc(100dvh - 92px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  header .header-main .menu-main .menu { flex: none; padding-bottom: 24px; }
  header .header-main .menu-main .menu > li { position: relative; margin: 0 0 14px; padding-bottom: 12px; }
  header .header-main .menu-main .menu > li::before { top: auto; bottom: 0; }
  header .header-main .menu-main .menu > li.menu-item-has-children > div { height: 34px; top: -6px; width: 48px; }
  header .header-main .menu-main .menu li.menu-item-has-children > div::after { right: 6px; transition: transform 0.2s ease; }
  header .header-main .menu-main .menu li.is-open > div::after { transform: translateY(-50%) rotate(180deg); }
  header .header-main .menu-main .menu li .sub-menu {
    position: static;
    min-width: 0;
    margin: 12px 0 2px;
    padding: 4px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.16);
    box-shadow: none;
  }
  header .header-main .menu-main .menu li .sub-menu li {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0 !important;
    background: transparent;
  }
  header .header-main .menu-main .menu li .sub-menu li::before { display: none; }
  header .header-main .menu-main .menu li .sub-menu > li + li { border-top: 1px solid rgba(255, 255, 255, 0.14) !important; }
  header .header-main .menu-main .menu li .sub-menu li a {
    display: block;
    padding: 12px 48px 12px 14px;
    border-radius: 10px;
    font-size: 15px;
    line-height: 21px;
    font-weight: 500;
    text-transform: none;
    color: #fff;
    opacity: 1;
    border-bottom: 0 !important;
  }
  header .header-main .menu-main .menu li .sub-menu li a:active { background: rgba(255, 255, 255, 0.12); }
  header .header-main .menu-main .menu li .sub-menu li.menu-item-has-children > div { height: 45px; top: 0; width: 48px; }
  header .header-main .menu-main .menu li .sub-menu li.menu-item-has-children > div::after { right: 18px; }
  header .header-main .menu-main .menu li .sub-menu .sub-menu { margin: 0 8px 10px; padding: 2px; background: rgba(0, 0, 0, 0.18); border-radius: 10px; }
  header .header-main .menu-main .menu li .sub-menu .sub-menu > li + li { border-top: 1px solid rgba(255, 255, 255, 0.1) !important; }
  header .header-main .menu-main .menu li .sub-menu .sub-menu li a { position: relative; padding: 10px 12px 10px 28px; font-size: 14.5px; font-weight: 400; color: rgba(255, 255, 255, 0.95); }
  header .header-main .menu-main .menu li .sub-menu .sub-menu li a::before { content: ''; position: absolute; left: 14px; top: 50%; width: 5px; height: 5px; border-radius: 50%; background: rgba(255, 255, 255, 0.7); transform: translateY(-50%); }
  header .header-main .menu-main .menu li.mega-all, header .header-main .menu-main .menu li .mega-desc { display: none !important; }
}


/* Mega menu: mục có cấp 3 hiện thành bảng nhiều cột, thấy đủ mọi mục con ngay khi mở */
@media (min-width: 1025px) {
  header .header-main .menu-main .menu li.has-mega > .sub-menu {
    display: grid;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    gap: 6px 10px;
    min-width: 660px;
    padding: 16px;
    left: -24px;
  }
  header .header-main .menu-main .menu li.has-mega > .sub-menu > li > a {
    font-size: 14px;
    font-weight: 700;
    color: #1d2140;
    padding: 9px 12px;
  }
  header .header-main .menu-main .menu li.has-mega > .sub-menu > li > a::after { display: none; }
  header .header-main .menu-main .menu li.has-mega > .sub-menu > li:hover > a { background: transparent; color: #b21300; }
  header .header-main .menu-main .menu li.has-mega > .sub-menu > li > a { border-bottom: 1px solid #f0e3e1; border-radius: 10px 10px 0 0; margin-bottom: 4px; }
  header .header-main .menu-main .menu li.has-mega .sub-menu .sub-menu,
  header .header-main .menu-main .menu li.has-mega:hover .sub-menu .sub-menu,
  header .header-main .menu-main .menu li.has-mega:focus-within .sub-menu .sub-menu {
    position: static;
    display: block;
    visibility: inherit;
    opacity: 1;
    transform: none;
    min-width: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  header .header-main .menu-main .menu li.has-mega .sub-menu .sub-menu::before { display: none; }
  header .header-main .menu-main .menu li.has-mega .sub-menu .sub-menu li a {
    font-weight: 400;
    color: #4a4e63;
    padding: 8px 12px 8px 24px;
    position: relative;
  }
  header .header-main .menu-main .menu li.has-mega .sub-menu .sub-menu li a::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 50%;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d9a9a3;
    transform: translateY(-50%);
    transition: background-color 0.18s ease;
  }
  header .header-main .menu-main .menu li.has-mega .sub-menu .sub-menu li:hover > a { background: #fdf1ef; color: #b21300; }
  header .header-main .menu-main .menu li.has-mega .sub-menu .sub-menu li:hover > a::before { background: #b21300; }
}

/* Mega menu: mô tả cột + dòng "Xem tất cả" */
header .header-main .menu-main .menu li .mega-desc { display: none; }
@media (min-width: 1025px) {
  header .header-main .menu-main .menu li.has-mega > .sub-menu { min-width: 720px; padding: 18px 18px 0; row-gap: 0; }
  header .header-main .menu-main .menu li.has-mega > .sub-menu > li > a { border-bottom: 0; margin-bottom: 0; padding-bottom: 2px; }
  header .header-main .menu-main .menu li .mega-desc {
    display: block;
    margin: 0 12px 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0e3e1;
    font-size: 12.5px;
    line-height: 18px;
    color: #8a8ea3;
    white-space: normal;
    min-height: 64px;
    box-sizing: border-box;
  }
  header .header-main .menu-main .menu li.has-mega > .sub-menu > li.mega-all {
    grid-column: 1 / -1;
    width: calc(100% + 36px);
    margin: 10px -18px 0;
    padding: 0;
    border-top: 1px solid #f3e9e7;
    background: #fbf6f5;
    border-radius: 0 0 14px 14px;
  }
  header .header-main .menu-main .menu li.has-mega > .sub-menu > li.mega-all > a {
    justify-content: flex-start;
    gap: 8px;
    padding: 13px 30px;
    border-radius: 0 0 14px 14px;
    font-size: 13.5px;
    font-weight: 600;
    color: #b21300;
  }
  header .header-main .menu-main .menu li.has-mega > .sub-menu > li.mega-all > a::after {
    display: inline-block;
    content: '→';
    width: auto;
    height: auto;
    border: 0;
    transform: none;
    opacity: 1;
    transition: transform 0.2s ease;
  }
  header .header-main .menu-main .menu li.has-mega > .sub-menu > li.mega-all:hover > a { background: #fdf1ef; }
  header .header-main .menu-main .menu li.has-mega > .sub-menu > li.mega-all:hover > a::after { transform: translateX(4px); }
}

/* Báo lỗi form: viền + chữ đỏ rõ ràng, kể cả form nền tối */
.js-form .invalid input:not([type=checkbox]):not([type=radio]),
.js-form .invalid textarea,
.js-form .invalid select,
.js-form .invalid .select2-selection { border-color: #e02424 !important; background-color: #fff5f5 !important; box-shadow: 0 0 0 2px rgba(224, 36, 36, 0.15); }
.js-form ._error_msg,
.page-egfe .wrap_efe .block_3_egfe .container_common ._left form .frm-all .frm-group ._error_msg { color: #e02424 !important; font-size: 12.5px; font-style: normal; font-weight: 600; line-height: 18px; }
.js-form ._error_msg:empty { display: none; }
.js-form .invalid > label, .js-form .invalid ._check-title, .js-form .frm-group._check.invalid { color: #e02424; }
.js-form .frm-group._check.invalid .test + label::before,
.js-form .frm-group._check.invalid input[type=checkbox] { outline: 2px solid #e02424; outline-offset: 1px; }
.js-form ._privacy_msg { color: #e02424; font-size: 13px; font-weight: 600; line-height: 19px; margin: -8px 0 12px; }
.js-form ._privacy_msg:empty { display: none; }
.js-form .item.invalid input[type=checkbox] { outline: 2px solid #e02424; outline-offset: 2px; }
.popup_def .form_popup .group-field ._error_msg { margin-top: 6px; }

.preview-ribbon { position: fixed; z-index: 99999; left: 50%; bottom: 18px; transform: translateX(-50%); padding: 10px 18px; border-radius: 999px; background: #1d2140; color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); pointer-events: none; }

/* Link trong nội dung bài viết: xanh, gạch chân để dễ nhận ra */
.content_detail a:not(.btn_site):not(.wp-block-button__link),
.the-content a:not(.btn_site):not(.wp-block-button__link),
.page-test .content a:not(.btn_site),
.content_detail_test a:not(.btn_site) { color: #1a5fb4; text-decoration: underline; text-underline-offset: 2px; }
.content_detail a:not(.btn_site):hover, .the-content a:not(.btn_site):hover { color: #b21300; }

.iig-cta { margin: 22px 0; }
.iig-cta--left { text-align: left; }
.iig-cta--center { text-align: center; }
.iig-cta--right { text-align: right; }
.content_detail a.iig-cta__btn, .the-content a.iig-cta__btn, a.iig-cta__btn {
  display: inline-block; padding: 12px 30px; border-radius: 0 12px; font-weight: 600; font-size: 15px; line-height: 1.4;
  text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
a.iig-cta__btn--primary, .the-content a.iig-cta__btn--primary, .content_detail a.iig-cta__btn--primary { background: #b21300; color: #fff; }
a.iig-cta__btn--blue, .the-content a.iig-cta__btn--blue, .content_detail a.iig-cta__btn--blue { background: #0b4ea2; color: #fff; }
a.iig-cta__btn--outline, .the-content a.iig-cta__btn--outline, .content_detail a.iig-cta__btn--outline { background: #fff; color: #b21300; box-shadow: inset 0 0 0 2px #b21300; }
.content_detail a.iig-cta__btn:hover, .the-content a.iig-cta__btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 10px 22px rgba(178, 19, 0, 0.25); }
.content_detail a.iig-cta__btn--outline:hover, .the-content a.iig-cta__btn--outline:hover { background: #b21300; }
.iig-callout { margin: 22px 0; padding: 16px 20px; border-radius: 0 14px; border-left: 5px solid; }
.iig-callout p { margin: 0 0 8px; }
.iig-callout p:last-child { margin-bottom: 0; }
.iig-callout__title { font-weight: 700; font-size: 1.05em; }
.iig-callout--info { background: #eef5ff; border-color: #0b4ea2; }
.iig-callout--info .iig-callout__title { color: #0b4ea2; }
.iig-callout--success { background: #ecfdf3; border-color: #16a34a; }
.iig-callout--success .iig-callout__title { color: #15803d; }
.iig-callout--warning { background: #fffbeb; border-color: #f59e0b; }
.iig-callout--warning .iig-callout__title { color: #b45309; }
.iig-callout--danger { background: #fef2f2; border-color: #b21300; }
.iig-callout--danger .iig-callout__title { color: #b21300; }
