.page-title {
  background-color: #f5f5f5;
  padding: 2rem 0;
  margin-bottom: 3rem;
  text-align: center;
}

.page-title h1 {
  color: #336776;
  font-weight: 700;
  margin: 0;
}

.activities-container {
  margin-bottom: 4rem;
  padding: 4rem 5rem;
}

.activity-card {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  min-height: 400px;
}

.large-card {
  position: relative;
  height: 100%;
  min-height: 700px;
  justify-content: end;
  transition: all 0.3s ease-in-out;
}


.large-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.66) 40%, rgba(0, 0, 0, 0.021) 80%);
    background-size: 100% 200%;
    background-position: 0 30%;
    z-index: 1;
    transition: background-position .5s ease-in-out;
  }
  
  .large-card:hover::after {
    background-position: 0 60%;
  }

.large-card .activity-img {
  position: absolute;
  height: 100%;
  width: 100%;
  z-index: 0;
}

.large-card .activity-content {
  z-index: 2;
  background: transparent;
  flex-flow: row nowrap;
  align-items: end;
  justify-content: center;
  gap: 1rem;
  position: relative;
}

.large-card .activity-content * {
  color: #fff;
}

.large-card .activity-btn {
  align-self: start;
}

.activity-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.activity-img {
height: 70%;
  min-height: 340px;
  overflow: hidden;
}

.activity-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.activity-card:hover .activity-img img {
  transform: scale(1.05);
}

.activity-content {
  padding: .5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #f9f9f9;
}
.activity-card:not(.large-card) .activity-content {
  flex: 1;
}

.activity-title {
    font-family: Cairo;
  font-size: 20px;
  font-weight: 700;
  color: #469e8d;
  margin-bottom: 1rem;
  line-height: 32px;
  text-align: right;
  align-self: start;
  flex: 1 2;
}

.activity-desc {
font-family: 'IBM Plex Sans Arabic';
  color: #10353C;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1 2 ;
  white-space: pre-wrap;
}

.activity-btn {
font-family: Almarai;
  display: inline-block;
  background-color: #469e8d;
  color: #fff !important;
  border-radius: 60px;
  height: 38px;
  max-width: 269px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  text-align: center;
  transition: all 0.3s ease;
  text-decoration: none;
  flex-shrink: 1;
}

.activity-btn:hover {
  background-color: #04525a;
}

/* Responsive adjustments */
@media (max-width: 1324px) {
    .activity-card::after{
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.845) 40%, rgba(0, 0, 0, 0.021) 80%);
    }
  .large-card{
    background: transparent;
    .activity-content{
        padding:  1.5rem;
        gap: 0;
        height: 100%;
        flex-flow: column nowrap;
        justify-content:end;
        align-items: start;
        *{
            flex: 0;
        }
    }
  }
  .activity-btn{
    width: 50%;
  }
}

@media (max-width: 768px) {
    .activities-container{
        padding: 1rem;
    }
  .page-title {
    padding: 1.5rem 0;
    margin-bottom: 2rem;
  }
  
  .page-title h1 {
    font-size: 1.8rem;
  }
  .large-card{
    min-height: 500px;
    .activity-title {
        font-size: 1.1rem;
      }
  }
  
 
}

@media (max-width: 576px) {
  .activity-img {
    min-height: 200px;
  }
  
  .activity-content {
    padding: 1.2rem;
  }
  
  .activity-title {
    font-size: 1.1rem;
  }
  .activity-btn{
    width: 100%;
    
  }
}
