
.bg-image {
   position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100% !important;
    transform: translate(-50%, -50%); 
    object-fit: cover; 
    transition: opacity 1s ease; 
    z-index: -1;
    display: block !important;
    opacity: 0;
}

.bg-image.fadeout {
  opacity: 0 !important;
}
.bg-image.next {
    opacity: 1;
    z-index: 0 !important;
}
.bg-image.current {
    opacity: 1;
    z-index: 1 !important;
}

{# ============================== #}
{#      TYPEWRITER CURSOR         #}
{# ============================== #}

.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 0.9em;
  background-color: currentColor;
  margin-left: 2px;
  vertical-align: baseline;
  animation: blink-cursor 0.7s step-end infinite;
}

@keyframes blink-cursor {
  from, to { opacity: 1; }
  50% { opacity: 0; }
}

{# ============================== #}
{#     VIDEO EMBED CONTAINER      #}
{# ============================== #}

.c-video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.c-video-embed.c-video-vertical {
  padding-bottom: 177.78%;
  max-width: 360px;
}

.c-video-vertical .hs-video-wrapper {
  padding-bottom: 177.78% !important;
}

.c-video-vertical .hs-video-container {
  max-width: 360px;
  margin: 0 auto;
}

.c-content-con.c-video-vertical {
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.c-video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

{# ============================== #}
{#     SA QUIZ MODULE STYLES      #}
{# ============================== #}

.sa-quiz {
  --_primary: var(--sa-primary, rgba(78, 47, 145, 1));
  --_accent: var(--sa-accent, rgba(0, 164, 189, 1));
  --_hover: var(--sa-hover, rgba(255, 122, 89, 1));
  --_transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Panel transitions */
.sa-quiz__panel {
  display: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity var(--_transition), transform var(--_transition);
}
.sa-quiz__panel.is-active { display: block; }
.sa-quiz__panel.is-visible { opacity: 1; transform: translateY(0); }

/* Question rows */
.sa-quiz__questions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sa-quiz__row {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #fff;
  border: 2px solid #e8e8e8;
  border-radius: 10px;
  padding: 15px 20px;
  transition: border-color var(--_transition), box-shadow var(--_transition);
}
.sa-quiz__row.is-answered { border-color: rgba(78, 47, 145, 0.2); }
.sa-quiz__row.is-unanswered {
  border-color: #e74c3c;
  box-shadow: 0 0 0 1px #e74c3c;
  animation: sa-shake 0.35s ease-in-out;
}

@keyframes sa-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

.sa-quiz__question {
  flex: 1 1 0%;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  line-height: 1.4;
  min-width: 0;
}

/* Segmented control */
.sa-quiz__options {
  display: flex;
  flex-shrink: 0;
  border: 2px solid #d0d0d0;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f5f5;
}

.sa-quiz__option {
  appearance: none;
  border: none;
  border-right: 1px solid #d0d0d0;
  background: transparent;
  color: #666;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--_transition), color var(--_transition);
  user-select: none;
  line-height: 1.3;
  position: relative;
}
.sa-quiz__option--last { border-right: none; }

.sa-quiz__option:hover {
  background: rgba(78, 47, 145, 0.08);
  color: #333;
}

.sa-quiz__option[aria-pressed="true"] {
  background: var(--_primary);
  color: #fff;
}

.sa-quiz__option:focus-visible {
  outline: 2px solid var(--_primary);
  outline-offset: -2px;
  z-index: 1;
}

/* Validation */
.sa-quiz__validation {
  font-size: 14px;
  font-weight: 500;
  color: #e74c3c;
  min-height: 1.5em;
  margin-top: 15px;
  text-align: center;
  transition: opacity var(--_transition);
}
.sa-quiz__validation:empty { opacity: 0; }

/* Submit - uses Clean Pro button classes, just add spacing */
.sa-quiz__submit {
  display: block;
  margin: 25px auto 0;
}

/* Results */
.sa-quiz__result { display: none; text-align: center; }
.sa-quiz__result.is-active { display: block; }

.sa-quiz__result-heading {
  font-family: "Inter Tight", "Rubik", sans-serif;
  color: var(--_primary);
  font-size: 28px;
  font-weight: 800;
  margin: 0 0 15px;
  line-height: 1.2;
}

.sa-quiz__result-body {
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}
.sa-quiz__result-body p { margin: 0 0 10px; }
.sa-quiz__result-body p:last-child { margin-bottom: 0; }

/* Result actions - buttons use Clean Pro classes */
.sa-quiz__result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

/* Responsive */
@media (max-width: 640px) {
  .sa-quiz__row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px 15px;
  }
  .sa-quiz__options { width: 100%; }
  .sa-quiz__option { flex: 1; text-align: center; padding: 10px 8px; font-size: 12px; }
  .sa-quiz__result-heading { font-size: 22px; }
  .sa-quiz__result-actions { flex-direction: column; align-items: center; }
}
