/* =============================================================
   IBDW — International Breast Density & Cancer Risk Assessment Workshop
   Main Stylesheet
   ============================================================= */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ---- CSS Variables ---- */
:root {
  --pink:       #cc3366;
  --pink-dark:  #a8274f;
  --pink-light: #f5e0e8;
  --green:      #2d6b2d;
  --teal:       #4a9a9a;
  --teal-light: #e8f4f4;
  --dark:       #1a1a2e;
  --gray-900:   #111827;
  --gray-700:   #374151;
  --gray-500:   #6b7280;
  --gray-300:   #d1d5db;
  --gray-100:   #f3f4f6;
  --white:      #ffffff;
  --shadow-sm:  0 1px 3px rgba(0,0,0,.1);
  --shadow-md:  0 4px 16px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.15);
  --radius:     8px;
  --radius-lg:  16px;
  --transition: all 0.2s ease;
  --max-width:  1200px;
  --font-head:  'Montserrat', sans-serif;
  --font-body:  'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  /* Sticky-header offset so anchor jumps don't land focus underneath the header
     (WCAG 2.4.11 Focus Not Obscured). Header is 70px; 80px adds breathing room. */
  scroll-padding-top: 80px;
}

/* ---- Skip-to-content link (WCAG 2.4.1 Bypass Blocks) ----
   Visually hidden until keyboard-focused, then slides into view at top-left. */
.skip-link {
  position: absolute;
  top: -3rem;
  left: 0;
  z-index: 1000;
  background: var(--pink);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom-right-radius: var(--radius);
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid var(--white);
  outline-offset: -4px;
  color: var(--white);
}

/* Programmatically-focused <main> shouldn't show a focus ring */
main:focus { outline: none; }

body {
  font-family: var(--font-body);
  color: var(--gray-700);
  background: var(--white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--pink); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--pink-dark); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--gray-900);
  line-height: 1.2;
  font-weight: 700;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---- Layout Utilities ---- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section--alt {
  background: var(--gray-100);
}

.section--teal {
  background: var(--teal-light);
}

.section--dark {
  background: var(--dark);
  color: var(--white);
}

.section--dark h2,
.section--dark h3 { color: var(--white); }

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--gray-500);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 0.5rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--pink);
  color: var(--white);
  border-color: var(--pink);
}
.btn-primary:hover {
  background: var(--pink-dark);
  border-color: var(--pink-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--pink);
}

.btn-outline-pink {
  background: transparent;
  color: var(--pink);
  border-color: var(--pink);
}
.btn-outline-pink:hover {
  background: var(--pink);
  color: var(--white);
}

/* ---- Site Header / Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.site-logo__mark {
  height: 52px;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.site-logo__mark img {
  height: 100%;
  width: auto;
  display: block;
}

.site-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.site-logo__abbr {
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gray-900);
}

.site-logo__full {
  font-size: 0.65rem;
  color: var(--gray-500);
  max-width: 220px;
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav a {
  padding: 0.4rem 0.9rem;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  border-radius: var(--radius);
  transition: var(--transition);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--pink);
  background: var(--pink-light);
}

.nav-cta {
  margin-left: 0.75rem;
  background: var(--pink) !important;
  color: var(--white) !important;
  padding: 0.4rem 1rem !important;
}
.nav-cta:hover {
  background: var(--pink-dark) !important;
  color: var(--white) !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--gray-700);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  transition: var(--transition);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--dark);
}

.hero__bg {
  position: absolute;
  inset: 0;
  background-image: url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  opacity: 0.35;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  padding: 4rem 0;
}

.hero__workshop-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(204, 51, 102, 0.2);
  border: 1px solid rgba(204, 51, 102, 0.5);
  color: #f7adc4;
  padding: 0.35rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero h1 span {
  color: var(--pink);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem;
}

.hero__meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.hero__meta-item svg {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  flex-shrink: 0;
}

.hero__desc {
  color: rgba(255,255,255,0.75);
  font-size: 1.1rem;
  max-width: 580px;
  margin-bottom: 2.5rem;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---- Feature Cards ---- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--pink-light);
  transform: translateY(-2px);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  background: var(--pink-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-card__icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--pink);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--gray-500);
}

/* ---- Stats Bar ---- */
.stats-bar {
  background: var(--pink);
  color: var(--white);
  padding: 2.5rem 0;
}

.stats-bar .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  gap: 2rem;
}

.stat {
  text-align: center;
}

.stat__number {
  font-family: var(--font-head);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat__label {
  font-size: 0.85rem;
  opacity: 0.85;
  font-weight: 500;
}

/* ---- Testimonials ---- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--pink);
}

.testimonial-card__quote {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--gray-700);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.testimonial-card__quote::before { content: '\201C'; }
.testimonial-card__quote::after  { content: '\201D'; }

.testimonial-card__author strong {
  display: block;
  font-size: 0.9rem;
  font-family: var(--font-head);
  color: var(--gray-900);
}

.testimonial-card__author span {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* ---- Letter from Chairs ---- */
.chairs-letter {
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 3rem;
  max-width: 860px;
  margin: 0 auto;
}

.chairs-letter h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--pink);
}

.chairs-letter p {
  margin-bottom: 1.25rem;
  line-height: 1.9;
}

.chairs-letter__signatures {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-300);
}

.chair-sig {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chair-sig img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--pink-light);
}

.chair-sig__info strong {
  display: block;
  font-size: 0.9rem;
  font-family: var(--font-head);
  color: var(--gray-900);
}

.chair-sig__info span {
  font-size: 0.8rem;
  color: var(--gray-500);
}

/* ---- Past Workshops ---- */
.workshops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.workshop-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.workshop-card:hover {
  border-color: var(--pink);
  box-shadow: var(--shadow-sm);
}

.workshop-card__info strong {
  display: block;
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--gray-900);
}

.workshop-card__info span {
  font-size: 0.8rem;
  color: var(--gray-500);
}

.workshop-card__year {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--pink-light);
  flex-shrink: 0;
}

/* ---- Sponsors Page ---- */
.sponsor-tier {
  margin-bottom: 3rem;
}

.sponsor-tier h3 {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-500);
  font-weight: 700;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sponsor-tier h3::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-300);
}

.sponsors-logo-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem;
}

.sponsor-logo-wrap {
  flex: 0 0 auto;
}

.sponsor-logo-wrap.diamond img { max-height: 70px; }
.sponsor-logo-wrap.gold img    { max-height: 55px; }
.sponsor-logo-wrap.silver img  { max-height: 45px; }
.sponsor-logo-wrap.exhibitor img { max-height: 40px; }
.sponsor-logo-wrap.additional img { max-height: 60px; }

.sponsor-logo-wrap img {
  filter: grayscale(20%);
  opacity: 0.85;
  transition: var(--transition);
}

.sponsor-logo-wrap img:hover {
  filter: grayscale(0%);
  opacity: 1;
}

/* Dark backdrop for sponsors whose logo file is a white-on-transparent
   variant (e.g., the official UH Cancer Center "white" logo). Without
   this, the logo's white pixels are invisible against the section's
   white background. Triggered by `dark_bg: true` on a sponsor entry
   in _data/sponsors.yml. */
.sponsor-logo-wrap.dark-bg {
  background: var(--gray-900);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.sponsor-logo-wrap.dark-bg img,
.sponsor-logo-wrap.dark-bg img:hover {
  filter: none;
  opacity: 1;
}

/* ---- Committee Page ---- */
.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.member-card {
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  border: 1px solid var(--gray-300);
  transition: var(--transition);
}

.member-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--pink-light);
}

.member-card img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid var(--pink-light);
}

.member-card__name {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 0.25rem;
}

.member-card__title {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-bottom: 0.25rem;
}

.member-card__institution {
  font-size: 0.8rem;
  color: var(--teal);
  font-weight: 500;
}

/* ---- Contact ---- */
.contact-form {
  max-width: 680px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--gray-900);
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  /* WCAG 1.4.11 Non-text Contrast — keep a visible 2px outline (contrast >7:1
     against white) instead of hiding it behind a low-alpha box-shadow. */
  outline: 2px solid var(--pink);
  outline-offset: 2px;
  border-color: var(--pink);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

/* ---- Mailing List Banner ---- */
.mailing-list {
  background: linear-gradient(135deg, var(--pink) 0%, var(--pink-dark) 100%);
  color: var(--white);
  padding: 4rem 0;
  text-align: center;
}

.mailing-list h2 {
  color: var(--white);
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.mailing-list p {
  opacity: 0.9;
  margin-bottom: 1.75rem;
  font-size: 1.05rem;
}

.mailing-list-form {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 480px;
  margin: 0 auto;
}

.mailing-list-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  border: none;
  font-size: 0.95rem;
  color: var(--gray-900);
}

.mailing-list-form input[type="email"]:focus {
  outline: 2px solid white;
}

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  background: var(--dark);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--pink), var(--teal));
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
}

.page-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1.05rem;
  max-width: 560px;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 1.5rem;
}

.site-footer .container {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 1.5rem;
}

.footer-brand p {
  font-size: 0.875rem;
  margin-top: 1rem;
  line-height: 1.8;
}

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-head);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--pink);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

.footer-bottom a {
  color: rgba(255,255,255,0.4);
}
.footer-bottom a:hover { color: var(--pink); }

/* ---- Announcement Banner ---- */
.announcement {
  background: var(--pink-light);
  border-bottom: 2px solid var(--pink);
  padding: 0.65rem 0;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--pink-dark);
}

.announcement a { color: var(--pink-dark); font-weight: 700; text-decoration: underline; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .site-nav { display: none; flex-direction: column; position: absolute; top: 70px; left: 0; right: 0; background: var(--white); padding: 1rem; border-bottom: 1px solid var(--gray-300); box-shadow: var(--shadow-md); }
  .site-nav.open { display: flex; }
  .site-header .container { position: relative; }
  .nav-toggle { display: block; }
  .hero { min-height: 100svh; }
  .hero h1 { font-size: 2rem; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { text-align: center; justify-content: center; }
  .site-footer .container { grid-template-columns: 1fr; gap: 2rem; }
  .chairs-letter { padding: 1.75rem; }
  .stats-bar .container { justify-content: center; }
  .mailing-list-form { flex-direction: column; }
  .mailing-list-form input[type="email"] { width: 100%; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .section { padding: 3rem 0; }
  .features-grid { grid-template-columns: 1fr; }
  .committee-grid { grid-template-columns: repeat(2, 1fr); }
}
