/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --navy: #1a2332;
  --navy-light: #243044;
  --white: #ffffff;
  --off-white: #f8f8f8;
  --warm-grey: #f4f3f1;
  --text: #2c2c2c;
  --text-secondary: #5a5a5a;
  --text-muted: #8a8a8a;
  --accent: #c4832d;
  --accent-hover: #a96e24;
  --border: #e8e8e8;
  /* Legacy compat */
  --warm-sand: #f4f3f1;
  --soft-blue: #f4f3f1;
  --soft-mint: #f4f3f1;
  --amber: #c4832d;
  --golden-accent: #c4832d;
  --golden-dark: #a96e24;
  --border-light: #e8e8e8;
  --text-light: #5a5a5a;
  --sage-footer: #1a2332;
}

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

body {
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
}

h2 { font-size: 2.4rem; margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.2rem; margin-bottom: 0.5rem; font-weight: 600; }

p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.lead {
  font-size: 1.15rem;
  max-width: 100%;
  margin-bottom: 4rem;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; height: auto; }

/* ===================== NAVIGATION ===================== */
.nav-container {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: 'Source Serif 4', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text) !important;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  transition: all 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--off-white);
}

/* Dropdown */
.dropdown {
  position: relative;
}
.dropdown-arrow {
  font-size: 0.7rem;
  margin-left: 2px;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  padding: 0.5rem 0;
  min-width: 180px;
  z-index: 1001;
  list-style: none;
}
.dropdown-menu li {
  display: block;
}
.dropdown-menu a {
  display: block !important;
  padding: 0.6rem 1.2rem !important;
  font-size: 0.9rem !important;
  color: var(--text-light) !important;
  background: none !important;
  border-radius: 0 !important;
}
.dropdown-menu a:hover {
  color: var(--text) !important;
  background: var(--off-white) !important;
}
.dropdown:hover .dropdown-menu {
  display: block;
}

.nav-contact-btn {
  background: var(--accent) !important;
  color: var(--white) !important;
  padding: 0.45rem 1.2rem !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
}
.nav-contact-btn:hover {
  background: var(--accent-hover) !important;
  color: var(--white) !important;
}

/* Mobile nav */
.mobile-menu-btn { display: none; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger { display: block; width: 22px; height: 2px; background: var(--text); margin: 5px 0; border-radius: 2px; }

@media (max-width: 768px) {
  .mobile-menu-btn { display: block; }
  .nav-links {
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--white); flex-direction: column; padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transform: translateY(-120%); opacity: 0; visibility: hidden;
    transition: all 0.3s; gap: 0.5rem;
  }
  .nav-links.active { transform: translateY(0); opacity: 1; visibility: visible; }
}

/* ===================== VIDEO HERO ===================== */
.video-hero {
  margin-top: 64px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
}

.video-hero__container {
  position: relative;
  width: 100%;
  height: 420px;
  overflow: hidden;
  border-radius: 0;
}

.video-hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.video-hero__content {
  position: absolute;
  z-index: 2;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 3.5rem;
}

.video-hero__title {
  font-family: 'Source Serif 4', serif;
  font-size: 3rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.video-hero__subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.85);
  max-width: 600px;
  margin-bottom: 0;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .video-hero__container { height: 360px; }
  .video-hero__content { padding: 2rem 1.5rem; }
  .video-hero__title { font-size: 2.2rem; }
}

/* ===================== PAGE BANNERS (subpages) ===================== */
.page-banner {
  margin-top: 64px;
  position: relative;
  height: 200px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.page-banner--navy { background: var(--navy); }
.page-banner--image {
  background-size: cover;
  background-position: center;
}

.page-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

.page-banner h1 {
  position: relative;
  z-index: 1;
  color: var(--white);
  font-size: 2.5rem;
  padding: 2rem 3.5rem;
}

/* Page header (subpages like about) */
.page-header {
  margin-top: 64px;
  background: var(--navy);
  padding: 2.5rem 0 2rem;
  display: flex;
  align-items: flex-end;
}

.panorama-banner {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 3rem;
  display: block;
}

.panorama-header {
  margin-top: 64px;
  padding: 2.5rem 0 0;
}

.panorama-wrapper {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.panorama-wrapper img {
  width: 100%;
  display: block;
  height: 250px;
  object-fit: cover;
  object-position: center 70%;
}

.panorama-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 30%, rgba(15,30,62,0.6));
  display: flex;
  align-items: flex-end;
  padding: 2rem 2.5rem;
}

.panorama-overlay h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin: 0;
}

.page-header h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: rgba(255,255,255,0.65);
  max-width: 600px;
  display: none;
}

/* Legacy hero support for subpages */
.hero {
  margin-top: 64px;
  position: relative;
  height: 200px;
  background: var(--navy);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-about, .hero-research, .hero-infrastructure, .hero-participate, .hero-contact {
  background: var(--navy);
}

.hero-about::before, .hero-research::before, .hero-infrastructure::before,
.hero-participate::before, .hero-contact::before { display: none; }

.hero .hero-content {
  padding: 2rem 3.5rem;
  max-width: 1200px;
  width: 100%;
}

.hero .hero-content h1 {
  color: var(--white);
  font-size: 2.5rem;
  margin-bottom: 0;
}

.hero .hero-content p {
  display: none;
}

/* ===================== LAYOUT ===================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.content-section {
  padding: 5rem 0;
}

.alt-bg {
  background: var(--warm-grey);
}

/* ===================== DARK BAND ===================== */
.dark-band {
  background: var(--navy);
  padding: 3rem 2rem;
  max-width: calc(1200px - 4rem);
  margin: -1rem auto 0;
  border-radius: 0;
}

.dark-band h2 {
  color: var(--white);
  margin-bottom: 2.5rem;
}

.themes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.theme-card {
  background: var(--navy-light);
  border-radius: 8px;
  padding: 2rem;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  text-align: center;
}

.theme-card:hover {
  transform: translateY(-2px);
}

.theme-card h3 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 0;
}

.theme-card p {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.theme-card .card-link {
  color: var(--accent);
  font-weight: 500;
  font-size: 0.9rem;
}

.theme-card .card-link:hover { color: #e0a04a; }

@media (max-width: 768px) {
  .themes-grid { grid-template-columns: 1fr; }
}

/* ===================== PILLARS ===================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  align-items: stretch;
}

.pillar {
  display: flex;
  flex-direction: column;
}

.pillar h4 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
  min-height: 1.2em;
}

.pillar p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  margin-bottom: 0;
  flex: 1;
}

@media (max-width: 768px) {
  .pillars-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}

@media (max-width: 480px) {
  .pillars-grid { grid-template-columns: 1fr; }
}

/* ===================== TWO COL ===================== */
.two-col {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}

@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
}

.stat-block {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 1rem;
}

.stat {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: 'Source Serif 4', serif;
  font-size: 4rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===================== INVOLVE GRID ===================== */
.involve-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.involve-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: box-shadow 0.2s;
}

.involve-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.involve-card h4 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.involve-card p {
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.involve-card .card-link {
  font-weight: 600;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .involve-grid { grid-template-columns: 1fr; }
}

/* ===================== CARDS (generic, for subpages) ===================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  transition: box-shadow 0.2s;
}

.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.card h3, .card h4 { margin-bottom: 0.75rem; }
.card p { font-size: 0.95rem; margin-bottom: 1rem; }

.card-link {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}
.card-link:hover { color: var(--accent-hover); }

/* ===================== RESEARCH THEMES (subpage) ===================== */
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.research-theme {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 2rem;
}

.research-theme h3 { margin-bottom: 0.75rem; }
.research-theme p { font-size: 0.95rem; }

/* ===================== INFRASTRUCTURE ===================== */
.infrastructure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.infrastructure-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
}

/* ===================== PARTICIPATE ===================== */
.participate-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.participate-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem;
}

.qr-container {
  text-align: center;
  margin: 1.5rem 0;
  padding: 1.5rem;
  background: var(--warm-grey);
  border-radius: 8px;
}

.qr-container img {
  max-width: 160px;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

.offerings-list {
  list-style: none;
  margin: 1rem 0;
}

.offerings-list li {
  padding: 0.4rem 0 0.6rem;
  border-bottom: 1px solid var(--border);
  padding-left: 0;
  position: relative;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.offerings-list li::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  position: absolute; left: -0.85rem; top: 0.95rem;
}

/* ===================== CONTACT ===================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin: 2rem 0;
}

.contact-details, .contact-description {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 2.5rem;
}

.contact-info {
  background: var(--warm-grey);
  border-radius: 8px;
  padding: 2.5rem;
  text-align: center;
  margin: 2rem 0;
}

/* Team */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.team-member { text-align: center; }

.team-photo {
  width: 100px; height: 100px;
  border-radius: 50%;
  background: var(--border);
  margin: 0 auto 0.75rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--text-muted);
}

.team-member h4 { margin-bottom: 0.15rem; font-size: 1rem; }
.team-member .role { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 0.15rem; }
.team-member .institution { color: var(--accent); font-size: 0.8rem; }

/* ===================== EXPLORE KBL ===================== */
.explore-kbl {
  background: var(--warm-grey);
  padding: 5rem 0;
  margin-top: 3rem;
}

.explore-kbl h2 { margin-bottom: 2rem; }

/* ===================== SECTION TITLE ===================== */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title p {
  max-width: 650px;
  margin: 0 auto;
}

/* ===================== SEMINAR LIST ===================== */
.seminar-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.seminar-item {
  display: flex;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.seminar-item:first-child {
  border-top: 1px solid var(--border);
}

.seminar-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
  padding-top: 0.25rem;
}

.seminar-day {
  font-family: 'Source Serif 4', serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1;
}

.seminar-month {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.seminar-details {
  flex: 1;
}

.seminar-details h4 {
  font-family: 'Source Serif 4', serif;
  font-weight: 400;
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.seminar-speaker {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.seminar-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.seminar-type {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
}

.type-behavioural {
  background: #f0e6d6;
  color: var(--accent);
}

.type-general {
  background: #e4e8ec;
  color: var(--navy);
}

.seminar-list.past .seminar-item {
  opacity: 0.6;
}

.seminar-list.past .seminar-item:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .seminar-item { gap: 1rem; }
  .seminar-date { min-width: 44px; }
  .seminar-day { font-size: 1.5rem; }
}

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--accent);
  color: var(--white);
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.15s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--accent-hover);
  color: var(--white);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: var(--white);
}

/* ===================== FOOTER ===================== */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 0;
}

footer .footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: start;
  flex-wrap: wrap;
  gap: 2rem;
}

footer .footer-left p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

footer .footer-logo-text {
  font-family: 'Source Serif 4', serif;
  font-size: 1.1rem;
  color: var(--white) !important;
  margin-bottom: 0.5rem !important;
}

footer .footer-right {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
}

footer .footer-right a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}
footer .footer-right a:hover { color: var(--white); }

footer a { color: var(--accent); }

footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

footer .footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  margin: 0;
}

/* Legacy footer compat */
footer .container p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  text-align: center;
}

@media (max-width: 768px) {
  h2 { font-size: 1.9rem; }
  .video-hero__title { font-size: 2.2rem; }
  .container { padding: 0 1.25rem; }
  .content-section { padding: 3.5rem 0; }
  .hero .hero-content { padding: 1.5rem; }
  .hero .hero-content h1 { font-size: 2rem; }
  footer .footer-inner { flex-direction: column; }
  footer .footer-right { flex-direction: row; flex-wrap: wrap; gap: 1rem; }
  .contact-layout { grid-template-columns: 1fr; }
  .research-grid { grid-template-columns: 1fr; }
}
