/* ==========================================================================
   ICPBB 2024 — Scientific theme layer on top of Bootstrap 5
   International Conference on Plant Biology and Biotechnology
   A thin custom layer: palette, hero banner, content card, tables.
   All layout/components come from Bootstrap; this only themes them.
   ========================================================================== */

:root {
  --sci-primary:   #14532d;   /* deep botanical green */
  --sci-primary-2: #0f766e;   /* teal */
  --sci-accent:    #16a34a;   /* vivid leaf green */
  --sci-ink:       #1f2a24;   /* body text */
  --sci-muted:     #5b6b62;   /* muted text */
  --sci-surface:   #ffffff;   /* card surface */
  --sci-bg:        #eef2f0;   /* page background */
  --sci-border:    #dde7e1;   /* hairlines */

  /* Bootstrap variable overrides */
  --bs-primary: #14532d;
  --bs-link-color: #0f766e;
  --bs-link-hover-color: #14532d;
  --bs-body-color: var(--sci-ink);
  --bs-font-sans-serif: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ----- Base ------------------------------------------------------------- */
body {
  background-color: var(--sci-bg);
  background-image:
    radial-gradient(1200px 600px at 100% -10%, rgba(15,118,110,.06), transparent 60%),
    radial-gradient(900px 500px at -10% 0%, rgba(20,83,45,.06), transparent 55%);
  color: var(--sci-ink);
  font-family: var(--bs-font-sans-serif);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Lora", Georgia, "Times New Roman", serif;
}

h2:empty { display: none; }           /* hide stray empty headings from templates */
.clear { clear: both; }

/* ----- Navbar ----------------------------------------------------------- */
.conf-nav {
  background: linear-gradient(90deg, var(--sci-primary) 0%, #0e5c46 55%, var(--sci-primary-2) 100%);
  box-shadow: 0 2px 14px rgba(0,0,0,.16);
}
.conf-nav .navbar-brand {
  font-family: "Lora", Georgia, serif;
  font-weight: 700;
  letter-spacing: .3px;
  display: flex;
  align-items: center;
  gap: .55rem;
}
.conf-nav .navbar-brand img { height: 30px; width: auto; }
.conf-nav .navbar-collapse { flex-wrap: wrap; row-gap: .3rem; }   /* safety: never force page h-scroll */
.conf-nav .navbar-nav { flex-wrap: wrap; }
.conf-nav .nav-link {
  font-weight: 500;
  color: rgba(255,255,255,.9) !important;
  border-radius: .4rem;
  padding: .45rem .55rem !important;
  transition: background-color .15s ease, color .15s ease;
}
.conf-nav .nav-link:hover,
.conf-nav .nav-link:focus { background: rgba(255,255,255,.14); color: #fff !important; }
.conf-nav .nav-link.active { background: rgba(255,255,255,.20); color: #fff !important; }
.conf-nav .dropdown-menu {
  border: 0;
  border-radius: .6rem;
  box-shadow: 0 12px 34px rgba(0,0,0,.18);
  padding: .4rem;
  margin-top: .35rem;
}
.conf-nav .dropdown-item { border-radius: .4rem; padding: .5rem .8rem; font-weight: 500; }
.conf-nav .dropdown-item:active { background: var(--sci-accent); }
.conf-nav .dropdown-item:hover { background: #eaf5ee; color: var(--sci-primary); }

/* Language switcher */
.conf-lang { gap: .35rem; align-items: center; }
.conf-lang .nav-link {
  padding: .25rem .4rem !important;
  border: 1px solid transparent;
  border-radius: .5rem;
  display: inline-flex;
  align-items: center;
}
.conf-lang img { height: 18px; width: auto; border-radius: 2px; display: block; }
.conf-lang .nav-link.active { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.15); }

/* ----- Layout: container + content card -------------------------------- */
#container {
  max-width: 1160px;
  margin: 2rem auto 2.5rem;
  padding: 0 1rem;
}
#main {
  --pad: clamp(1.25rem, 3.2vw, 2.75rem);
  background: var(--sci-surface);
  border: 1px solid var(--sci-border);
  border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(16,52,38,.10);
  padding: var(--pad);
  overflow: hidden;
}

/* ----- Hero banner (header2 include) ----------------------------------- */
.conf-hero {
  margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) var(--pad);
  padding: clamp(1.6rem, 3.4vw, 2.9rem);
  background:
    linear-gradient(125deg, rgba(20,83,45,.96), rgba(15,118,110,.94)),
    radial-gradient(600px 300px at 90% -20%, rgba(22,163,74,.55), transparent 60%);
  color: #fff;
  position: relative;
}
.conf-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 4px;
  background: linear-gradient(90deg, var(--sci-accent), #7dd3a6, var(--sci-primary-2));
}
.conf-hero__body { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.conf-hero__logo {
  height: 66px; width: auto; flex: 0 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.25));
}
.conf-hero__title {
  color: #fff;
  font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  line-height: 1.2;
  margin: 0;
}
.conf-hero__title span { color: #b8f0cf; white-space: nowrap; }
.conf-hero__meta {
  margin: .6rem 0 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: rgba(255,255,255,.92);
}
.conf-hero__meta i { color: #b8f0cf; }
.conf-hero__venue { margin: .25rem 0 0; color: rgba(255,255,255,.85); }
.conf-hero__venue a { color: #d7fbe6; text-decoration: underline; }
.conf-hero__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.3rem; }
.conf-hero__actions .btn {
  --bs-btn-border-radius: .55rem;
  font-weight: 600;
  font-size: .875rem;
}
.conf-hero__actions .btn-light { color: var(--sci-primary); }
.conf-hero__actions .btn-outline-light:hover { color: var(--sci-primary); }

/* ----- Content typography ---------------------------------------------- */
#main h3 {
  color: var(--sci-primary);
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 600;
  margin: 1.9rem 0 .85rem;
  padding-bottom: .45rem;
  border-bottom: 2px solid var(--sci-border);
}
#main h3 a { color: var(--sci-primary); }
#main .conf-hero + h3:first-of-type,
#main > h3:first-child { margin-top: 0; }
#main h4 {
  color: #26382e;
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.1rem 0 .6rem;
}
#main p { line-height: 1.75; margin-bottom: 1rem; }
#main a { color: var(--sci-primary-2); text-decoration: none; }
#main a:hover { color: var(--sci-primary); text-decoration: underline; }
#main ul { padding-left: 1.3rem; margin-bottom: 1rem; }
#main li { margin: .4rem 0; line-height: 1.6; }
#main ul li::marker { color: var(--sci-accent); }
#main strong, #main b { color: #17281f; }
#main img { max-width: 100%; height: auto; border-radius: .5rem; }

/* Callouts reusing legacy .success / .error classes */
#main h3.success, #main p.success, #main h4.success {
  background: #e8f5ee;
  border: 1px solid #c7e8d5;
  border-left: 4px solid var(--sci-accent);
  padding: .9rem 1.1rem;
  border-radius: .6rem;
  color: var(--sci-primary);
}
#main h3.success { border-bottom: 0; }
#main p.error {
  background: #fdecec;
  border: 1px solid #f3c9c9;
  border-left: 4px solid #dc3545;
  padding: .9rem 1.1rem;
  border-radius: .6rem;
  color: #8f1d1d;
}
#main .center, #main td.center { text-align: center; }

/* ----- Tables ----------------------------------------------------------- */
/* Data tables (default and border="1") */
#main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.1rem 0 1.4rem;
  font-size: .97rem;
  background: #fff;
  border-radius: .6rem;
  overflow: hidden;
}
#main th, #main td {
  border: 1px solid var(--sci-border);
  padding: .6rem .8rem;
  vertical-align: top;
  line-height: 1.5;
}
#main thead th { background: var(--sci-primary); color: #fff; font-weight: 600; }
#main tbody tr:nth-child(even) { background: #f4f8f5; }
#main tr.success { background: var(--sci-primary); color: #fff; }
#main tr.success td, #main tr.success a { color: #fff; }
#main table:not([border="0"]) td img {
  max-width: 150px;
  border-radius: .5rem;
  box-shadow: 0 4px 12px rgba(16,52,38,.12);
}

/* Layout tables (border="0", used on sponsors pages): keep them airy */
#main table[border="0"] {
  border: 0;
  background: transparent;
}
#main table[border="0"] td {
  border: 0;
  padding: .75rem 1rem;
  vertical-align: middle;
}
#main table[border="0"] tbody tr { background: transparent; }
#main table[border="0"] tbody tr:nth-child(even) { background: transparent; }
#main table[border="0"] tr {
  border-bottom: 1px solid var(--sci-border);
}
#main table[border="0"] td img {
  max-height: 90px;
  width: auto;
  box-shadow: none;
  border-radius: .375rem;
}
#main table[border="0"] h3 {
  border-bottom: 0;
  margin: 0 0 .35rem;
  font-size: 1.15rem;
}

/* ----- Footer ----------------------------------------------------------- */
.conf-footer {
  margin-top: 2.5rem;
  background: linear-gradient(180deg, #10382a, #0c2b20);
  color: rgba(255,255,255,.82);
  padding: 2rem 0 1.4rem;
}
.conf-footer__inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
}
.conf-footer p { margin: 0; font-size: .95rem; }
.conf-footer img { height: 46px; width: auto; background: #fff; padding: 4px; border-radius: .4rem; }
.conf-footer a { color: #a7e8c4; text-decoration: none; }
.conf-footer a:hover { text-decoration: underline; }
#clustrmaps { margin-top: .5rem; }

/* ----- Responsive tweaks ----------------------------------------------- */
@media (max-width: 575.98px) {
  #container { margin: 1rem auto 1.5rem; }
  .conf-hero__logo { height: 52px; }
  #main table, #main th, #main td { font-size: .9rem; }
}
