/* No white background – only the section has a defined background */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: transparent;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100%;
}

.section-wrap {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
}

.carousel {
  position: relative;
  width: 100%;
  min-height: 170px;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #d0d0d0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}


.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: none;
  overflow: hidden;
  z-index: 1;
}

.slide.active {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  z-index: 2;
}

.slide.exiting {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  z-index: 3;
}

/* Consistent animation: always fade out right, fade in from left */
.slide.active .image-panel {
  animation: slideInFromLeft 0.6s ease-out;
}

.slide.exiting .image-panel {
  animation: slideOutToRight 0.6s ease-in;
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

.text-panel {
  flex: 1;
  min-width: 0;
  padding: 20px 24px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.text-panel h2 {
  margin: 0 0 10px 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.25;
}

.text-panel p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #333;
}

.image-panel {
  flex: 0 0 42%;
  min-width: 0;
  overflow: hidden;
  background: transparent;
  padding: 0;
}

.image-panel img {
  width: 100%;
  height: 100%;
  min-height: 170px;
  object-fit: cover;
  display: block;
  border-radius: 20px;
}

/* Pagination: progress bar + dots */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  padding: 0 8px;
}

.progress-track {
  width: 120px;
  height: 4px;
  background: #c0c0c0;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: #1a1a1a;
  border-radius: 2px;
  transition: width 0.1s linear;
}

.dots {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: #1a1a1a;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.dot:hover {
  opacity: 0.85;
  transform: scale(1.1);
}

.dot.active {
  transform: scale(1.2);
  opacity: 1;
}

.dot:focus-visible {
  outline: 2px solid #1a1a1a;
  outline-offset: 2px;
}

@media (max-width: 500px) {
  .carousel {
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }

  .image-panel {
    display: none;
  }

  .text-panel {
    flex: 1 1 100%;
    padding: 24px 20px 12px 20px;
    text-align: center;
    align-items: center;
    background: transparent;
  }

  .text-panel h2 {
    font-size: 1.15rem;
    text-align: center;
    margin: 0 0 12px 0;
  }

  .text-panel p {
    font-size: 0.9rem;
    text-align: center;
    max-width: 100%;
  }

  .pagination {
    margin-top: 8px;
  }
}
