/*========================BASE========================*/
html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  margin: 0;
  background: #f5f7fa;
  color: #1f2937;
  line-height: 1.45;

  display: flex;
  flex-direction: column;
}

main,
.section-label {
  max-width: 1280px;
  margin: 0 auto;
}

/*========================NAV========================*/
nav {
  background: white;
  padding: 15px 6%;
}

nav a {
  margin-right: 30px;
  text-decoration: none;
  color: #003366;
  font-weight: 600;
  font-size: 14px;
  position: relative;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: #003366;
  transition: width 0.2s ease;
}

nav a:hover::after {
  width: 100%;
}

/*========================HEADER========================*/
.header-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #003366;
  color: white;
  padding: 20px 4%;
}

.header-bar h1 {
  font-size: 25px;
  margin: 0;
}

.logo {
  height: 100px;
}

.introduction {
  margin: 20px 8.5%;
  padding: 10px 4%;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  color: #232f43;
}

/*========================SECTION LABEL========================*/
.section-label {
  font-size: 20px;
  /* font-weight: 600; */
  color: #003366;
  margin: 16px 7%;
  padding: 10px 4%;
}

.section-divider {
  content: "";
  display: block;
  width: 70%;
  height: 2px;
  margin: 28px auto;
  background-color: #d1d5db; /* neutral gray */
}

/*========================FEATURED SEMINAR (OPEN LAYOUT)========================*/
.featured-seminar {
  max-width: 1280px;
  margin: 0 auto 24px;
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 32px;
}

/* Thumbnail */
.featured-poster {
  width: 600px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
  cursor: pointer;
  transition: filter 0.3s ease;
}
.featured-poster:hover {
  filter: brightness(60%);
}

/* Text block */
/* .featured-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
} */

/* Title slightly lower than center */
.featured-title {
  font-size: 26px;
  font-weight: 700;
  color: #003366;
  /* margin-top: -20px; */
  margin-bottom: 20px;
}

/* Speaker more prominent */
.featured-speaker {
  text-decoration: none;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;    /* slightly bigger */
}
.featured-speaker:hover{
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.featured-speaker img {
  width: 100px;        /* bigger speaker image */
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
}

/* Meta stays subtle */
.featured-meta {
  font-size: 14px;
  color: #374151;
}

/* Abstract unchanged */
/* .featured-abstract {
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.55;
  max-width: 88%;
} */

.featured-abstract {
  margin-top: 20px;
  font-size: 15px;
  line-height: 1.55;
  max-width: 88%;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
}

.featured-abstract.expanded {
  -webkit-line-clamp: unset;
}

.read-more {
  color: #003366;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  display: inline-block;
}


/* Video link unchanged */
.featured-video-link {
  margin-top: 10px;
}

.youtube-cta {
  display: inline-block;
  margin: 10px 0 15px;
  padding: 5px 10px;
  background: #c62828;
  color: #fff;
  font-weight: 400;
  border-radius: 6px;
  text-decoration: none;
}

.youtube-cta:hover {
  background: #b71c1c;
}
.notes-cta {
  display: inline-block;
  margin: 10px 0 15px;
  padding: 5px 10px;
  background: #1565c0;   /* blue = documents */
  color: #fff;
  font-weight: 400;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
}

.notes-cta:hover {
  background: #0d47a1;
}

/*========================CARDS========================*/
main {
  padding: 24px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  min-height: 60vh;          /* keep page height stable when few results */
  align-content: start;      /* avoid stretching cards when space is tall */
}

.seminar-card {
  background: white;
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);

  display: flex;
  align-items: center;
  gap: 12px;
}
.card-left { display: flex; flex-direction: column; gap: 8px; }
.card-left .card-date { color: #4b5563; font-size: 13px; margin: 0; }
.card-left .card-abstract { margin: 0; color: #374151; font-size: 14px; margin: 2px 0;}
.card-left .read-more {
  align-self: flex-start;
  background: transparent;
  border: 0;
  color: #003366;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.card-abstract.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-right { display: flex; flex-direction: column; align-items: center; gap: 8px; justify-content: space-between;}
/* .card-right a { width: 100%; display: block; } */
.speaker-photo { margin-top: 25%; width: 100%; max-width: 220px; height: auto; border-radius: 10px; object-fit: cover; }
.card-speaker { text-align: center; font-size: 13px; color: #4b5563}
.card-right .youtube-cta {
  text-align: center;
  width: 25px;
}
.card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.seminar-card h3 {
  font-size: 16px;
  margin: 0 0 4px;
}

.speaker-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
/*Search*/
.seminar-search {
  max-width: 1280px;
  margin: 0 auto 10px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.seminar-search input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  width: 400px;
}

.seminar-search input:focus {
  outline: 2px solid #003366;
  outline-offset: 1px;
}

#searchCount {
  color: #4b5563;
  font-size: 13px;
  white-space: nowrap;
}

.no-results {
  grid-column: 1 / -1;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  text-align: center;
  color: #6b7280;
}


/*========================MODAL========================*/
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  max-width: 1200px;
  width: 60%;
  border-radius: 10px;
}

.pdf-scroll {
  max-height: 80vh;
  overflow-y: auto;
}

.pdf-scroll img {
  width: 100%;
  display: block;
  margin-bottom: 12px;
  border-radius: 6px;
}

/*========================FOOTER========================*/
footer {
  margin-top: auto;
  padding: 10px;
  background: #003366;
  color: white;
  font-size: 13px;
  text-align: center;
}
/*========================TEAM========================*/

.team-section {
  max-width: 1280px;
  margin: 0 auto 40px;
  padding: 0 6%;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  justify-content: center;
  justify-items: center; 
  gap: 28px;
}

/* CARD */
.team-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #e5e7eb;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  max-width: 240px;  
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}

/* IMAGE */
.team-image-wrapper {
  position: relative;
  width: 220px;
  height: 220px;
}

.team-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* TRANSPARENT OVERLAY PANEL */
.team-overlay {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);

  width: 88%;
  padding: 8px 8px;

  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(6px);

  border-radius: 6px;
  text-align: center;

  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

/* NAME */
.team-overlay h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

/* ROLE */
.team-overlay p {
  margin: 2px 0 0;
  font-size: 13px;
  color: #4b5563;
}


/*========================RESPONSIVE========================*/
@media (max-width: 1199px) {

  /* HEADER */
  .header-bar {
    padding: 18px 5%;
  }

  .logo {
    height: 80px;
  }

  /* FEATURED SEMINAR */
  .featured-seminar {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 5%;
  }

  .featured-poster {
    width: clamp(320px, 80vw, 520px);
    height: auto;
    margin: 0 auto;
  }

  .featured-title {
    font-size: 24px;
    margin-top: 0;
  }

  .featured-abstract {
    max-width: 100%;
  }

  /* MAIN GRID */
  main {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px;
    gap: 20%;
  }

  /* CARDS */
  .seminar-card {
    flex-direction: row;
    align-items: center;
  }

  .speaker-photo {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 767px) {

  /* HEADER */
  .header-bar {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 16px 4%;
  }

  .logo {
    height: 70px;
  }

  .introduction {
    margin: 16px 4%;
    padding: 0;
    font-size: 15px;
  }

  /* FEATURED SEMINAR */
  .featured-seminar {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 4%;
  }

  .featured-poster {
    width: clamp(280px, 90vw, 520px);
    height: auto;
    margin: 0 auto;
  }

  .featured-title {
    font-size: 21px;
  }

  .featured-speaker img {
    width: 80px;
    height: 80px;
  }

  /* MAIN GRID */
  main {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  /* CARDS */
  .seminar-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .card-right { align-items: flex-start; width: 100%; }

  .seminar-card img {
    order: -1;
    margin-left: 0;
  }

  .speaker-photo {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 420px) {

  .featured-title {
    font-size: 19px;
  }

  .featured-abstract {
    font-size: 14px;
  }

  .featured-poster {
    min-width: 280px;
  }

  .seminar-card h3 {
    font-size: 15px;
  }

  .seminar-card p {
    font-size: 13px;
  }
}

/*TEAM*/
@media (max-width: 1100px) {
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 800px) {
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
}
