/* Slider container with fixed height to prevent content shift */
#if-slider {
  width: 100%;
  height: 180px;          /* Fixed height so form remains visible */
  overflow: hidden;
  position: relative;
  margin-bottom: 16px;
}

/* Position slides absolutely; only active slide visible */
#if-slider .if-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

/* Show the active slide */
#if-slider .if-slide.active {
  display: block;
  opacity: 1;
  z-index: 2;
}

/* Fallback: show first slide when no JS */
#if-slider .if-slide:first-of-type {
  display: block;
  opacity: 1;
  z-index: 2;
}

/* Other UI styles remain unchanged */
.if-lang-select { display: flex; gap: 8px; margin-bottom: 16px; }
.if-lang-btn { padding: 6px 12px; border: 1px solid #ccc; background: #f9f9f9; border-radius: 4px; cursor: pointer; transition: background .2s, color .2s; }
.if-lang-btn.active, .if-lang-btn:hover { background: #3961e7; color: #fff; border-color: #3961e7; }

.if-group { margin-bottom: 12px; }
.if-group label { font-weight: bold; margin-bottom: 4px; display: block; }
.if-buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.if-btn { padding: 8px 16px; border: 1px solid #ccc; background: #f9f9f9; border-radius: 4px; cursor: pointer; transition: background .2s, color .2s; }
.if-btn.active, .if-btn:hover { background: #3961e7; color: #fff; border-color: #3961e7; }

#if-result-frontend { margin-top: 20px; }
.if-result-text { white-space: pre-wrap; font-size: 1em; line-height: 1.4; margin-bottom: 12px; }
.if-actions { display: flex; gap: 10px; }
.if-actions .button, .if-actions .if-print, .if-actions .if-whatsapp, .if-actions .if-new { padding: 8px 14px; font-size: 1em; text-decoration: none; border: 1px solid #3961e7; border-radius: 4px; background: #fff; color: #3961e7; cursor: pointer; transition: background .2s, color .2s; }
.if-actions .button:hover, .if-actions .if-print:hover, .if-actions .if-whatsapp:hover, .if-actions .if-new:hover { background: #3961e7; color: #fff; }