/* Project pages. Engenharia para Todos mockup (1169px wide, converted to 1920px). */

/* Half-donut with the section name: same graphic as the homepage projects. */
.oasis-donut {
  position: relative;
  container-type: inline-size;
}

.oasis-donut img {
  display: block;
  width: 100%;
  height: auto;
}

.oasis-donut__title {
  position: absolute;
  top: 70%;
  left: 50%;
  width: 48%;
  margin: 0;
  transform: translate(-50%, -50%);
  color: var(--oasis-white);
  font-size: 5.6cqw;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
}

/* Over the slideshow: 435px wide, 75px from the left. */
.oasis-hero__section {
  position: absolute;
  top: 0;
  left: clamp(12px, 3.9vw, 75px);
  z-index: 30;
  width: clamp(170px, 22.6vw, 435px);
  pointer-events: none;
}

/* Without the homepage half-circle the title bar spans the full width; the text stays put. */
@media (min-width: 769px) {
  .oasis-hero--section .oasis-hero__overlay-bar {
    left: 0;
    width: 100%;
  }

  .oasis-hero--section .oasis-hero__container {
    padding-left: var(--oasis-arrow-x);
  }
}

/* Subsection header (mockup at 1920px): 388px donut 75px from the left;
   dots 37px after it, 40px below the menu. */
.oasis-project-page__header {
  display: flex;
  align-items: flex-start;
  gap: clamp(12px, 1.9vw, 37px);
  padding: 0 clamp(12px, 2.3vw, 45px) 0 clamp(12px, 3.9vw, 75px);
  background: var(--oasis-white);
}

.oasis-project-page__header .oasis-donut {
  flex: 0 0 clamp(150px, 20.2vw, 388px);
}

.oasis-project-page__header .oasis-dots {
  flex: 1;
  width: auto;
  max-width: 1371px;
  margin: clamp(12px, 2.1vw, 40px) 0 0;
}

/* Subsections: 376px square photos with 25% corners, 80px apart; the name
   pill sticks out 8.7% above the photo. On hover the photo gets a 50% white
   veil and the pill moves to the centre. */
.oasis-subsections {
  padding: clamp(48px, 6.4vw, 123px) var(--oasis-gutter) clamp(32px, 3.1vw, 60px);
  background: var(--oasis-white);
}

.oasis-subsections__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(48px, 4.2vw, 80px) clamp(24px, 4.2vw, 80px);
}

.oasis-subsection {
  position: relative;
  display: block;
  width: clamp(200px, 19.6vw, 376px);
  container-type: inline-size;
  text-decoration: none;
}

.oasis-subsection__photo {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--oasis-grey);
  border-radius: 25%;
}

.oasis-subsection__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.oasis-subsection__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.oasis-subsection__name {
  position: absolute;
  top: -8.7cqw;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72cqw;
  min-height: 25.8cqw;
  padding: 0.3em 0.8em;
  transform: translateX(-50%);
  background: var(--oasis-topic, var(--oasis-orange));
  color: var(--oasis-white);
  border-radius: var(--oasis-radius-pill);
  font-size: 5.2cqw;
  font-weight: 700;
  line-height: 1.08;
  text-align: center;
  text-transform: uppercase;
  transition: top 0.3s ease, transform 0.3s ease;
}

.oasis-subsection:hover .oasis-subsection__photo::after,
.oasis-subsection:focus-visible .oasis-subsection__photo::after {
  opacity: 1;
}

.oasis-subsection:hover .oasis-subsection__name,
.oasis-subsection:focus-visible .oasis-subsection__name {
  top: 50%;
  transform: translate(-50%, -50%);
}

/* On the project page the dots span almost the full width (1790px). */
.oasis-subsections .oasis-dots {
  width: 93%;
  max-width: 1790px;
}

/* Activities in two columns: photo (rounded) with the title below, and the
   description beside it. */
.oasis-project-page__body {
  padding: clamp(24px, 3.1vw, 60px) clamp(16px, 4vw, 77px) clamp(40px, 4.2vw, 80px);
  background: var(--oasis-white);
}

.oasis-project-page__text {
  max-width: 1100px;
  margin: 0 auto clamp(32px, 4.2vw, 80px);
  color: var(--oasis-text);
  font-size: clamp(1rem, 0.99vw, 1.1875rem);
  line-height: 1.58;
}

.oasis-project-page__text a {
  color: var(--oasis-blue-light);
  font-weight: 700;
}

.oasis-activities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(40px, 4.2vw, 80px) clamp(24px, 3.4vw, 66px);
  max-width: 1766px;
  margin-inline: auto;
}

.oasis-subsections__grid + .oasis-activities {
  margin-top: clamp(48px, 5.2vw, 100px);
}

.oasis-activity {
  display: grid;
  grid-template-columns: minmax(0, 47fr) minmax(0, 53fr);
  gap: clamp(14px, 1.2vw, 24px);
  align-items: start;
}

.oasis-activity__media {
  display: block;
  color: inherit;
  text-decoration: none;
}

.oasis-activity__photo {
  display: block;
  width: 100%;
  /* height: auto overrides the height attribute WordPress adds, so aspect-ratio applies. */
  height: auto;
  aspect-ratio: 1.62 / 1;
  background: var(--oasis-grey);
  object-fit: cover;
  border-radius: clamp(24px, 3vw, 60px);
}

.oasis-activity__title {
  margin: 0.6em 0 0;
  color: var(--oasis-blue-light);
  font-size: clamp(0.8rem, 0.99vw, 1.1875rem);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.oasis-activity__text {
  color: var(--oasis-text);
  font-size: clamp(0.9rem, 0.94vw, 1.125rem);
  line-height: 1.45;
}

.oasis-activity__text > :first-child {
  margin-top: 0;
}

.oasis-activity__text a {
  color: var(--oasis-blue-light);
  font-weight: 700;
}

.oasis-activity__signup {
  margin-top: clamp(12px, 1vw, 20px);
}

/* Flowing text (e.g. Hands-on Science): the text wraps around the photo and continues below it. */
.oasis-activities--flow {
  display: block;
  max-width: 1500px;
}

.oasis-activities--flow .oasis-activity {
  display: flow-root;
}

.oasis-activities--flow .oasis-activity + .oasis-activity {
  margin-top: clamp(40px, 4.2vw, 80px);
}

.oasis-activities--flow .oasis-activity__media {
  float: left;
  width: clamp(240px, 26vw, 500px);
  margin: 0 clamp(20px, 2.5vw, 48px) 1em 0;
}

.oasis-activities--flow .oasis-activity__text {
  font-size: clamp(0.95rem, 0.99vw, 1.1875rem);
  line-height: 1.55;
}

@media (max-width: 960px) {
  .oasis-activities {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Mobile (mockup at 278px): cards in one column at 56% width, header graphic ~39% wide. */
@media (max-width: 768px) {
  .oasis-hero__section {
    left: 4vw;
    width: 39vw;
  }

  .oasis-donut__title {
    width: 62%;
    font-size: 7.5cqw;
  }

  .oasis-project-page__header .oasis-donut {
    flex-basis: 39vw;
  }

  .oasis-subsections__grid {
    flex-direction: column;
    align-items: center;
  }

  .oasis-subsection {
    width: min(56vw, 300px);
  }

  .oasis-activity {
    grid-template-columns: minmax(0, 1fr);
  }

  .oasis-activities--flow .oasis-activity__media {
    float: none;
    width: auto;
    margin: 0 0 1em;
  }
}
