/* ==========================================================================
   17th ICCC & 15th APCCS 2027 — Kitakyushu, Japan
   Custom theme layered on top of Bootstrap 5
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --iccc-green: #176a3a; /* forest green (title) */
  --iccc-green-dark: #0f4a27;
  --iccc-green-light: #2e8b57;
  --iccc-sky: #3a86b8; /* blue from the sky */
  --iccc-autumn: #c0622a; /* autumn-leaf accent */
  --iccc-ink: #233028;
  --iccc-muted: #5d6b62;
  --iccc-bg: #f6f8f5;
  --iccc-line: #e0e7e1;

  --bs-link-color: var(--iccc-green);
  --bs-link-hover-color: var(--iccc-green-dark);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  font-family: 'Inter', 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Yu Gothic', Meiryo, sans-serif;
  color: var(--iccc-ink);
  background-color: #fff;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: Georgia, 'Times New Roman', 'Yu Mincho', serif;
  color: var(--iccc-green-dark);
  font-weight: 700;
}

a {
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ---------- Header / Navbar -------------------------------------------- */
/* The header/footer are injected into [data-include] wrappers; display:contents
   removes the wrapper from layout so the header's sticky positioning works
   against the page scroll (stays fixed at the top). */
[data-include] {
  display: contents;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: #fff;
  border-bottom: 3px solid var(--iccc-green);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

/* Shrink the header a little once the page is scrolled */
.site-header .navbar {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  transition:
    padding 0.25s ease,
    box-shadow 0.25s ease;
}
.site-header .navbar-brand .brand-main {
  transition: font-size 0.25s ease;
}
.site-header .navbar-brand .brand-sub {
  overflow: hidden;
  transition:
    max-height 0.25s ease,
    opacity 0.2s ease,
    margin 0.25s ease;
  max-height: 1.5rem;
}
.site-header.is-shrunk .navbar {
  padding-top: 0.15rem;
  padding-bottom: 0.15rem;
}
.site-header.is-shrunk .navbar-brand .brand-main {
  font-size: 1.15rem;
}
.site-header.is-shrunk .navbar-brand .brand-sub {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

/* widen header container so all 8 menu items fit on laptops */
.site-header > .navbar > .container {
  max-width: 1360px;
}

/* Brand — design sample 9 (EB Garamond, classic + italic subtitle) */
.navbar-brand {
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  line-height: 1.12;
  color: var(--iccc-green-dark) !important;
  margin-right: 1.25rem;
}
.navbar-brand:hover,
.navbar-brand:focus {
  text-decoration: none;
}
.navbar-brand .brand-main {
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.navbar-brand .brand-main .th {
  font-size: 0.55em;
  vertical-align: super;
  margin-right: 0.2em;
}
.navbar-brand .brand-sub {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  font-style: italic;
  color: var(--iccc-green-light);
  font-family: 'EB Garamond', Georgia, serif;
  letter-spacing: 0.01em;
}

/* Menu — design sample 6 (minimal text links, "|" separators) */
.site-header .navbar-nav .nav-link {
  font-family: 'Inter', Arial, sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--iccc-ink);
  padding: 0.35rem 0.5rem;
  border-radius: 0;
  background: transparent;
  white-space: nowrap;
}
.site-header .navbar-nav .nav-link:hover {
  color: var(--iccc-green);
  background: transparent;
  text-decoration: none;
}
.site-header .navbar-nav .nav-link.active {
  color: var(--iccc-green);
  font-weight: 700;
  background: transparent;
}
/* "|" separators between items — horizontal (wide) layout only */
@media (min-width: 1400px) {
  .site-header .navbar-nav .nav-item:not(:last-child) > .nav-link::after {
    content: '|';
    color: #b9c5bd;
    font-weight: 400;
    margin-left: 0.55rem;
    margin-right: -0.4rem;
  }
}

/* Hamburger — design sample 7 (staggered-width lines) */
.site-header .navbar-toggler {
  border: 0;
  padding: 0.35rem 0.25rem;
}
.site-header .navbar-toggler:focus {
  box-shadow: none;
}
.hb-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: flex-start;
}
.hb-icon span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--iccc-green-dark);
}
.hb-icon span:nth-child(1) {
  width: 30px;
}
.hb-icon span:nth-child(2) {
  width: 22px;
}
.hb-icon span:nth-child(3) {
  width: 26px;
}

/* Mobile/tablet menu — full-width offcanvas sliding in from the right */
@media (max-width: 1399.98px) {
  #mainNav.offcanvas {
    --bs-offcanvas-width: 100%;
  }
  .site-header .offcanvas-header {
    border-bottom: 3px solid var(--iccc-green);
    padding: 1rem 1.25rem;
  }
  .site-header .offcanvas-title {
    font-family: "EB Garamond", Georgia, serif;
    font-size: 1.35rem;
    color: var(--iccc-green-dark);
  }
  .site-header .offcanvas-close {
    margin-left: auto;
    border: 0;
    background: transparent;
    color: var(--iccc-green-dark);
    font-size: 1.5rem;
    line-height: 1;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
  }
  .site-header .offcanvas-body {
    padding: 0.5rem 0 35vh;
  }
  .site-header .offcanvas .navbar-nav .nav-link {
    font-size: 1.05rem;
    padding: 0.95rem 1.5rem;
    border-bottom: 1px solid var(--iccc-line);
  }
  .site-header .offcanvas .navbar-nav .nav-item:last-child .nav-link {
    border-bottom: 0;
  }
}

/* ---------- Hero ------------------------------------------------------- */
/* Hero — contained width + rounded card with soft shadow (samples 1 + 2) */
.hero {
  position: relative;
  background: transparent;
  padding: 2rem 0 0.5rem;
}
.hero img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 14px 34px rgba(15, 74, 39, 0.18);
}

@media (max-width: 575.98px) {
  .hero {
    padding: 1rem 0 0;
  }
  .hero img {
    border-radius: 0.6rem;
  }
}

/* ---------- Page heading band ------------------------------------------ */
.page-band {
  background: linear-gradient(135deg, var(--iccc-green-dark), var(--iccc-green-light));
  color: #fff;
  padding: 2.6rem 0;
}
.page-band h1 {
  color: #fff;
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
}
.page-band .lead-sub {
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Inter', Arial, sans-serif;
  margin: 0.35rem 0 0;
}

/* ---------- Section helpers -------------------------------------------- */
.section {
  padding: 3.5rem 0;
}
.section--alt {
  background: #fbfcfb;
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 1.8rem;
  padding-bottom: 0.55rem;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 400;
}
.section-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  background: var(--iccc-autumn);
  border-radius: 2px;
}
.section-title.text-center {
  display: block;
}
.section-title.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* ---------- Cards & boxes ---------------------------------------------- */
.card-flat {
  border: 1px solid var(--iccc-line);
  border-radius: 0.75rem;
  background: #fff;
  height: 100%;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.card-flat:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 74, 39, 0.12);
}

.chair-card {
  border-left: 5px solid var(--iccc-green);
  background: var(--iccc-bg);
  border-radius: 0.5rem;
  padding: 1.5rem 1.75rem;
}
.chair-card .signature {
  font-family: Georgia, serif;
  font-style: italic;
  color: var(--iccc-green-dark);
}

/* ---------- Venue ------------------------------------------------------- */
.venue-card {
  height: 100%;
  border: 1px solid var(--iccc-line);
  border-left: 5px solid var(--iccc-green);
  border-radius: 0.6rem;
  background: var(--iccc-bg);
  padding: 1.5rem 1.6rem;
}
.venue-card .venue-name {
  font-size: 1.2rem;
  color: var(--iccc-green-dark);
  margin: 0 0 1.1rem;
}
.venue-info {
  list-style: none;
  padding: 0;
  margin: 0;
}
.venue-info li {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.55rem 0;
  border-top: 1px dashed var(--iccc-line);
}
.venue-info li:first-child {
  border-top: 0;
}
.venue-info li i {
  flex: 0 0 auto;
  font-size: 1.1rem;
  color: var(--iccc-green);
  margin-top: 0.15rem;
}
.venue-map {
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid var(--iccc-line);
  box-shadow: 0 6px 18px rgba(15, 74, 39, 0.07);
}

/* ---------- Important Dates table -------------------------------------- */
.dates-list {
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid var(--iccc-line);
  box-shadow: 0 6px 18px rgba(15, 74, 39, 0.07);
}
.dates-list .row-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.25rem;
  border-bottom: 1px solid var(--iccc-line);
  background: #fff;
}
.dates-list .row-item:last-child {
  border-bottom: 0;
}
.dates-list .row-item:nth-child(even) {
  background: #eef3ee;
}
.dates-list .row-item .label {
  font-weight: 600;
}
.dates-list .row-item .value {
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 700;
  color: var(--iccc-green-dark);
  white-space: nowrap;
}

/* ---------- What's New -------------------------------------------------- */
.news-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px dashed var(--iccc-line);
}
.news-item .news-date {
  flex: 0 0 auto;
  font-family: 'Inter', Arial, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--iccc-ink);
  min-width: 130px;
}
/* Stack date over content on narrow screens */
@media (max-width: 767.98px) {
  .news-item {
    flex-direction: column;
    gap: 0.15rem;
  }
  .news-item .news-date {
    min-width: 0;
  }
}

/* ---------- Topic chips ------------------------------------------------- */
.topic-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--iccc-line);
  border-radius: 0.6rem;
  background: #fff;
  height: 100%;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}
.topic-card:hover {
  background: var(--iccc-bg);
  border-color: var(--iccc-green-light);
}
.topic-card .topic-no {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--iccc-green);
  color: #fff;
  font-family: 'Inter', Arial, sans-serif;
  font-weight: 700;
}

/* ---------- History tables (About) ------------------------------------- */
.table-history th {
  background: var(--iccc-green);
  color: #fff;
  white-space: nowrap;
}
.table-history td,
.table-history th {
  vertical-align: middle;
}

/* ---------- Coming soon ------------------------------------------------- */
.coming-soon {
  text-align: center;
  padding: 4rem 1rem;
}
.coming-soon .cs-icon {
  font-size: 3.2rem;
  color: var(--iccc-green-light);
  margin-bottom: 1rem;
}
.coming-soon .lead-intro {
  display: inline-block;
  text-align: left;
}

/* ---------- Buttons ----------------------------------------------------- */
.btn-iccc {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--iccc-green);
  --bs-btn-border-color: var(--iccc-green);
  --bs-btn-hover-bg: var(--iccc-green-dark);
  --bs-btn-hover-border-color: var(--iccc-green-dark);
  --bs-btn-active-bg: var(--iccc-green-dark);
  --bs-btn-padding-x: 1.5rem;
  --bs-btn-padding-y: 0.6rem;
  font-weight: 600;
}

/* ---------- Footer ------------------------------------------------------ */
.site-footer {
  background: var(--iccc-green-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 2.8rem 0 1.4rem;
  margin-top: 25vh;
  font-size: 0.92rem;
}
.site-footer h5 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
}
.site-footer a {
  color: rgba(255, 255, 255, 0.85);
}
.site-footer a:hover {
  color: #fff;
}
.site-footer .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.site-footer .footer-links li {
  margin-bottom: 0.5rem;
}

/* Footer brand title — sample 8 (EB Garamond, 2-line stack + coral rule) */
.site-footer .footer-brand-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-weight: 500;
  font-size: 1.55rem;
  line-height: 1.12;
  letter-spacing: 0.03em;
  position: relative;
  padding-bottom: 0.65rem;
  margin-bottom: 1.1rem;
}
.site-footer .footer-brand-title .th {
  font-size: 0.55em;
  vertical-align: super;
}
.site-footer .footer-brand-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 46px;
  height: 2px;
  background: #d9763f;
}

/* Footer secretariat contact */
.site-footer .footer-secretariat {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.site-footer .footer-secretariat .th {
  font-size: 0.58em;
  vertical-align: super;
}
.site-footer .footer-secretariat a {
  text-decoration: underline;
}

/* Footer menu — two content-width columns sitting close together */
.site-footer .footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 3rem;
}
.site-footer .footer-menu .footer-links {
  margin: 0;
}
/* On desktop: push the whole menu block to the right edge, but keep the
   "Menu" heading and link text left-aligned within the block */
@media (min-width: 992px) {
  .site-footer .footer-menu-col {
    display: flex;
    justify-content: flex-end;
  }
}
/* When the footer stacks (mobile/tablet), add breathing room above the menu */
@media (max-width: 991.98px) {
  .site-footer .footer-menu-col {
    margin-top: 2.5rem;
  }
}
.site-footer .footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  margin-top: 2rem;
  padding-top: 1.2rem;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.6);
}
.site-footer .footer-bottom .th {
  font-size: 0.58em;
  vertical-align: super;
}

/* ---------- Back to top ------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--iccc-green);
  color: #fff;
  border: 0;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(15, 74, 39, 0.28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.25s ease,
    transform 0.25s ease,
    visibility 0.25s ease,
    background 0.2s ease;
  z-index: 1040;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--iccc-green-dark);
}
.back-to-top i {
  font-size: 1.3rem;
}

/* ---------- Misc -------------------------------------------------------- */
.lead-intro {
  font-size: 1.05rem;
  color: var(--iccc-muted);
}

@media (max-width: 575.98px) {
  .dates-list .row-item {
    flex-direction: column;
    gap: 0.15rem;
  }
  .dates-list .row-item .value {
    white-space: normal;
  }
}
