/* --- Global & Fonts --- */
:root {
    --bs-primary-rgb: 33, 93, 255; /* For button colors */
    --navbar-height: 78px; /* Keep navbar height in one place */
    --iframe-gutter: 12px; /* Narrow side padding for edge-to-edge iframe */
    --reading-max: 1200px; /* Max readable width for content on wide/landscape */
}
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
    background-color: #f4f7f6;
}
.custom-container {
    /* Always keep 5% viewport margins and fill remaining width */
    width: calc(100vw - 10vw); /* 90vw */
    max-width: none; /* remove cap so 5% margins are consistent */
    margin-left: 5vw;
    margin-right: 5vw;
    padding-left: 15px;
    padding-right: 15px;
}

/* Narrower gutters for non-home pages (main content) on small screens */
@media (max-width: 1000px) {
    .main-content .custom-container {
        width: calc(100vw - 6vw); /* 94vw */
        margin-left: 3vw;
        margin-right: 3vw;
        padding-left: 10px;
        padding-right: 10px;
    }
}
@media (max-width: 640px) {
    .main-content .custom-container {
        width: calc(100vw - 4vw); /* 96vw */
        margin-left: 2vw;
        margin-right: 2vw;
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* Landscape: cap reading width for non-home pages (page header + main content) */
@media (orientation: landscape) and (min-width: 1000px) {
    .page-header .custom-container,
    .main-content .custom-container {
        width: min(calc(100vw - 10vw), var(--reading-max));
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
    /* Increase specificity to override .page-header .header-content { width:100% } */
    .page-header .custom-container.header-content {
        width: min(calc(100vw - 10vw), var(--reading-max));
        margin-left: auto;
        margin-right: auto;
    }
}

/* --- Navbar --- */
.navbar {
    height: var(--navbar-height);
    background-color: transparent;
    transition: background-color 0.3s ease;
    padding: 0.5rem 0;
    will-change: transform, background-color;
    transform: translateZ(0); /* promote to its own layer to avoid flicker */
    z-index: 1061; /* keep navbar and toggler at the very top */
}
.navbar.scrolled { 
    background-color: #1B2B86; 
}
/* Ensure navbar appears solid while mobile menu is open */
body.nav-open .navbar {
    background-color: #1B2B86;
}
.navbar .logo { 
    width: 87px; 
    height: 36px; 
}
.navbar .navbar-brand {
    display: flex;
    align-items: center;
    height: var(--navbar-height);
    padding: 0; /* remove default vertical padding for perfect centering */
}
.navbar .nav-link {
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    margin: 0 20px;
}
.navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background-color: #fff;
}
.navbar-toggler { 
    border: none; 
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--navbar-height);
    line-height: 1;
}
.navbar-toggler:focus {
    box-shadow: none;
}
/* Animated hamburger icon */
.navbar-toggler .hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 18px;
}
.navbar-toggler .hamburger .line {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #fff;
    border-radius: 1px;
    transition: transform 0.25s ease, opacity 0.2s ease, background-color 0.25s ease;
    will-change: transform, opacity;
}
/* Toggle to X when menu is open */
.navbar-toggler[aria-expanded="true"] .hamburger .line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.navbar-toggler[aria-expanded="true"] .hamburger .line:nth-child(2) {
    opacity: 0;
}
.navbar-toggler[aria-expanded="true"] .hamburger .line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}
.btn-register {
    min-width: 96px; height: 40px; background-color: #215cff7c; color: #fff;
    padding: 0 18px;
    font-size: 16px; font-weight: 500; border-radius: 4px;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
    margin-left: 20px;
    transition: background-color .25s ease, opacity .25s ease, transform .15s ease, box-shadow .25s ease;
    box-shadow: 0 2px 6px rgba(33, 93, 255, 0.06);
}
.btn-register:hover { 
    background-color: #658eff88; 
    color: #fff; 
    opacity: .96;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(33, 93, 255, 0.14);
}
.btn-register:active {
    transform: translateY(0) scale(0.985);
    box-shadow: 0 1px 4px rgba(33, 93, 255, 0.12);
}
.btn-register:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 93, 255, 0.28);
}

.btn-register.is-closed,
.btn-register.is-closed:hover,
.btn-register.is-closed:active,
.btn-register.is-closed:focus {
    background-color: rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.92) !important;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.28);
}

/* Keep CTA text white across interaction states */
.btn-register,
.btn-register:hover,
.btn-register:active,
.btn-register:focus,
.btn-register:visited,
.btn-new-register,
.btn-new-register:hover,
.btn-new-register:active,
.btn-new-register:focus,
.btn-new-register:visited,
.btn-hero-download,
.btn-hero-download:hover,
.btn-hero-download:active,
.btn-hero-download:focus,
.btn-hero-download:visited {
    color: #fff !important;
    text-decoration: none;
}

/* One-time attention pulse */
@keyframes registerPulse {
    0% { box-shadow: 0 0 0 0 rgba(33, 93, 255, 0.35); opacity: .92; }
    60% { box-shadow: 0 0 0 12px rgba(33, 93, 255, 0); opacity: 1; }
    100% { box-shadow: 0 0 0 0 rgba(33, 93, 255, 0); opacity: .98; }
}
.btn-register.attn,
.btn-new-register.attn,
.hero-vertical .btn-hero-register.attn { animation: registerPulse 1.6s ease-out 2; }

/* --- Hero Section (Home) --- */
.hero-section {
    height: 100vh;
    min-height: 700px;
    background: url('../images/bg_new.png') no-repeat center center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-sizing: border-box;
    padding: var(--navbar-height) 0 40px 0;
}

.hero-section .container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0px;
}

/* Switchable hero layouts */
.hero-horizontal { 
    display: none; 
}

.hero-vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    flex: 1;
    justify-content: space-between;
    padding: 0 15px;
}

/* Enable horizontal layout on wide screens */
@media (min-width: 1100px) {
    .hero-horizontal { display: block; }
    .hero-vertical { display: none; }
}

/* Main Content Wrapper (for horizontal layout) */
.hero-main-content {
    transform: translateY(-75px);
}

/* Logo */
.hero-logo {
    margin-bottom: 38px;
}

.hero-logo img {
    max-width: 248px;
    height: auto;
}

/* Main Title */
.hero-main-title {
    margin-bottom: 80px;
}

.hero-main-title img {
    max-width: 678px;
    height: auto;
}

/* Time and Location Info */
.hero-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.info-icon {
    opacity: 0.6;
    flex-shrink: 0;
}

.info-text {
    font-size: 18px;
    color: #ffffffd3;
    white-space: nowrap;
}

/* Primary CTAs */
.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.hero-status {
    margin-top: -20px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 16px;
    letter-spacing: 0.02em;
    max-width: 540px;
}

.btn-new-register {
    width: 138px;
    height: 44px;
    background-color: #215cffa8;
    color: #fff;
    font-size: 20px;
    font-weight: 500;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background-color 0.25s ease, opacity 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 6px rgba(33, 93, 255, 0.10);
}

.btn-new-register:hover {
    background-color: rgba(33, 93, 255, 0.8);
    color: #fff;
    opacity: .98;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(33, 93, 255, 0.18);
}
.btn-new-register:active { transform: translateY(0) scale(0.985); box-shadow: 0 1px 4px rgba(33,93,255,0.14); }
.btn-new-register:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(33, 93, 255, 0.28); }


.btn-hero-download {
    min-width: 138px;
    width: auto;
    padding: 0 20px;
    height: 44px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #fff;
    font-size: 20px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.08);
    transition: background-color 0.25s ease, opacity 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    white-space: nowrap;
}

.btn-hero-download:hover {
    background-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    opacity: .98;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
}

.btn-hero-download:active {
    transform: translateY(0) scale(0.985);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.btn-hero-download:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28);
}

.is-closed {
    cursor: default;
}

/* Organizers Footer (horizontal layout only) */
.hero-horizontal .organizers-footer {
    margin-top: auto;
    padding-top: 20px;
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    transform: none;
    width: auto;
    max-width: none;
    padding-left: calc(5vw + 15px);
    padding-right: calc(5vw + 15px);
}

.organizer-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.organizer-row:last-child {
    margin-bottom: 0;
}

.organizer-label {
    font-size: 14px;
    color: #fff;
    flex-shrink: 0;
    margin-right: 8px;
}

.organizer-logos {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.organizer-logos img {
    height: 30px;
    width: auto;
    object-fit: contain;
}

/* Slightly reduce two logos that look visually larger for better balance */
.organizer-logos img[alt="中国人民大学健康大数据研究院"],
.organizer-logos img[alt="中国商业统计学会人工智能分会"] {
    height: 26px; /* micro-shrink from 30px to 26px */
}

.icp-info {
    color: rgba(255,255,255,0.3);
    font-size: clamp(11px, 0.85vw, 13px);
    margin: 20px 0 0 0;
    text-align: center;
    padding: 0 15px;
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
}
.icp-info a { color: rgba(255,255,255,0.7); text-decoration: none; }
.icp-info a:hover { color: #fff; text-decoration: underline; }
.icp-info .sep { margin: 0 8px; color: rgba(255,255,255,0.25); }
.icp-info .beian-icon { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; opacity: 0.8; }

/* -------- Vertical Hero Styles -------- */
.hero-vertical .content-wrapper {
    padding-top: 0;
    margin-top: auto;
    margin-bottom: auto;
    transform: translateY(0px);
}

.hero-vertical .hero-actions {
    margin-bottom: 0;
}

.hero-actions-vertical {
    flex-direction: column;
    gap: 18px;
    margin-top: clamp(24px, 5vh, 48px);
}

.hero-actions-vertical .btn-hero-download {
    min-width: 160px;
    width: auto;
    padding: 0 24px;
    height: 50px;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background-color: transparent;
    font-size: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
}

.hero-actions-vertical .btn-hero-download:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.hero-vertical .hero-title-img {
    width: clamp(560px, 60vw, 780px);
    height: auto;
    max-width: 95%;
    margin-top: 0;
}

.hero-vertical .hero-date {
    color: #fff;
    font-size: clamp(18px, 1.6vw, 24px);
    margin-top: clamp(28px, 4vh, 56px);
}

.hero-vertical .hero-date .hero-date-place {
    display: block;
    margin-top: 6px;
    font-size: clamp(16px, 1.4vw, 22px);
}

.hero-vertical .btn-hero-register {
    width: 160px; 
    height: 50px; 
    background-color: rgba(255,255,255,0.8); 
    color: #2d5ad7;
    font-size: 22px; 
    font-weight: 500; 
    border-radius: 32px; 
    margin-top: 24px;
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    text-decoration: none;
    transition: background-color 0.25s ease, opacity 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.hero-vertical .btn-hero-register:hover {
    background-color: rgba(255, 255, 255, 0.75);
    color: #386EFF;
    opacity: .98;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0,0,0,0.10);
}
.hero-vertical .btn-hero-register:active { transform: translateY(0) scale(0.985); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.hero-vertical .btn-hero-register:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(56, 110, 255, 0.28); }

.btn-hero-register.is-closed,
.btn-hero-register.is-closed:hover,
.btn-hero-register.is-closed:active,
.btn-hero-register.is-closed:focus {
    background-color: rgba(255, 255, 255, 0.65);
    color: #5c6fc4;
    box-shadow: none;
    transform: none;
}

.hero-status-vertical {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 15px;
    letter-spacing: 0.01em;
    text-align: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.hero-vertical .hero-footer { 
    margin-top: auto; 
    padding: 0 15px 10px 15px; 
}

.hero-vertical .hero-footer-img {
    max-width: min(550px, 95%);
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* --- Secondary Pages --- */
.page-header {
    height: 300px;
    background: url('../images/bg_header.png') no-repeat center center/cover;
    display: flex; align-items: flex-end; color: #fff; padding-bottom: 36px;
}
.page-header .header-content { position: relative; width: 100%; }
.page-header h1 {
    font-family: 'DIN Alternate', sans-serif;
    font-weight: bold; font-size: 36px; margin: 0;
}
.page-header p { font-size: 24px; margin-top: 4px; }

.page-header .page-subtitle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 22px;
    margin-top: 6px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: 1px solid rgba(255, 255, 255, 0.45);
}

.status-badge.status-closed {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}
/* Controlled two-line header on portrait: keep each part on its own line */
@media (orientation: portrait) {
    .page-header h1 .h1-first,
    .page-header h1 .h1-second { display: block; }
    .page-header h1 { white-space: normal; }
}
@media (orientation: landscape) {
    .page-header h1 .h1-first,
    .page-header h1 .h1-second { display: inline; }
}

.header-downloads {
    position: absolute;
    right: 30px;
    bottom: 0;
    display: flex;
    gap: 12px;
    align-items: center;
}

.btn-download {
    border: 1px solid #fff;
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    white-space: nowrap;
}
.btn-download:hover {
    background-color: rgba(255,255,255,0.1);
    color: #fff;
}

.main-content { 
    padding: 30px 0 60px 0; 
}

.info-card {
    background-color: #fff; 
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    border: none; 
    margin-bottom: 30px; 
    border-radius: 4px; 
    overflow: hidden;
}

.notice-card .card-header {
    background: linear-gradient(90deg, #2f3ea0 0%, #5564d1 100%);
}

.notice-card .card-body {
    font-size: 15px;
    line-height: 1.7;
}

.info-card .card-header {
    height: 50px; 
    background-color: #202661; 
    color: #fff;
    font-size: 18px; 
    font-weight: 500; 
    padding: 0 30px; 
    display: flex; 
    align-items: center;
}

.info-card .card-body { 
    padding: 30px; 
    font-size: 14px; 
    line-height: 22px; 
    color: #333; 
}
.org-list hr { 
    margin: 30px 0; 
}

.org-item { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    align-items: flex-start; 
}

.org-item img {
    max-width: 100%;
    height: auto;
    max-height: 44px;
    width: auto;
    flex-shrink: 0;
}

.org-item img.sponsor-kuande {
    max-height: 65px;
}

/* QuantVerse sponsor logo larger size */
.org-item img.sponsor-quantverse {
    max-height: 75px;
}

.org-item p { 
    margin: 0; 
}

/* --- Schedule Page --- */
.schedule-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}
.schedule-tabs .nav-item {
    width: 100%;
}
.schedule-tabs .nav-link {
    height: 40px;
    padding: 0 20px;
    color: #000;
    font-weight: 500;
    font-size: 16px;
    border: 1px solid #ddd;
    background-color: #fff;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}
.schedule-tabs .nav-link.active {
    background-color: #215DFF;
    color: #fff;
    border-color: #215DFF;
}
.schedule-card .card-body { padding: 0; }
.session-list { padding: 0 0 15px; }
.session-item {
    padding: 15px 30px;
    border-bottom: 1px solid #eee;
}
.session-item:last-child { border-bottom: none; }
.session-time { margin-right: 20px; font-weight: 500; }
.session-title { font-size: 18px; color: #0034C2; font-weight: 500; }
.session-speaker { font-size: 14px; color: rgba(0,0,0,0.85); margin-top: 8px; }
.chair-info {
    /* Slightly smaller, softer text for chair intro */
    position: relative;
    padding: 20px 30px 20px 40px; /* balanced top/bottom padding; extra left padding for the vertical line */
    color: rgba(0, 0, 0, 0.72);
    font-size: 14px;
    line-height: 1.65;
}
.chair-info::before {
    /* Decorative vertical line that grows with content height */
    content: "";
    position: absolute;
    left: 24px; /* sits inside the 40px left padding */
    top: 23px;   /* match top padding so line centers with text block */
    bottom: 18px;/* match bottom padding so line centers with text block */
    width: 2px;
    background: linear-gradient(to bottom, rgba(27, 43, 134, 0.35), rgba(27, 43, 134, 0.15)); /* themed blue with subtle fade */
    border-radius: 2px;
}
.chair-info p {
    margin-bottom: 10px;
}
.chair-info p:last-child {
    /* Remove trailing extra gap under the last paragraph */
    margin-bottom: 0;
}

/* Responsive adjustment for very small screens */
@media (max-width: 576px) {
    .chair-info {
        font-size: 13px;
        padding: 16px 20px 16px 32px; /* balanced padding on small screens */
    }
    .chair-info::before {
        left: 18px;
        top: 16px;
        bottom: 16px;
    }
}

/* --- Courses Page --- */
.speaker-avatar { width: 120px; height: 120px; object-fit: cover; }
.info-card ul { padding-left: 20px; }

/* --- Courses Page Overrides (scoped via body.page-courses) --- */
.page-courses .info-card .card-body {
    /* Secondary content text color: #000 at 85% */
    color: rgba(0, 0, 0, 0.85);
}
.page-courses .info-card .card-body p {
    margin-bottom: 10px;
}
/* Remove default list paddings/margins; custom numbering/bullets */
.page-courses .info-card .card-body ol,
.page-courses .info-card .card-body ul {
    list-style: none;
    margin: 0 0 12px 0;
    padding-left: 0; /* avoid uncontrollable left padding */
}
/* Ordered list with CSS counter */
.page-courses .info-card .card-body ol {
    counter-reset: ord;
}
.page-courses .info-card .card-body ol > li {
    counter-increment: ord;
    position: relative;
    padding-left: 1.2em; /* space for number marker */
    margin-bottom: 8px;
}
.page-courses .info-card .card-body ol > li::before {
    content: counter(ord) ".";
    position: absolute;
    left: 0;
    color: #000000c3;
    font-weight: 500;
}
/* Unordered list bullets */
.page-courses .info-card .card-body ul > li {
    position: relative;
    padding-left: 1.2em;
    margin-bottom: 6px;
}
.page-courses .info-card .card-body ul > li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #000000c3;
    font-weight: 600;
}
/* Nested lists tighter spacing */
.page-courses .info-card .card-body li > ul,
.page-courses .info-card .card-body li > ol {
    margin-top: 6px;
}

/* --- Guide Page --- */
.accordion-button:not(.collapsed) { color: #fff; background-color: #202661; }
.accordion-button:focus { box-shadow: none; }
.accordion-item {
    border: 1px solid #dee2e6;
    border-radius: 0;
}
.accordion-item:first-of-type, .accordion-item:first-of-type .accordion-button {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}
.accordion-item:last-of-type, .accordion-item:last-of-type .accordion-button.collapsed {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}


/* --- Speaker Details Styles --- */
.speaker-details {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin-top: 15px;
}
.speaker-photo {
    width: 130px;
    height: 130px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
}
.speaker-info h5 {
    color: #1B2B86;
    margin-bottom: 10px;
}
.speaker-abstract {
    background-color: transparent;
    padding: 0;
    margin: 15px 0;
    border-radius: 0;
}
.speaker-bio {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
}
.speaker-bio p { 
    margin: 0 0 10px; 
}

.speaker-bio p:last-child { 
    margin-bottom: 0; 
}

.speaker-abstract p { 
    margin: 0 0 10px; 
}

.speaker-abstract p:last-child { 
    margin-bottom: 0; 
}
.session-speaker {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.session-speaker:hover {
    color: #215DFF;
}
.expand-icon {
    font-size: 18px;
    transition: transform 0.16s ease;
}
.expanded .expand-icon {
    transform: rotate(180deg);
}

/* --- Guide Page Custom Styles --- */
.venue-details {
    text-align: center;
}
.venue-address {
    font-size: 16px;
    font-weight: 400;
    color: #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.venue-address .fa-map-marker-alt {
    color: #215DFF;
    font-size: 18px;
    margin-right: 6px;
    height: 18px;
    width: 18px;
}
.venue-map {
    width: 500px;
    height: 270px;
    max-width: 100%;
    object-fit: cover;
    margin: 24px auto 16px auto;
    display: block;
    border-radius: 4px;
}
.transport-info {
    display: inline-block;
    text-align: left;
    max-width: 500px;
    width: 100%;
}
.transport-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}
.transport-label {
    flex-shrink: 0;
    width: 72px;
    height: 26px;
    background-color: #215DFF;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}
.transport-text {
    font-size: 14px;
    color: #000;
    line-height: 26px;
}
.transport-text span {
    color: #215DFF;
}

.service-section:not(:last-child) {
    margin-bottom: 20px;
}
.service-section h4 {
    font-size: 14px;
    font-weight: 500;
    color: #000;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}
.service-section h4 i {
    font-size: 16px;
    color: #215DFF;
    margin-right: 8px;
    width: 16px;
    text-align: center;
}
.service-section ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}
.service-section li {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.85);
    line-height: 30px;
    position: relative;
    padding-left: 15px;
}
.service-section li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
    line-height: 30px;
    color: #215DFF;
}
.service-section li strong {
    font-weight: 500;
}

.faq-accordion .accordion-item {
    border: 0;
    border-bottom: 1px solid #EAEAEA;
}
.faq-accordion .accordion-item:last-child {
    border-bottom: 0;
}
.faq-accordion .accordion-button {
    height: 60px;
    padding: 0 30px;
    background-color: #fff;
    color: #000;
    font-size: 16px;
    font-weight: 400;
}
.faq-accordion .accordion-button:not(.collapsed) {
    background-color: #fff;
    color: #000;
    box-shadow: none;
}
.faq-accordion .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}
.faq-accordion .accordion-button::after {
    flex-shrink: 0;
    width: 10px;
    height: 10px;
    margin-left: auto;
    content: "";
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23D8D8D8'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 10px;
    transition: transform .2s ease-in-out;
}
.faq-accordion .accordion-body {
    padding: 0px 30px 20px 30px;
    font-size: 14px;
    color: rgba(0,0,0,0.65);
}

/* --- Footer --- */
.site-footer {
    min-height: 82px; 
    background-color: #202661; 
    color: #fff; 
    font-size: 12px;
    display: flex; 
    align-items: center; 
    padding: 15px 0;
}

.site-footer p { 
    margin: 0; 
    line-height: 18px; 
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    /* Mobile: add a small label next to the hamburger for discoverability */
    .navbar-toggler { gap: 8px; padding: 0 6px; }
    .navbar-toggler::before {
        content: 'MENU';
        color: #fff;
        font-size: 18px;
        line-height: 1;
        opacity: 0.95;
        letter-spacing: 0.5px;
    }
    /* One-time pulse nudge for the hamburger button */
    @keyframes togglerPulse {
        0% { box-shadow: 0 0 0 0 rgba(33,93,255,0.65); }
        70% { box-shadow: 0 0 0 12px rgba(33,93,255,0); }
        100% { box-shadow: 0 0 0 0 rgba(33,93,255,0); }
    }
    .navbar-toggler.attn {
        animation: togglerPulse 1.6s ease-out 2;
        border-radius: 8px;
    }
    body.nav-open {
        overflow: hidden; /* prevent body from scrolling when menu is open */
        position: relative;
        width: 100%;
    overscroll-behavior: contain; /* avoid scroll chaining causing jumps */
    scroll-behavior: auto; /* avoid smooth scroll conflicts while menu open */
    }
    /* Limit collapse height and make it scroll independently to avoid layout shifts */
    .navbar-collapse.collapse.show {
        max-height: calc(100vh - var(--navbar-height));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .navbar .nav-link { margin: 10px 0; padding: 10px; text-align: center; }
    .navbar .nav-link.active::after { display: none; }
    .navbar-collapse {
    background: rgba(27, 43, 134, 0.95); 
    padding: 20px; 
    margin-top: 0; /* prevent pushing content which can cause jump */
    border-radius: 0; /* full-width overlay looks cleaner on mobile */
    position: fixed; /* detach from navbar height changes */
    top: var(--navbar-height); /* equal to .navbar height */
    left: 0; 
    right: 0; 
    width: 100%; 
    max-height: calc(100vh - var(--navbar-height)); 
    overflow-y: auto; /* scroll inside panel instead of page */ 
    -webkit-overflow-scrolling: touch; 
    overflow-anchor: none; /* avoid scroll anchoring jumps */ 
    z-index: 1060; /* below navbar, above page content */
    transition: none !important; /* disable animation */
    }
    /* Overlay to block interactions with underlying content when menu is open */
    body.nav-open::before {
        content: '';
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.01); /* minimal opacity to ensure tap capture on iOS */
        z-index: 1059; /* directly under the collapse panel */
        pointer-events: auto;
    }
    /* Fallback: disable pointer events on underlying content nodes */
    body.nav-open .page-header,
    body.nav-open .main-content,
    body.nav-open .site-footer,
    body.nav-open .hero-section,
    body.nav-open .iframe-container {
        pointer-events: none;
    }
    .btn-register { margin-left: 0; }
    .page-header h1 { font-size: 28px; }
    .page-header p { font-size: 20px; }
    .page-header .page-subtitle {
        flex-wrap: wrap;
        gap: 8px;
        font-size: 18px;
    }
    .status-badge {
        font-size: 12px;
        padding: 3px 10px;
    }
    .header-downloads {
        position: static;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 15px;
        justify-content: flex-end;
    }
    .btn-download {
        display: block;
        text-align: center;
        font-size: 14px;
        padding: 8px 12px;
    }
}

/* Disable collapsing transition only for the main navbar collapse */
#navbarNav.collapse,
#navbarNav.collapsing {
    transition: none !important;
}

/* Prefer small viewport units on mobile to avoid address-bar induced jumps */
@supports (height: 100svh) {
    @media (max-width: 991.98px) {
        .hero-section { height: 100svh; }
        .navbar-collapse.collapse.show { max-height: calc(100svh - var(--navbar-height)); }
    }
}

@media (max-width: 575.98px) {
    .info-card .card-header {
        height: auto;
        min-height: 50px;
        padding: 8px 16px;
        font-size: 16px;
        line-height: 1.35;
        white-space: normal;
        overflow-wrap: anywhere;
        text-wrap: balance;
        align-items: center;
    }
    /* Do not break inside English words for schedule headers; allow normal CJK wrapping */
    .schedule-card .card-header {
        overflow-wrap: break-word; /* only break if needed at word boundary */
        word-break: normal;        /* keep words intact */
        hyphens: manual;           /* don't auto-hyphenate */
        text-wrap: wrap;           /* disable balancing to avoid early wraps */
    }
}

/* Hide "全部" tab temporarily */
.schedule-tabs .nav-item:first-child { 
    display: none !important; 
}

/* Responsive layout for schedule tabs */
@media (max-width: 1000px) {
    .schedule-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* 2 rows x 3 cols */
    gap: 8px; /* tighter spacing on portrait */
    }
    .schedule-tabs .nav-link {
        height: auto;            /* allow wrapping */
    min-height: 42px;
    padding: 6px 8px;
        line-height: 1.25;
        white-space: normal;
        text-align: center;
        overflow-wrap: anywhere; /* prevent overflow */
    }
}
@media (max-width: 640px) {
    .schedule-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr)); /* keep 2 rows x 3 cols on small portrait */
    gap: 6px;
    }
    .schedule-tabs .nav-link {
    min-height: 40px;
    padding: 4px 8px;
    font-size: 14px;
    }
}

/* --- Register Page Custom Styles --- */
.registration-notes ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.registration-notes li {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.85);
    line-height: 30px;
    position: relative;
    padding-left: 15px; /* Space for the bullet point */
}

.registration-notes li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 14px;
    line-height: 30px;
    color: #215DFF;
}

.iframe-container {
        margin-top: 30px;
        width: 100vw;
        max-width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        padding-left: max(var(--iframe-gutter), env(safe-area-inset-left));
        padding-right: max(var(--iframe-gutter), env(safe-area-inset-right));
        overflow: hidden;
}

@media (min-width: 1000px) {
    .iframe-container {
        max-width: 900px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        border-radius: 10px;
        box-shadow: 0 2px 16px rgba(33,93,255,0.08);
        padding-left: 0;
        padding-right: 0;
    }
}

.iframe-container iframe {
    display: block;
    width: 100% !important;   /* force fit container */
    max-width: 100% !important;
    border: 0;
}


/* --- Pricing Section Styles --- */
.pricing-section {
    margin-top: 30px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}
.pricing-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}
.pricing-table {
    text-align: center;
    background-color: #fff;
    font-size: 14px;
}
.pricing-table thead th {
    background-color: #f8f9fa;
    font-weight: 500;
    vertical-align: middle;
}
.pricing-table td, .pricing-table th {
    vertical-align: middle;
}
.pricing-table tbody tr:hover {
    background-color: #f8f9fa;
}
.pricing-details {
    margin-top: 15px;
    font-size: 14px;
    color: #555;
    line-height: 1.8;
    padding-left: 1rem;

}
.pricing-details p {
    margin-bottom: 5px;
}
.pricing-details ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 15px;
}
.pricing-details ul li::before {
    content: '•';
    color: #215DFF;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

/* --- Schedule Page Additions --- */
.session-chair {
    padding: 20px 30px 0px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(0, 0, 0, 0.85);
    background-color: #fff;
}
