/* ===== Skip Link ===== */
.skip-link {
  position: absolute; left: -9999px; top: auto;
  width: 1px; height: 1px; overflow: hidden;
  z-index: 999; padding: 0.5rem 1rem;
  background: #27348b; color: #fff; font-weight: 600;
  text-decoration: none; border-radius: 0 0 4px 0;
}
.skip-link:focus {
  position: fixed; left: 0; top: 0;
  width: auto; height: auto; overflow: visible;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-y: scroll; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #333; line-height: 1.7; background: #fff;
}
a { color: #27348b; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ===== Header ===== */
.site-header {
  background: transparent; border-bottom: 1px solid transparent;
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.site-header.scrolled {
  background: #8ed1fc;
  border-bottom: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 1.5rem;
}
.site-logo img { height: 48px; }
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a {
  color: #27348b; font-weight: 600; font-size: 0.95rem;
  padding: 0.4rem 0; border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}
.site-nav a:hover, .site-nav a.active {
  border-bottom-color: #8ed1fc; text-decoration: none;
}
.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.mobile-menu-toggle:focus-visible { outline: 2px solid #27348b; outline-offset: 2px; border-radius: 4px; }
.mobile-menu-toggle span {
  display: block; width: 24px; height: 3px; background: #27348b;
  margin: 4px 0; border-radius: 2px; transition: 0.3s;
}

/* ===== Hero ===== */
.hero {
  background: #8ed1fc; text-align: center;
  padding: 80px 35px 40px;
  box-shadow: 0 5px 5px 0 rgba(18,63,82,0.04);
}
.hero-inner { max-width: 1000px; margin: 0 auto; }
.hero-banner {
  display: flex; align-items: center; justify-content: center; gap: 2rem;
}
.hero-tree { height: 260px; width: auto; }
.hero-tree-left, .hero-tree-right { flex-shrink: 0; }
.hero-text { text-align: center; }
.hero h1 {
  color: #27348b; font-size: 70px; font-weight: 800;
  line-height: 1em; margin-bottom: 12px;
}
.hero-subtitle {
  color: #27348b; font-size: 1.3rem; font-weight: 400;
  line-height: 1.2em;
}
.hero-subtitle strong { font-weight: 700; }

/* ===== Content ===== */
.page-content { padding: 3rem 1.5rem; }
.no-hero .page-content { padding-top: 5rem; }
.content-inner { max-width: 900px; margin: 0 auto; }
.content-inner h2 {
  color: #27348b; font-size: 1.8rem; margin: 2.5rem 0 1rem;
  border-bottom: 2px solid #8ed1fc; padding-bottom: 0.4rem;
}
.content-inner h3 { color: #27348b; font-size: 1.4rem; margin: 2rem 0 0.8rem; }
.content-inner h4 { color: #27348b; font-size: 1.2rem; margin: 1.8rem 0 0.6rem; text-align: center; }
.content-inner p { margin-bottom: 1rem; text-align: justify; }
.content-inner ul, .content-inner ol { margin: 0.5rem 0 1rem 1.5rem; }
.content-inner li { margin-bottom: 0.3rem; }
.content-inner blockquote {
  border-left: 4px solid #8ed1fc; padding: 1rem 1.5rem;
  background: #f0f8ff; margin: 1.5rem 0; font-style: italic;
}
.content-inner hr { border: none; border-top: 2px solid #e8e8e8; margin: 2rem 0; }
.content-inner table {
  width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem;
  font-size: 0.9rem;
}
.content-inner th, .content-inner td {
  border: 1px solid #ddd; padding: 0.5rem 0.75rem; text-align: left;
}
.content-inner th { background: #27348b; color: #fff; }

/* ===== Mailing List Form ===== */
/* Formsubmit.co handles form submissions */
.form-placeholder {
  background: #f8fbff; border: 1px solid #ddd; border-radius: 8px;
  padding: 1.5rem 2rem; margin: 1.5rem 0; text-align: center;
}
.form-placeholder .form-row {
  display: flex; gap: 0.75rem; justify-content: center;
  flex-wrap: wrap; margin: 0.75rem 0;
}
.form-placeholder input {
  padding: 0.5rem 0.8rem; border: 1px solid #ccc; border-radius: 4px;
  font-size: 0.9rem; flex: 1; min-width: 150px;
}
.form-placeholder input:focus {
  outline: 2px solid #27348b; outline-offset: 1px; border-color: #27348b;
}
.form-placeholder button:focus, .btn:focus {
  outline: 2px solid #8ed1fc; outline-offset: 2px;
}
.form-placeholder button, .btn {
  background: #27348b; color: #fff; border: none; border-radius: 4px;
  padding: 0.5rem 1.2rem; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s; display: inline-block;
}
.form-placeholder button:hover, .btn:hover { background: #1a2460; text-decoration: none; }

/* ===== Accordion / Details ===== */
details {
  border: 1px solid #ddd; border-radius: 6px; margin: 0.8rem 0;
  background: #fafafa;
}
details[open] { background: #fff; }
.content-inner details p { text-align: justify; text-indent: 0; }
.content-inner details blockquote {
  border-left: none; background: none; font-style: italic;
  margin: 0.5rem 0; padding: 0.5rem 2rem; text-align: justify;
}
.content-inner details blockquote p {
  text-align: justify; text-indent: 0; margin-bottom: 0.5rem;
}
details summary {
  padding: 0.8rem 1.2rem; cursor: pointer; font-weight: 700;
  color: #27348b; list-style: none; display: flex; align-items: center;
  justify-content: space-between;
}
details summary::before { display: none; }
details summary::after { display: none; }
details summary::-webkit-details-marker { display: none; }
details > *:not(summary):not(br) {
  display: block;
  padding: 0.5rem 2rem 0.5rem;
  text-align: justify;
  animation: accordionOpen 0.8s ease forwards;
}
details > br { display: none; }
details[open] { }
@keyframes accordionOpen {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Fade in details as they scroll into view (handbook only) */
.handbook-page details {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.handbook-page details.visible {
  opacity: 1; transform: translateY(0);
}
details code {
  background: #e8f0fe; padding: 0.15rem 0.4rem; border-radius: 3px;
  font-size: 0.95em; color: #27348b;
}
.content-inner details h4 {
  color: #333; font-size: 0.95rem; font-weight: 700;
  margin: 0 0 0; border: none; text-align: left;
  padding: 0.8rem 2rem 0 !important; font-style: normal;
}
.examples-link {
  font-size: 0.95rem; font-weight: 700; font-style: italic;
  text-decoration: underline;
}

/* ===== Handbook Floating TOC (hover to reveal) ===== */
.handbook-nav {
  position: fixed; top: 0; z-index: 90;
  left: calc(50% - 450px - 44px);
  width: 36px;
  transition: width 0.25s ease;
  visibility: hidden;
}
.handbook-nav:hover { width: 240px; }
.handbook-nav-inner {
  background: #1e1e1e; border-radius: 10px;
  padding: 6px 0; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  max-height: 70vh; overflow-y: auto; scrollbar-width: thin;
  scrollbar-color: #555 transparent;
  box-shadow: 2px 0 16px rgba(0,0,0,0.25);
}
.handbook-nav:hover .handbook-nav-inner {
  opacity: 1; pointer-events: auto; padding: 12px 14px;
}
/* Visible tab trigger */
.handbook-nav::before {
  content: '☰'; position: absolute; top: 0; left: 0;
  width: 36px; height: 36px;
  background: #27348b; color: #fff;
  font-size: 1.1rem; line-height: 36px; text-align: center;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: opacity 0.25s;
  cursor: pointer;
}
.handbook-nav:hover::before { opacity: 0; width: 0; }
/* On narrow screens where there's no gutter, fall back to left edge */
@media (max-width: 1080px) {
  .handbook-nav { left: 8px; }
}
.handbook-nav-title {
  color: #8ed1fc; font-size: 0.85rem; font-weight: 700;
  padding: 0 4px 6px; margin: 0; border-bottom: 1px solid #333;
  white-space: nowrap;
}
.handbook-nav ul { list-style: none; margin: 0; padding: 4px 0 0; }
.handbook-nav li { margin: 0; }
.handbook-nav a {
  display: block; padding: 3px 6px; font-size: 0.82rem;
  color: #aaa; text-decoration: none; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  transition: color 0.15s; border-radius: 3px; line-height: 1.4;
}
.handbook-nav a:hover { color: #fff; background: #333; text-decoration: none; }
.handbook-nav a.active { color: #8ed1fc; font-weight: 600; }
.handbook-nav a.nav-heading { font-weight: 600; color: #ddd; padding-top: 5px; }
.handbook-nav a.nav-subheading { padding-left: 14px; }
.handbook-nav a.nav-commitment-group {
  font-weight: 600; color: #ddd; padding-top: 6px; margin-top: 3px;
  border-top: 1px solid #333;
}
.handbook-nav a.nav-section { padding-left: 14px; }

/* ===== Organizer Cards ===== */
.organizer-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1.5rem; margin: 2rem auto; max-width: 850px;
}
.organizer-card { text-align: center; flex: 0 0 150px; }
.organizer-card img {
  width: 150px; height: 150px; object-fit: cover;
  border-radius: 16px; margin-bottom: 0.8rem;
}
.organizer-card h5 { color: #27348b; margin-bottom: 0.2rem; font-size: 1rem; }
.organizer-card .org-inst { font-weight: 700; font-size: 0.9rem; color: #555; text-align: center; }
.organizer-card p { text-align: center; }

/* ===== Workshop Image Cards ===== */
.workshop-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 2rem 0; }
.workshop-card {
  position: relative; border-radius: 12px; overflow: hidden;
  aspect-ratio: 16/8;
}
.workshop-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.3s;
}
.workshop-card:hover img { transform: scale(1.03); }
.workshop-card .card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 30%, rgba(0,0,0,0.6));
  display: flex; align-items: flex-end; justify-content: flex-end;
  padding: 1.5rem;
}
.workshop-card .card-overlay h2 {
  color: #fff; font-size: 2rem; border: none; padding: 0; margin: 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

/* ===== Verified Labs List ===== */
.verified-labs { list-style: none; padding: 0; margin: 1.5rem 0; columns: 2; column-gap: 2rem; }
.verified-labs li {
  padding: 0.6rem 0; border-bottom: 1px solid #eee;
  font-size: 1.05rem;
}
.verified-labs li::before {
  content: '\2714'; color: #27348b; font-weight: bold; margin-right: 0.6rem;
}

/* ===== Attendee Columns ===== */
.attendee-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 2rem 0; }
.attendee-columns h4 { text-align: left; }
.attendee-columns ul { margin-left: 1rem; }

/* ===== Activity Photos ===== */
.activity-photos {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1rem; margin: 2rem 0;
}
.activity-photos img { border-radius: 8px; width: 100%; aspect-ratio: 1; object-fit: cover; }

/* ===== Footer ===== */
.site-footer {
  background: #27348b; color: #fff; text-align: center;
  padding: 2.5rem 1.5rem;
}
.footer-logo { height: 40px; margin-bottom: 1rem; filter: brightness(2); }
.site-footer p { color: rgba(255,255,255,0.8); font-size: 0.9rem; margin-bottom: 0.5rem; }
.footer-links a { color: #8ed1fc; }

/* ===== Workshop Detail Images ===== */
.workshop-hero-img {
  width: 100%; border-radius: 12px; margin: 1.5rem 0;
}
.pineda-img {
  width: 100%; max-height: 500px; object-fit: cover;
  border-radius: 12px; margin: 1.5rem 0;
}
.funding-logo { max-width: 250px; margin: 1rem 0; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .handbook-nav { display: none; }
}
@media (max-width: 768px) {
  .mobile-menu-toggle { display: block; }
  .site-nav {
    display: none; flex-direction: column; position: absolute;
    top: 100%; left: 0; right: 0; background: #fff;
    padding: 1rem 1.5rem; border-bottom: 3px solid #8ed1fc;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  .site-nav.open { display: flex; }
  .hero h1 { font-size: 50px; }
  .hero { padding: 60px 20px 30px; }
  .hero-tree { height: 180px; }
  .hero-tree-right { display: none; }
  .workshop-cards { grid-template-columns: 1fr; }
  .attendee-columns { grid-template-columns: 1fr; }
  .organizer-card { flex: 0 0 130px; }
  .activity-photos { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .hero h1 { font-size: 36px; }
  .hero-tree { height: 140px; }
  .organizer-card { flex: 0 0 130px; }
  .activity-photos { grid-template-columns: 1fr; }
  .content-inner p { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
