﻿/* ================================================================
   PinT 2027 - Shared Stylesheet
   Main color: #22537F (Jilin University blue)
   ================================================================ */

:root {
  --color-primary: #22537F;
  --color-primary-dark: #1a4263;
  --color-primary-light: #e8f0f7;
  --color-alert: #b3261e;
  --color-bg: #ffffff;
  --color-text: #333333;
  --color-muted: #666666;
  --color-light: #f5f7fa;
  --color-border: #dddddd;
  --font-sans: system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', sans-serif;
  --max-width: 960px;
}

/* ---- Reset & Base ---- */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  /* Column flex container: main grows into the free space, so a page with
     little content pushes the footer to the bottom of the viewport instead of
     leaving a strip below it. A page taller than the viewport flows normally. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* ---- Utilities ---- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--color-primary-dark);
  color: #ffffff;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
  text-decoration: none;
}

.note {
  font-size: 0.85rem;
  color: var(--color-muted);
}

/* ---- Header ---- */

.site-header {
  border-bottom: 3px solid var(--color-primary);
  margin-bottom: 2rem;
}

.header-top {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1rem 0.5rem;
  gap: 1rem;
}

.header-logo {
  text-align: center;
}

.header-logo img {
  height: 70px;
  width: auto;
  display: block;
  margin: 0 auto;
}

.header-title {
  text-align: center;
  flex: 1;
}

.header-title h1 {
  font-size: 1.5rem;
  color: var(--color-primary);
  line-height: 1.3;
  margin-bottom: 0.15rem;
}

.header-title .subtitle {
  font-size: 0.95rem;
  color: var(--color-muted);
}

.header-title .subtitle span {
  white-space: nowrap;
}

/* ---- Navigation ---- */

.site-nav {
  background: var(--color-primary);
}

.site-nav ul {
  max-width: var(--max-width);
  margin: 0 auto;
  list-style: none;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
}

.site-nav li a {
  display: block;
  padding: 0.6rem 1.2rem;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s;
}

.site-nav li a:hover {
  background: var(--color-primary-dark);
  text-decoration: none;
}

.site-nav li a.active {
  background: var(--color-primary-dark);
  font-weight: 700;
}

/* ---- Main Content ---- */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem 3rem;
  /* Grows into leftover height so the footer stays at the viewport bottom.
     width is needed because margin: auto does not stretch a flex item. */
  flex: 1 0 auto;
  width: 100%;
}

main h2 {
  font-size: 1.35rem;
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 0.35rem;
  margin: 2.5rem 0 1rem;
}

main h2:first-child {
  margin-top: 0;
}

main h3 {
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  margin: 1.5rem 0 0.75rem;
}

main p {
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

main ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

main ul li {
  margin-bottom: 0.3rem;
}

/* ---- Venue Map ---- */

.venue-maps {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  margin: 1rem 0;
}

.venue-maps iframe {
  flex: 0 0 auto;
}

.map-links {
  list-style: none;
  margin-left: 0;
  margin-bottom: 1rem;
}

.map-links li {
  margin-bottom: 0.5rem;
}

.map-links a {
  font-weight: 500;
}

/* ---- Accommodation ---- */

.hotel-images {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1rem 0;
}

.hotel-images img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

/* ---- Important Dates Box ---- */

.dates-box {
  background: var(--color-light);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
}

.dates-box p {
  margin-bottom: 0.3rem;
}

.dates-box strong {
  display: inline-block;
  min-width: 140px;
}

/* ---- Organizers ---- */

.org-list {
  list-style: none;
  margin-left: 0;
}

.org-list li {
  margin-bottom: 0.5rem;
}

/* ---- Special Issues ---- */

.announcement {
  color: var(--color-alert);
  font-weight: 700;
}

/* ---- Footer ---- */

.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.85rem;
  line-height: 1.6;
}

.site-footer p {
  margin-bottom: 0.25rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.9);
}

.site-footer .footer-links {
  margin-top: 0.35rem;
}

.site-footer .footer-logos {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-footer .footer-logos img {
  height: 50px;
  width: auto;
  opacity: 0.9;
}

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .site-header {
    margin-bottom: 1.25rem;
  }

  .header-top {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 0.75rem;
    padding: 0.6rem 0.75rem 0.35rem;
  }

  .header-title {
    flex: 0 0 100%;
    order: 1;
  }

  .header-title h1 {
    font-size: 1.25rem;
  }

  .header-title .subtitle {
    font-size: 0.85rem;
  }

  .header-logo img {
    height: 44px;
  }

  .site-nav ul {
    flex-wrap: wrap;
  }

  .site-nav li a {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
  }

  .venue-maps {
    flex-direction: column;
  }

  .venue-maps iframe {
    width: 100%;
    height: 300px;
  }
}

/* ---- PDF Link ---- */

.pdf-link::before {
  content: "[PDF] ";
  font-weight: 600;
  font-size: 0.85rem;
}

/* ---- Small screens ---- */

@media (max-width: 480px) {
  body {
    font-size: 15px;
  }

  .header-top {
    padding: 0.5rem 0.5rem 0.25rem;
  }

  .header-logo img {
    height: 36px;
  }

  .header-title h1 {
    font-size: 1.15rem;
  }

  .site-nav li a {
    padding: 0.45rem 0.6rem;
    font-size: 0.8rem;
  }

  main h2 {
    font-size: 1.2rem;
    margin-top: 1.75rem;
  }

  .dates-box strong {
    min-width: 0;
  }
}