/* =========================================================
   CLB Giám đốc Bệnh viện – Public Theme
   Brand: #008046 (Medical Green) – hiện đại, trang trọng,
   thể hiện trách nhiệm với sức khoẻ cộng đồng.
   ========================================================= */

:root {
    /* Brand palette */
    --primary: #008046;
    --primary-600: #006d3b;
    --primary-700: #005a31;
    --primary-800: #044426;
    --primary-50: #e8f5ee;
    --primary-100: #cfeadb;
    --primary-200: #9fd4b7;

    --accent: #c9a24a;            /* vàng đồng – trang trọng, uy tín */
    --accent-600: #a6832f;

    --danger: #d64545;            /* dấu hiệu y tế */
    --info: #0ea5b7;

    /* Neutrals */
    --ink-900: #0f1f17;
    --ink-800: #1c2a22;
    --ink-700: #33443a;
    --ink-600: #55685c;
    --ink-500: #7a8c80;
    --ink-300: #c8d2cc;
    --ink-200: #e3e8e5;
    --ink-100: #f1f5f2;
    --ink-050: #f7faf8;
    --white: #ffffff;

    /* Semantic */
    --bg-page: #f4f7f5;
    --bg-soft: #ffffff;
    --text: var(--ink-800);
    --muted: var(--ink-600);
    --border: var(--ink-200);

    /* Effects */
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --shadow-xs: 0 1px 2px rgba(15, 31, 23, 0.06);
    --shadow-sm: 0 4px 14px rgba(15, 31, 23, 0.06);
    --shadow-md: 0 10px 30px rgba(15, 31, 23, 0.08);
    --shadow-lg: 0 20px 45px rgba(0, 128, 70, 0.15);
    --ring: 0 0 0 4px rgba(0, 128, 70, 0.18);

    /* Gradients */
    --grad-hero: linear-gradient(135deg, #005a31 0%, #008046 55%, #18a063 100%);
    --grad-hero-dark: linear-gradient(135deg, #033a22 0%, #006d3b 100%);

    /* Font */
    --font-sans: 'Be Vietnam Pro', 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg-page);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main { flex: 1; }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    color: var(--ink-900);
    font-weight: 700;
    letter-spacing: -0.01em;
}

a { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-700); }

::selection { background: var(--primary-100); color: var(--primary-800); }

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--primary);
    color: #fff;
    padding: .75rem 1rem;
    z-index: 9999;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- Bootstrap overrides ---------- */
.bg-primary { background-color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
.border-primary { border-color: var(--primary) !important; }

.btn { border-radius: 999px; font-weight: 600; padding: .6rem 1.25rem; transition: all .2s ease; }
.btn:focus { box-shadow: var(--ring); }

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(0, 128, 70, 0.25);
}
.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-700);
    border-color: var(--primary-700);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.btn-light {
    background: #fff;
    border-color: #fff;
    color: var(--primary-700);
    font-weight: 700;
}
.btn-light:hover { background: var(--primary-50); color: var(--primary-800); }

.btn-outline-light { border-width: 2px; }

.btn-lg { padding: .85rem 1.75rem; font-size: 1rem; }

/* CTA button in navbar */
.btn-cta {
    background: var(--accent);
    color: #1a1405;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    padding: .55rem 1.2rem;
    box-shadow: 0 6px 18px rgba(201, 162, 74, 0.35);
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.btn-cta:hover { background: var(--accent-600); color: #fff; transform: translateY(-1px); }

/* ---------- Topbar ---------- */
.topbar {
    background: var(--primary-800);
    color: rgba(255, 255, 255, 0.85);
    font-size: .82rem;
    padding: .45rem 0;
}
.topbar a { color: inherit; }
.topbar-item i { color: var(--accent); margin-right: .35rem; }
.topbar-divider { margin: 0 .75rem; opacity: .4; }
.topbar-motto i { color: var(--accent); margin-right: .35rem; }
.topbar-motto { font-weight: 600; letter-spacing: .02em; }

/* ---------- Header / Navbar ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    background: #fff;
    border-bottom: 1px solid var(--border);
    transition: box-shadow .25s, padding .25s;
}
.site-header.is-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    border-bottom-color: transparent;
}

.site-header .navbar { padding: .9rem 0; transition: padding .25s; }
.site-header.is-scrolled .navbar { padding: .55rem 0; }

.navbar-brand {
    display: flex !important;
    align-items: center;
    gap: .75rem;
    padding: 0;
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--grad-hero);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 6px 16px rgba(0, 128, 70, 0.35);
    flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--ink-900);
    letter-spacing: -0.01em;
}
.brand-sub {
    font-size: .72rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 600;
}

.navbar-nav .nav-link {
    color: var(--ink-800) !important;
    font-weight: 600;
    padding: .5rem .9rem !important;
    border-radius: 8px;
    position: relative;
    font-size: .95rem;
    transition: color .2s, background .2s;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus,
.navbar-nav .nav-item.show > .nav-link {
    color: var(--primary) !important;
    background: var(--primary-50);
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: .25rem;
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: width .25s, left .25s;
}
.navbar-nav .nav-link:hover::after {
    width: 50%;
    left: 25%;
}
.navbar-nav .dropdown-toggle::after { display: none; }

.navbar-toggler {
    border: 1px solid var(--border);
    padding: .4rem .6rem;
}
.navbar-toggler:focus { box-shadow: var(--ring); }

.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: .5rem;
    margin-top: .5rem !important;
}
.dropdown-item {
    border-radius: 8px;
    padding: .55rem .75rem;
    font-weight: 500;
    color: var(--ink-800);
    display: flex;
    align-items: center;
    gap: .55rem;
}
.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--primary-50);
    color: var(--primary-700);
}
.dropdown-item i { color: var(--primary); }

/* ---------- Hero ---------- */
.hero-section {
    position: relative;
    background: var(--grad-hero);
    color: #fff;
    padding: 5.5rem 0 5rem;
    margin-bottom: 3rem;
    overflow: hidden;
    isolation: isolate;
}
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 85% 15%, rgba(255,255,255,0.12), transparent 45%),
        radial-gradient(circle at 10% 80%, rgba(201,162,74,0.18), transparent 40%);
    z-index: -1;
}
.hero-section::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 60px;
    background: var(--bg-page);
    /* clip-path: polygon(0 100%, 100% 100%, 100% 35%, 0 100%); */
    z-index: 0;
}
.hero-section > .container { position: relative; z-index: 1; }

.hero-section h1 {
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}
.hero-section .lead { color: rgba(255, 255, 255, 0.95); font-weight: 500; }

/* Countdown */
.countdown {
    display: flex;
    gap: .9rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}
.countdown-item {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    text-align: center;
    min-width: 96px;
    transition: transform .2s;
}
.countdown-item:hover { transform: translateY(-3px); }
.countdown-number {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: .3rem;
    color: #fff;
    font-variant-numeric: tabular-nums;
}
.countdown-label {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

/* ---------- Page banner (inner pages) ---------- */
.page-banner {
    position: relative;
    background: var(--grad-hero);
    color: #fff;
    padding: 3.5rem 0 3rem;
    margin-bottom: 3rem;
    overflow: hidden;
    isolation: isolate;
}
.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 100% 0%, rgba(255,255,255,0.12), transparent 35%),
        radial-gradient(circle at 0% 100%, rgba(201,162,74,0.15), transparent 40%);
    z-index: -1;
}
.page-banner h1 {
    color: #fff;
    font-weight: 800;
    margin-bottom: .25rem;
    letter-spacing: -0.015em;
}
.page-banner .lead { color: rgba(255, 255, 255, 0.9); margin-bottom: 0; }

/* ---------- Section titles ---------- */
.section-title {
    color: var(--ink-900);
    font-weight: 800;
    font-size: 1.75rem;
    margin-bottom: 2rem;
    padding-bottom: 0;
    border-bottom: none;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: '';
    display: block;
    width: 56px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 4px;
    margin-top: .6rem;
}
.section-title.text-center {
    display: block;
}
.section-title.text-center::after { margin-left: auto; margin-right: auto; }

.eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: .2em;
    font-size: .75rem;
    font-weight: 700;
    color: var(--primary);
    background: var(--primary-50);
    padding: .3rem .8rem;
    border-radius: 999px;
    margin-bottom: .75rem;
}

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-xs);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s;
    overflow: hidden;
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-100);
}

.card-header {
    background: var(--primary-50);
    color: var(--primary-800);
    font-weight: 700;
    border-bottom: 1px solid var(--primary-100);
}

.card-title { font-weight: 700; color: var(--ink-900); }
.card-text { color: var(--ink-700); }

/* Feature icon card */
.card-body .display-4 {
    font-size: 2rem;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--primary-50);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem !important;
}

/* Article card */
.article-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.article-card .card-body { display: flex; flex-direction: column; flex: 1; }
.article-image {
    height: 200px;
    object-fit: cover;
    width: 100%;
    transition: transform .4s ease;
}
.article-card:hover .article-image { transform: scale(1.04); }
.article-card .card-footer {
    background: #fff;
    border-top: 1px solid var(--border);
    padding: .85rem 1.25rem;
}

.category-badge {
    background: var(--primary-50);
    color: var(--primary-700);
    border: 1px solid var(--primary-100);
    padding: .3rem .8rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    display: inline-block;
}

/* Speaker card */
.speaker-card {
    text-align: center;
    background: #fff;
    padding: 1.75rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform .25s, box-shadow .25s, border-color .25s;
    height: 100%;
}
.speaker-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-100);
}
.speaker-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
    border: 4px solid #fff;
    outline: 3px solid var(--primary-100);
    outline-offset: 0;
    background: var(--primary-50);
}
.speaker-card h6 {
    font-weight: 700;
    color: var(--ink-900);
    margin-bottom: .25rem;
}

/* Member & sponsor */
.member-card {
    text-align: center;
    padding: 1.75rem 1rem;
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all .25s;
    height: 100%;
}
.member-card:hover { box-shadow: var(--shadow-sm); border-color: var(--primary-100); transform: translateY(-3px); }
.member-logo { max-height: 60px; max-width: 60px; width: auto; object-fit: contain; flex-shrink: 0; margin-bottom: .25rem; }

.sponsor-logo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1.75rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all .25s;
    min-width: 180px;
    min-height: 110px;
}
.sponsor-logo-wrapper:hover {
    border-color: var(--primary-100);
    box-shadow: var(--shadow-sm);
    transform: translateY(-3px);
}
.sponsor-logo {
    max-height: 80px;
    max-width: 100%;
    width: auto;
    filter: grayscale(100%);
    opacity: .75;
    transition: all .3s;
    display: block;
    margin: 0 auto;
}
.sponsor-logo-wrapper:hover .sponsor-logo {
    filter: grayscale(0);
    opacity: 1;
}

/* ---------- Stats ---------- */
.stats-row { margin-top: -3rem; position: relative; z-index: 2; }
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    box-shadow: var(--shadow-sm);
    height: 100%;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-100);
}
.stat-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto .75rem;
    border-radius: 12px;
    background: var(--primary-50);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}
.stat-number {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--primary-700);
    line-height: 1;
    margin-bottom: .35rem;
    font-variant-numeric: tabular-nums;
}
.stat-label {
    font-size: .85rem;
    color: var(--muted);
    font-weight: 500;
}

@media (max-width: 768px) {
    .stats-row { margin-top: -1.5rem; }
    .stat-number { font-size: 1.5rem; }
}

/* ---------- Timeline ---------- */
.timeline {
    position: relative;
    padding-left: 2.25rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: .5rem;
    top: .25rem;
    bottom: .25rem;
    width: 2px;
    background: linear-gradient(var(--primary), var(--primary-100));
}
.timeline-item {
    position: relative;
    margin-bottom: 1.75rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.9rem;
    top: .4rem;
    width: 14px;
    height: 14px;
    background: #fff;
    border: 3px solid var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 0 4px var(--primary-50);
}

/* ---------- Sessions ---------- */
.session-card {
    border-left: 4px solid var(--primary);
    background: #fff;
}
.session-time {
    color: var(--primary);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.session-room {
    background: var(--accent);
    color: #1a1405;
    padding: .25rem .8rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    display: inline-block;
}

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    background: transparent;
    padding: .75rem 0;
    margin-bottom: 0;
    font-size: .9rem;
}
.breadcrumb-item a { color: rgba(255,255,255,.85); }
.breadcrumb-item a:hover { color: #fff; }
.breadcrumb-item.active { color: #fff; }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }

/* ---------- Filters (News) ---------- */
.btn-outline-primary.btn {
    border-width: 1.5px;
    font-weight: 600;
}

/* ---------- Forms ---------- */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: .65rem .9rem;
    transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: var(--ring);
}

/* ---------- List groups ---------- */
.list-group-flush .list-group-item {
    border-color: var(--border);
    padding: .85rem 0;
    background: transparent;
    font-size: 1rem;
}

/* ---------- Alerts ---------- */
.alert {
    border-radius: var(--radius);
    border: none;
    padding: 1rem 1.25rem;
}
.alert-info {
    background: #e6f7fa;
    color: #045c6a;
    border-left: 4px solid var(--info);
}
.alert-success {
    background: var(--primary-50);
    color: var(--primary-800);
    border-left: 4px solid var(--primary);
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 4rem;
    color: rgba(255, 255, 255, 0.8);
    background: var(--primary-800);
}
.footer-accent {
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary));
}
.footer-main { padding: 3.5rem 0 2.5rem; }

.footer-brand {
    display: flex;
    align-items: center;
    gap: .85rem;
    margin-bottom: 1rem;
}
.footer-brand .brand-logo {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: none;
}
.footer-title { font-size: 1.05rem; font-weight: 800; color: #fff; line-height: 1.2; }
.footer-sub {
    font-size: .72rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
}
.footer-desc { font-size: .92rem; color: rgba(255,255,255,0.75); margin-bottom: 1.25rem; }

.footer-heading {
    color: #fff;
    font-weight: 700;
    font-size: .95rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: .6rem;
}
.footer-heading::after {
    content: '';
    position: absolute;
    left: 0; bottom: 0;
    width: 32px; height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.footer-links, .footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li, .footer-contact li { margin-bottom: .55rem; }
.footer-links a {
    color: rgba(255, 255, 255, 0.78);
    font-size: .92rem;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    transition: color .2s, transform .2s;
}
.footer-links a i { font-size: .7rem; color: var(--accent); transition: transform .2s; }
.footer-links a:hover { color: #fff; }
.footer-links a:hover i { transform: translateX(3px); }

.footer-contact li {
    display: flex;
    gap: .6rem;
    align-items: flex-start;
    font-size: .9rem;
    color: rgba(255,255,255,0.78);
}
.footer-contact li i {
    color: var(--accent);
    margin-top: .2rem;
    flex-shrink: 0;
}

.footer-social {
    display: flex;
    gap: .5rem;
}
.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all .2s;
}
.footer-social a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1405;
    transform: translateY(-2px);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
    font-size: .85rem;
    color: rgba(255,255,255,0.6);
}
.footer-bottom a { color: rgba(255,255,255,0.75); }
.footer-bottom a:hover { color: #fff; }

/* ---------- Back to top ---------- */
.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .25s;
    z-index: 1040;
    cursor: pointer;
}
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover { background: var(--primary-700); }

/* ---------- Utility ---------- */
.bg-soft { background: var(--primary-50); }
.rounded-xl { border-radius: var(--radius) !important; }
.shadow-soft { box-shadow: var(--shadow-sm) !important; }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #fff;
        border-radius: var(--radius);
        padding: 1rem;
        margin-top: 1rem;
        border: 1px solid var(--border);
        box-shadow: var(--shadow-sm);
    }
    .navbar-nav .nav-link { padding: .75rem 1rem !important; }
    .navbar-nav .nav-link::after { display: none; }
    .btn-cta { margin-top: .5rem; text-align: center; justify-content: center; }
    .brand-sub { display: none; }
}

@media (max-width: 768px) {
    html { font-size: 14.5px; }
    .hero-section { padding: 3.5rem 0 3rem; }
    .hero-section h1 { font-size: 1.9rem; }
    .page-banner { padding: 2.25rem 0; }
    .page-banner h1 { font-size: 1.6rem; }
    .section-title { font-size: 1.4rem; }

    .countdown { gap: .6rem; }
    .countdown-item { min-width: 72px; padding: .75rem .6rem; }
    .countdown-number { font-size: 1.75rem; }
    .countdown-label { font-size: .7rem; }

    .footer-main { padding: 2.5rem 0 1.5rem; }
    .footer-brand { margin-bottom: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* =========================================================
   Rich Text Editor (rte)
   ========================================================= */
.rte-wrapper {
    border: 1px solid var(--ink-300);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #fff;
}

.rte-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: var(--ink-100);
    border-bottom: 1px solid var(--ink-300);
}

.rte-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: var(--ink-700);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s, border-color 0.15s;
}

.rte-btn:hover {
    background: var(--ink-200);
    border-color: var(--ink-300);
}

.rte-btn.active {
    background: var(--primary-100, #cfeadb);
    border-color: var(--primary, #008046);
    color: var(--primary, #008046);
}

.rte-sep {
    display: inline-block;
    width: 1px;
    height: 24px;
    background: var(--ink-300);
    margin: 0 4px;
}

.rte-editor {
    min-height: 280px;
    padding: 12px 16px;
    outline: none;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--ink-800);
    overflow-y: auto;
}

.rte-editor:focus {
    box-shadow: inset 0 0 0 2px rgba(0, 128, 70, 0.2);
}

.rte-editor h2 { font-size: 1.4rem; font-weight: 600; margin: 1rem 0 0.5rem; }
.rte-editor h3 { font-size: 1.15rem; font-weight: 600; margin: 0.9rem 0 0.4rem; }
.rte-editor p  { margin: 0 0 0.75rem; }
.rte-editor ul,
.rte-editor ol { padding-left: 1.5rem; margin: 0 0 0.75rem; }
.rte-editor a  { color: var(--primary, #008046); text-decoration: underline; }
.rte-editor img { max-width: 100%; border-radius: 4px; margin: 6px 0; }

.rte-source {
    display: block;
    width: 100%;
    min-height: 280px;
    padding: 12px 16px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    border: none;
    resize: vertical;
    outline: none;
    color: var(--ink-800);
    background: #fafafa;
}

.rte-source:focus {
    box-shadow: inset 0 0 0 2px rgba(0, 128, 70, 0.2);
}

/* =========================================================
   File Upload Component
   ========================================================= */
.file-upload-component { font-size: 0.92rem; }

.file-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 1rem;
    border: 2px dashed var(--ink-300);
    border-radius: var(--radius-sm);
    background: var(--ink-050);
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    cursor: pointer;
}
.file-drop-zone.drag-over {
    border-color: var(--primary);
    background: var(--primary-50);
}

.file-list { display: flex; flex-direction: column; gap: 6px; }

.file-item {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-sm);
    background: #fff;
    gap: 0;
    transition: opacity 0.2s;
}
.file-item--deleted { opacity: 0.5; }

.file-thumb {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
    background: var(--ink-100);
}
.file-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.file-info { min-width: 0; }
.file-name { font-size: 0.88rem; }
.file-meta { font-size: 0.78rem; }

/* Image browser modal */
.image-browser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}
.image-browser-item {
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.image-browser-item:hover { border-color: var(--primary); }
.image-browser-item img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
}
.image-browser-item .img-name {
    font-size: 0.72rem;
    text-align: center;
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Markdown preview */
.markdown-preview { line-height: 1.7; }
.markdown-preview h1,.markdown-preview h2,.markdown-preview h3 { margin-top: 1rem; }
.markdown-preview pre { background: #f4f4f4; padding: .75rem; border-radius: 4px; overflow-x: auto; }
.markdown-preview code { font-family: monospace; font-size: 0.88em; }
.markdown-preview img { max-width: 100%; }

/* ── Single image upload widget ─────────────────────────────────────────── */
.single-img-upload { display: inline-flex; flex-direction: column; }
.single-img-preview {
    width: 220px; height: 150px;
    border: 2px dashed #dee2e6; border-radius: 8px;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: #f8f9fa;
}
.single-img-preview.empty .single-img-thumb { display: none; }
.single-img-preview:not(.empty) .bi-image { display: none; }
.single-img-thumb { max-width: 100%; max-height: 100%; object-fit: contain; }
.single-img-preview.avatar { width: 130px; height: 130px; border-radius: 50%; }
.single-img-preview.avatar .single-img-thumb { object-fit: cover; width: 100%; height: 100%; border-radius: 50%; }

/* ── Rich HTML content (output from rich text editor) ───────────────────── */
/* Bao gồm .content-body (ArticleDetail) và .rich-content (Conference, Speaker, Sponsor) */
.content-body,
.rich-content {
    line-height: 1.8;
    color: var(--ink-700);
    overflow-wrap: break-word;
    word-break: break-word;
}
/* Mọi ảnh trong nội dung HTML không được vượt quá chiều rộng container */
.content-body img,
.rich-content img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    margin: .5rem 0;
}
.content-body p, .rich-content p { margin-bottom: .85rem; }
.content-body h1, .content-body h2, .content-body h3,
.content-body h4, .content-body h5, .content-body h6,
.rich-content h1, .rich-content h2, .rich-content h3,
.rich-content h4, .rich-content h5, .rich-content h6 {
    margin-top: 1.25rem;
    margin-bottom: .5rem;
    color: var(--ink-900);
}
.content-body ul, .content-body ol,
.rich-content ul, .rich-content ol {
    padding-left: 1.5rem;
    margin-bottom: .85rem;
}
.content-body blockquote,
.rich-content blockquote {
    border-left: 4px solid var(--primary-200);
    padding: .5rem 1rem;
    margin: 1rem 0;
    background: var(--primary-50);
    border-radius: 0 6px 6px 0;
    color: var(--ink-600);
}
.content-body a, .rich-content a {
    color: var(--primary-600);
    text-decoration: underline;
}
.content-body table, .rich-content table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    overflow-x: auto;
    display: block;
}
.content-body table th, .content-body table td,
.rich-content table th, .rich-content table td {
    border: 1px solid var(--border);
    padding: .4rem .75rem;
}

/* ── Conference banner image ────────────────────────────────────────────── */
.conference-banner-wrap {
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    max-height: 420px;
    background: var(--ink-100);
    display: flex;
    align-items: center;
    justify-content: center;
}
.conference-banner-img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    display: block;
}
