:root {
  --header-size: 1.75rem;
  --timeline-bg: #cee6e9;
  --timeline-active: #b4f701;
  --timeline-tail: 220px;
  --popup-text: #244A50;
}

#main-wrapper {
  padding: 0;
  margin: 0;
}

.img-light {
  display: none;
}

body.light-mode .img-dark {
  display: none;
}

body.light-mode .img-light {
  display: block;
}

/******************************* PAGE HEADER ****************************/

.header-wrapper {
  padding: var(--padding-l) var(--padding-m) 0 var(--padding-m);
}

.thisisus-header {
  text-transform: uppercase;
  font-size: var(--header-size);
  font-weight: 700;
  line-height: 1.2;
}

.thisisus-text {
  font-size: var(--font-m);
  font-weight: 300;
  line-height: 1.5;
  padding: var(--padding-s) 0 var(--padding-xl) 0;
}

body.light-mode {
  --timeline-active: #467278;
  --timeline-bg: rgba(36, 74, 80, 0.15);
}

body.light-mode .timeline-item.is-visited .timeline-dot, .timeline-item.is-active .timeline-dot {
    background-color: #1e3a3e;
    border-color: #467278;
}

.img-light {
  display: none;
}

body.light-mode .img-dark {
  display: none;
}

body.light-mode .img-light {
  display: block;
}


/******************************* SECTION TOGGLE ****************************/


.section-toggle {
  display: flex;
  width: 260px;
  margin: auto;
  margin-bottom: var(--margin-xxl);
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/******************************* BUTTONS ****************************/


.toggle-btn {
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0.7rem 0;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 300;
  color: white;
  transition: opacity 0.3s ease;
}

/* Left side */

.toggle-btn:first-child {
  background-color: #61868B;
}


/* Right side */

.toggle-btn:last-child {
  background-color: #467278;
}

/* Hover */

.toggle-btn:hover {
  opacity: 0.9;
  color: #1e293b;
}


/******************************* TIMELINE SECTION ****************************/

.timeline-section {
  padding: 0 var(--padding-m) 0 var(--padding-m);
}

.timeline {
  position: relative;
  display: grid;
  gap: 4rem;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 24px;
  width: 4px;
  border-radius: 999px;
  background-color: var(--timeline-bg);
}

.timeline-item {
  position: relative;
  display: grid;
  gap: 1.5rem;
  padding-left: 56px;
}

.timeline-content,
.timeline-media {
  position: relative;
  z-index: 1;
}

.timeline-title {
  font-size: var(--font-sm);
  font-weight: 600;
  color: var(--text-color);
  text-transform: uppercase;
  padding-bottom: var(--padding-s);
}

.timeline-text {
  color: var(--text-color);
  font-size: var(--font-sm);
  font-weight: 300;
  line-height: 1.5;
  padding-bottom: var(--padding-sm);
}

.timeline-media img {
  display: block;
  width: 100%;
  max-width: 350px;
  height: auto;
  margin: 0 auto;
}

.timeline-dot {
  position: absolute;
  top: 50%;
  left: 24px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  transform: translate(-10px, -50%);
  background-color: #d9d9d9;
  border: 4px solid #bfbfbf;
  z-index: 2;
}

/* For color changing scroll effect on timeline */
.timeline-progress {
  position: absolute;
  top: 0;
  left: 24px;
  width: 4px;
  height: 0;
  border-radius: 999px;
  z-index: 1;
  pointer-events: none;

  background: linear-gradient(
    to bottom,
    var(--timeline-active) 0,
    var(--timeline-active) calc(100% - var(--timeline-tail)),
    rgba(180, 247, 1, 0) 100%
  );
}

.timeline.is-complete .timeline-progress {
  background: var(--timeline-active);
}

.timeline-item.is-visited .timeline-dot,
.timeline-item.is-active .timeline-dot {
  background-color: var(--timeline-active);
  border-color: #4e7b41;
}

/******************************* TEAM SECTION ****************************/

.team-banner img {
  width: 100%;
  height: 100%;
  padding: var(--padding-xxl) var(--padding-s) 0 var(--padding-s);
}

.filter-wrapper {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: column;
  padding-top: var(--padding-m);
}

.filter-label {
  text-align: center;
  font-weight: 300;
  font-size: var(--font-xs);
  padding-bottom: var(--padding-s);
}

.filter-select {
  font-family: var(--fontStyle);
  font-size: var(--font-s);
  border: var(--filter-style);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: var(--filter-shadow);
  width: 250px;
  text-align: left;
  padding: 12px;
  margin: 0 auto;

  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  background-image: url("/static/articles/img/arrow_filter.svg");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 22px;
}

.filter-select {
  transition: box-shadow 0.2s ease;
}

.filter-select:hover {
  box-shadow: 0 0 0 3px #b5f70174;
}

.team-section {
  padding-bottom: 6rem;
  overflow: visible;
}

.team-heading {
  font-size: var(--font-l);
  text-transform: uppercase;
  margin-bottom: 2rem;
}

/******************************* CAROUSEL ****************************/

.layout-switch button {
  display: none;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
}

.layout-switch button.active-layout-button {
  display: block;
}

.team-carousel {
  position: relative;
  width: 100vw;
  height: 520px;
  margin-left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
  overflow: hidden;
}

 
.team-card {
  position: absolute;
  width: 260px;
  height: 360px;
  border-radius: 1rem;
  overflow: hidden;
  background-color: white;

  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);

  transition:
    transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
    opacity 0.5s ease;

  opacity: 0;
  transform-style: preserve-3d;
  cursor: pointer;
}

.team-card-image {
  position: relative;
  width: 100%;
  height: 100%;
}

.team-card-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: top center;

  display: block;
  transition:
    filter 0.5s ease,
    transform 0.5s ease;
}


.team-card-name {
  position: absolute;
  left: 20px;
  bottom: 18px;
  z-index: 5;
  color: #FFFFFF;
  font-size: 1.5rem;
  font-weight: 300;
  text-transform: uppercase;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.team-card-plus {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border: none;
  outline: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #FFFFFF;
  color: #1e293b;
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.team-card-plus i {
  font-size: 1.1rem;
  line-height: 1;
}

.team-card.is-active .team-card-plus {
  opacity: 1;
  transform: scale(1);
}

.team-card.is-active:hover .team-card-plus {
  opacity: 1;
  transform: scale(1) rotate(90deg);
  background-color: #244a50;
  color: #ffffff;
}

.team-grid-card.animate-in {
  animation: gridFade 0.6s ease forwards;
}

@keyframes gridFade {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/******************************* LAYOUT SWITCH ****************************/

.team-layout {
  display: none;
}

.team-layout.active {
  display: block;
}

.layout-switch {
  display: flex;
  justify-content: center;
  padding-bottom: var(--padding-xl);
}

.layout-switch img {
  width: 100px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.layout-switch img:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

/******************************* GRID LAYOUT ****************************/

.team-grid {
  display: grid;
  gap: 2rem;
  justify-content: center;
  padding: var(--padding-xl) var(--padding-m) var(--padding-xxl);
  max-width: 1400px;
  margin: 0 auto;
  grid-template-columns:
    repeat(
      auto-fit,
      minmax(300px, 300px)
    );
}

.team-grid-card {
  position: relative;
  width: 300px;
  height: 400px;
  border-radius: 1rem;
  overflow: hidden;
  background-color: #FFFFFF;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  cursor: pointer;
}

.team-grid-image {
  width: 100%;
  height: 100%;
}

.team-grid-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.team-grid-card .team-card-plus {
  opacity: 1;
  transform: scale(1);
}

.team-grid-card:hover .team-card-plus {
  transform: scale(1) rotate(90deg);
  background-color: #244a50;
  color: white;
}

/* Use active styling permanently */

.team-grid-card .team-card-plus {
  opacity: 1;
  transform: scale(1);
}

.team-grid-card:hover .team-card-plus {
  transform: scale(1) rotate(90deg);
  background-color: #244a50;
  color: white;
}

/******************************* POP UP****************************/


.details-overlay {
  overflow-y: auto;
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5000;
}

.details-overlay.active {
  opacity: 1;
  pointer-events: auto;
}


.details-container {
  position: relative;
  width: min(900px, 100%);
  max-height: 75vh;
  overflow-y: auto;
  padding: 2.25rem 1.25rem 1.75rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition:
    transform 0.3s ease;
}

.details-overlay.active .details-container {
  transform: translateY(0);
}

.details-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding-top: 6rem;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}


.details-thumbnail {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 2px solid #244A50;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  backface-visibility: hidden;
  transform: translateZ(0);
}


.details-fullname {
  text-transform: uppercase;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--popup-text);
  line-height: 1.2;
}

.details-role {
  font-size: 1.25rem;
  color: var(--popup-text);
  font-weight: 600;
  padding-top: var(--padding-xs);
}

.details-grid {
  display: grid;
  gap: 2rem;
}


/* Tablet/Desktop */

@media (min-width: 768px) {

  .details-grid {
    grid-template-columns: 1fr 1fr;
  }

  .details-thumbnail {
    width: 110px;
    height: 110px;
  }
}

.details-column h3 {
  font-size: 0.875rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.08em;

  color: var(--popup-text);

  margin-bottom: 1rem;

  border-left: 3px solid #244A50;
  padding-left: 0.75rem;
}


.details-text {
    font-weight: 300;
    color: #334155;
    line-height: 1.7;
    font-size: 20px;
}

.details-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: none;
  outline: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  color: #64748b;
  transition:
    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.details-close:hover {
  background-color: #244A50;
  color: white;
  transform:
    rotate(90deg);
}

.details-close i {
  font-size: 1.1rem;
  stroke-width: 2;
}

/******************************* MEDIA QUERIES ****************************/

/* Tablet*/

@media (min-width: 768px) {
  .header-wrapper {
  padding: var(--padding-m) var(--padding-xl) var(--padding-m) var(--padding-xl);
  }

  .team-carousel {
    height: 600px;
    width: 100%;
    margin-left: auto;
    transform: none;
    overflow: visible;
  }

  .thisisus-header {
    font-size: 2.2rem;
  }

  .team-section {
    padding: var(--padding-xl) 0;
  }

  .team-banner img {
    padding: var(--padding-xl) var(--padding-xxl) 0 var(--padding-xxl);
  }

  .filter-wrapper {
    padding: 0 0 var(--padding-m) 0;
  }

  .details-header {
    margin-top: 0;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 6.5rem;
    padding-bottom: 3rem;
  }

}

/* Desktop */

@media (min-width: 1024px) {
  #thisisus-content {
    padding: var(--padding-xl) var(--padding-xxl) 6rem;
  }

  .header-wrapper {
    padding: 0;
  }

  .timeline-section {
    padding: 0;
  }

  .timeline-item--right .timeline-content {
    grid-column: 2;
    grid-row: 1;
  }

  .timeline-item--right .timeline-media {
    grid-column: 1;
    grid-row: 1;
  }

  .timeline::before {
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline-item {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding-left: 0;
  }

  .timeline-item--right .timeline-content {
    grid-column: 2;
  }

  .timeline-dot {
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .timeline-text {
    line-height: 1.5;
  }

  .timeline-progress {
    left: 50%;
    transform: translateX(-50%);
  }

  .timeline-media img {
    max-width: 450px;
  }

  .team-banner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
  }

  .filter-wrapper {
    padding: 0;
  }


  .details-header {
    margin-top: 0;
    padding-top: 0.5rem;
    display: flex;
    align-items: center;
    text-align: center;
    padding-top: 0;
    padding-bottom: 3.5rem;
  }

  .details-thumbnail {
    flex-shrink: 0;
  }

  .details-text-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .details-container {
    width: min(900px, 100%);
    height: 70vh;
  }

  .details-fullname {
    max-width: 600px;
}

   .details-thumbnail {
    width: 130px;
    height: 130px;
  }
}

/* tv/mega-screen sizes */

@media (min-width: 1440px) {

  #thisisus-content {
    padding: var(--padding-xl) var(--padding-xxl) 6rem;
  }

  .timeline-section {
    padding: 0;
  }

   .details-container {
    width: min(900px, 100%);
    height: 70vh;
  }
}

@media (min-width: 1650px) {
  #thisisus-content {
    margin: 0 auto;
    max-width: 1440px;
    padding-left: 0;
    padding-right: 0;
  }
}
