/* ===== Trang Lịch trình Đại hội (agenda-tong-the) — bố cục theo poster ===== */
.ag-page {
  --ag-line: #e2e8f0;
  --ag-muted: #64748b;
  /* Chiều cao subheader dính (sticky-top) — thanh chọn ngày dính ngay bên dưới nó */
  --ag-subheader-h: 62px;
}
@media (max-width: 575.98px) { .ag-page { --ag-subheader-h: 56px; } }

/* Hero */
.ag-hero {
  background: linear-gradient(135deg, #09132b 0%, #173479 48%, #0d5f57 100%);
  position: relative;
  overflow: hidden;
}
.ag-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .08), transparent 35%),
    radial-gradient(circle at 85% 80%, rgba(45, 212, 191, .18), transparent 40%);
  pointer-events: none;
}
.ag-hero .container { z-index: 1; }
.ag-hero-badge {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-weight: 600;
  letter-spacing: .3px;
  padding: .45rem .9rem;
  backdrop-filter: blur(4px);
}

/* Thanh điều hướng ngày (dính trên cùng khi cuộn) */
.ag-daynav-sentinel { height: 1px; }
.ag-daynav-wrap {
  position: sticky;
  top: var(--ag-subheader-h, 62px);
  z-index: 1010;
  padding: .6rem 0;
  margin: 0 -12px .5rem;
  transition: background .2s ease, box-shadow .2s ease, padding .2s ease;
}
.ag-daynav-wrap.is-stuck {
  background: rgba(248, 250, 252, .9);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .1);
  border-bottom: 1px solid #e2e8f0;
  padding: .55rem 12px;
}
.ag-daynav {
  display: flex;
  align-items: center;
  gap: .5rem;
  overflow-x: auto;
  padding: .3rem 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.ag-daynav-wrap.is-stuck .ag-daynav { box-shadow: none; border-color: transparent; background: transparent; }
.ag-daynav::-webkit-scrollbar { display: none; }
.ag-daynav-caption {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: 0 .65rem 0 .5rem;
  margin-right: .15rem;
  font-size: .78rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .4px;
  border-right: 1px solid #e2e8f0;
}
.ag-daynav-caption .material-symbols-outlined { font-size: 18px; }
@media (max-width: 575.98px) { .ag-daynav-caption { display: none; } }
.ag-daynav-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .95rem;
  border: 1px solid var(--ag-line);
  border-radius: 999px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  transition: all .18s ease;
  white-space: nowrap;
}
.ag-daynav-item:hover { border-color: #93c5fd; color: #1d4ed8; transform: translateY(-1px); }
.ag-daynav-item.is-active {
  background: linear-gradient(135deg, #1d4ed8, #0d9488);
  border-color: transparent;
  color: #fff;
  font-size: .95rem;
  padding: .62rem 1.15rem;
  box-shadow: 0 8px 20px rgba(29, 78, 216, .35);
  transform: translateY(-1px) scale(1.03);
}
.ag-daynav-num {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: .8rem;
}
.ag-daynav-item.is-active .ag-daynav-num { background: rgba(255, 255, 255, .22); color: #fff; }

/* Khối mỗi ngày */
.ag-day { scroll-margin-top: calc(var(--ag-subheader-h, 62px) + 76px); margin-top: 2rem; }

/* Tiêu đề ngày — banner gradient */
.ag-day-head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.35rem;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(120deg, #0b1f52 0%, #1d4ed8 52%, #0d9488 100%);
  box-shadow: 0 14px 30px rgba(13, 148, 136, .20);
}
.ag-day-head::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, .14), transparent 38%),
    radial-gradient(circle at 92% 120%, rgba(45, 212, 191, .28), transparent 45%);
  pointer-events: none;
}
.ag-day-head > * { position: relative; z-index: 1; }
.ag-day-head h2 { color: #fff !important; }
.ag-day-head .text-secondary { color: rgba(255, 255, 255, .78) !important; }
.ag-day-badge {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.ag-day-badge .small { font-size: .55rem; font-weight: 700; letter-spacing: 1.5px; opacity: .9; }

/* ===== Buổi (session) — mỗi buổi 1 tông màu như poster ===== */
.agx-session {
  --s-color: #64748b;    /* màu nhấn */
  --s-tint: #f1f5f9;     /* nền thẻ */
  --s-bar: #e2e8f0;      /* nền thanh tiêu đề buổi */
  margin-bottom: 1.1rem;
}
.ses-morning   { --s-color: #ec4899; --s-tint: #fdf2f8; --s-bar: #fce7f3; }
.ses-noon      { --s-color: #f97316; --s-tint: #fff7ed; --s-bar: #ffedd5; }
.ses-afternoon { --s-color: #22c55e; --s-tint: #f0fdf4; --s-bar: #dcfce7; }
.ses-evening   { --s-color: #8b5cf6; --s-tint: #f5f3ff; --s-bar: #ede9fe; }

/* Thanh tiêu đề buổi */
.agx-ses-head {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin: 0 0 1rem;
}
.agx-ses-icon {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 26px;
  color: #fff;
  background: var(--s-color);
  box-shadow: 0 6px 16px color-mix(in srgb, var(--s-color) 40%, transparent);
}
.agx-ses-label {
  flex: 1 1 auto;
  margin: 0;
  padding: .7rem 1.2rem;
  border-radius: 12px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .5px;
  color: color-mix(in srgb, var(--s-color) 72%, #1f2937);
  background: var(--s-bar);
}

/* Timeline trong buổi */
.agx-rail { position: relative; }
.agx-row {
  position: relative;
  display: grid;
  grid-template-columns: 70px 28px 1fr;
  gap: 0;
  padding-bottom: .9rem;
}
.agx-time {
  text-align: right;
  padding-right: .7rem;
  padding-top: .35rem;
  line-height: 1.15;
}
.agx-time-start { display: block; font-weight: 800; color: #0f172a; font-size: 1.05rem; }
.agx-time-end { display: block; font-weight: 700; font-size: .95rem; color: var(--s-color); }

/* Chấm + đường nối dọc */
.agx-dot { position: relative; display: flex; justify-content: center; }
.agx-dot::after {
  content: "";
  position: absolute;
  top: 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--s-color);
  box-shadow: 0 0 0 4px #fff, 0 0 0 5px color-mix(in srgb, var(--s-color) 35%, transparent);
  z-index: 1;
}
.agx-dot::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: -.9rem;
  width: 2px;
  border-left: 2px dashed color-mix(in srgb, var(--s-color) 45%, #e2e8f0);
}
.agx-row:last-child .agx-dot::before { display: none; }

/* Nội dung */
.agx-content { min-width: 0; }

/* Thẻ hoạt động */
.agx-card {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  background: var(--s-tint);
  border-radius: 14px;
  padding: .85rem 1.05rem;
}
.agx-card-ico {
  flex: 0 0 auto;
  font-size: 30px;
  line-height: 1;
  color: color-mix(in srgb, var(--s-color) 78%, #1f2937);
  margin-top: .1rem;
}
.agx-card-body { min-width: 0; }
.agx-card-time {
  display: block;
  font-size: .82rem;
  font-weight: 700;
  color: var(--s-color);
  margin-bottom: .05rem;
}
.agx-card-title {
  display: block;
  font-size: 1.12rem;
  font-weight: 800;
  color: #1f2937;
  line-height: 1.25;
}
.agx-card-place {
  display: block;
  margin-top: .15rem;
  font-size: .9rem;
  color: var(--ag-muted);
  line-height: 1.35;
}
.agx-place-main { display: block; font-weight: 600; color: #475569; }
.agx-place-sub { display: block; }
.agx-card-desc {
  margin-top: .5rem;
  padding-top: .5rem;
  border-top: 1px dashed color-mix(in srgb, var(--s-color) 30%, #e2e8f0);
  font-size: .88rem;
  color: #475569;
  line-height: 1.55;
}

/* Lưới các môn thể thao song song trong một buổi */
.agx-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .7rem;
}
.agx-grid .agx-card { padding: .75rem .85rem; }
.agx-grid .agx-card-ico { font-size: 26px; }
.agx-grid .agx-card-title { font-size: 1rem; }

/* Fallback khi không hỗ trợ color-mix() */
@supports not (color: color-mix(in srgb, red, blue)) {
  .agx-ses-label { color: #1f2937; }
  .agx-card-ico, .agx-card-time, .agx-card-title { color: inherit; }
  .agx-card-time, .agx-time-end { color: var(--s-color); }
}

/* Responsive */
@media (max-width: 767.98px) {
  .agx-grid { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
  .agx-row { grid-template-columns: 54px 22px 1fr; }
  .agx-time-start { font-size: .92rem; }
  .agx-time-end { font-size: .82rem; }
  .agx-ses-icon { width: 40px; height: 40px; font-size: 22px; }
  .agx-ses-label { font-size: 1.08rem; padding: .55rem .9rem; }
  .agx-card { padding: .7rem .8rem; gap: .6rem; }
  .agx-card-ico { font-size: 24px; }
  .agx-card-title { font-size: 1rem; }
  .ag-day-badge { width: 54px; height: 54px; font-size: 1.4rem; }
}
