/* professional certifications */
.ceHero {
  margin: 26px 0 10px; border-radius: 28px; padding: clamp(24px, 5vw, 46px); color: #fff; position: relative; overflow: hidden;
  display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap;
  background: radial-gradient(520px 260px at 92% 0%, rgba(250, 199, 117, .28), transparent 70%), linear-gradient(135deg, #10352d, #0F6E56 60%, #1D9E75);
}
.ceHero h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 4.6vw, 2.7rem); line-height: 1.25; }
.ceHero p { margin: 0; max-width: 640px; opacity: .93; font-size: 1.06rem; }
.ceStats { display: flex; gap: 10px; }
.ceStats span { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2); border-radius: 16px; padding: 10px 14px; text-align: center; font-size: .82rem; min-width: 76px; }
.ceStats b { display: block; font-size: 1.35rem; color: var(--brand-gold); line-height: 1.3; }

.ceChooser { margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); }
.ceHead h2 { margin: 0; font-size: 1.35rem; }
.ceHead p { margin: 2px 0 0; color: var(--muted); }
.ceForm { margin-top: 14px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; align-items: end; }
.ceForm .fieldL { display: flex; flex-direction: column; gap: 6px; font-size: .86rem; color: var(--muted); font-weight: 600; }
.ceAr { grid-column: 1 / -1; justify-self: start; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--bg); border-radius: 99px; padding: .3rem .85rem; cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--muted); }
.ceAr input { accent-color: var(--primary); }
.ceResults h3 { margin: 18px 0 10px; font-size: 1.05rem; }
.ceEmpty { color: var(--muted); margin: 14px 0 0; }

.ceGrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ceCard {
  text-align: start; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.ceCard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cfe0da; }
.ceCard:focus-visible { outline: 3px solid var(--primary-soft); border-color: var(--primary); }
.ceCardTop { display: flex; flex-direction: column; }
.ceCardTop b { font-size: 1.04rem; line-height: 1.4; }
.ceCardTop small { color: var(--muted); font-size: .8rem; }
.ceCardAr { color: var(--ink); font-size: .9rem; }
.ceCardFee { font-weight: 700; color: var(--primary); font-size: .95rem; }
.ceBadges { display: flex; flex-wrap: wrap; gap: 5px; }
.cb { font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.cb.lv1 { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.cb.lv2 { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.cb.lv3 { background: var(--violet-soft); color: var(--violet); border-color: transparent; }
.cb.ar { background: var(--gold-soft); color: #a46b10; border-color: transparent; }
.cb.free { background: #e8f7ee; color: #1b7a43; border-color: transparent; }
.cb.hrdf { background: #fff; color: #0b5a46; border-color: #bfe3d6; }
.ceWhy { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.ceWhy i { font-style: normal; font-size: .74rem; color: #3d5b54; background: #f1f6f4; border-radius: 8px; padding: .08rem .45rem; }
.ceWhy i.warn { color: #9a4a12; background: var(--amber-soft); }

.ceHrdf {
  margin-top: 26px; border-radius: 26px; padding: clamp(20px, 4vw, 34px); display: grid; grid-template-columns: .9fr 1.1fr; gap: 20px 28px; align-items: center;
  background: linear-gradient(180deg, #fffaf0, #fff3dc); border: 1px solid #f3e1b8;
}
.ceHrdf .btn { grid-column: 1 / -1; justify-self: start; }
.ceTag { display: inline-block; font-size: .78rem; font-weight: 700; color: #a46b10; background: #fff; border-radius: 99px; padding: .1rem .65rem; margin-bottom: 6px; }
.ceHrdfText h2 { margin: 0 0 8px; font-size: clamp(1.3rem, 3vw, 1.75rem); }
.ceHrdfText p { margin: 0; color: #5e4d2b; }
.ceHrdfList { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ceHrdfList li { background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 2px; }
.ceHrdfList span { color: var(--muted); font-size: .86rem; }

.ceTools { display: grid; grid-template-columns: 1fr 220px; gap: 10px; margin-bottom: 10px; }
.ceChips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.ceChips::-webkit-scrollbar { display: none; }
.ceChips .tab { flex: none; }
.ceNote { color: var(--muted); font-size: .82rem; margin: 16px 0 0; }

.ceDlg { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 32px); border: 0; border-radius: 24px; padding: 0; box-shadow: 0 30px 80px rgba(10, 30, 26, .35); }
.ceDlg::backdrop { background: rgba(12, 30, 26, .45); backdrop-filter: blur(2px); }
.ceDlgBody { padding: 26px clamp(18px, 4vw, 32px) 22px; }
.ceX { position: absolute; top: 14px; left: 14px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 1rem; color: var(--muted); }
.ceX:hover { color: var(--ink); border-color: var(--ink); }
.ceDlgOrg { margin: 0; color: var(--muted); font-size: .85rem; padding-left: 40px; }
.ceDlg h2 { margin: 2px 0 0; font-size: 1.5rem; line-height: 1.35; }
.ceDlgAr { margin: 0 0 8px; color: var(--ink); }
.ceDlgWhy { margin: 12px 0 4px; background: var(--primary-soft); color: #0b4f3e; border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.ceDlg dl { margin: 10px 0 0; display: grid; gap: 0; }
.ceRow { display: grid; grid-template-columns: 130px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ceRow:last-child { border-bottom: 0; }
.ceRow dt { color: var(--muted); font-weight: 700; font-size: .88rem; }
.ceRow dd { margin: 0; }
.ceNext { margin: 12px 0 0; font-weight: 600; }
.ceLink { border: 0; background: none; color: var(--primary); font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; }
.ceDlgActions { margin-top: 16px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ceChecked { color: var(--muted); font-size: .82rem; }

/* assistant: floating button + panel */
.aiFab {
  position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 8px;
  border: 0; border-radius: 99px; padding: .7rem 1.15rem .7rem 1.25rem; font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; color: #fff;
  background: linear-gradient(135deg, #17465e, #0F6E56 60%, #1D9E75); box-shadow: 0 12px 30px rgba(11, 42, 56, .35), 0 0 0 1px rgba(255, 255, 255, .25) inset;
  transition: transform .18s ease, box-shadow .18s ease; animation: aiIn .5s ease both .6s;
}
.aiFab:hover { transform: translateY(-2px); box-shadow: 0 16px 36px rgba(11, 42, 56, .42), 0 0 0 1px rgba(255, 255, 255, .3) inset; }
.aiSpark { color: #FAC775; font-size: 1.15rem; line-height: 1; animation: aiTwinkle 2.8s ease-in-out infinite; }
.aiOpen .aiFab { opacity: 0; pointer-events: none; }
@keyframes aiIn { from { opacity: 0; transform: translateY(14px); } }
@keyframes aiTwinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.25) rotate(20deg); } }

.aiPanel {
  position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 61; width: min(400px, calc(100vw - 24px)); height: min(640px, calc(100vh - 40px));
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 22px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(10, 30, 26, .32); animation: aiPop .22s ease both;
}
.aiPanel[hidden] { display: none; }
@keyframes aiPop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.aiHead { display: flex; align-items: center; gap: 10px; padding: 14px 16px; color: #fff; background: linear-gradient(135deg, #17465e, #0F6E56); }
.aiHead div { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.aiHead small { opacity: .85; font-size: .78rem; }
.aiLogo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .15); color: #FAC775; font-size: 1.1rem; }
.aiX { width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; cursor: pointer; font-size: .95rem; }
.aiX:hover { background: rgba(255, 255, 255, .28); }
.aiModels { display: flex; gap: 4px; padding: 8px 10px; background: var(--bg); border-bottom: 1px solid var(--line); }
.aiModels label { flex: 1; cursor: pointer; }
.aiModels input { position: absolute; opacity: 0; pointer-events: none; }
.aiModels span { display: block; text-align: center; font-size: .8rem; font-weight: 700; color: var(--muted); padding: .35rem .2rem; border-radius: 10px; border: 1px solid transparent; }
.aiModels input:checked + span { background: #fff; color: var(--primary); border-color: #cfe0da; box-shadow: var(--shadow-sm); }
.aiModels input:focus-visible + span { outline: 2px solid var(--primary); }
.aiBody { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.aiHello p { margin: 0 0 8px; color: var(--muted); font-size: .9rem; }
.aiHello button { display: block; width: 100%; text-align: start; margin-bottom: 6px; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: .5rem .75rem; font: inherit; font-size: .88rem; cursor: pointer; color: var(--ink); }
.aiHello button:hover { border-color: var(--primary); color: var(--primary); background: #fbfefd; }
.ceChat { display: flex; flex-direction: column; gap: 10px; }
.ceChat:empty { display: none; }
.ceMsg { max-width: 88%; border-radius: 16px; padding: 9px 13px; line-height: 1.8; font-size: .94rem; }
.ceMsg p { margin: 0 0 6px; }
.ceMsg p:last-of-type { margin-bottom: 0; }
.ceMsg ul { margin: 4px 0 6px; padding-inline-start: 1.2rem; }
.ceMsg small { display: block; margin-top: 6px; color: var(--muted); font-size: .72rem; }
.ceMsg a { color: var(--primary); word-break: break-all; }
.ceMsg.me { align-self: flex-start; background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.ceMsg.bot { align-self: flex-end; background: var(--bg); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ceMsg.err { background: var(--amber-soft); border-color: #f1d3b3; color: #7a3d10; }
.ceTyping { display: flex; gap: 4px; padding: 4px 0; }
.ceTyping i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .4; animation: ceDot 1s infinite ease-in-out; }
.ceTyping i:nth-child(2) { animation-delay: .15s; }
.ceTyping i:nth-child(3) { animation-delay: .3s; }
@keyframes ceDot { 50% { opacity: 1; transform: translateY(-3px); } }
.aiForm { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.aiForm input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--bg); border-radius: 99px; padding: .6rem 1rem; font: inherit; font-size: .95rem; }
.aiForm input:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); background: #fff; }
.aiSend { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; cursor: pointer; display: grid; place-items: center; }
.aiSend svg { width: 20px; height: 20px; transform: scaleX(-1); }
.aiSend:disabled { opacity: .5; cursor: wait; }
.aiNote { margin: 0; padding: 0 14px 10px; color: var(--muted); font-size: .7rem; line-height: 1.6; }
@media (max-width: 560px) {
  .aiFab { bottom: 14px; inset-inline-end: 14px; }
  .aiPanel { inset-inline: 0; bottom: 0; width: 100%; height: 88vh; border-radius: 22px 22px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .aiFab, .aiSpark, .aiPanel { animation: none; } }

/* official training platforms */
.trGroup { margin: 18px 0 10px; font-size: 1.02rem; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.trGroup::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.trGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trCard { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.trCard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cfe0da; }
.trTop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.trTop b { font-size: 1.08rem; }
.trTop i { font-style: normal; color: var(--primary); font-weight: 700; }
.trCard small { color: var(--muted); font-size: .8rem; }
.trWhat { font-size: .9rem; line-height: 1.75; flex: 1; }
.trTags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.trTags em { font-style: normal; font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; background: var(--bg); color: var(--muted); border: 1px solid var(--line); }
.trTags em.g { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.ceCheck { margin-top: 18px; border-radius: 18px; padding: 16px 18px; background: #fff8ec; border: 1px solid #f1d9a8; display: grid; gap: 6px; }
.ceCheck b { color: #8a5a0f; }
.ceCheck p { margin: 0; color: #5e4d2b; font-size: .92rem; }
.ceCheck .btn { justify-self: start; margin-top: 4px; }

@media (max-width: 1000px) { .ceGrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ceForm { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .ceGrid, .trGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ceHrdf { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .ceGrid, .ceForm, .ceHrdfList, .ceTools, .trGrid { grid-template-columns: 1fr; }
  .ceStats span { min-width: 0; padding: 8px 10px; }
  .ceRow { grid-template-columns: 1fr; gap: 2px; }
}
