/* =========================================================
   GOOGLE FONTS
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;1,400&family=Source+Sans+3:wght@300;400;600&display=swap');

/* =========================================================
   CSS VARIABLES
   ========================================================= */
:root {
  --uf-red:     #c1002a;
  --uf-dark:    #1a1a1a;
  --uf-mid:     #4a4a4a;
  --uf-light:   #f5f4f0;
  --uf-border:  #d0ccc4;
  --uf-white:   #ffffff;
  --font-serif: 'EB Garamond', Georgia, serif;
  --font-sans:  'Source Sans 3', 'Segoe UI', sans-serif;
  --max-width:  960px;
  --pad:        2rem;
}

/* =========================================================
   RESET
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--uf-white);
  color: var(--uf-dark);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
}
a { color: var(--uf-red); }
address { font-style: normal; }
img { max-width: 100%; height: auto; display: block; }

/* =========================================================
   SITE HEADER
   ========================================================= */
.cw-header {
  background: var(--uf-white);
  border-bottom: 1px solid var(--uf-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.cw-header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.85rem var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.cw-branding { display: flex; flex-direction: column; line-height: 1.25; flex-shrink: 0; }
.cw-branding .uni {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--uf-red);
  text-decoration: none;
}
.cw-branding .dept {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--uf-dark);
  text-decoration: none;
}
.cw-branding .dept:hover { color: var(--uf-red); }

.cw-header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
}
.cw-header-divider {
  width: 1px;
  height: 36px;
  background: var(--uf-border);
}
.cw-tiu-logo { display: block; height: 38px; width: auto; }
.cw-tiu-logo img { height: 38px; width: auto; }

/* Year navigation tabs */
.cw-year-nav { display: flex; align-items: center; gap: 0; }
.cw-year-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--uf-mid);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
}
.cw-year-tab:hover { color: var(--uf-dark); text-decoration: none; }
.cw-year-tab.current-menu-item,
.cw-year-tab[aria-current="page"] {
  color: var(--uf-red);
  border-bottom-color: var(--uf-red);
}

/* Red accent line */
.cw-header-accent { height: 3px; background: var(--uf-red); }

/* =========================================================
   HERO BANNER
   ========================================================= */
.cw-hero {
  width: 100%;
  max-height: 270px;
  overflow: hidden;
  background: #2c3e50;
}
.cw-hero img,
.cw-hero .wp-block-cover {
  width: 100%;
  height: 270px;
  object-fit: cover;
  object-position: center 60%;
  display: block;
}

/* =========================================================
   PAGE WRAPPER
   ========================================================= */
.cw-page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem var(--pad) 4rem;
}

/* Page title */
.cw-page-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  color: var(--uf-dark);
  line-height: 1.25;
  border-bottom: 2px solid var(--uf-red);
  padding-bottom: 0.6rem;
  margin: 0 0 2rem;
}

/* =========================================================
   TWO-COLUMN LAYOUT
   Used on programme pages: content left, poster right
   ========================================================= */
.cw-two-col {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0 3rem;
  align-items: start;
}
.cw-sidebar { align-self: start; }
.cw-sidebar img {
  width: 100%;
  border: 1px solid var(--uf-border);
  box-shadow: 0 2px 14px rgba(0,0,0,0.09);
}

/* =========================================================
   SECTION LABEL
   ========================================================= */
.cw-section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--uf-red);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--uf-border);
  margin: 2rem 0 1rem;
}
.cw-section-label:first-child { margin-top: 0; }

/* =========================================================
   SPEAKER / TALK CARDS
   ========================================================= */
.cw-talk {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 1rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #eeebe6;
}
.cw-talk:last-child { border-bottom: none; }
.cw-talk-portrait {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--uf-border);
  background: var(--uf-light);
  flex-shrink: 0;
}
.cw-talk-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cw-talk-portrait .initials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--uf-mid);
  font-family: var(--font-sans);
}
.cw-talk-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--uf-dark);
  line-height: 1.35;
}
.cw-talk-speaker {
  font-size: 0.875rem;
  color: var(--uf-mid);
  font-style: italic;
}
.cw-talk.own {
  background: #fdf8f8;
  margin: 0 -0.75rem;
  padding: 1rem 0.75rem;
  border-left: 3px solid var(--uf-red);
  border-bottom: 1px solid #f0e4e4;
}
.cw-talk.own .cw-talk-portrait { border-color: var(--uf-red); }

/* =========================================================
   ORGANIZERS ROW
   ========================================================= */
.cw-organizers {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 1.2rem 1.4rem;
  background: var(--uf-light);
  border: 1px solid var(--uf-border);
  border-radius: 2px;
  margin-bottom: 2rem;
}
.cw-organizer-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.cw-organizer-portrait {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--uf-border);
  background: var(--uf-light);
  flex-shrink: 0;
}
.cw-organizer-portrait img { width: 100%; height: 100%; object-fit: cover; }
.cw-organizer-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--uf-dark);
  line-height: 1.2;
}
.cw-organizer-affil { font-size: 0.82rem; color: var(--uf-mid); font-style: italic; }
.cw-organizer-dept  { font-size: 0.78rem; color: var(--uf-mid); }

/* =========================================================
   INFO GRID (Start page)
   ========================================================= */
.cw-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
}
.cw-info-section { display: flex; flex-direction: column; gap: 0.75rem; }
.cw-info-section.full { grid-column: 1 / -1; }

.cw-info-section h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--uf-dark);
  margin: 0 0 0.1rem;
}
.cw-info-section p,
.cw-info-section address {
  font-size: 0.93rem;
  color: var(--uf-mid);
  line-height: 1.65;
  margin: 0;
}

/* Map placeholder */
.cw-map-placeholder {
  width: 100%;
  height: 200px;
  background: var(--uf-light);
  border: 1px solid var(--uf-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--uf-mid);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* Transport items */
.cw-transport { display: flex; flex-direction: column; gap: 0.9rem; }
.cw-transport-item { display: flex; gap: 0.8rem; align-items: flex-start; }
.cw-transport-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--uf-light);
  border: 1px solid var(--uf-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9rem;
}
.cw-transport-body { font-size: 0.9rem; color: var(--uf-mid); line-height: 1.55; }
.cw-transport-body strong { color: var(--uf-dark); display: block; }

/* Hotel cards */
.cw-hotels { display: flex; flex-direction: column; gap: 1rem; }
.cw-hotel {
  padding: 0.9rem 1rem;
  background: var(--uf-light);
  border-left: 3px solid var(--uf-border);
}
.cw-hotel h4 {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--uf-dark);
  margin: 0 0 0.15rem;
}
.cw-hotel p { font-size: 0.88rem; color: var(--uf-mid); line-height: 1.5; margin: 0; }
.cw-hotel-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--uf-red);
  border: 1px solid #e8b0bc;
  padding: 0.1rem 0.4rem;
  margin-bottom: 0.3rem;
}

/* =========================================================
   PROGRAMME LINK
   ========================================================= */
.cw-program-link {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--uf-mid);
}
.cw-program-link a { color: var(--uf-red); font-weight: 600; }

/* Coming soon badge */
.cw-badge {
  display: inline-block;
  background: var(--uf-light);
  border: 1px solid var(--uf-border);
  color: var(--uf-mid);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.6rem;
  margin-bottom: 1.2rem;
}

/* =========================================================
   WORDPRESS EDITOR OVERRIDES
   Keep block editor content looking right
   ========================================================= */
.cw-page .wp-block-image img {
  width: 100%;
  border: 1px solid var(--uf-border);
  box-shadow: 0 2px 14px rgba(0,0,0,0.09);
}
.cw-page .wp-block-cover {
  min-height: 270px;
}
.cw-page h1 { font-family: var(--font-serif); font-size: 2rem; font-weight: 600; }
.cw-page h2 { font-family: var(--font-serif); font-size: 1.5rem; font-weight: 600; color: var(--uf-dark); }
.cw-page h3 { font-family: var(--font-serif); font-size: 1.15rem; font-weight: 600; }
.cw-page p  { font-size: 0.95rem; color: var(--uf-mid); line-height: 1.7; }

/* =========================================================
   FOOTER
   ========================================================= */
.cw-footer {
  background: #1e1e1e;
  color: #bbb;
  font-size: 0.82rem;
  font-family: var(--font-sans);
  padding: 2.2rem var(--pad);
  margin-top: 3rem;
}
.cw-footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}
.cw-footer-dept  { color: #fff; font-weight: 600; font-size: 0.9rem; margin-bottom: 0.3rem; }
.cw-footer-addr  { color: #999; line-height: 1.65; }
.cw-footer-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; align-items: flex-start; }
.cw-footer-links a { color: #bbb; text-decoration: none; }
.cw-footer-links a:hover { color: #fff; text-decoration: underline; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 720px) {
  .cw-two-col  { grid-template-columns: 1fr; }
  .cw-info-grid { grid-template-columns: 1fr; }
  .cw-page-title { font-size: 1.45rem; }
  .cw-hero img { height: 160px; }
  .cw-header-inner { flex-wrap: wrap; }
  .cw-year-tab { padding: 0.4rem 0.6rem; font-size: 0.78rem; }
}
