/* ========================================
   East Asia Section of IPIA - Main Stylesheet
   ======================================== */

/* --- Fonts --- */
@font-face {
  font-family: RobotoCondensed;
  font-style: normal;
  font-weight: 700;
  src: url("../templates/berlinbridges2022_fullscreen/fonts/RobotoCondensed-Bold.ttf") format("truetype");
}
@font-face {
  font-family: RobotoCondensed;
  font-style: normal;
  font-weight: 400;
  src: url("../templates/berlinbridges2022_fullscreen/fonts/RobotoCondensed-Regular.ttf") format("truetype");
}
@font-face {
  font-family: RobotoCondensed;
  font-style: normal;
  font-weight: 300;
  src: url("../templates/berlinbridges2022_fullscreen/fonts/RobotoCondensed-Light.ttf") format("truetype");
}
@font-face {
  font-family: SpecialElite;
  font-style: normal;
  font-weight: 400;
  src: url("../templates/berlinbridges2022_fullscreen/fonts/SpecialElite-Regular.ttf") format("truetype");
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: RobotoCondensed, Arial, sans-serif;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.5;
  color: #345;
  background: #fff;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 { color: #222; font-weight: 700; line-height: 1.2; }
h1 { font-size: 28px; padding: 20px 0 10px; }
h2 { font-size: 24px; padding: 16px 0 8px; }
h3 { font-size: 22px; padding: 14px 0 8px; }
p { padding: 8px 0; }
a { color: #257; text-decoration: none; }
a:hover { color: #930; text-decoration: underline; }
ul, ol { margin: 8px 0 8px 24px; }
li { padding: 3px 0; }
img { max-width: 100%; height: auto; }
table { border-collapse: collapse; width: 100%; }

/* --- Top Navigation Bar --- */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: #71b2ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.top-nav a { color: #fff; padding: 4px 10px; font-size: 15px; white-space: nowrap; }
.top-nav a:hover { color: #ffd; text-decoration: none; }

/* Hamburger for mobile */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block; width: 24px; height: 3px; background: #fff;
  margin: 4px 0; border-radius: 2px;
}

/* Desktop nav links */
.nav-links { display: flex; list-style: none; margin: 0; gap: 2px; overflow-x: auto; }
.nav-links li { padding: 0; }
.nav-links a {
  display: block; padding: 12px 10px; color: #fff; font-weight: 700;
  font-size: 15px; letter-spacing: 0.5px; text-transform: uppercase;
  border-radius: 4px; transition: background 0.2s;
}
.nav-links a:hover { background: rgba(255,255,255,0.2); color: #fff; text-decoration: none; }

.top-nav-home { font-size: 20px; font-weight: 700; margin-right: 8px; }
.top-nav-home:hover { color: #ffd; }

/* --- Header --- */
.site-header {
  background: #fff; text-align: center; padding: 60px 0 0 0;
}
.site-title {
  font-family: SpecialElite, Arial, sans-serif;
  font-size: 38px; font-weight: 400; letter-spacing: 3px;
  font-variant: small-caps; color: #333;
  padding: 24px 16px; margin: 0 auto; max-width: 1000px;
}
.header-image {
  background: #71b2ff url("../templates/berlinbridges2022_fullscreen/images/bgheader_blue.jpg") repeat-x;
}
.header-image img { display: block; margin: 0 auto; }

/* --- Main Content --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.content-area {
  display: flex; flex-wrap: wrap; gap: 30px;
  background: #fff; padding: 30px 0 50px;
}

/* Sidebar */
.sidebar {
  flex: 0 0 280px; order: 1;
}
.sidebar-inner {
  background: #fff; border: 1px solid #aaa; border-radius: 5px;
  padding: 20px 16px; position: sticky; top: 68px;
}
.sidebar ul { list-style: none; margin: 0; padding: 8px 0; }
.sidebar li { padding: 0; margin: 2px 0; }
.sidebar a {
  display: block; padding: 8px 16px; color: #111;
  font-size: 16px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px; border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.sidebar a:hover, .sidebar a.active {
  background: #eee; color: #930; text-decoration: none;
}

/* Main content column */
.main-content {
  flex: 1 1 0; min-width: 0; order: 2;
}

/* --- Section Styling --- */
.page-section {
  padding: 10px 0;
}
.page-section:not(:last-child) {
  border-bottom: 1px solid #e0e0e0;
  margin-bottom: 20px;
}
.page-section h1 {
  color: #222;
  border-bottom: 2px solid #71b2ff;
  padding-bottom: 8px;
  margin-bottom: 16px;
}

/* --- Home Section --- */
.home-section p {
  font-size: 20px;
  line-height: 1.6;
}

/* --- Tables --- */
.info-table {
  width: 100%;
  margin: 12px 0;
}
.info-table th {
  text-align: left;
  font-weight: 700;
  padding: 8px 12px 8px 0;
  vertical-align: top;
  white-space: nowrap;
  color: #222;
  border-bottom: 1px solid #ddd;
}
.info-table td {
  padding: 8px 0;
  vertical-align: top;
  border-bottom: 1px solid #ddd;
}
.info-table tr:last-child th,
.info-table tr:last-child td {
  border-bottom: none;
}

/* Seminar Table */
.seminar-table { margin: 16px 0; }
.seminar-table th {
  background: #71b2ff; color: #fff; padding: 10px 12px;
  font-size: 17px; text-align: left;
}
.seminar-table td {
  padding: 12px; border-bottom: 1px solid #ddd; vertical-align: top;
}
.seminar-table tr:hover { background: #f5f8ff; }
.seminar-date { font-weight: 700; white-space: nowrap; min-width: 160px; }
.seminar-speaker { color: #f60; font-style: italic; }

/* --- Symposium List --- */
.symposium-list { list-style: none; margin: 16px 0; }
.symposium-list li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}
.symposium-list li:last-child { border-bottom: none; }
.symposium-title { font-weight: 700; }
.symposium-detail { color: #666; font-size: 18px; }

/* --- Award List --- */
.award-list { margin: 16px 0; }
.award-item { margin: 12px 0; padding: 8px 0; border-bottom: 1px solid #eee; }
.award-item:last-child { border-bottom: none; }
.award-symposium { font-weight: 700; }
.award-winner { font-size: 18px; }

/* --- Logos --- */
.logo-row {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: center;
  margin: 16px 0;
}
.logo-row img { max-height: 60px; width: auto; }

/* --- Organizing Committee Table --- */
.oc-table td {
  padding: 6px 12px 6px 0;
  border-bottom: 1px solid #eee;
}

/* --- Other Associations --- */
.assoc-list { list-style: none; margin: 16px 0; }
.assoc-list li { padding: 8px 0; }
.assoc-name { font-weight: 700; }

/* --- Footer --- */
.site-footer {
  background: #71b2ff; color: #fff; text-align: center;
  padding: 20px; font-size: 16px;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: #ddd; }

/* --- Scroll to Top --- */
.scroll-top {
  position: fixed; bottom: 40px; right: 20px;
  background: #333; color: #fff; width: 44px; height: 44px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer; opacity: 0; transition: opacity 0.3s;
  border: none; z-index: 999;
}
.scroll-top.visible { opacity: 0.7; }
.scroll-top:hover { opacity: 1; background: #c65; }

/* ========================================
   Responsive Design
   ======================================== */

/* Sidebar collapses below 900px */
@media (max-width: 900px) {
  .sidebar { flex: 1 1 100%; order: 2; }
  .sidebar-inner { position: static; }
  .main-content { flex: 1 1 100%; order: 1; }
  .site-title { font-size: 30px; }
}

/* Mobile nav */
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 48px; left: 0; right: 0;
    background: #71b2ff; flex-direction: column; padding: 8px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 16px; }

  body { font-size: 18px; }
  .site-title { font-size: 26px; letter-spacing: 1px; }
  .container { padding: 0 12px; }
  .home-section p { font-size: 18px; }
  .info-table th { white-space: normal; }
  .seminar-date { white-space: normal; }
}

@media (max-width: 480px) {
  .site-title { font-size: 22px; }
  .top-nav a { font-size: 14px; }
}

/* ========================================
   Symposium Detail Page Styles
   ======================================== */

.page-header {
  background: #fff; text-align: center; padding: 70px 0 20px;
}
.page-header h1 {
  border-bottom: none;
  font-family: SpecialElite, Arial, sans-serif;
  font-size: 32px;
}
.back-link {
  display: inline-block; margin: 12px 0;
  font-weight: 700;
}
.back-link:hover { text-decoration: none; }

.speaker-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}
.speaker-table td:first-child { white-space: nowrap; font-weight: 700; }

/* Symposium sub-nav */
.sub-nav {
  background: #fff;
  border-bottom: 1px solid #ddd;
  padding: 8px 0;
  text-align: center;
}
.sub-nav a {
  display: inline-block; padding: 8px 16px; margin: 2px;
  font-weight: 700;
  border-radius: 4px;
  transition: background 0.2s;
}
.sub-nav a:hover {
  background: #eee; text-decoration: none;
}

/* Symposium download links */
.download-list { list-style: none; margin: 16px 0; }
.download-list li { padding: 6px 0; }
.download-list a { font-weight: 700; }
