/* ---------- CARD GRID ---------- */
.special-list .list-specials,
.special-detail-page .list-specials {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
  gap: 28px;
}

.special-list .row-list-specials {
  display: grid;
}

/* ---------- CARD ---------- */
.wrap-card-special {
  max-width: none;
}

.spc-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.08);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  height: 100%;
}

.spc-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #1D4288, #3eb049);
  z-index: 3;
}

.spc-card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  transform: translateY(-3px);
}

/* ---------- CARD IMAGE ---------- */
.spc-card__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 8;
  background: #e8eaed;
}

.spc-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* subtle overlay on image */
.spc-card__image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.22);
  pointer-events: none;
}

.spc-card__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 6px 16px;
  font-family: Inter, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: rgba(62,176,73,0.65);
  border-radius: 100px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  z-index: 2;
}

/* ---------- CARD BODY ---------- */
.spc-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 24px 24px;
}

/* Brand logo row — sits at top of body */
.spc-card__brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  margin-bottom: 10px;
}

.spc-card__brand-logo {
  max-height: 28px;
  max-width: 120px;
  object-fit: contain;
}

.spc-card__dates {
  display: inline-block;
  font-family: Inter, sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1D4288;
  background: rgba(29,66,136,0.08);
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.01em;
}

.spc-card__title {
  font-family: Inter, sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: #1a1a1a;
  line-height: 1.2;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.spc-card__subtitle {
  font-family: Inter, sans-serif;
  font-size: 0.88rem;
  font-weight: 500;
  color: #555;
  line-height: 1.5;
  margin: 0 0 6px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.spc-card__desc {
  font-family: Inter, sans-serif;
  font-size: 0.84rem;
  font-weight: 400;
  color: #666;
  line-height: 1.5;
  margin: 0 0 20px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  flex: 1;
}

/* ---------- CARD ACTIONS ---------- */
.spc-card__actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
}

.spc-card__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  font-family: Inter, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-align: center;
}

.spc-card__btn--primary {
  background: #1D4288;
  color: #fff !important;
}

.spc-card__btn--primary:hover {
  background: #163672;
  color: #fff !important;
  text-decoration: none;
}

.spc-card__btn--secondary {
  background: transparent;
  color: #1D4288;
  border: 1.5px solid rgba(29,66,136,0.25);
}

.spc-card__btn--secondary:hover {
  background: rgba(29,66,136,0.06);
  border-color: rgba(29,66,136,0.4);
  color: #1D4288;
  text-decoration: none;
}

.spc-card__btn:focus-visible {
  outline: 2px solid #1D4288;
  outline-offset: 2px;
}

/* ---------- CARD FOOTER ---------- */
.spc-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  margin-top: 14px;
  border-top: 1px solid #f0f0f0;
}

.spc-card__terms {
  background: none;
  border: none;
  padding: 0;
  font-family: Inter, sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
  color: #1D4288;
  cursor: pointer;
  text-decoration: none;
  opacity: 0.6;
  transition: opacity 0.15s ease;
}

.spc-card__terms:hover {
  opacity: 1;
  text-decoration: underline;
}

.spc-card__terms:focus-visible {
  opacity: 1;
  outline: 2px solid #1D4288;
  outline-offset: 2px;
}

.spc-card__small-logo {
  max-height: 22px;
  max-width: 70px;
  object-fit: contain;
}

.spc-card__terms-body {
  padding: 12px 16px;
  margin: 6px 16px 8px;
  background: #f8f9fa;
  border-radius: 8px;
  font-family: Inter, sans-serif;
  font-size: 0.76rem;
  line-height: 1.6;
  color: #555;
}

/* ---------- MODAL ---------- */
.spc-card-modal .modal-dialog {
  max-width: 560px;
}

.spc-card-modal .modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid #eee;
}

.spc-card-modal .modal-header img {
  cursor: pointer;
  width: 20px;
  height: 20px;
}

.spc-card-modal .modal-title {
  font-family: Inter, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #1D4288;
  margin: 0;
}

.spc-card-modal .modal-body {
  padding: 24px;
  font-family: Inter, sans-serif;
  font-size: 0.9rem;
  line-height: 1.6;
  color: #333;
}

.spc-card-modal .modal-footer {
  padding: 12px 24px 20px;
  border-top: none;
}

.spc-card-modal .close-button-modal {
  background: #fff;
  border: 1.5px solid #1D4288;
  border-radius: 10px;
  padding: 10px 28px;
  font-family: Inter, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #1D4288;
  cursor: pointer;
  transition: all 0.15s ease;
}

.spc-card-modal .close-button-modal:hover {
  background: rgba(29,66,136,0.06);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
  .special-list .list-specials,
  .special-detail-page .list-specials {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .spc-card__body {
    padding: 16px 20px 20px;
  }

  .spc-card__title {
    font-size: 1.15rem;
  }

  .spc-card__actions {
    flex-direction: column;
  }
}

@media (min-width: 769px) and (max-width: 1199px) {
  .special-list .list-specials,
  .special-detail-page .list-specials {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .special-list .list-specials,
  .special-detail-page .list-specials {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- DETAIL PAGE OVERRIDES ---------- */
.spc-card--detail {
  flex-direction: row;
  border-radius: 16px;
  max-width: none;
}

.spc-card--detail .spc-card__image-wrap {
  flex: 0 0 45%;
  aspect-ratio: auto;
  min-height: 360px;
}

.spc-card--detail .spc-card__body {
  padding: 28px 32px;
}

.spc-card--detail .spc-card__title {
  font-size: 1.6rem;
  -webkit-line-clamp: unset;
}

.spc-card--detail .spc-card__subtitle {
  -webkit-line-clamp: unset;
}

.spc-card--detail .spc-card__desc {
  -webkit-line-clamp: unset;
}

@media (max-width: 992px) {
  .spc-card--detail {
    flex-direction: column;
  }

  .spc-card--detail .spc-card__image-wrap {
    flex: none;
    aspect-ratio: 16 / 10;
    min-height: auto;
  }
}
