/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
body, html { height: 100%; font-family: 'Poppins', sans-serif; overflow: hidden; }

/* Slideshow background */
.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  animation: morph 60s infinite ease-in-out;
  transform: scale(1.03);
}

/* Slide timing (10s apart) */
.slide1 { background-image: url('images/slide1.jpg'); animation-delay: 0s; }
.slide2 { background-image: url('images/slide2.jpg'); animation-delay: 6s; }
.slide3 { background-image: url('images/slide3.jpg'); animation-delay: 12s; }
.slide4 { background-image: url('images/slide4.jpg'); animation-delay: 18s; }
.slide5 { background-image: url('images/slide5.jpg'); animation-delay: 24s; }
.slide6 { background-image: url('images/slide6.jpg'); animation-delay: 30s; }
.slide7 { background-image: url('images/slide7.jpg'); animation-delay: 36s; }
.slide8 { background-image: url('images/slide8.jpg'); animation-delay: 42s; }
.slide9 { background-image: url('images/slide9.jpg'); animation-delay: 48s; }
.slide10 { background-image: url('images/slide10.jpg'); animation-delay: 54s; }

/* Alternate morph for even slides for variety */
.slide2, .slide4, .slide6, .slide8, .slide10 { animation-name: morphAlt; }

/* Smooth morph, gentle pan, even timing */
@keyframes morph {
  0%   { opacity: 0;   transform: scale(1.03) translateX(-1.5%); }
  3%   { opacity: 1;   transform: scale(1.05) translateX(-0.5%); }
  25%  { opacity: 1;   transform: scale(1.06)  translateX(1.5%); }
  33%  { opacity: 0;   transform: scale(1.03) translateX(0%); }
  100% { opacity: 0;   transform: scale(1.03) translateX(-1.5%); }
}

/* Alternate morph with different pan direction */
@keyframes morphAlt {
  0%   { opacity: 0;   transform: scale(1.03) translateX(1.5%); }
  3%   { opacity: 1;   transform: scale(1.05) translateX(0.5%); }
  25%  { opacity: 1;   transform: scale(1.06) translateX(-1.5%); }
  30%  { opacity: 0;   transform: scale(1.03) translateX(0%); }
  100% { opacity: 0;   transform: scale(1.03) translateX(1.5%); }
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.card-logo {
  display: block;
  margin: 0 auto 5px auto;
  width: 60px;
  height: auto;
}

/* Card */
.card {
  background: rgba(83, 79, 79, 0.16);
  border-radius: 20px;
  padding: 20px;
  width: 90%;
  max-width: 500px;
  text-align: center;
  color: #c9c9c9;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.295);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .card { width: 80%; padding: 20px; border-radius: 15px; }
  .card-logo { width: 55px; margin-bottom: 10px; }
  .card h1 { font-size: 1.1rem; }
  .intro-card,
  .card .subtitle,
  .card .support-text,
  .card .details { font-size: 0.7rem; }
  .partner-btn { padding: 14px 26px; font-size: 0.8rem; }
  .back-btn,
  .learn-more-link,
  .copy-btn,
  .ussd-btn { padding: 8px 16px; font-size: 0.7rem; }
  .ussd-option { padding: 8px 16px; font-size: 0.7rem; }
}

.highlight { color: #599ee7; font-weight: 700; }

/* Progress bar */
.progress-container {
  width: 100%;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  overflow: hidden;
  height: 20px;
}

#progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #b4d8ff, #599ee7, #305f91);
  background-size: 400% 100%;
  border-radius: 15px;
  transition: width 0.1ms ease-out;
  position: relative;
  animation: gradientFlow 5s ease infinite;
}

@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes fluidShine {
  0% { left: -30%; }
  50% { left: 100%; }
  100% { left: -30%; }
}

#progress-text {
  font-size: 0.85rem;
  font-weight: 500;
}

/* Partner button, USSD button, and USSD main button */
.partner-btn,
.ussd-btn,
.ussd-main-btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  background: #c9c9c9;
  color: #181818;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  align-self: center;
}

/* Copy button */
.copy-btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 8px;
  background: #c9c9c9;
  color: #181818;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

/* Hover effect for partner button, copy button, ussd button, ussd main button */
.partner-btn:hover,
.copy-btn:hover,
.ussd-btn:hover,
.ussd-main-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 15px rgba(89, 158, 231, 0.5);
  background: #599ee7;
  color: #e8e8e8;
}

/* Back button */
.back-btn {
  display: inline-block;
  padding: 8px 18px;
  margin-top: 8px;
  background: transparent;
  border: 1.5px solid #c9c9c9;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #c9c9c9;
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  align-self: center;
}

.back-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 15px rgba(89, 158, 231, 0.5);
  color: #599ee7;
  border: 1.5px solid #599ee7;
}

/* Learn More button */
.learn-more-link {
  display: inline-block;
  padding: 8px 18px;
  margin-top: 8px;
  border: 1.5px solid #c9c9c9;
  border-radius: 8px;
  font-size: 0.85rem;
  color: #c9c9c9;
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
  align-self: center;
  font-style: italic;
}

.learn-more-link:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 15px rgba(89, 158, 231, 0.5);
  color: #599ee7;
  border: 1.5px solid #599ee7;
}

/* Support text */
.support-text {
  font-style: italic;
  font-size: 0.85rem;
  margin-top: 10px;
  color: #c9c9c9;
}

/* Payment Card */
.payment-card {
  display: none;
  opacity: 0; 
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.payment-card .payment-option {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  gap: 10px;
}

.payment-card .details {
  flex: 1;
  text-align: left;
  font-size: 0.85rem;
  line-height: 1.5;
  display: block;
}

.payment-card .details span {
  pointer-events: none;
  text-decoration: none;
}

.payment-card .actions {
  display: flex;
  flex-direction: column;
  gap: 7.5px;
  align-items: flex-end;
}

/* USSD Overlay and Dropdown */
.ussd-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  background: rgba(0, 0, 0, 0);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.ussd-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

/* Glass morphing dropdown */
.ussd-dropdown-centered {
  background: rgba(37, 37, 37, 0.716);
  -webkit-backdrop-filter: blur(15px);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  width: 75%;
  text-align: center;
  box-shadow: 0 8px 10px rgba(0, 0, 0, 0.1);
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Show dropdown with ease-in */
.ussd-overlay.show, .ussd-dropdown-centered.show {
  opacity: 1;
}

/* Dropdown options */
.ussd-dropdown-centered .ussd-option {
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-align: center;
  background: #c9c9c9;
  color: #181818;
  font-weight: 600;
  transition: all 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.ussd-dropdown-centered .ussd-option:hover {
  background: #f3f2f2;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 6px 15px rgba(89, 158, 231, 0.5);
}

/* Hide original dropdown styles if any */
.ussd-dropdown:not(.centered) { display: none; }

/* Toast */
#toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  text-align: center;
  bottom: 28px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.281);
  color: #c9c9c9;
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.18s;
  z-index: 70;
  pointer-events: none;
}

#toast.visible {
  opacity: 1;
  pointer-events: auto;
}