/* ==========================================================================
   Perspectives in AML: Expert Insights Series — shared stylesheet
   Brand colors: purple #a871ff, deep purple #26125d, red #990015
   Typeface: Lato (Google Fonts)
   ========================================================================== */

:root {
  --purple: #a871ff;
  --purple-dark: #26125d;
  --red: #990015;
  --text: #000000;
  --white: #ffffff;
  --card-bg: #ffffff;
  --panel-radius: 28px;
  --blob-radius: 32px 32px 6px 32px;
  --shadow-soft: 0 10px 28px rgba(38, 18, 93, 0.18);
  --shadow-strong: 0 24px 60px rgba(19, 8, 48, 0.4);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Lato', Arial, Helvetica, sans-serif;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

button {
  font-family: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}

/* ==========================================================================
   Login page (index.html)
   ========================================================================== */

.login-page {
  min-height: 100vh;
  background-image: url('../img/index-background.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--purple-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
}

.login-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 44px;
  justify-content: center;
  max-width: 980px;
  width: 100%;
}

.login-card {
  flex: 1 1 380px;
  max-width: 430px;
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  /* top-left | top-right | bottom-right | bottom-left — bottom-right is the
     pronounced "blob" corner in the design, the other three stay modest */
  border-radius: 28px 28px 96px 28px;
  padding: 38px 36px;
  color: var(--white);
  box-shadow: var(--shadow-strong);
}

.login-card .card-logo {
  width: 313px;
  max-width: 100%;
  height: auto;
  margin-bottom: 28px;
}

.login-card h2 {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin: 0 0 16px;
}

.login-form input[type="email"] {
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 18px;
  font-family: inherit;
}

.login-form input[type="email"]::placeholder {
  color: #777;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.75rem;
  line-height: 1.45;
  margin-bottom: 26px;
}

.consent input {
  margin-top: 3px;
  flex: 0 0 auto;
}

.submit-btn {
  background: var(--purple);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 13px 22px;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.submit-btn:hover {
  background: var(--white);
  color: var(--purple);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.92);
  background: var(--purple);
  color: var(--white);
  padding: 28px 36px;
  border-radius: 20px;
  text-align: center;
  max-width: 380px;
  width: calc(100% - 48px);
  box-shadow: var(--shadow-strong);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 500;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.toast h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 900;
}

.toast p {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 400;
}

@media (max-width: 560px) {
  .login-card {
    padding: 30px 24px;
  }
}

/* ==========================================================================
   Facilitator hosting pages
   ========================================================================== */

.site-header {
  position: relative;
  background-image: url('../img/mainpage-banner.png');
  background-size: cover;
  background-position: center;
  background-color: var(--purple-dark);
  color: var(--white);
  padding: 24px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  min-height: 120px;
}

.site-header .header-logo {
  height: 56px;
  width: auto;
}

.lang-toggle {
  background: rgba(255, 255, 255, 0.12);
  border: 2px solid var(--white);
  color: var(--white);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 8px;
  font-weight: 900;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  transition: background 0.15s ease;
  flex: 0 0 auto;
}

.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.28);
}

main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 48px 20px;
}

.intro h2 {
  color: var(--purple);
  font-size: 1.35rem;
  margin: 0 0 14px;
}

.intro > p:first-of-type {
  margin-top: 0;
  max-width: 74ch;
}

.intro h3 {
  color: var(--purple-dark);
  font-size: 1.05rem;
  margin: 28px 0 10px;
}

.intro ul {
  margin: 0 0 8px 22px;
  padding: 0;
}

.intro li {
  margin-bottom: 6px;
}

.committee-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 16px;
}

.committee-member {
  width: 132px;
  text-align: center;
}

.committee-member img {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  margin: 0 auto 8px;
}

.committee-member .name {
  color: var(--purple);
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0;
}

.committee-member .role {
  font-size: 0.75rem;
  color: #2b2b2b;
  margin: 3px 0 0;
}

.committee-member .chair {
  color: var(--red);
  font-weight: 900;
}

hr.section-rule {
  border: none;
  border-top: 1px solid #e2ddec;
  margin: 34px 0;
}

.steps {
  display: flex;
  flex-wrap: wrap;
  gap: 30px 48px;
  margin-bottom: 40px;
}

.step {
  flex: 1 1 380px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  cursor: pointer;
  border-radius: 14px;
  padding: 14px;
  margin: -14px;
  transition: background 0.15s ease;
}

.step:hover,
.step:focus-visible {
  background: #f6f1ff;
}

.step-number {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #e4e4e4;
  color: #333;
  font-weight: 900;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-body p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  max-width: 46ch;
}

.step-btn {
  display: inline-block;
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  margin-bottom: 10px;
  cursor: pointer;
}

.step-btn.guide-btn {
  background: var(--purple-dark);
}

.step-btn.ppt-btn {
  background: var(--red);
}

.video-group {
  border-radius: var(--panel-radius);
  padding: 30px;
  margin-bottom: 34px;
}

.video-group.patient-cases {
  background: linear-gradient(135deg, #c299ff 0%, var(--purple) 100%);
}

.video-group.clinical-questions {
  background: var(--purple-dark);
}

.video-group h3 {
  color: var(--white);
  font-size: 1.15rem;
  margin: 0 0 20px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
  gap: 22px;
}

.video-tile {
  display: flex;
  flex-direction: column;
}

.video-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  cursor: pointer;
  border: none;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.video-card:hover,
.video-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2);
}

.card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.card-text {
  flex: 1 1 auto;
  min-width: 0;
}

.video-card h4 {
  color: var(--purple);
  font-size: 0.95rem;
  margin: 0 0 8px;
  line-height: 1.35;
}

.video-card .speaker {
  font-weight: 700;
  font-size: 0.82rem;
  margin: 0 0 8px;
}

.video-card .description {
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0;
  color: #1a1a1a;
}

.card-media {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.play-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(168, 113, 255, 0.15);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  cursor: pointer;
  flex: 0 0 auto;
}

.play-btn svg {
  width: 18px;
  height: 18px;
  margin-left: 2px;
}

.card-media .duration {
  font-size: 0.7rem;
  color: #666;
  white-space: nowrap;
  text-align: center;
}

.video-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-right: 4px;
}

.add-ppt-btn {
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  cursor: pointer;
  color: var(--white);
  background: var(--purple-dark);
  transition: background 0.15s ease;
  white-space: nowrap;
}

.video-group.clinical-questions .add-ppt-btn {
  background: var(--purple);
}

.add-ppt-btn.added,
.video-group.clinical-questions .add-ppt-btn.added {
  background: var(--red);
}

/* ==========================================================================
   Video modal
   ========================================================================== */

.video-modal {
  position: fixed;
  inset: 0;
  background: #f2f0f3;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.video-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-inner {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 1400px;
  z-index: 1;
}

.modal-close {
  position: fixed;
  top: 22px;
  right: 28px;
  background: none;
  border: none;
  color: var(--purple-dark);
  font-size: 2.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  z-index: 3;
}

.modal-nav {
  flex: 0 0 auto;
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  border: none;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.8rem;
  color: var(--purple-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

.modal-video-wrap {
  aspect-ratio: 16 / 9;
  background: #9c9c9c;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-video-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  color: #333;
  font-size: 2.1rem;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.modal-footer .add-ppt-btn {
  padding: 11px 20px;
  font-size: 0.78rem;
  background: var(--purple-dark);
}

.modal-footer .add-ppt-btn.added {
  background: var(--red);
}

@media (max-width: 480px) {
  .video-modal {
    padding: 14px;
    gap: 6px;
  }
  .modal-nav {
    width: 36px;
    height: 36px;
    font-size: 1.3rem;
  }
  .modal-close {
    top: 8px;
    right: 10px;
    font-size: 2rem;
  }
}

.deco-bottom {
  display: flex;
  justify-content: center;
  margin-top: -10px;
  overflow: hidden;
}

.deco-bottom img {
  width: 100px;
}

@media (max-width: 720px) {
  .site-header {
    padding: 20px 22px;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 14px;
  }
  .lang-toggle {
    align-self: flex-end;
  }
  main {
    padding: 28px 20px 10px;
  }
  .video-group {
    padding: 22px 18px;
  }
}
