/* DKHL 2.3.0 - targeted, reversible presentation fixes for Modern V2 on Flatsome.
   Does not alter content or the DKHL Academy event/data contract. */
body.dkhlm-site { --dkhl23-navy:#0b2d50; --dkhl23-ink:#163552; --dkhl23-gold:#e8b84e; }
body.dkhlm-site .dkhlm-section .button,
body.dkhlm-site .dkhlm-section .dkhlm-btn { text-align:center; overflow-wrap:break-word; }
body.dkhlm-site .dkhlm-section .button.secondary,
body.dkhlm-site .dkhlm-section .button.is-fill.secondary,
body.dkhlm-site .dkhlm-cta .dkhlm-btn { background:#e8b84e; color:#082849; border-color:#e8b84e; }
body.dkhlm-site .dkhlm-section .button.secondary:is(:hover,:focus-visible) { background:#f2cc73; color:#082849; }

/* Academy dark promotion was inheriting dark heading text/blank button text. */
body.dkhlm-site .dkhlm-app .study-promo { background:#103d6d; color:#fff; gap:14px; flex-wrap:wrap; }
body.dkhlm-site .dkhlm-app .study-promo :is(h2,h3,strong) { color:#fff !important; }
body.dkhlm-site .dkhlm-app .study-promo p { color:#d9eafd !important; }
body.dkhlm-site .dkhlm-app .study-promo .btn,
body.dkhlm-site .dkhlm-app .study-promo a,
body.dkhlm-site .dkhlm-app .study-promo button { background:#fff !important; color:#13385c !important; border:1px solid #fff !important; border-radius:9px; text-shadow:none; text-indent:0; min-height:42px; padding:10px 15px; opacity:1; box-shadow:none; font-weight:700; font-size:13px; }
body.dkhlm-site .dkhlm-app .study-promo .btn:is(:hover,:focus-visible) { background:#eff7ff !important; color:#082849 !important; }
body.dkhlm-site .dkhlm-app #academy-main :is(select,input[type=text],input[type=search],textarea) { box-sizing:border-box; max-width:100%; min-width:0; min-height:44px; height:auto; color:#173552 !important; -webkit-text-fill-color:#173552; border:1px solid #bccbd9; background-color:#fff; font-size:14px; line-height:1.45; border-radius:9px; padding:10px 12px; opacity:1; }
body.dkhlm-site .dkhlm-app #academy-main select { appearance:auto; -webkit-appearance:menulist; padding-right:24px; }
body.dkhlm-site .dkhlm-app #academy-main option { color:#173552; background:#fff; }
body.dkhlm-site .dkhlm-app #academy-main :is(select,input,textarea):focus-visible { outline:2px solid #1d73be; outline-offset:2px; }
body.dkhlm-site .dkhlm-app #academy-main :is(.study-tools,.study-tools>*,.study-panel-head,.study-topbar) { min-width:0; }
body.dkhlm-site .dkhlm-app #academy-main .study-tools select,
body.dkhlm-site .dkhlm-app #academy-main .study-tools input { width:100%; }

@media (max-width:849px) {
  /* Modern pages have the floating contact widget; the stock promo top bar is no longer needed on phones. */
  body.dkhlm-site #header .header-top { display:none!important; }
  body.dkhlm-site .dkhlm-section :is(#khoa-hoc,#hoc-phi,#hoc-on-thi,#lien-he,#tu-van,#hang-bang-khac) { scroll-margin-top:88px; }
  body.dkhlm-site .dkhlm-footer { padding-top:28px!important; padding-bottom:22px!important; }
  body.dkhlm-site .dkhlm-app .academy-sidebar { padding:14px; }
  body.dkhlm-site .dkhlm-app .academy-content { overflow-wrap:break-word; }
}
@media (max-width:599px) {
  body.dkhlm-site .dkhlm-section { padding-top:30px!important; padding-bottom:30px!important; }
  body.dkhlm-site .dkhlm-section .row > .col.dkhlm-course-card,
  body.dkhlm-site .dkhlm-section .row > .col.dkhlm-tool-card,
  body.dkhlm-site .dkhlm-section .row > .col.dkhlm-info-card,
  body.dkhlm-site .dkhlm-section .row > .col.dkhl21-license-card,
  body.dkhlm-site .dkhlm-section .row > .col.dkhl26-course-card,
  body.dkhlm-site .dkhlm-section .row > .col.dkhl26-step-card,
  body.dkhlm-site .dkhlm-section .row > .col.dkhl26-study-card {
    flex:0 0 50%!important; width:50%!important; max-width:50%!important; min-width:0;
    padding:0 5px 10px!important;
  }
  body.dkhlm-site .dkhlm-section .row > .col.dkhlm-tool-card:nth-child(odd):last-child,
  body.dkhlm-site .dkhlm-section .row > .col.dkhlm-info-card:nth-child(odd):last-child,
  body.dkhlm-site .dkhlm-section .row > .col.dkhl21-license-card:nth-child(odd):last-child {
    flex:0 0 100%!important; width:100%!important; max-width:100%!important;
  }
  body.dkhlm-site .dkhlm-section :is(.dkhlm-course-card,.dkhlm-tool-card,.dkhlm-info-card,.dkhl21-license-card,.dkhl26-course-card)>.col-inner {
    min-width:0; height:100%; padding:14px 12px!important; border-radius:14px;
    display:flex; flex-direction:column; gap:0;
  }
  body.dkhlm-site .dkhlm-section :is(.dkhlm-course-card,.dkhlm-tool-card,.dkhlm-info-card,.dkhl21-license-card,.dkhl26-course-card) h3 {
    font-size:clamp(17px,4.7vw,21px)!important;line-height:1.29;overflow-wrap:break-word;margin:4px 0 8px;
  }
  body.dkhlm-site .dkhlm-section :is(.dkhlm-course-card,.dkhlm-tool-card,.dkhlm-info-card,.dkhl21-license-card,.dkhl26-course-card) p:not(.dkhlm-eyebrow):not(.dkhlm-number){
    font-size:12.5px;line-height:1.48;margin:0 0 10px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
  }
  body.dkhlm-site .dkhlm-section :is(.dkhlm-course-card,.dkhlm-tool-card,.dkhlm-info-card,.dkhl21-license-card,.dkhl26-course-card) .button {
    display:flex!important;align-items:center;justify-content:center;width:100%;min-width:0;max-width:100%;
    margin:auto 0 0!important;padding:9px 7px!important;min-height:44px;line-height:1.26;
    font-size:12px!important;letter-spacing:-.01em;white-space:normal;word-break:normal;overflow-wrap:normal;text-align:center;
  }
  body.dkhlm-site .dkhlm-section :is(.dkhlm-course-card,.dkhlm-tool-card,.dkhlm-info-card,.dkhl21-license-card,.dkhl26-course-card) .button span {overflow-wrap:break-word;}
  body.dkhlm-site .dkhlm-section .dkhlm-course-card .dkhlm-eyebrow {padding:4px 7px;font-size:10px;letter-spacing:0;margin-bottom:7px;}
  body.dkhlm-site .dkhlm-section .dkhlm-course-card .col-inner { min-height:190px; }
  body.dkhlm-site .dkhlm-section .dkhlm-course-note {margin:6px 0 0;padding:12px!important;}
  /* 3 category pills: one compact horizontal row. At 320px, users can swipe the row. */
  body.dkhlm-site .dkhlm-category-nav { display:flex;flex-wrap:nowrap;gap:6px;overflow-x:auto;overflow-y:hidden;padding:2px 1px 9px;margin-top:15px;scrollbar-width:thin;scroll-snap-type:x proximity;}
  body.dkhlm-site .dkhlm-category-nav a {flex:0 0 auto;white-space:nowrap;padding:7px 10px;font-size:12.5px;line-height:1.4;scroll-snap-align:start;}
  body.dkhlm-site .dkhlm-title-area {padding:20px 0 22px;margin-bottom:15px;}
  body.dkhlm-site .dkhlm-title-area h1 {font-size:clamp(26px,7.5vw,32px);line-height:1.25;}
  body.dkhlm-site .dkhlm-breadcrumb {padding:12px 0;}
  /* Full content stays available at the article URL; cards are only summaries. */
  body.dkhlm-site .dkhlm-card-grid,
  body.dkhlm-site .dkhlm-directory .editorial-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  body.dkhlm-site .dkhlm-card-grid > *,
  body.dkhlm-site .dkhlm-directory .editorial-grid > * {min-width:0;max-width:100%;}
  body.dkhlm-site .dkhlm-card-copy h2,
  body.dkhlm-site .dkhlm-directory .editorial-card h3 {overflow-wrap:break-word;}
  /* Prevent a dark quote panel from inheriting dark text or blank buttons. */
  body.dkhlm-site .dkhlm-app .study-promo {align-items:stretch;padding:18px;border-radius:13px;}
  body.dkhlm-site .dkhlm-app .study-promo :is(h2,h3) {font-size:19px!important;line-height:1.4;}
  body.dkhlm-site .dkhlm-app .study-promo .btn {align-self:flex-start;width:auto;max-width:100%;}
  body.dkhlm-site .dkhlm-app #academy-main .study-tools {grid-template-columns:minmax(0,1fr)!important;gap:12px;}
  body.dkhlm-site .dkhlm-app #academy-main :is(.study-tools label,.study-topbar) {font-size:12px;}
  body.dkhlm-site .dkhlm-app .academy-content {max-width:100%;}
  body.dkhlm-site .dkhlm-footer .row > .col:first-child {flex:0 0 100%!important;max-width:100%!important;width:100%!important;}
  body.dkhlm-site .dkhlm-footer .row > .col:nth-child(2),
  body.dkhlm-site .dkhlm-footer .row > .col:nth-child(3) {flex:0 0 50%!important;max-width:50%!important;width:50%!important;min-width:0;padding-inline:7px!important;}
  body.dkhlm-site .dkhlm-footer .col-inner {padding-bottom:0;}
  body.dkhlm-site .dkhlm-footer :is(h2,h3) {font-size:16px;margin-bottom:9px;}
  body.dkhlm-site .dkhlm-footer :is(p,li,a) {font-size:12.5px;line-height:1.55;}
  body.dkhlm-site .dkhlm-footer li {margin-bottom:5px;}
  body.dkhlm-site .dkhlm-footer .dkhlm-footer-logo {max-width:52px;margin-bottom:8px;}
  body.dkhlm-site .dkhlm-footer .dkhlm-footer-bottom {padding-top:12px;}
}
@media (max-width:359px) {
  /* Procedure descriptions are verbose; don't force unreadably narrow columns on 320px devices. */
  body.dkhlm-site .dkhlm-section .row > .col.dkhlm-tool-card.dkhl23-long-card {flex-basis:100%!important;width:100%!important;max-width:100%!important;}
}
@media (prefers-reduced-motion:reduce) {
  body.dkhlm-site .dkhl21-dock-menu,body.dkhlm-site .dkhl21-dock-toggle {transition:none!important;}
}
/* Keep nested button text readable on the academy's dark card, including theme spans. */
body.dkhlm-site .dkhlm-app .study-promo :is(a.btn,button.btn) :is(span,strong,em) {color:#13385c!important;-webkit-text-fill-color:#13385c;}
body.dkhlm-site .dkhlm-app #academy-main :is(select,input,textarea):focus-visible {box-shadow:none!important;}
