:root {
    /* Hệ màu thương hiệu MedEdu247: teal #009692 · xanh dương #0081c8 · cam #fdb944 · nền trắng */
    --teal: #009692;
    --teal-bright: #33aba6;
    --teal-deep: #00706d;
    --teal-soft: #e9f6f5;
    --blue: #0081c8;
    --blue-deep: #005f93;
    --blue-soft: #e7f3fa;
    --amber: #fdb944;
    --amber-deep: #b87a12;
    --amber-soft: #fff5e3;
    --yellow: var(--amber);          /* token cũ -> ánh xạ sang cam thương hiệu */
    --ink: #0b2b33;
    --navy: #003a5c;                 /* nền tối: xanh dương đậm của thương hiệu */
    --body: #4a5a60;
    --muted: #6a7a80;
    --cream: #f2faf9;
    --line: #dbe9e8;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(11, 43, 51, 0.08);
    --font: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--body); background: #fff; line-height: 1.65; font-size: 16px; }
img { max-width: 100%; height: auto; }
a { color: var(--teal-deep); }
h1, h2, h3 { color: var(--navy); font-weight: 800; line-height: 1.25; margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); text-transform: uppercase; letter-spacing: .4px; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1160px, 92vw); margin-inline: auto; }
.kicker { color: var(--teal); font-weight: 700; text-transform: uppercase; letter-spacing: 1.4px; font-size: .85rem; margin-bottom: .35rem; }
.lead { font-size: 1.12rem; color: var(--ink); }
.skip-link { position: fixed; z-index: 100; top: 10px; left: 10px; padding: 10px 16px; background: var(--navy); color: #fff; border-radius: 8px; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* Top bar */
.topbar { background: var(--navy); color: #d8ecf7; font-size: .84rem; }
.topbar-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; flex-wrap: wrap; }
.topbar a { color: #d8ecf7; text-decoration: none; margin-right: 14px; }
.topbar a:hover { color: #fff; }
.topbar-hotline { font-weight: 600; color: #fff; }

/* Nav + mega dropdown */
.site-nav { position: sticky; top: 0; z-index: 60; background: #fff; box-shadow: 0 2px 14px rgba(11, 43, 51, .07); }
.nav-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 1.22rem; color: var(--navy); }
.brand img { display: block; height: auto; }
.menu-toggle { display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--navy); cursor: pointer; }
.menu-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.menu-item { position: relative; }
.menu-item > a { display: flex; align-items: center; gap: 5px; padding: 22px 14px; text-decoration: none; color: var(--navy); font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; }
.menu-item > a:hover, .menu-item.is-active > a { color: var(--teal-deep); border-bottom-color: var(--teal); }
.caret { font-size: .7em; opacity: .65; transition: transform .2s; }
.has-sub:hover .caret, .has-sub:focus-within .caret { transform: rotate(180deg); }
.submenu { position: absolute; top: calc(100% + 2px); left: 0; min-width: 260px; background: #fff; border-radius: 0 0 14px 14px; box-shadow: var(--shadow); list-style: none; margin: 0; padding: 8px 0; opacity: 0; visibility: hidden; transform: translateY(8px); transition: .18s ease; }
.has-sub:hover > .submenu, .has-sub:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; }
.submenu a { display: block; padding: 10px 20px; color: var(--navy); text-decoration: none; font-size: .92rem; font-weight: 500; }
.submenu a:hover { background: var(--cream); color: var(--teal-deep); padding-left: 24px; transition: padding .15s; }

/* Hero slider */
.hero { position: relative; background: linear-gradient(150deg, var(--blue-deep), var(--teal-deep) 55%, var(--teal)); color: #fff; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.16) 1px, transparent 1px); background-size: 22px 22px; opacity: .5; pointer-events: none; }
.hero-slides { position: relative; min-height: 430px; display: grid; }
.hero-slide { grid-area: 1 / 1; align-self: center; padding: 64px 0 72px; opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; pointer-events: none; }
.hero-slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.hero-slide h1 { color: #fff; font-size: clamp(1.9rem, 4.6vw, 3.1rem); max-width: 760px; }
.hero .kicker { color: var(--yellow); }
.hero-text { max-width: 620px; font-size: 1.06rem; color: #dff3f2; }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 42px; align-items: center; }
.hero-media { margin: 0; }
.hero-media img { display: block; width: 100%; border-radius: var(--radius); box-shadow: 0 20px 50px rgba(0, 58, 92, .4); }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; gap: 9px; justify-content: center; }
.hero-dot { width: 11px; height: 11px; padding: 0; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; }
.hero-dot.is-active { background: var(--yellow); border-color: var(--yellow); }

/* Buttons, chips, pills */
.btn { display: inline-block; padding: 12px 26px; border-radius: 999px; font-weight: 700; text-decoration: none; text-transform: uppercase; letter-spacing: .4px; font-size: .9rem; transition: .18s; border: 2px solid transparent; }
.btn-primary { background: var(--yellow); color: var(--ink); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(253, 185, 68, .4); }
.btn-ghost { border-color: var(--teal); color: var(--teal-deep); background: #fff; }
.btn-ghost:hover { background: var(--teal); color: #fff; }
.btn-light { background: #fff; color: var(--teal-deep); }
.chip { display: inline-block; padding: 8px 18px; margin: 4px 6px 4px 0; border: 1.5px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--navy); font-weight: 600; font-size: .88rem; background: #fff; }
.chip:hover, .chip.is-active { border-color: var(--teal); background: var(--teal); color: #fff; }
.pill { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--teal-deep); color: #fff; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.pill-soft { background: var(--teal-soft); color: var(--teal-deep); }

/* Sections */
.section { padding: 66px 0; }
.section-alt { background: var(--cream); }
.section-more { text-align: center; margin-top: 30px; }
.grid { display: grid; gap: 22px; margin-top: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.catalog-card { text-align: center; padding: 34px 28px; }
.catalog-card p { color: var(--muted); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(11, 43, 51, .12); }
.card h3 { margin-top: .4em; }
.card p { font-size: .93rem; }
.feature-card { border-top: 4px solid var(--teal); }
.check { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--teal-soft); color: var(--teal-deep); font-weight: 800; font-size: 1.15rem; }
.price { color: var(--teal-deep); font-weight: 800; font-size: 1.15rem; }
.quote-band { margin-top: 44px; text-align: center; font-size: 1.3rem; font-weight: 700; color: var(--teal-deep); font-style: italic; padding: 26px; background: #fff; border: 2px dashed var(--teal-bright); border-radius: var(--radius); }

.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 34px; align-items: center; }
.stats { display: grid; gap: 14px; }
.stat { background: linear-gradient(140deg, var(--navy), var(--blue)); color: #fff; border-radius: var(--radius); padding: 18px 22px; display: flex; align-items: baseline; gap: 14px; }
.stat strong { font-size: 1.7rem; color: var(--amber); }
.about-side { display: grid; gap: 14px; }
.about-media { margin: 0; }
.about-media img { display: block; width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }

.testimonial-card blockquote { margin: 0 0 12px; font-style: italic; }
.testimonial-card figcaption { font-weight: 700; color: var(--navy); }

/* Posts */
.post-card { display: flex; min-height: 100%; padding: 0; overflow: hidden; flex-direction: column; }
.post-card h3 { padding: 10px 18px 0; font-size: 1.25rem; line-height: 1.32; }
.post-card p { padding: 8px 18px 20px; color: var(--muted); font-size: .9rem; line-height: 1.6; }
/* Eyebrow (chuyên mục) đặt trên tiêu đề theo hướng dẫn của khách; padding-right chừa chỗ cho date-badge.
   Dùng .post-card .card-eyebrow để thắng độ đặc hiệu của .post-card p. */
.post-card .card-eyebrow { margin: 0; padding: 16px 96px 0 18px; color: var(--teal-deep); font-size: .74rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.post-card p:last-child { margin-top: auto; }
.post-media { position: relative; min-height: 150px; background: linear-gradient(140deg, var(--blue-deep), var(--teal)); }
.post-media img { width: 100%; height: 160px; object-fit: cover; display: block; }
.date-badge { position: absolute; right: 14px; bottom: -18px; background: #fff; color: var(--navy); border-radius: 12px; box-shadow: var(--shadow); padding: 7px 12px; text-align: center; line-height: 1.15; }
.date-badge strong { display: block; font-size: 1.2rem; }
.date-badge span { font-size: .74rem; color: var(--teal-deep); font-weight: 700; }
.post-card h3 a { color: var(--navy); text-decoration: none; }
.post-card h3 a:hover { color: var(--teal-deep); }
.cat-tabs { margin-bottom: 6px; }
.empty-note { padding: 30px 0; text-align: center; }
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 30px; }
.post-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: .9rem; }

/* Page hero + prose */
.page-hero { background: linear-gradient(150deg, var(--navy), var(--blue-deep)); color: #fff; padding: 46px 0 40px; }
.page-hero h1 { color: #fff; font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin-bottom: .3em; }
.page-hero .lead { color: #dff3f2; }
.crumbs { font-size: .86rem; margin-bottom: 14px; }
.crumbs a { color: #bfe0f2; text-decoration: none; }
.crumbs a:hover { color: #fff; }
.crumbs em { font-style: normal; color: #fff; }
.prose { max-width: 860px; }
.prose h2, .prose h3 { margin-top: 1.5em; }
.prose img { border-radius: var(--radius); margin: 18px 0; }
.prose figure { margin: 24px 0; }
.prose figure img { display: block; width: 100%; margin: 0; }
.prose blockquote { margin: 20px 0; padding: 14px 22px; border-left: 4px solid var(--teal); background: var(--cream); border-radius: 0 12px 12px 0; font-style: italic; }

/* Trang chuyên gia (nội dung là trang tĩnh trong CMS, kind = 'expert'):
   danh sách ảnh tròn + tên; trang hồ sơ có ảnh lớn ở đầu rồi mới tới phần giới thiệu. */
.expert-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px 20px; margin-top: 30px; }
.expert-tile { display: block; color: var(--navy); text-align: center; text-decoration: none; }
.expert-avatar { display: block; width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 50%; background: var(--cream); box-shadow: 0 10px 26px rgba(0, 58, 92, .14); transition: transform .2s, box-shadow .2s; }
/* margin/border-radius phải reset vì .prose img đặt border-radius 16px + margin 18px,
   làm ảnh avatar bị đẩy xuống (lộ nền kem, trông như bị cắt đỉnh đầu).
   object-position ưu tiên vùng mặt khi ảnh tương lai không vuông. */
.expert-avatar img { display: block; width: 100%; height: 100%; margin: 0; border-radius: 0; object-fit: cover; object-position: center 22%; }
.expert-tile:hover .expert-avatar, .expert-tile:focus-visible .expert-avatar { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(0, 58, 92, .2); }
.expert-tile strong { display: block; margin-top: 14px; font-size: .96rem; line-height: 1.35; }
.expert-tile:hover strong { color: var(--teal-deep); }
.expert-hero { background: linear-gradient(150deg, var(--navy), var(--blue-deep)); color: #fff; padding: 46px 0 44px; }
.expert-profile { text-align: center; }
.expert-back { display: inline-block; margin-bottom: 16px; color: #bfe0f2; font-size: .84rem; font-weight: 600; text-decoration: none; }
.expert-back:hover { color: #fff; text-decoration: underline; }
.expert-avatar--lg { width: min(210px, 52vw); margin: 0 auto 20px; box-shadow: 0 0 0 5px rgba(255, 255, 255, .92), 0 20px 46px rgba(0, 30, 48, .4); }
.expert-profile h1 { color: #fff; font-size: clamp(1.6rem, 3.6vw, 2.4rem); margin-bottom: .25em; }
.expert-role { color: #bfe9e6; font-weight: 600; }
.expert-bio { padding-top: 34px; }
.prose:has(.expert-grid) { max-width: 1000px; }
.post-cover { width: 100%; max-height: 420px; object-fit: cover; }

/* CTA band + footer */
.cta-band { background: linear-gradient(140deg, var(--teal-deep), var(--teal)); color: #fff; padding: 46px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: 1.4rem; }
.cta-band p { margin: 0; color: #dff3f2; }
.site-footer { background: #07272b; color: #9fb9bd; font-size: .92rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 26px; padding: 50px 0 30px; }
.site-footer h3 { color: #fff; font-size: 1rem; text-transform: uppercase; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: #9fb9bd; text-decoration: none; }
.site-footer a:hover { color: var(--teal-bright); }
.brand-light, .brand-light span { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; font-size: .84rem; }
.fab-call { position: fixed; right: 22px; bottom: 22px; width: 48px; height: 48px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; text-decoration: none; font-size: 1.2rem; box-shadow: 0 0 0 6px rgba(0,150,146,.22), 0 0 0 14px rgba(0,150,146,.12); animation: fab-pulse 2.2s infinite; z-index: 55; }
@keyframes fab-pulse { 0%, 100% { box-shadow: 0 0 0 6px rgba(0,150,146,.22), 0 0 0 14px rgba(0,150,146,.12); } 50% { box-shadow: 0 0 0 10px rgba(0,150,146,.14), 0 0 0 20px rgba(0,150,146,.06); } }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .fab-call { animation: none; }
}

/* Responsive */
@media (max-width: 980px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .about-grid { grid-template-columns: 1fr; }
    .hero-inner { grid-template-columns: 1fr; }
    /* Mobile/tablet: ảnh slide hiện bên dưới phần chữ (làm nền) thay vì ẩn hẳn.
       Giới hạn chiều cao + object-fit để hero không kéo dài màn hình. */
    .hero-media { margin: 22px 0 0; }
    .hero-media img { width: 100%; max-height: 240px; object-fit: cover; box-shadow: 0 14px 34px rgba(0, 30, 48, .35); }
    /* iPad: 3 chuyên gia mỗi hàng */
    .expert-grid { grid-template-columns: repeat(3, 1fr); }
    .menu-toggle { display: inline-flex; align-items: center; gap: 7px; }
    .brand img { width: 150px; }
    .main-menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; box-shadow: var(--shadow); padding: 10px 5vw 20px; }
    .main-menu.is-open { display: block; }
    .menu-list { flex-direction: column; }
    .menu-item > a { padding: 13px 4px; border-bottom: none; }
    .submenu { position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none; padding: 0 0 6px 16px; display: none; }
    .has-sub.is-open > .submenu { display: block; }
}
@media (max-width: 640px) {
    .grid-4, .grid-3 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .cta-inner { justify-content: center; text-align: center; }
    .brand img { width: 132px; }
    .hero-media { margin-top: 18px; }
    .hero-media img { max-height: 190px; }
    .hero-slide { padding: 42px 0 60px; }
    /* Mobile: 2 chuyên gia mỗi hàng */
    .expert-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; }
    .expert-tile strong { font-size: .88rem; }
    .expert-avatar--lg { width: min(170px, 46vw); }
}
.notfound { text-align: center; padding: 80px 0; }

/* ---- Modal hướng dẫn Demo của site nội dung (js/site-demo-guide.js) ----
   Cùng kiểu modal của site khóa học nhưng dùng token màu của site.css. */
body.demo-guide-open { overflow: hidden; }
.demo-guide-launcher { position: fixed; z-index: 360; bottom: 22px; left: 22px; display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 7px 14px 7px 7px; border: 1px solid #86cfca; border-radius: 999px; color: #fff; background: var(--teal-deep); box-shadow: 0 14px 38px rgba(0, 112, 109, .3); cursor: pointer; font-family: inherit; }
.demo-guide-launcher > span { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: var(--teal-deep); background: #9adcd8; font-size: 18px; font-weight: 900; }
.demo-guide-launcher strong { font-size: .82rem; letter-spacing: .05em; }
.demo-guide-overlay { position: fixed; z-index: 400; inset: 0; display: grid; place-items: center; padding: 24px; overflow-y: auto; background: rgba(11, 43, 51, .7); backdrop-filter: blur(7px); opacity: 0; transition: opacity .18s; }
.demo-guide-overlay.is-open { opacity: 1; }
.demo-guide-panel { width: min(760px, 100%); border-radius: 24px; background: #fff; box-shadow: 0 34px 100px rgba(0, 0, 0, .28); overflow: hidden; transform: translateY(14px) scale(.985); transition: transform .2s; }
.demo-guide-overlay.is-open .demo-guide-panel { transform: none; }
.demo-guide-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 26px 28px 20px; }
.demo-guide-header h2 { max-width: 560px; margin: 4px 0 0; font-size: clamp(1.35rem, 3.2vw, 1.9rem); line-height: 1.18; }
.demo-guide-kicker { color: var(--teal-deep); font-size: .7rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.demo-guide-close { flex: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--cream); color: var(--navy); font-size: 20px; line-height: 1; cursor: pointer; }
.demo-guide-close:hover { background: var(--teal-soft); }
.demo-guide-warning { display: flex; align-items: center; gap: 14px; margin: 0 28px; padding: 13px 16px; border: 1px solid #f1c5a4; border-radius: 12px; color: #81440f; background: var(--amber-soft); font-size: .84rem; }
.demo-guide-warning strong { flex-shrink: 0; }
.demo-guide-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 22px 28px; padding: 0; list-style: none; }
.demo-guide-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 11px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #f9fcfb; }
.demo-guide-steps li > span:first-child { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 50%; color: #fff; background: var(--teal); font-size: .78rem; font-weight: 900; }
.demo-guide-steps strong { display: block; color: var(--navy); font-size: .92rem; }
.demo-guide-steps p { margin: 3px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.55; }
.demo-guide-account { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 28px 22px; padding: 12px 14px; border-radius: 12px; background: var(--teal-soft); font-size: .8rem; }
.demo-guide-account > span { margin-right: auto; color: var(--navy); font-weight: 800; }
.demo-guide-account code { padding: 4px 7px; border-radius: 6px; color: var(--teal-deep); background: #fff; }
.demo-guide-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 20px 28px 26px; border-top: 1px solid var(--line); }
.demo-guide-button { display: inline-flex; align-items: center; min-height: 46px; padding: 10px 16px; border: 0; border-radius: 999px; background: var(--teal-deep); color: #fff; font-family: inherit; font-size: .8rem; font-weight: 800; text-decoration: none; cursor: pointer; }
.demo-guide-button:hover { background: var(--teal); }
.demo-guide-secondary { background: #fff; color: var(--teal-deep); box-shadow: inset 0 0 0 1px var(--teal-deep); }
.demo-guide-link { margin-left: auto; color: var(--teal-deep); font-size: .8rem; font-weight: 800; }
@media (max-width: 980px) {
    .demo-guide-steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .demo-guide-overlay { align-items: flex-end; padding: 0; }
    .demo-guide-panel { max-height: 94vh; border-radius: 22px 22px 0 0; overflow-y: auto; }
    .demo-guide-header, .demo-guide-actions { padding-inline: 18px; }
    .demo-guide-warning, .demo-guide-steps, .demo-guide-account { margin-inline: 18px; }
    .demo-guide-warning { align-items: flex-start; flex-direction: column; gap: 2px; }
    .demo-guide-link { margin-left: 0; }
}
