:root {
  --crimson: #841617;
  --dark-crimson: #4e0002;
  --gray: #f0f0f0;
  --dark-gray: #323232;
  --tint: #f5ecec;
  --blue: #1f5fa8;
  --blue-light: #bcdceb;
  --pagefind-ui-primary: #841617;
  --pagefind-ui-text: #1f1a1a;
  --pagefind-ui-font: "Montserrat", Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Montserrat", Arial, sans-serif; color: var(--dark-gray); background: #fff; }
a { color: var(--dark-gray); text-decoration: none; }
a:hover { color: var(--crimson); }
.sr-only { position: absolute; left: -9999px; }

.site-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; padding: 20px 8%;
  max-width: 1440px; margin: 0 auto;
}
.logo {
  display: flex; align-items: center; justify-content: center;
  width: 104px; height: 104px; padding: 8px; border-radius: 50%;
  background: var(--crimson);
}
.logo img { width: 100%; height: 100%; object-fit: contain; }
.main-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 36px; font-weight: 600; font-size: 17px; }
.main-nav .home { display: flex; padding: 10px 0; }
.main-nav .active, .sub-nav .active { color: var(--crimson); border-bottom: 4px solid var(--crimson); }
.search { display: flex; align-items: center; width: 230px; height: 52px; padding: 0 16px; background: var(--gray); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; outline: none; }
.search button { display: flex; padding: 8px; border: 0; background: none; color: var(--crimson); cursor: pointer; }

.sub-nav { display: flex; justify-content: space-around; flex-wrap: wrap; background: var(--gray); padding: 0 4%; font-weight: 700; font-size: 20px; }
.sub-nav a { padding: 26px 24px; }
.sub-nav a:hover { background: #e3dfdb; }
.sub-nav .active { border-bottom: 4px solid var(--crimson); }

.hero {
  position: relative; height: 560px; display: flex; align-items: center;
  background: #3b1a1c; overflow: hidden;
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after { content: ""; position: absolute; inset: 0; background: rgba(59, 26, 28, 0.55); }
.hero h1 {
  position: relative; z-index: 1; margin: 0 auto; padding: 0 8%; width: 100%; max-width: 1440px; color: #fff;
  font-size: clamp(40px, 6vw, 88px); line-height: 1.1; font-weight: 700; letter-spacing: -1px; text-wrap: balance;
}

.intro { text-align: center; padding: 72px 8% 72px; }
.intro h2 { margin: 0 auto; max-width: 1000px; font-size: clamp(28px, 3.4vw, 46px); line-height: 1.25; font-weight: 700; }
.intro p { margin: 24px auto 0; max-width: 760px; font-size: 18px; line-height: 1.6; color: #4a4343; }

/* Subpages */
.content { max-width: 1100px; margin: 0 auto; padding: 64px 8% 80px; }
.content h2 { margin: 0 0 16px; font-size: clamp(26px, 3vw, 38px); font-weight: 700; }
.lead { margin: 0 0 32px; max-width: 760px; font-size: 18px; line-height: 1.6; color: #4a4343; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.card { padding: 28px; background: var(--gray); border-top: 4px solid var(--blue); }
.card h3 { margin: 0 0 12px; font-size: 20px; }
.card p { margin: 0; line-height: 1.6; color: #4a4343; }
.contact-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; }
.contact-info h3 { margin: 0 0 4px; }
.contact-info p { margin: 0 0 24px; color: #4a4343; }
@media (max-width: 700px) { .contact-layout { grid-template-columns: 1fr; } }

/* Home: intro extras and conferences */
.intro h3 { margin: 28px auto 0; max-width: 900px; font-size: clamp(20px, 2.2vw, 30px); font-weight: 700; }
.intro p { text-align: left; }
.more { display: inline-block; margin-top: 28px; font-weight: 700; color: var(--blue); }
.more:hover { text-decoration: underline; }
.conferences { padding: 40px 8% 96px; background: linear-gradient(to bottom, #fff 0, #fff 260px, var(--tint) 260px); }
.conferences h2 { margin: 0 0 48px; text-align: center; font-size: clamp(30px, 3.5vw, 44px); font-weight: 600; }
.conf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; max-width: 1100px; margin: 0 auto; }
.conf-card { background: #fff; }
.conf-card img { display: block; width: 100%; height: 240px; object-fit: cover; background: #d8d3ce; }
.conf-body { padding: 28px 32px 36px; }
.conf-body h3 { margin: 0 0 16px; font-size: 30px; font-weight: 700; }
.conf-body p { margin: 0 0 8px; font-size: 18px; color: #4a4343; }
/* Typography: serif display headings, Montserrat for everything else */
h1, h2, h3 { font-family: var(--font-display); }
.hero h1 { font-weight: 700; }
.conferences h2 { font-weight: 700; }
.conf-body p:nth-of-type(2) { color: var(--blue); font-weight: 600; }

/* Page title banners with photo */
.page-hero {
  position: relative; overflow: hidden; display: flex; align-items: center;
  height: 400px; background: #3b1a1c; border-bottom: 6px solid var(--blue-light);
}
.page-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero::after { content: ""; position: absolute; inset: 0; background: rgba(59, 26, 28, 0.6); }
.page-hero h1 {
  position: relative; z-index: 1; width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 8%;
  color: #fff; font-size: clamp(40px, 5.5vw, 72px); font-weight: 700;
}

/* Fade in on scroll (script.js adds .js to <html>, then .visible as items scroll into view) */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
.js .card-grid .reveal:nth-child(2), .js .conf-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.js .card-grid .reveal:nth-child(3), .js .conf-grid .reveal:nth-child(3) { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* Slow zoom on hero photos */
@keyframes slow-zoom { from { transform: scale(1); } to { transform: scale(1.1); } }
.hero-img { animation: slow-zoom 30s ease-out forwards; }
@media (prefers-reduced-motion: reduce) { .hero-img { animation: none; } }

/* About: alternating photo and text bands */
.about-intro { padding-bottom: 48px; }
.about-intro .lead { margin-bottom: 0; }
.about-band { padding: 56px 8%; }
.band-tint { background: var(--tint); }
.band-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; max-width: 1100px; margin: 0 auto; }
.band-inner img { display: block; width: 100%; height: 300px; object-fit: cover; background: #d8d3ce; }
.band-inner.reverse img { order: 2; }
.band-text h2 { margin: 0 0 16px; font-size: clamp(26px, 3vw, 36px); font-weight: 700; }
.band-text p { margin: 0 0 16px; font-size: 17px; line-height: 1.8; color: #4a4343; }
@media (max-width: 800px) {
  .band-inner { grid-template-columns: 1fr; gap: 28px; }
  .band-inner.reverse img { order: 0; }
}

/* Footer */
.site-footer { margin-top: 0; padding: 64px 8% 28px; background: var(--dark-gray); color: #e9dcdc; font-size: 15px; line-height: 1.6; }
.site-footer a { color: #e9dcdc; }
.site-footer a:hover { color: var(--blue-light); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 48px; max-width: 1100px; margin: 0 auto; }
.footer-grid h3 { margin: 0 0 16px; color: #fff; font-size: 20px; }
.footer-grid ul { margin: 0; padding: 0; list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-brand p { margin: 16px 0 0; max-width: 320px; }
.footer-logo { display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; padding: 6px; border-radius: 50%; background: var(--crimson); }
.footer-logo img { width: 100%; height: 100%; object-fit: contain; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px; max-width: 1100px; margin: 48px auto 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 14px; color: #bda9a9; }
.footer-bottom p { margin: 0; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Search page */
#search { min-height: 320px; }
.search-note { color: #4a4343; }

/* Clickable cards: the link stretches to cover the whole card */
.card-clickable { position: relative; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card-clickable a { font-weight: 600; color: var(--blue); }
.card-clickable a::after { content: ""; position: absolute; inset: 0; }
.card-clickable:hover, .card-clickable:focus-within { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12); }
.card-clickable a:focus-visible { outline: none; }
.card-clickable:focus-within { outline: 3px solid var(--blue-light); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .card-clickable { transition: none; } .card-clickable:hover, .card-clickable:focus-within { transform: none; } }

/* Keep the card hover lift working alongside the fade-in */
.js .reveal.card-clickable { transition: opacity 0.7s ease, transform 0.25s ease, box-shadow 0.25s ease; }
.js .card-clickable.visible:hover, .js .card-clickable.visible:focus-within { transform: translateY(-4px); transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) { .js .card-clickable.visible:hover, .js .card-clickable.visible:focus-within { transform: none; } }

/* Clickable conference cards (home page): keep the title dark, turn crimson on hover */
.conf-card.card-clickable a { color: var(--dark-gray); font-weight: inherit; }
.conf-card.card-clickable:hover a, .conf-card.card-clickable:focus-within a { color: var(--crimson); }

/* Card icons (social page) */
.card-icon { display: block; width: 56px; height: 56px; margin-bottom: 16px; }
.card-icon svg { display: block; width: 100%; height: 100%; }

/* Embedded Google Form */
.form-embed iframe { display: block; width: 100%; height: 760px; border: 0; background: #fff; }
.form-fallback { margin: 12px 0 0; font-size: 15px; color: #4a4343; }
.form-fallback a { color: var(--blue); font-weight: 600; }

/* Mobile menu (hamburger) */
.menu-toggle { display: none; position: relative; width: 48px; height: 48px; padding: 0; border: 2px solid var(--crimson); border-radius: 8px; background: #fff; cursor: pointer; }
.menu-toggle .bars { position: absolute; top: 50%; left: 50%; width: 22px; height: 3px; margin: -1.5px 0 0 -11px; background: var(--crimson); transition: background 0.2s; }
.menu-toggle .bars::before, .menu-toggle .bars::after { content: ""; position: absolute; left: 0; width: 22px; height: 3px; background: var(--crimson); transition: top 0.2s, transform 0.2s; }
.menu-toggle .bars::before { top: -7px; }
.menu-toggle .bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .bars::before { top: 0; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars::after { top: 0; transform: rotate(-45deg); }
.menu-toggle:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .logo { width: 80px; height: 80px; }
  .main-nav { width: 100%; flex-direction: column; align-items: stretch; gap: 0; font-size: 18px; }
  .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--gray); }
  .main-nav .home { align-items: center; }
  .main-nav .home::after { content: "Home"; margin-left: 10px; }
  .search { width: 100%; margin: 16px 0 8px; }
  .sub-nav { flex-direction: column; justify-content: flex-start; padding: 0 8%; font-size: 18px; }
  .sub-nav a { padding: 14px 0; border-bottom: 1px solid #cfc9c2; }
  /* Only collapse the menus when JavaScript is available to open them */
  .js .main-nav, .js .sub-nav { display: none; }
  body.menu-open .main-nav, body.menu-open .sub-nav { display: flex; }
}

/* New to MUN page */
.tint-wrap { background: var(--tint); }
.tint-wrap .card { background: #fff; }
.glossary { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 48px; margin: 0; }
.glossary > div { padding: 18px 0; border-bottom: 1px solid var(--gray); }
.glossary dt { margin-bottom: 4px; font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.glossary dd { margin: 0; line-height: 1.6; color: #4a4343; }
.faq-list { max-width: 820px; }
.faq { border-bottom: 1px solid #cfc9c2; }
.faq summary { position: relative; padding: 20px 44px 20px 0; font-size: 18px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 28px; font-weight: 400; color: var(--crimson); }
.faq[open] summary::after { content: "\2212"; }
.faq summary:hover { color: var(--crimson); }
.faq summary:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }
.faq p { margin: 0 0 22px; max-width: 720px; line-height: 1.7; color: #4a4343; }
.faq p a, .faq-more a { color: var(--blue); font-weight: 600; }
.faq-more { margin: 32px 0 0; }

/* Countries we've represented (home page map) */
.map-section { padding: 72px 8% 88px; text-align: center; }
.map-section h2 { margin: 0 0 16px; font-size: clamp(30px, 3.5vw, 44px); font-weight: 700; }
.map-section .lead { margin: 0 auto 32px; text-align: center; }
.map-wrap { position: relative; max-width: 1100px; margin: 0 auto; }
.map-wrap svg { display: block; width: 100%; height: auto; }
.map-wrap path { fill: var(--gray); stroke: #fff; stroke-width: 0.6; transition: fill 0.15s; }
.map-wrap path:hover { fill: var(--blue-light); }
.map-wrap path.visited { fill: var(--crimson); }
.map-wrap path.visited:hover { fill: #6a1112; }
.map-tip { position: absolute; z-index: 2; padding: 6px 10px; border-radius: 4px; background: #2b1416; color: #fff; font-size: 14px; font-weight: 600; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, -130%); transition: opacity 0.1s; }
.map-tip.show { opacity: 1; }
.map-count { margin: 28px 0 0; font-weight: 700; color: var(--crimson); }
.map-count:empty { display: none; }
.country-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 900px; margin: 16px auto 0; padding: 0; list-style: none; }
.country-list li { padding: 6px 14px; border-radius: 999px; background: var(--tint); font-size: 15px; font-weight: 600; }
.country-list:empty { display: none; }
.map-svg { aspect-ratio: 960 / 500; }
.map-note { padding-top: 40px; color: #4a4343; }

/* Executive team cards: photo with a bio that appears on hover, tap, or keyboard focus */
.officer { position: relative; padding: 0; overflow: hidden; background: #fff; border: 1px solid var(--gray); border-top: 4px solid var(--blue); }
.officer-photo { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #d8d3ce; }
.officer-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.officer .bio {
  position: absolute; inset: 0; display: flex; align-items: center; margin: 0; padding: 24px;
  background: rgba(132, 22, 23, 0.94); color: #fff; font-size: 15px; line-height: 1.6;
  opacity: 0; transform: translateY(12px); transition: opacity 0.25s ease, transform 0.25s ease;
}
.officer h3 { margin: 20px 24px 4px; font-size: 22px; }
.officer .role { margin: 0 24px 24px; font-weight: 600; color: var(--blue); }
@media (hover: hover) { .officer:hover .bio { opacity: 1; transform: none; } }
.officer:focus-visible { outline: 3px solid var(--blue-light); outline-offset: 2px; }
.officer:focus-visible .bio, .officer.open .bio { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .officer .bio { transition: none; transform: none; } }

/* Conference pages */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.conf-banner { position: relative; display: flex; align-items: flex-end; height: 190px; overflow: hidden; background: #3b1a1c; }
.conf-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.conf-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(59, 26, 28, 0.85), rgba(59, 26, 28, 0.3)); }
.conf-banner h2 { position: relative; z-index: 1; width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 8% 32px; color: #fff; font-size: clamp(30px, 4vw, 48px); font-weight: 700; }
.conf-main { padding-top: 48px; padding-bottom: 64px; }

.conf-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 0 0 32px; }
.conf-facts > div { padding: 18px 20px; background: var(--tint); border-left: 4px solid var(--blue); }
.tint-wrap .conf-facts > div { background: #fff; }
.conf-facts dt { margin-bottom: 4px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #6b6060; }
.conf-facts dd { margin: 0; font-size: 18px; font-weight: 600; }

.conf-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 40px; }
.btn { display: inline-block; padding: 14px 28px; border: 2px solid var(--crimson); border-radius: 4px; background: var(--crimson); color: #fff; font-size: 16px; font-weight: 700; }
.btn:hover { border-color: #6a1112; background: #6a1112; color: #fff; }
.btn-outline { background: transparent; color: var(--crimson); }
.btn-outline:hover { background: var(--crimson); color: #fff; }

.conf-sub { margin: 48px 0 16px; font-size: clamp(22px, 2.5vw, 28px); }
.card h4 { margin: 0 0 8px; font-family: var(--font-display); font-size: 18px; }

.schedule-wrap { overflow-x: auto; }
.schedule { width: 100%; border-collapse: collapse; background: #fff; }
.schedule th, .schedule td { padding: 14px 16px; border-bottom: 1px solid var(--gray); text-align: left; }
.schedule thead th { background: var(--crimson); color: #fff; font-weight: 600; }
.schedule td:first-child { width: 1%; font-weight: 600; white-space: nowrap; }

.venue-map iframe { display: block; width: 100%; height: 360px; border: 0; }
.map-box { display: flex; align-items: center; justify-content: center; min-height: 320px; padding: 24px; background: var(--gray); color: #4a4343; text-align: center; }
.directions, .back-top { font-weight: 600; color: var(--blue); }
.back-top { display: inline-block; margin-top: 32px; }
.conf-main .faq-list { max-width: 820px; }

/* --- Conferences dropdown (gray bar) --- */
.sub-nav .nav-dropdown { position: relative; }
.dropdown-toggle { display: flex; align-items: center; gap: 10px; padding: 26px 24px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.dropdown-toggle:hover { background: #e3dfdb; }
.dropdown-toggle:focus-visible { outline: 3px solid var(--blue-light); outline-offset: -3px; }
.caret { width: 0; height: 0; margin-top: 4px; border: 5px solid transparent; border-top-color: currentColor; transition: transform 0.2s; }
.nav-dropdown.open .caret { transform: rotate(180deg) translateY(4px); }
.dropdown-menu { position: absolute; top: 100%; left: 0; z-index: 20; display: none; min-width: 280px; margin: 0; padding: 0; list-style: none; background: #fff; border-top: 4px solid var(--crimson); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18); }
.nav-dropdown.open .dropdown-menu { display: block; }
@media (hover: hover) { .nav-dropdown:hover .dropdown-menu { display: block; } }
.dropdown-menu a { display: block; padding: 16px 24px; border-bottom: 1px solid var(--gray); font-size: 17px; font-weight: 600; }
.dropdown-menu li:last-child a { border-bottom: 0; }
.sub-nav .dropdown-menu .active { border-bottom: 1px solid var(--gray); background: var(--tint); }
.sub-nav .dropdown-menu li:last-child .active { border-bottom: 0; }

@media (max-width: 900px) {
  .sub-nav .nav-dropdown { width: 100%; }
  .dropdown-toggle { width: 100%; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid #cfc9c2; }
  .dropdown-menu { position: static; min-width: 0; border-top: 0; background: transparent; box-shadow: none; }
  .dropdown-menu a { padding: 12px 0 12px 16px; font-size: 16px; }
  .nav-dropdown:hover .dropdown-menu { display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }
}

/* Section headings on an individual conference page */
.content .conf-sub { margin: 56px 0 16px; font-size: clamp(22px, 2.5vw, 30px); }

/* Award history: uses the FAQ row style; this styles the table inside each year */
.awards-table { width: 100%; margin: 0 0 22px; border-collapse: collapse; }
.awards-table th, .awards-table td { padding: 12px 16px; border-bottom: 1px solid var(--gray); text-align: left; }
.awards-table thead th { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #6b6060; }
.awards-table td:first-child { font-weight: 600; }
.awards-section { padding-top: 0; }

/* Dropdown group labels (Hosted / Attended) */
.dropdown-label { padding: 12px 24px 6px; background: var(--tint); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #6b6060; }
@media (max-width: 900px) { .dropdown-label { padding: 12px 0 4px 16px; background: transparent; } }

/* Conferences We Attend page */
.attend-intro { padding-bottom: 24px; }
.attend-jump { margin: 0; font-weight: 600; }
.attend-jump a { color: var(--blue); }
.attend-section { padding-top: 56px; }
.attend-body { padding-bottom: 28px; }
.attend-sub { margin: 28px 0 10px; font-size: 20px; }
.attend-awards { margin: 0 0 8px; padding-left: 20px; line-height: 1.8; color: #4a4343; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.photo-grid figure { margin: 0; }
.photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #d8d3ce; }
.photo-grid figcaption { margin-top: 6px; font-size: 14px; color: #6b6060; }