/* Employee rows */
.employee-row {
  position: relative;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* Alternating background borders */
.employee-row:nth-child(n+2) {
  border-top: 1px solid #8F8F8F;
}

/* Alternating background images */
.employee-row:nth-child(odd)::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 95px;
  height: 100%;
  background-color: #f1f1f1;
}

.employee-row:nth-child(odd) {
  background: url(../images/dots-bg.png) repeat-y -325px 0;
  background-size: 420px;
}

.employee-row:nth-child(even)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 95px;
  height: 100%;
  background-color: #f1f1f1;
}

.employee-row:nth-child(even) {
  background: url(../images/dots-bg.png) repeat-y calc(100% + 320px) 0;
  background-size: 420px;
}

/* New layout wrapper */
.employee-inner {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 20px;
}

/* Photo container */
.employee-photo {
  width: 400px;
  height: 440px;
  border: 1px solid #ebebeb;
  margin: 20px 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  flex-shrink: 0;
  position: relative;
  z-index: 999;
}

/* Flip photo position using odd/even */
.employee-row:nth-child(odd) .employee-inner {
  flex-direction: row;
}
.employee-row:nth-child(even) .employee-inner {
  flex-direction: row-reverse;
}

/* Content container */
.employee-content {
  max-width: 800px;
  background: rgba(255, 255, 255, 0.9);
  padding: 40px;
  box-sizing: border-box;
  flex: 1;
}

/* Text styles */
.employee-content h2 {
  margin: 0 0 4px 0;
  font-size: 36px;
  color: var(--blue);
  font-weight: 600;
}

.employee-content h3 {
  margin: 20px 0 20px 0;
  font-size: 24px;
  font-weight: 600;
  color: var(--blue);
}

.employee-content p {
  margin: 0 0 20px 0;
  line-height: 1.7em;
}

.employee-content blockquote {
  margin: 0;
  padding-left: 60px;
  padding-right: 60px;
  font-style: italic;
  line-height: 1.7em;
  font-weight: 700px;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .employee-row:nth-child(odd)::before,
  .employee-row:nth-child(even)::before {
    width: 20px;
  }

  .employee-row:nth-child(odd) {
    background-position: -400px 0;
  }

  .employee-row:nth-child(even) {
    background-position: calc(100% + 395px) 0;
  }

  .employee-inner {
    flex-direction: column !important;
    gap: 20px;
  }
  
  .employee-inner .employee-content {
    order: 2;
    margin: 0 auto;
  }

  .employee-inner .employee-photo {
    order: 1;
    width: calc(100% - 40px);
    height: 60vw;
    margin: 35px auto 0 auto;
  }
  
  .employee-photo {
    width: 100%;
    height: 320px;
    background-position: center 10%;
  }
  
  .employee-content {
    padding-top: 10px;
  }
}

/* MOBILE: stack image above text */
@media (max-width: 768px) {
  .employee-content {
    padding: 10px 20px 20px 20px;
  }

  .employee-photo {
    margin-top: 20px;
  }
  
  .employee-content blockquote {
    padding-left: 20px;
    padding-right: 20px;
  }

  .employee-content h2 {
    font-size: 32px;
  }

  .employee-content h3 {
    font-size: 22px;
  }
}
