.embark-page {
  height: auto;
  width: 100%;
  background-color: #f4f4f4;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: height 0.4s ease-in-out;
  overflow: hidden;
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  /* box-sizing: border-box; */
}

.embark-header {
  height: 20vh;
  color: blac;
  font-family: "Open Sans";
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  padding-top: 2rem !important;
}

.embark-header-title {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  text-align: center;
  justify-content: space-evenly;
  width: 100%;
}

.embark-title {
  margin: 0;
  font-size: 24px;
}

.embark-header-text {
  width: 100%;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.embark-subtitle {
  margin: 0;
  font-size: 18px;
  margin-top: 12px;
  padding-left: 16px;
  padding-right: 16px;
}

.embark-lines {
  position: absolute;
  display: flex;
  width: 100%;
  height: 20vh;
  top: 0;
  align-items: center;
}

.embark-header-line {
  background-color: rgb(0, 0, 0);
  height: 1px;
  width: 30%;
}

:root {
  --container-color: hsla(0, 0%, 100%, 0.856);
  --first-color: hsl(241, 63%, 25%);

  --body-font: "Poppins", sans-serif;
  --h2-font-size: 1.25rem;
  --small-font-size: 0.813rem;
}

@media screen and (min-width: 1120px) {
  :root {
    --h2-font-size: 1.5rem;
    --small-font-size: 0.875rem;
  }
}

/* * {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
} */

body {
  font-family: var(--body-font);
  background-color: var(--body-color);
  color: var(--text-color);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.container {
  display: grid;
  place-items: center;
  margin-inline: 1.5rem;
  padding-block: 0.2rem;
}

.card__container {
  display: grid;
  row-gap: 3.5rem;
}

.card__article {
  position: relative;
  overflow: hidden;
}

.card__img {
  width: 328px;
  border-radius: 1.5rem;
}

.card__data {
  width: 280px;
  background-color: var(--container-color);
  padding: 1.5rem 2rem;
  box-shadow: 0 8px 24px hsla(0, 0%, 0%, 0.15);
  border-radius: 1rem;
  position: absolute;
  bottom: -9rem;
  left: 0;
  right: 0;
  margin-inline: auto;
  align-items: center;
  text-align: center;
  opacity: 0;
  transition: opacity 1s 1s;
  box-sizing: border-box;
}

.card__description {
  display: block;
  font-size: var(--small-font-size);
  margin-bottom: 0.25rem;
}

.card__title {
  font-size: var(--h2-font-size);
  font-weight: 500;
  margin-top: 0.5rem;
  color: var(--title-color);
  margin-bottom: 0.75rem;
  font-weight: bold;
}

.card__button {
  text-decoration: none;
  font-size: var(--small-font-size);
  font-weight: 500;
  color: var(--first-color);
}

.card__button:hover {
  text-decoration: underline;
}

.card__article:hover .card__data {
  animation: show-data 1s forwards;
  opacity: 1;
  transition: opacity 0.3s;
}

.card__article:hover {
  animation: remove-overflow 2s forwards;
}

.card__article:not(:hover) {
  animation: show-overflow 2s forwards;
}

.card__article:not(:hover) .card__data {
  animation: remove-data 1s forwards;
}

/* Card animation */
@keyframes show-data {
  50% {
    transform: translateY(-10rem);
  }
  100% {
    transform: translateY(-7rem);
  }
}

@keyframes remove-overflow {
  to {
    overflow: initial;
  }
}

@keyframes remove-data {
  0% {
    transform: translateY(-7rem);
  }
  50% {
    transform: translateY(-10rem);
  }
  100% {
    transform: translateY(0.5rem);
  }
}

@keyframes show-overflow {
  0% {
    overflow: initial;
    pointer-events: none;
  }
  50% {
    overflow: hidden;
  }
}

/* For small devices */
@media screen and (max-width: 340px) {
  .container {
    margin-inline: 1rem;
  }

  .card__data {
    width: 250px;
    padding: 1rem;
  }
}

/* For medium devices */
@media screen and (min-width: 768px) {
  .card__container {
    grid-template-columns: repeat(2, 1fr);
    column-gap: 1.5rem;
  }
}

/* For large devices */
@media screen and (min-width: 1120px) {
  .container {
    height: auto;
  }

  .card__container {
    grid-template-columns: repeat(3, 1fr);
  }
  .card__img {
    width: 348px;
  }
  .card__data {
    width: 316px;
    padding-inline: 2.5rem;
  }
}
.button-container {
  display: flex;
  justify-content: center;
  /*margin-top: 20px;*/
}

.button-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 18px;
  background: #d9d9d9;
  border-radius: 30px;
  width: 200px;
  color: rgb(0, 0, 0);
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  text-align: center;
}

.button-link:hover {
  background-color: rgb(41, 41, 41);
  color: white;
}

.view-ybs0 {
  background-color: #353535;
  color: white;
  border: none;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  /*margin-top: 29px;*/
  width: 150px;
  transition: background-color 0.3s;
}

.view-ybs0:hover {
  background-color: #505458;
}

/* Mobile  */
@media (max-width: 600px) {
  .embark {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
  }

  .embark {
    width: 90%;
    max-width: 350px;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
  }
}

.section-container {
  position: relative;
}

.join {
  /*position: sticky;*/
  bottom: 0;
  width: 100%;
  background-color: #f4f4f4;
  padding-top: 30px;
    padding-bottom: 30px;  

  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 60px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.13), 0 4px 12px rgba(0, 0, 0, 0.13);

  flex-wrap: wrap;
}

.join-text {
  margin: 0;
  font-size: 23px;
  flex: 1;
  color: #0c0c0c;
  padding-left: 5%;
}

.join-text {
  color: white;
}

.join-buttons {
  padding-right: 50px;
}

@media (max-width: 768px) {
  .join-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
  }
  .embark-header-line {
    width: 130px;
    height: 0.5px;
  }

  .join {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .join-text {
    margin-bottom: 10px;
    padding-left: 5%;
    padding-right: 15%;
    text-align: center;
  }

  .join-buttons {
    justify-content: center;
    padding-right: 10%;
    padding-left: 13%;
  }

  .join button {
    width: 80%;
    font-size: 15px;
    width: 230px;
  }

  .embark-page {
    height: 140%;
  }

  .join-text {
    padding-right: 40px;
  }
  
  .embark-header-title {
    font-size: 18px;
  }
  
  .embark-title{
      font-size: 20px;
  }

  .embark-header-line {
    width: 16%;
    height: 0.5px;
  }

  .embark-subtitle {
    font-size: 12px;
  }
}

@media (max-width: 600px) {
  .join-buttons {
    gap: 20px;
  }
  .embark-header-line {
    width: 50px;
    height: 0.5px;
  }

  .join-buttons {
    justify-content: center;
    padding-right: 10%;
    padding-left: 10%;
  }

  .join-text {
    padding-right: 45px;
  }

  .embark {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
  }

  .embark {
    width: 50%;
    max-width: 350px;
    display: flex;
    justify-content: center;
  }

  /*.embark:nth-child(n + 3) {*/
  /*  display: none;*/
  /*}*/

  .embark-subtitle {
    font-size: 15px;
  }

  .join-text {
    margin-bottom: 10px;
    padding-left: 15%;
    padding-right: 15%;
    text-align: center;
  }
}

/*@media (max-width: 1190px) {*/
/*  .embark:nth-child(n + 4) {*/
/*    display: none;*/
/*  }*/
/*}*/

.card__container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* NEW CODEEEE*/
.card__article {
  flex: 0 1 calc(25% - 2rem);
  max-width: calc(25% - 2rem);
}

/* Tablets: 3 cards */
@media screen and (max-width: 1190px) {
  /*.card__article:nth-child(4) {*/
  /*  display: none !important;*/
  /*}*/

  .card__article {
    flex: 0 1 calc(33.33% - 2rem);
    max-width: calc(29.33% - 2rem);
  }

  .card__data {
    width: 250px;
  }
}

/* Tablet: 2 cards visible */
@media screen and (max-width: 1024px) {
  /*.card__article:nth-child(3),*/
  /*.card__article:nth-child(4) {*/
  /*  display: none !important;*/
  /*}*/

  .card__article {
    flex: 0 1 45%;
    max-width: 45%;
  }
  .card__article {
    width: 80% !important;
  }
}

/* Mobile: 2 cards stacked + adjustments */
@media screen and (max-width: 600px) {
  .rectangle-buttons {
    padding-right: 40px;
    gap: 20px;
  }

  .card__container {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
  }

  .card__article {
    width: 100%;
    max-width: 350px;
  }

  /*.card__article:nth-child(n + 3) {*/
  /*  display: none !important;*/
  /*}*/

  .card__image img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }
}
