/* Electrophysiology Research Foundation - v5
   Slider uses real <img> tags – never upscales images
*/

:root {
  --navy: #0a2a4a;
  --blue: #1a5276;
  --accent: #3498db;
  --text: #2c3e50;
  --light-text: #5d6d7e;
  --bg: #f8f9fa;
  --white: #ffffff;
  --border: #e0e6ed;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  line-height: 1.65;
  background: var(--bg);
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }
strong, b { font-weight: 700; }

/* Header */
.site-header {
  background: var(--navy);
  color: white;
  padding: 0.7rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo-wrap img {
  height: 42px;
  width: auto;
}
.logo-text {
  font-size: 1.15rem;
  font-weight: 700;
  color: white;
  line-height: 1.25;
}
.logo-text span {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  opacity: 0.9;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 1.05rem;
  flex-wrap: wrap;
}
nav a {
  color: rgba(255,255,255,0.9);
  font-size: 0.9rem;
  font-weight: 500;
}
nav a:hover, nav a.active {
  color: white;
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
}

/* ===== SLIDER – natural size, never upscales ===== */
.hero {
  position: relative;
  width: 100%;
  background: var(--navy);
  overflow: hidden;
}

.slider {
  position: relative;
  width: 100%;
}

.slide {
  display: none;
  position: relative;
  width: 100%;
  text-align: center;
  background: var(--navy);
}
.slide.active {
  display: block;
}

.slide img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  /* never forces the image larger than its natural pixels */
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,42,74,0.55), rgba(26,82,118,0.35));
  pointer-events: none;
}

.slide-content {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 820px;
  padding: 1.2rem;
  width: 90%;
}
.slide-content h2 {
  font-size: 1.9rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.slide-content p {
  font-size: 1.05rem;
  opacity: 0.95;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.slider-nav {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}
.slider-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none;
  cursor: pointer;
}
.slider-dot.active { background: white; }

/* Main content */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2.4rem 1.4rem;
}
.page-title {
  color: var(--navy);
  font-size: 1.85rem;
  margin-bottom: 1.4rem;
  padding-bottom: 0.55rem;
  border-bottom: 3px solid var(--accent);
}
.section { margin-bottom: 2.3rem; }
.section h2 {
  color: var(--blue);
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}
.section h3 {
  color: var(--navy);
  font-size: 1.12rem;
  margin: 1.1rem 0 0.45rem;
}
.section p { margin-bottom: 0.95rem; color: var(--text); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.3rem;
  margin-top: 1.3rem;
}
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.3rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.card h3 {
  color: var(--blue);
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}
.card p {
  font-size: 0.94rem;
  color: var(--light-text);
  margin-bottom: 0.7rem;
}
.card a { font-weight: 600; font-size: 0.9rem; }

.sponsor-card, .trustee-card, .pub-card {
  background: white;
  border-left: 4px solid var(--accent);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.sponsor-card h3, .trustee-card h3, .pub-card h3 { color: var(--navy); margin-bottom: 0.4rem; }
.sponsor-card p, .trustee-card p, .pub-card p { font-size: 0.95rem; color: var(--light-text); margin-bottom: 0.4rem; }

.director-highlight {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  align-items: flex-start;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.director-highlight img {
  width: 150px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.director-highlight h3 {
  color: var(--navy);
  margin-bottom: 0.35rem;
  font-size: 1.25rem;
}
.director-highlight .creds {
  font-size: 0.95rem;
  color: var(--light-text);
  margin-bottom: 0.8rem;
}

.bio-header, .trustee-header {
  display: flex;
  gap: 1.8rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.bio-photo img, .trustee-photo img {
  width: 160px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  border: 3px solid white;
}
.bio-credentials, .trustee-meta {
  background: white;
  border: 1px solid var(--border);
  padding: 1.15rem 1.4rem;
  border-radius: 6px;
  flex: 1;
  min-width: 240px;
}
.bio-credentials ul, .trustee-meta ul {
  list-style: none;
  margin-top: 0.5rem;
}
.bio-credentials li, .trustee-meta li {
  padding: 0.2rem 0;
  font-size: 0.94rem;
  color: var(--light-text);
}
.bio-credentials li::before, .trustee-meta li::before {
  content: "• ";
  color: var(--accent);
  font-weight: bold;
}

.trustee-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 2rem;
}
.trustee-jump a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: white;
  border: 1px solid var(--border);
  padding: 0.45rem 0.8rem;
  border-radius: 5px;
  font-size: 0.9rem;
  color: var(--blue);
  font-weight: 500;
}
.trustee-jump a:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}
.trustee-jump img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.trustee-section {
  scroll-margin-top: 80px;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

/* History images */
.history-images {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1.5rem 0;
  justify-content: center;
}
.history-images img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Research gallery – one image per row, never upscaled */
.research-gallery {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.2rem;
}
.research-gallery figure {
  margin: 0;
  text-align: center;
}
.research-gallery img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.research-gallery figcaption {
  font-size: 0.88rem;
  color: var(--light-text);
  margin-top: 0.4rem;
}

.doc-list, .pub-list { list-style: none; margin-top: 0.9rem; }
.doc-list li, .pub-list li {
  margin-bottom: 0.6rem;
  padding: 0.65rem 1rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 5px;
}
.doc-list a, .pub-list a { font-weight: 500; color: var(--blue); }

.contact-bar {
  background: var(--navy);
  color: white;
  padding: 1.4rem;
  border-radius: 6px;
  margin-top: 2.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.8rem;
  justify-content: space-between;
}
.contact-bar h3 { color: white; margin-bottom: 0.3rem; font-size: 1.05rem; }
.contact-bar p { margin: 0.15rem 0; font-size: 0.94rem; opacity: 0.95; }
.contact-bar a { color: #a8d5f0; }

.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.85);
  padding: 1.6rem 0;
  margin-top: 2.8rem;
  font-size: 0.88rem;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.4rem;
  text-align: center;
}

.objectives {
  background: white;
  border: 1px solid var(--border);
  padding: 1.4rem 1.6rem;
  border-radius: 6px;
}
.objectives ol { padding-left: 1.25rem; }
.objectives li { margin-bottom: 0.7rem; color: var(--text); }

.trial-list { list-style: none; }
.trial-list li {
  background: white;
  border: 1px solid var(--border);
  padding: 0.8rem 1.1rem;
  margin-bottom: 0.55rem;
  border-radius: 5px;
  font-size: 0.94rem;
  color: var(--light-text);
}
.trial-list strong { color: var(--navy); }

@media (max-width: 700px) {
  .slide-content h2 { font-size: 1.35rem; }
  .slide-content p { font-size: 0.95rem; }
  .header-inner { flex-direction: column; align-items: flex-start; }
  nav ul { gap: 0.75rem; }
  .page-title { font-size: 1.5rem; }
  .director-highlight img, .bio-photo img, .trustee-photo img { width: 130px; }
}
