/*
 * CELLA website styles.
 * Loaded after Bootstrap 3 (css/bootstrap.min.css) and Font Awesome 4.
 * Sections follow the page order: base, navigation, header, home, studies,
 * talks & insights, team, publications, contact/footer.
 */

/* ---------- Base ---------- */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #777;
  font-weight: 400;
}
h2,
h3,
h4 {
  font-family: "Raleway", sans-serif;
}
h2 {
  text-transform: uppercase;
  margin: 0 0 20px;
  font-weight: 800;
  font-size: 36px;
  color: #333;
}
h3 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}
h4 {
  font-size: 18px;
  color: #333;
  font-weight: 600;
}
p {
  font-size: 15px;
}
a {
  color: #608dfd;
  font-weight: 400;
}
a:hover,
a:focus {
  text-decoration: none;
  color: #608dfd;
}
ul,
ol {
  list-style: none;
  padding: 0;
}
/* The site has always been laid out without Bootstrap's negative .row margins */
.row {
  margin-left: 0;
  margin-right: 0;
}

.section-title {
  margin-bottom: 70px;
}
.section-title h2 {
  position: relative;
  margin-top: 10px;
  margin-bottom: 15px;
  padding-bottom: 15px;
}
.section-title h2::after {
  position: absolute;
  content: "";
  background: linear-gradient(to right, #5ca9fb 0%, #6372ff 100%);
  height: 4px;
  width: 60px;
  bottom: 0;
  margin-left: -30px;
  left: 50%;
}
.section-title p {
  font-size: 18px;
}

/* ---------- Navigation ---------- */
#menu {
  padding: 15px;
  transition: all 0.8s;
}
#menu.navbar-default {
  background-color: #fff;
  border-color: rgba(231, 231, 231, 0);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
#menu a.navbar-brand {
  font-family: "Raleway", sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #333;
  text-transform: uppercase;
}
#menu.navbar-default .navbar-nav > li > a {
  font-family: "Lato", sans-serif;
  text-transform: uppercase;
  color: #555;
  font-size: 15px;
  font-weight: 400;
  padding: 8px 2px;
  border-radius: 0;
  margin: 9px 20px 0;
}
#menu.navbar-default .navbar-nav > li > a:after {
  display: block;
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #6372ff 0%, #5ca9fb 100%);
  content: "";
  transition: width 0.2s;
}
#menu.navbar-default .navbar-nav > li > a:hover:after,
#menu.navbar-default .navbar-nav > li.active > a:after {
  width: 100%;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
  background-color: transparent;
}
/* Keep all menu items on one row between the mobile breakpoint and 1200px */
@media (min-width: 768px) and (max-width: 1199px) {
  #menu.navbar-default .navbar-nav > li > a {
    margin: 9px 9px 0;
  }
}
@media (min-width: 768px) and (max-width: 991px) {
  #menu {
    padding: 15px 0;
  }
  #menu.navbar-default .navbar-nav > li > a {
    font-size: 13px;
    margin: 9px 5px 0;
  }
}
.navbar-toggle {
  border-radius: 0;
}
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
  background-color: #fff;
  border-color: #608dfd;
}
.navbar-default .navbar-toggle:hover > .icon-bar {
  background-color: #608dfd;
}
.nav-github {
  font-size: 20px;
}
/* The boxed "Publications" item */
.nav-pill {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid #767676;
  border-radius: 2px;
  background: #efefef;
  color: #333;
  line-height: 1.3;
}

/* Inner pages: keep the first heading clear of the fixed navigation bar */
.page-offset {
  padding-top: 80px;
}

/* ---------- Header (home page) ---------- */
.intro {
  height: 650px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background: gold url(../img/header.jpg) no-repeat center;
  background-size: contain;
}
/* On narrow screens shrink the header to the image instead of a fixed 650px */
@media (max-width: 991px) {
  .intro {
    height: calc(80px + 56.3vw);
    background-position: center bottom;
  }
}

/* ---------- Home: current progress, about, principal investigators ---------- */
#features {
  background: #f6f6f6;
  position: relative;
  padding-top: 100px;
}
.progress-card {
  background: #fff;
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
  max-width: 1000px;
  margin: 0 auto 60px auto;
  border: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}
.progress-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 8px;
  height: 100%;
  background: linear-gradient(to bottom, #5ca9fb 0%, #6372ff 100%);
}
.progress-card .section-title {
  margin-bottom: 30px;
}
.progress-card .section-title h2 {
  margin-top: 0;
}
.progress-body {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  text-align: left;
}
.progress-photo {
  flex: 0 0 250px;
}
.progress-photo img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.progress-text {
  flex: 1 1 500px;
}
.progress-text p {
  font-size: 16px;
  line-height: 1.8;
  color: #555;
  margin: 0;
}
.stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 30px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  margin-top: 30px;
}
.stat {
  text-align: center;
}
.stat-number {
  font-size: 36px;
  font-weight: 800;
  background: linear-gradient(to right, #5ca9fb, #6372ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  font-size: 14px;
  color: #888;
  font-weight: 600;
  margin-top: 5px;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: #f0f0f0;
}

/* Scrolling list of countries. js/main.js duplicates the list and adds
   .is-looping, so the animation (which moves by half the width) loops
   without a jump. */
.marquee {
  margin-top: 30px;
  position: relative;
  overflow: hidden;
  padding: 10px 0;
}
.marquee::before,
.marquee::after {
  content: "";
  position: absolute;
  top: 0;
  width: 60px;
  height: 100%;
  pointer-events: none;
}
.marquee::before {
  left: 0;
  background: linear-gradient(to right, #fff, rgba(255, 255, 255, 0));
}
.marquee::after {
  right: 0;
  background: linear-gradient(to left, #fff, rgba(255, 255, 255, 0));
}
.marquee-track {
  display: inline-block;
  white-space: nowrap;
  color: #aaa;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.marquee-track.is-looping {
  animation: marquee 40s linear infinite;
}
.marquee-track ul {
  display: inline;
  margin: 0;
}
.marquee-track li {
  display: inline;
}
.marquee-track li::after {
  content: "\00a0\2022\00a0";
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track.is-looping {
    animation: none;
  }
}

.intro-text {
  max-width: 900px;
  margin: 0 auto 40px;
  font-size: 20px;
  color: #000;
  line-height: 1.6;
  text-align: center;
}
.intro-paragraph {
  font-size: 18px;
  font-weight: 400;
  color: #333;
  line-height: 1.6;
}

.features-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 10px 0;
}
.features-row > div {
  flex: 0 0 18%;
  max-width: 18%;
  text-align: center;
}
@media (max-width: 1200px) {
  .features-row > div {
    flex: 0 0 22%;
    max-width: 22%;
  }
}
@media (max-width: 992px) {
  .features-row > div {
    flex: 0 0 30%;
    max-width: 30%;
  }
}
@media (max-width: 768px) {
  .features-row > div {
    flex: 0 0 45%;
    max-width: 45%;
  }
}
@media (max-width: 480px) {
  .features-row > div {
    flex: 0 0 100%;
    max-width: 100%;
  }
}
.pi-photo {
  width: 150px;
  height: 150px;
  margin-bottom: 15px;
  border-radius: 50%;
  object-fit: cover;
}
.feature-title {
  font-size: 19px;
  font-weight: 700;
  color: #222;
  margin-bottom: 10px;
}

/* ---------- Our studies ---------- */
#about {
  padding: 40px 0;
}
#about h2 {
  position: relative;
  margin-bottom: 40px;
  padding-bottom: 15px;
}
#about h2::after {
  position: absolute;
  content: "";
  background: linear-gradient(to right, #5ca9fb 0%, #6372ff 100%);
  height: 4px;
  width: 60px;
  bottom: 0;
  left: 0;
}
#about h3 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  text-align: left;
  margin: 0 0 20px;
}
#about p {
  line-height: 24px;
  margin: 30px 0;
}
.study-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 40px;
  gap: 20px;
  flex-wrap: wrap;
}
.study-text {
  flex: 1 1 50%;
  min-width: 280px;
  color: #444;
  font-size: 16px;
}
.study-text a {
  color: #5ca9fb;
}
.study-goals {
  padding-left: 20px;
  font-size: 15px;
}
.study-img {
  width: 400px;
  max-width: 40%;
  height: auto;
  margin-top: 10px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
@media (max-width: 768px) {
  .study-img {
    max-width: 100%;
    margin: 20px 0;
  }
}
/* Country list: as many columns of at least 200px as fit, up to 3 */
.country-list {
  columns: 200px 3;
  column-gap: 20px;
}
.country-list li {
  break-inside: avoid;
  margin-bottom: 8px;
}
/* Closing "…and more" line, lined up with the country names */
.country-more {
  padding-left: 30px;
  font-style: italic;
  color: #888;
}
.flag {
  width: 24px;
  height: 18px;
  margin-right: 6px;
  vertical-align: -3px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* ---------- Academic talks & insights ---------- */
#testimonials {
  padding: 100px 0;
  background: #f6f6f6;
}
.resources-section {
  padding: 60px 0;
  background-color: #f9f9f9;
}
.resource-section-title {
  margin-bottom: 30px;
  font-weight: 900;
  font-size: 24px;
  color: #000;
  text-align: left;
}
.resource-items {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 20px;
  justify-content: flex-start;
}
.resource-item {
  flex: 0 0 auto;
  width: 250px;
  text-align: left;
}
.resource-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.resource-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
  color: #222;
  min-height: 60px;
  display: grid;
  align-content: space-between;
  line-height: 1.2;
}
.resource-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
}
.resource-presenter {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.4;
  color: #444;
  font-weight: 600;
}
@media (max-width: 1024px) {
  .resource-item {
    width: 32%;
  }
}
@media (max-width: 768px) {
  .resource-item {
    width: 48%;
  }
}
@media (max-width: 480px) {
  .resource-item {
    width: 100%;
  }
}

/* ---------- Team ---------- */
#team {
  padding: 100px 0;
}
#team h4 {
  margin: 5px 0;
}
.team-photo {
  margin: 20px 0;
}
#team .team-img {
  width: 250px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 22 / 25;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin: 0 auto;
}
#team .thumbnail {
  background: transparent;
  border: 0;
}
#team .thumbnail .caption {
  padding: 10px 0 0;
  color: #888;
}
.team-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 20px;
  padding-left: 15px;
  padding-right: 15px;
  width: 100%;
  margin: 0 auto;
}
.team {
  flex: 0 0 calc(25% - 20px);
  max-width: calc(25% - 20px);
  text-align: center;
}
@media (max-width: 992px) {
  .team {
    flex: 0 0 calc(33.33% - 20px);
    max-width: calc(33.33% - 20px);
  }
}
@media (max-width: 768px) {
  .team {
    flex: 0 0 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
}
@media (max-width: 480px) {
  .team {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ---------- Publications ---------- */
.publications {
  max-width: 900px;
  margin: 40px auto;
  padding: 20px;
}
.publications h1 {
  margin-top: 0;
}
.publications-status {
  text-align: center;
  margin: 40px;
}
.publications-status.is-error {
  color: red;
}

/* ---------- Contact and footer ---------- */
#contact {
  padding: 100px 0 60px;
  background: linear-gradient(to right, #f7d04b 0%, #f1bc23 100%);
  color: rgba(30, 30, 30, 0.9);
}
#contact .section-title {
  margin-bottom: 40px;
}
#contact .section-title p {
  font-size: 20px;
}
#contact h2 {
  color: #fff;
  margin-top: 10px;
  margin-bottom: 15px;
  padding-bottom: 15px;
}
#contact .section-title h2::after {
  position: absolute;
  content: "";
  background: rgba(255, 255, 255, 0.3);
  height: 4px;
  width: 60px;
  bottom: 0;
  left: 30px;
}
#contact .social {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 50px;
  margin-top: 50px;
  text-align: center;
}
#contact .social ul li {
  display: inline-block;
  margin: 0 20px;
}
#contact .social i.fa {
  font-size: 22px;
  width: 48px;
  height: 48px;
  padding: 12px 0;
  border: 2px solid #fff;
  color: #fff;
  border-radius: 50%;
  transition: all 0.3s;
}
#contact .social i.fa:hover {
  color: #608dfd;
  background: #fff;
}
#footer {
  background: #f6f6f6;
  padding: 30px 0;
}
