/* ===== Base ===== */
html, body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: #222;
  background: #fff;
  line-height: 1.5;
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px;
}

/* ===== Header & Nav (dark, compact, big logo) ===== */
.header {
  background: #444;                 /* dark gray bar */
  border-bottom: 1px solid #222;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 0;                   /* (2) shorter bar: less top/bottom padding */
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;                      /* title readable on dark */
  font-weight: 700;
  font-size: 20px;
}

/* (1) Force large logo height regardless of inline styles */
.logo img {
  height: 130px !important;         /* big logo in the bar */
  width: auto;
  border-radius: 6px;
}

.logo span { color: #fff; }

.nav {
  margin-left: auto;
  display: flex;
  gap: 18px;
}

.nav a {
  text-decoration: none;
  color: #f1f1f1;                   /* light links on dark */
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.nav a.active,
.nav a:hover {
  background: #666;                 /* hover contrast */
  color: #fff;
}

/* Hamburger button for small screens */
.hamburger {
  display: none;
  background: transparent;
  border: 0;
  padding: 6px 8px;
  margin-left: auto;
  cursor: pointer;
  border-radius: 8px;
}

.hamburger:focus {
  outline: 2px solid #ccc;
  outline-offset: 2px;
}

.hamburger .bar {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: #fff;                 /* visible on dark header */
}

/* ===== Typography & Blocks ===== */
h1 { font-size: 36px; margin: 16px 0 8px; }
h2 { font-size: 22px; margin: 20px 0 10px; color: #444; }
h3 { font-size: 18px; margin: 16px 0 8px; color: #555; }

.hero { text-align: center; padding: 24px 0; }
.hero img { max-width: 360px; height: auto; border-radius: 8px; }

.card {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.footer {
  color: #777;
  font-size: 14px;
  padding: 24px 0;
  border-top: 1px solid #eee;
  text-align: center;
}

.lead { font-size: 18px; line-height: 1.6; }
.small { font-size: 14px; color: #666; }
.caption { font-size: 13px; color: #666; text-align: center; margin-top: 8px; }
.note { background: #fafafa; border: 1px solid #eee; padding: 12px 14px; border-radius: 8px; }

/* ===== Generic Grid (keeps multi-column where used) ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

/* Tablets keep 2 columns generically */
@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  /* Allow mild horizontal scroll for long menus on mid widths */
  .nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
}

/* Phones default to single column generically */
@media (max-width: 720px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

/* ===== Speakers-specific layout (CSS-only targeting) =====
   The speakers section on Home has a .grid whose .card items each contain
   an <img> and text paragraphs. We target that grid using :has()
   so other grids remain unaffected.
*/
.grid:has(.card img[alt*="Dr."]) {
  grid-template-columns: 1fr;       /* (3) one speaker per row */
}

/* Inside those speaker cards, place photo left and bio right */
.grid:has(.card img[alt*="Dr."]) .card img {
  float: left;                      /* image left */
  width: 220px;                     /* nice portrait width */
  max-width: 40%;
  height: auto;
  margin: 0 16px 8px 0;             /* space to the right/bottom */
}

.grid:has(.card img[alt*="Dr."]) .card p {
  margin-top: 0;
}

/* Clear float at the end of each speaker card */
.grid:has(.card img[alt*="Dr."]) .card::after {
  content: "";
  display: block;
  clear: both;
}

/* On phones, stack image above text for readability */
@media (max-width: 720px) {
  .grid:has(.card img[alt*="Dr."]) .card img {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0 0 12px 0;
  }
}

/* ===== Responsive Navigation (collapse to hamburger) ===== */
@media (max-width: 720px) {
  .nav {
    display: none;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    margin: 10px 0 0 0;
  }
  .nav.open { display: flex; }
  .hamburger { display: block; }
  .logo { margin-right: auto; }

  .nav a {
    background: #555;
    border: 1px solid #333;
    padding: 10px 12px;
  }
  .nav a:hover {
    background: #777;
  }
}


/* ===== End of File ===== */

