/* ============================================================
   SampTA Conference Series — Central Website
   Clean, professional, academic design — system fonts, no cruft
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  /* Colors */
  --color-primary:       #1b3a5c;
  --color-primary-light: #254d78;
  --color-primary-dark:  #122842;
  --color-accent:        #2a7ae2;
  --color-accent-hover:  #1a5fb8;
  --color-bg:            #f7f8fa;
  --color-bg-white:      #ffffff;
  --color-text:          #212529;
  --color-text-muted:    #5a6370;
  --color-border:        #dee2e6;
  --color-border-light:  #e9ecef;
  --color-highlight:     #fff8e1;
  --color-highlight-border: #ffc107;

  /* Typography — system font stack, zero network requests */
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;

  /* Sizing */
  --max-width: 960px;
  --nav-height: 56px;
  --sidebar-width: 300px;

  /* Transitions — short and simple */
  --transition: 0.15s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-primary);
  margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; margin-top: 2rem; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; }

p  { margin-bottom: 1rem; }

a {
  color: var(--color-accent);
  text-decoration: none;
}
a:hover, a:focus {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

ul, ol { margin-bottom: 1rem; padding-left: 1.5rem; }
li     { margin-bottom: 0.25rem; }

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

main {
  flex: 1;
  padding: 2.5rem 0 3rem;
}

/* ===== SIDEBAR / HEADER ===== */
.site-header {
  background: var(--color-primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

/* Desktop: fixed left sidebar */
@media (min-width: 768px) {
  body {
    padding-left: var(--sidebar-width);
    padding-right: 0;
  }
  .site-header {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    overflow-y: auto;
    border-right: 1px solid rgba(255,255,255,0.08);
  }
  .site-header .container {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 1.75rem 1.45rem 1.4rem;
    max-width: none;
    min-height: 100vh;
  }
  .site-logo {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    align-items: center;
    padding-bottom: 1.45rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    white-space: normal;
    text-align: center;
  }
  .site-logo-img {
    height: 30px;
    margin-right: 0;
    margin-bottom: 0;
  }
  .site-logo-title {
    display: block;
    font-size: 2rem;
    line-height: 1;
  }
  .site-nav {
    width: 100%;
    margin-top: 1.45rem;
  }
  .site-nav ul {
    flex-direction: column;
    width: 100%;
    gap: 1px;
  }
  .site-nav a {
    padding: 0.9rem 1rem;
    width: 100%;
    border-radius: 8px;
    font-size: 1.04rem;
  }
  .site-nav a:hover {
    background: rgba(255,255,255,0.08);
  }
  .site-nav a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
  }
  .sidebar-footer {
    margin-top: auto;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.72rem;
    opacity: 0.4;
    text-align: center;
  }
}

.site-logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.site-logo:hover {
  color: #fff;
  text-decoration: none;
}

.site-logo-img {
  height: 28px;
  width: auto;
  margin-right: 0.4rem;
  vertical-align: middle;
  flex-shrink: 0;
}

.site-logo-title {
  color: inherit;
}

/* Nav toggle (mobile only) */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: #fff;
}
.nav-toggle svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.site-nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 4px;
  text-decoration: none;
  transition: background var(--transition);
}
.site-nav a:hover,
.site-nav a:focus {
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
}
.site-nav a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 200;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
  }
  .site-nav a {
    padding: 0.75rem 1rem;
    font-size: 1rem;
  }
  .sidebar-footer { display: none; }
}

/* ===== PAGE HEADER / HERO ===== */
.page-header {
  background: var(--color-primary);
  color: #fff;
  padding: 1.6rem 0;
  margin-bottom: 2rem;
}
.page-header h1 {
  color: #fff;
  margin-bottom: 0.25rem;
}
.page-header .subtitle {
  opacity: 0.75;
  font-size: 1.05rem;
  max-width: 600px;
}

.hero {
  padding: 1.95rem 0 1.55rem;
}
.hero h1 {
  font-size: 2.65rem;
  margin-bottom: 0.24rem;
}
.hero .subtitle {
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0;
}

.hero-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: left;
}

.hero-logo {
  height: 82px;
  width: auto;
  flex-shrink: 0;
}

.hero-copy {
  max-width: 42rem;
}

@media (max-width: 767px) {
  .hero {
    text-align: center;
  }
  .hero-brand {
    flex-direction: column;
    gap: 0.85rem;
    text-align: center;
  }
  .hero-logo {
    height: 68px;
  }
  .hero h1 {
    font-size: 2.25rem;
  }
  .hero .subtitle {
    margin: 0 auto;
  }
}

/* ===== FEATURED EVENT ===== */
.featured-event {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border-light);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 6px 6px 0;
  padding: 1.5rem 1.5rem;
}
.featured-event h2 {
  margin-top: 0 !important;
}
.featured-event .card {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 0;
}
.featured-event .card:hover {
  box-shadow: none;
}
.featured-event img,
.content-body img {
  max-width: 100%;
  height: auto;
}
.featured-event-actions {
  margin-top: 1rem;
}

/* Button */
.btn {
  display: inline-block;
  padding: 0.55rem 1.2rem;
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
}
.btn:hover {
  background: var(--color-accent-hover);
  color: #fff;
  text-decoration: none;
}

/* ===== CARDS ===== */
.card {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: box-shadow var(--transition);
}
.card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.card h3 { margin-top: 0; }

/* ===== TABLES ===== */
.conference-table,
.committee-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}
.conference-table thead,
.committee-table thead {
  background: var(--color-primary);
  color: #fff;
}
.conference-table th,
.committee-table th {
  font-family: var(--font-heading);
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
}
.conference-table td,
.committee-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: top;
}
.conference-table tbody tr:hover,
.committee-table tbody tr:hover {
  background: rgba(42,122,226,0.04);
}
.conference-table .note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Responsive table — stacked on mobile */
@media (max-width: 767px) {
  .conference-table-wrapper,
  .committee-table-wrapper { margin: 1.5rem 0; padding: 0; overflow: visible; }
  .conference-table,
  .committee-table { min-width: 0; }
  .conference-table thead,
  .committee-table thead { display: none; }
  .conference-table tbody tr,
  .committee-table tbody tr {
    display: block;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
  }
  .conference-table tbody tr:hover,
  .committee-table tbody tr:hover {
    background: var(--color-bg-white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }
  .conference-table td,
  .committee-table td {
    display: block;
    padding: 0.2rem 0;
    border-bottom: none;
    font-size: 0.95rem;
  }
  .conference-table td:first-child,
  .committee-table td:first-child {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: var(--color-primary);
  }
  .conference-table td::before,
  .committee-table td::before {
    content: attr(data-label);
    display: inline;
    font-weight: 600;
    color: var(--color-primary);
    margin-right: 0.4rem;
    font-size: 0.85rem;
  }
  .conference-table td:first-child::before,
  .committee-table td:first-child::before { display: none; }
  .conference-table td:empty,
  .committee-table td:empty { display: none; }
}

/* ===== QUICK LINKS GRID ===== */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
@media (max-width: 767px) {
  .quick-links.limit-mobile > :nth-child(n+4) { display: none; }
}

/* ===== SECTION DIVIDER ===== */
.section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.65);
  padding: 2rem 0;
  font-size: 0.875rem;
  margin-top: auto;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.site-footer a { color: rgba(255,255,255,0.8); }
.site-footer a:hover { color: #fff; }

/* ===== UTILITIES ===== */
.text-muted  { color: var(--color-text-muted); }
.text-small { font-size: 0.9em; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.not-found .card {
  max-width: 42rem;
}

/* ===== PRINT ===== */
@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  body { font-size: 12pt; background: #fff; padding-left: 0; padding-right: 0; }
  .page-header { background: none; color: var(--color-primary); padding: 1rem 0; }
  .page-header h1 { color: var(--color-primary); }
  a { color: var(--color-primary); }
  a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; color: var(--color-text-muted); }
}
