/* ARMA 2026 – Scientific Program
   Palette taken from https://arma2026.com/home :
   royal blue headings, sky-blue backgrounds, orange/gold accents, navy footer. */
:root {
  --blue: #0b4ba3;
  --blue-deep: #082f7a;
  --primary: #093eaf;
  --navy: #304f7f;
  --sky: #b6e6fd;
  --sky-soft: #f4fbff;
  --orange: #f6a21a;
  --orange-deep: #a85f00;
  --orange-soft: #fff4de;
  --ink: #303031;
  --muted: #5b6678;
  --line: #d6e4f1;
  --paper: #eef6fc;
  --card: #ffffff;
  --tt-line: #8d9bb0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, var(--paper) 0%, #f9fcff 60%, #fff 100%) fixed;
  font-family: Sarabun, Prompt, "Open Sans", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  box-shadow: 0 2px 14px rgba(11, 75, 163, 0.1);
}
.header-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand img { display: block; height: 50px; width: auto; }
.header-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-family: Poppins, sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.header-nav a { color: #2d3748; text-decoration: none; font-weight: 500; }
.header-nav a:hover { color: var(--blue); }
.header-current {
  color: var(--blue);
  font-weight: 600;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 0.15rem;
}

/* ---------- hero ---------- */
.program-hero {
  background:
    linear-gradient(180deg, rgba(8, 47, 122, 0.82) 0%, rgba(11, 75, 163, 0.7) 100%),
    url("../../../media/images/bg-sky-2.jpg") center 35% / cover no-repeat,
    linear-gradient(180deg, #0b4ba3, #082f7a);
  color: #fff;
  text-align: center;
  padding: 3.2rem 1.25rem 5rem;
}
.hero-inner { max-width: 900px; margin: 0 auto; }
.hero-kicker {
  margin: 0 0 0.5rem;
  font-family: Poppins, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cfeeff;
}
.program-hero h1 {
  margin: 0;
  font-family: Raleway, sans-serif;
  font-weight: 800;
  font-size: clamp(2.1rem, 4.4vw, 3.3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}
.hero-rule {
  width: 96px;
  height: 4px;
  margin: 0.9rem auto 1rem;
  border-radius: 99px;
  background: var(--orange);
}
.hero-dates {
  margin: 0;
  font-family: Raleway, sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--orange);
}
.hero-venue { margin: 0.3rem 0 0; font-size: 1rem; color: rgba(255, 255, 255, 0.95); }
.hero-theme { margin: 0.75rem 0 0; font-style: italic; color: #ffd98f; font-size: 1rem; }

.hero-updated { margin: 0.6rem 0 0; color: rgba(255, 255, 255, 0.9); font-size: 0.92rem; letter-spacing: 0.02em; }

/* ---------- layout ---------- */
.program-main {
  max-width: 1320px;
  margin: -2.6rem auto 0;
  padding: 0 1.25rem 3.5rem;
  position: relative;
  z-index: 2;
}

/* ---------- tabs ---------- */
.view-tabs {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0;
}
.view-tab {
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  background: #fff;
  color: var(--blue);
  font-family: Poppins, sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 22px rgba(11, 75, 163, 0.12);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.view-tab:hover { color: var(--primary); transform: translateY(-1px); }
.view-tab:focus-visible, .day-pill:focus-visible, .btn-clear:focus-visible {
  outline: 3px solid rgba(246, 162, 26, 0.7);
  outline-offset: 2px;
}
.view-tab.active { background: var(--blue); color: #fff; box-shadow: 0 8px 22px rgba(11, 75, 163, 0.32); }
.view-tab.active i { color: var(--orange); }
[hidden] { display: none !important; }

/* ---------- cards / filters ---------- */
.filter-card,
.timetable-bar,
.download-card {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 1.1rem;
  box-shadow: 0 16px 40px rgba(11, 75, 163, 0.12);
  padding: 1.15rem 1.2rem 1rem;
  margin-bottom: 1.15rem;
}
.form-label {
  font-family: Poppins, sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.35rem;
}
.form-control, .form-select {
  border: 1px solid #c9dcee;
  border-radius: 0.7rem;
  min-height: 44px;
  color: var(--ink);
  font-family: Sarabun, sans-serif;
}
.form-control:focus, .form-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 0.2rem rgba(11, 75, 163, 0.16);
}
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
#result-count { color: var(--muted); font-size: 0.93rem; }
.btn-clear {
  border: 1px solid #c9dcee;
  background: #fff;
  color: var(--blue);
  border-radius: 999px;
  padding: 0.35rem 0.95rem;
  font-family: Poppins, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
}
.btn-clear:hover { border-color: var(--orange); color: var(--orange-deep); background: var(--orange-soft); }

/* ---------- timetable tab ---------- */
.timetable-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1rem; padding: 0.9rem 1.2rem; margin-bottom: 0.5rem; }
.bar-label {
  font-family: Poppins, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--blue);
}
.day-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.day-pill {
  border: 1px solid #c9dcee;
  background: var(--sky-soft);
  color: var(--blue);
  border-radius: 0.8rem;
  padding: 0.4rem 0.95rem 0.45rem;
  text-align: left;
  line-height: 1.2;
  cursor: pointer;
  transition: all 0.15s;
}
.day-pill strong { display: block; font-family: Raleway, sans-serif; font-size: 1rem; font-weight: 800; }
.day-pill small { display: block; font-size: 0.74rem; color: var(--muted); font-weight: 500; }
.day-pill:hover { border-color: var(--blue); background: #e5f4ff; }
.day-pill.active { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(11, 75, 163, 0.3); }
.day-pill.active strong { color: var(--orange); }
.day-pill.active small { color: #d6ecff; }
.scroll-hint { margin: 0 0 0.6rem 0.3rem; color: var(--muted); font-size: 0.86rem; }

.tt-scroll {
  overflow: auto;
  max-height: 80vh;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(11, 75, 163, 0.1);
}
.tt-scroll:focus-visible { outline: 3px solid rgba(246, 162, 26, 0.6); }

/* One font family / size for the whole timetable (Excel colours, bold, italic and
   cell backgrounds are kept as inline styles, font sizes are intentionally not). */
table.tt {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  border-top: 1px solid var(--tt-line);
  border-left: 1px solid var(--tt-line);
  font-family: Sarabun, "Open Sans", sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: #000;
}
.tt td {
  background: #fff;
  border-right: 1px solid var(--tt-line);
  border-bottom: 1px solid var(--tt-line);
  padding: 7px 10px;
  text-align: center;
  vertical-align: middle;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: 14px;
}
.tt td span, .tt td div { font-family: inherit; font-size: 14px; }
.tt tr.tt-title td { white-space: nowrap; text-align: left; font-weight: 700; padding: 9px 12px; }
.tt tr.tt-title td .tt-c { position: sticky; left: 12px; display: inline-block; }
.tt tr.tt-head td { position: sticky; top: 0; z-index: 3; font-weight: 700; }
.tt td.tt-time { position: sticky; left: 0; z-index: 2; white-space: nowrap; }
.tt tr.tt-head td:first-child { left: 0; z-index: 4; }

/* ---------- search results ---------- */
.search-table-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(11, 75, 163, 0.1);
  overflow: auto;
}
.search-table { width: 100%; border-collapse: collapse; min-width: 880px; }
.search-table th, .search-table td {
  border-bottom: 1px solid #e3edf7;
  padding: 0.8rem 0.9rem;
  vertical-align: top;
  text-align: left;
}
.search-table th {
  position: sticky;
  top: 0;
  background: var(--blue);
  color: #fff;
  font-family: Poppins, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  z-index: 1;
}
.search-table tbody tr:hover { background: #f4faff; }
.col-date, .col-time { white-space: nowrap; font-weight: 700; color: var(--blue); }
.col-date { width: 10.5rem; }
.col-time { width: 7.5rem; }
.col-room { width: 13rem; color: var(--muted); font-size: 0.93rem; }
.col-room .room-tag {
  display: block;
  margin-bottom: 0.2rem;
}
.col-room i { color: var(--orange); margin-right: 0.25rem; }
.col-session { min-width: 26rem; }
.type-chip {
  display: inline-block;
  margin-bottom: 0.4rem;
  padding: 0.12rem 0.65rem;
  border-radius: 999px;
  background: var(--sky);
  color: var(--blue-deep);
  font-family: Poppins, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.sess-box {
  display: block;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.5;
  border: 1px solid #cfdbe8;
  border-left: 5px solid var(--sess-accent, #cfdbe8);
  border-radius: 0.6rem;
  padding: 0.6rem 0.8rem;
  font-size: 0.93rem;
  color: #000;
}
.sess-box mark { background: #ffe08a; color: #000; padding: 0 1px; border-radius: 2px; }
.empty-state {
  background: #fff;
  border: 1px dashed #b9d3ea;
  border-radius: 1rem;
  color: var(--muted);
  padding: 1.6rem 1rem;
  text-align: center;
}

/* ---------- download tab ---------- */
.download-card { display: flex; gap: 1.25rem; align-items: center; padding: 1.4rem 1.5rem; }
.download-icon {
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 1.2rem;
  background: var(--orange-soft);
  color: #d9480f;
  font-size: 2.6rem;
}
.download-body h2 { margin: 0 0 0.3rem; font-family: Raleway, sans-serif; font-weight: 800; font-size: 1.35rem; color: var(--blue); }
.download-body p { margin: 0 0 0.9rem; color: var(--muted); }
.file-size { display: inline-block; margin-left: 0.4rem; padding: 0 0.55rem; border-radius: 99px; background: var(--sky); color: var(--blue-deep); font-size: 0.78rem; font-weight: 600; }
.download-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.btn-primary-arma, .btn-outline-arma {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  padding: 0.6rem 1.3rem;
  font-family: Poppins, sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}
.btn-primary-arma { background: var(--orange); color: #3a2400; box-shadow: 0 8px 18px rgba(246, 162, 26, 0.38); }
.btn-primary-arma:hover { background: #ffb53d; color: #3a2400; transform: translateY(-1px); }
.btn-outline-arma { border: 2px solid var(--blue); color: var(--blue); background: #fff; }
.btn-outline-arma:hover { background: var(--blue); color: #fff; }
.pdf-preview {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(11, 75, 163, 0.1);
  overflow: hidden;
}
.pdf-preview iframe { display: block; width: 100%; height: 78vh; min-height: 520px; border: 0; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--navy) url("../../../media/images/bg-footer-1.jpg") center / cover no-repeat;
  color: #fffdf5;
  text-align: center;
  padding: 1.8rem 1.25rem 2rem;
  font-size: 0.93rem;
  position: relative;
}
.site-footer::before { content: ""; position: absolute; inset: 0; background: rgba(32, 58, 100, 0.82); }
.site-footer > * { position: relative; }
.site-footer p { margin: 0.2rem 0; }
.site-footer a { color: var(--orange); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-title {
  font-family: Raleway, sans-serif;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 0.4rem !important;
}

@media (max-width: 720px) {
  .header-inner { padding: 0.45rem 0.9rem; }
  .brand img { height: 42px; }
  .header-nav { gap: 0.85rem; font-size: 0.7rem; }
  .program-hero { padding: 2.2rem 1rem 4rem; }
  .program-main { padding: 0 0.85rem 2.4rem; }
  .filter-bar { align-items: flex-start; flex-direction: column; }
  .download-card { flex-direction: column; text-align: center; }
  .download-actions { justify-content: center; }
  .view-tab { font-size: 0.8rem; padding: 0.55rem 0.95rem; }
  .tt-scroll { max-height: 75vh; }
}
