h1 {
  font-size: 3em;
  font-weight: 600;
  margin-top: 50px;
  text-transform: uppercase;
}

/* Container for Cards */
.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 0 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Card Styling */
.cards {
  position: relative;
  width: 20%;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  background-color: #fff;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.cards:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Image Styling */
.cards img {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-bottom: 5px solid #007bff;
}

/* Text Rectangle Styling */
.cards--three__rect-1, .cards--three__rect-2 {
  position: absolute;
  left: 0;
  width: 100%;
  padding: 15px;
  text-align: center;
  color: #fff;
  font-weight: 500;
  text-transform: uppercase;
  background-color: rgba(7, 100, 199, 1);
  letter-spacing: 1px;
}

.cards--three__rect-1 {
  bottom: 85px;
  font-size: 1.5em;
}

.cards--three__rect-2 {
  bottom: 40px;
  font-size: 1.1em;
  background-color: rgba(0, 123, 255, 1);
}

.shadow-1, .shadow-2 {
  position: relative;
  z-index: 2;
}

/* Circle Overlay for Design */
.cards--three__circle {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 100px;
  height: 100px;
  background-color: rgba(0, 123, 255, 0.1);
  border-radius: 50%;
  z-index: 1;
}

/* Social Icons */
.cards--three__list {
  list-style: none;
  padding: 10px 0;
  display: flex;
  justify-content: center;
  margin: 0;
  background-color: #f7f7f7;
  border-top: 1px solid #ddd;
}

.cards--three__list li {
  margin: 0 15px;
}

.cards--three__list a {
  font-size: 1.8em;

  transition: color 0.3s ease;
}

.cards--three__list a:hover {
  color: #007bff;
}

.fa-envelope.fa-shake {
  animation: shake 1s infinite alternate;
}

/* Hover animation for envelope icon */
@keyframes shake {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(10deg); }
}

/* Animation for Cards Hover */
.cards--three__circle {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .cards {
      width: 45%;
  }
}

@media (max-width: 768px) {
  .cards {
      width: 60%;
  }

  h1 {
      font-size: 2.5em;
  }
}

@media (max-width: 480px) {
  .cards {
      width: 90%;
  }

  h1 {
      font-size: 2em;
  }
}
