/* ui-cards.css */

.offer-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: stretch;
}

.offer-card {
  position: relative;
  flex: 1 1 calc(33.33% - 16px);
  max-width: calc(33.33% - 16px);
  height: 400px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  background-color: #f1f1f1;
  border: 1px solid #ddd;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  overflow: hidden;
}

.offer-card-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s;
}

.offer-card-front,
.offer-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 16px;
  box-sizing: border-box;
}

.offer-card-front {
  background-color: white;
  z-index: 2;
}

.offer-card-back {
  background-color: #fff;
  transform: rotateY(180deg);
  z-index: 1;
}

.offer-card.flipped .offer-card-inner {
  transform: rotateY(180deg);
}

.offer-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  border-radius: inherit;
}

.confirmation-message {
  color: red;
  font-weight: bold;
  line-height: 1.3;
}

.offer-card h3,
.offer-card p,
.offer-card button {
  margin: 12px 0;
  font-size: 1em;
  text-align: center;
}

.offer-card button,
.optin-button,
.giveaway-view-details {
  display: block;
  width: 100%;
  padding: 5px;
  background-color: #0073aa;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.offer-card button:hover,
.optin-button:hover,
.giveaway-view-details:hover {
  background-color: #005f8a;
}

.offer-card-back h3 {
  margin-bottom: 16px;
  text-align: center;
}

.offer-card-back .giveaway-details,
.offer-card-back p {
  text-align: left;
  margin-bottom: 16px;
  line-height: 1.6;
  font-size: 14px;
}

.offer-card-back p strong {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.close-card {
  position: absolute;
  top: 10px;
  right: 10px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  color: black;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s, color 0.3s;
}

.close-card:hover {
  background: #f0f0f0;
  color: #333;
}

.business-card {
  border: 1px solid #ddd;
  padding: 10px;
  margin: 10px;
  width: 333px;
  display: inline-block;
  text-align: center;
  background: white;
  border-radius: 10px;
}

.business-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 20px 0;
}

.business-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.business-card img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 10px;
}

.business-card h3 {
  font-size: 1.4em;
  margin: 10px 0;
  color: #333;
}

.business-card p {
  font-size: 1em;
  color: #777;
  margin-bottom: 15px;
}

.business-card-link {
  display: inline-block;
  padding: 10px 20px;
  background-color: #0073aa;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.business-card-link:hover {
  background-color: #005177;
}
