/* defaults */
*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 62.5%; 
}


a,
a:link {
  font-family: inherit;
  text-decoration: none;
}

/* Button to open the modal */
.link-1 {
  font-size: 1.8rem;
  color: var(--light);
  background: var(--background);
  box-shadow: .4rem .4rem 2.4rem .2rem hsla(236, 50%, 50%, 0.3);
  border-radius: 100rem;
  padding: 1.4rem 3.2rem;
  transition: .2s;
  position: fixed; /* Fixed position to keep it at the start of the page */
  top: 1rem;
  left: 1rem;
}

.link-1:hover,
.link-1:focus {
  transform: translateY(-.2rem);
  box-shadow: 0 0 4.4rem .2rem hsla(236, 50%, 50%, 0.4);
}

/* modal */
.modal-container {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 3000;
  display: none; /* Hide by default */
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background: hsla(0, 0%, 40%, .6);
  --light: hsl(0, 0%, 100%);
  --background: linear-gradient(#801017, #9198e5);
}

.modal-container.show {
  display: flex; /* Show modal when .show is added */
}

.modal {
  width: 90%; 
  max-height: 90vh; /* Max height to prevent modal from exceeding viewport */
  padding: 4rem 2rem;
  border-radius: .8rem;
  color: var(--light);
  background: var(--background);
  position: relative;
  overflow: auto; /* Allows vertical scrolling */
}

.modal__details {
  text-align: center;
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid hsla(0, 0%, 100%, .4);
}

.modal__title {
  font-size: 3.2rem;
  margin-bottom: 1rem;
}

.modal__description {
  font-size: 1.6rem;
  font-style: italic;
}

.modal__text {
  padding: 0 4rem;
  margin-bottom: 4rem;
  font-size: 1.6rem;
  line-height: 2;
  position: relative;
}

.modal__text::before {
  content: '';
  position: absolute;
  top: 0%;
  left: 100%;
  transform: translate(-50%, -50%);
  width: 18rem;
  height: 18rem;
  border: 1px solid hsla(0, 0%, 100%, .2);
  border-radius: 100rem;
  pointer-events: none;
}

.modal__btn {
  padding: 1rem 1.6rem;
  border: 1px solid hsla(0, 0%, 100%, .4);
  border-radius: 100rem;
  color: inherit;
  background: transparent;
  font-size: 1.6rem;
  text-align:center; 
  font-family: inherit;
  letter-spacing: .2rem;
  transition: .2s;
  cursor: pointer;    
  display: flex;
  flex-direction: column;
  width:100%; 
  margin-left:50px; 
}

.modal__btn:hover,
.modal__btn:focus {
  border-color: hsla(0, 0%, 100%, .6);
  transform: translateY(-.2rem);
}

/* Close Button */
.link-2 {
  width: 10rem; 
  height: 8rem;
  border: 1px solid hsla(0, 0%, 100%, .4);
  border-radius: 100rem;
  color: inherit;
  font-size: 6.2rem; 
  position: absolute;
  top: 2rem;
  right: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: .2s;
  cursor: pointer;
  background: none; 
  border: none;
}

.link-2::before {
  content: ''; 
  transform: translateY(-.1rem);
}

.link-2:hover,
.link-2:focus {
  border-color: hsla(0, 0%, 100%, .6);
  transform: translateY(-.2rem);
}

/* Second Version Link */
/* =============================================== */
.second-version-link,
.second-version-link:link {
  color: hsl(236, 50%, 50%);
  padding: .8rem 1.6rem .8rem .2rem;
  border-bottom: 2px solid hsl(236, 50%, 50%);
  font-size: 1.4rem;
  font-weight: bold;
  position: absolute;
  top: 4rem;
  right: 4rem;
}

.second-version-link::after {
  content: '\2197';
  position: absolute;
  top: 0;
  right: 0;
  font-size: .9em;
}

.abs-site-link {
  position: fixed;
  bottom: 20px;
  left: 20px;
  color: hsla(0, 0%, 0%, .6);
  font-size: 1.6rem;
}

/* Cards */
/* =============================================== */
.cards__container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 70px; 
}

.card__imge {
  height: 360px;
  width: 350px;
  margin: 0 auto;
  background-color: grey;
  border-radius: .8rem;
  margin-bottom:20px;
}

.card__title {
  font-size: 2rem;
  margin-top: 1rem;
} 

.card__description {
  font-size: 1.4rem;
  color: hsl(0, 0%, 40%);
}

#btn_btn {
  background-color:#801017;  
  width:70%;
}

#btn_btn:hover {
  width:70%;
}
