/* ===== GLOBAL LAYOUT ===== */
.__power-bg {
  padding: 96px 32px;
}

.__power-global {
  display: flex;
  gap: 32px;
  flex-direction: column;
  max-width: 1440px;
  margin: 0 auto;
}

/* ===== HEADER ===== */
.__power-header {
  display: flex;
  padding: 0 64px;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}

.__power-header h2 {
  padding: 0 50px;
  color: #000;
}

/* ===== MODEL CONTAINER ===== */
.__power-model {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.__power-model-img {
  width: 90%;
  height: 180px;
  position: relative;
  margin: 0 auto;
}

/* ===== TAB ICONS (Icons trên đầu) ===== */
.__power-model-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 220px;
}

.__power-model-content-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.__power-model-content-icon {
  width: 70px;
  height: 70px;
  position: relative;
  flex-shrink: 0;
}

.__power-model-content-icon img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s ease;
}

.__power-model-content-icon .icon-active {
  opacity: 0;
}

.__power-model-content-icon .icon-default {
  opacity: 1;
}

.__power-model-content-item.active .__power-model-content-icon .icon-default {
  opacity: 0;
}

.__power-model-content-item.active .__power-model-content-icon .icon-active {
  opacity: 1;
}

.__power-model-content-text {
  font-size: 18px;
  line-height: 24px;
  font-weight: 500;
}

/* ===== ICON STATES (Dùng chung) ===== */
.icon-default {
  opacity: 1;
}

.icon-active {
  opacity: 0;
}

.__power-model-content-item.active .icon-default {
  opacity: 0;
}

.__power-model-content-item.active .icon-active {
  opacity: 1;
}

/* ===== SWIPER ===== */
.mySwiper {
  width: 100%;
  overflow: hidden;
}

.mySwiper .swiper-slide {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
}

.mySwiper .swiper-slide-active {
  opacity: 1;
  visibility: visible;
}

.mySwiper .swiper-slide:first-child {
  opacity: 1;
  visibility: visible;
}

.mySwiper.swiper-initialized .swiper-slide {
  opacity: 0;
  visibility: hidden;
}

.mySwiper.swiper-initialized .swiper-slide-active {
  opacity: 1;
  visibility: visible;
}

/* ===== BODY CONTAINER ===== */
.__power-body {
  border: 12px solid #e0f2fe;
  border-radius: 32px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.__power-row {
  gap: 64px;
  padding: 0px 64px 53px 64px;
  margin-top: 95px;
}

.__power-title {
  font-size: 32px;
  line-height: 44px;
}

.__power-row-item {
  display: flex;
  flex-direction: column;
  gap: 24px;
  flex: 1;
}

.__power-row-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ===== CONTENT ICONS (Icons trong slide content) ===== */
.__power-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.__power-content-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.__power-content-icon {
  width: auto;
  height: 18px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.__power-content-icon img {
  width: 100%;
  height: auto !important;
  object-fit: contain;
}

/* ===== RESPONSIVE: 1200px - 1439px ===== */
@media (min-width: 1200px) and (max-width: 1439px) {
  .__power-model-img {
    width: 100%;
    max-width: 900px;
    height: auto;
    aspect-ratio: 958 / 180;
    margin: 0 auto;
  }

  .__power-model-content {
    height: clamp(180px, 16vw, 220px);
  }
}

/* ===== RESPONSIVE: 1440px+ ===== */
@media (min-width: 1440px) {
  .__power-model {
    max-width: 1100px;
    margin: 0 auto;
  }

  .__power-model-img {
    width: 958px;
    height: 180px;
    margin: 0 auto;
  }

  .__power-model-content {
    height: 220px;
  }

  .__power-row {
    gap: 64px;
    padding: 0 64px 53px 64px;
    margin-top: 95px;
  }

  .__power-title {
    font-size: 32px;
    line-height: 44px;
  }
}

/* ===== RESPONSIVE: Exactly 1200px ===== */
@media (width: 1200px) {
  .__power-row {
    flex-direction: column-reverse;
  }
  
  .__power-row-item {
    width: 100%;
  }
}

/* ===== RESPONSIVE: 769px - 1199px (Tablet) ===== */
@media (min-width: 769px) and (max-width: 1199px) {
  .__power-model-img {
    display: none;
  }
  
  .__power-model-content {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    min-height: 96px;
    align-items: flex-start;
    gap: 8px;
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  
  .__power-model-content-item {
    position: relative;
  }
  
  .__power-row {
    flex-direction: column;
  }
  
  .__power-row-item {
    width: 100%;
  }
}

/* ===== RESPONSIVE: Mobile (max 768px) ===== */
@media (max-width: 768px) {
  .__power-bg {
    padding: 48px 16px;
  }
  
  .__power-header {
    padding: 0 16px;
  }
  
  .__power-header h2 {
    padding: 0;
  }
  
  .__power-header h2 span {
    display: block;
  }

  .__power-model {
    position: relative;
  }

  .__power-model-img {
    display: none;
  }

  .__power-model-content {
    position: relative;
    width: 100%;
    height: auto;
    display: flex;
    min-height: 96px;
    align-items: flex-start;
    gap: 8px;
    flex-direction: row;
    flex-wrap: nowrap;
    padding: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .__power-model-content::-webkit-scrollbar {
    display: none;
  }

  .__power-model-content-item {
    position: relative !important;
    top: unset !important;
    left: unset !important;
    min-width: 100px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    cursor: pointer;
  }

  .__power-model-content-text {
    display: block;
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
  }

  .__power-model-content-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
  }

  .mySwiper {
    overflow: visible;
    display: block;
  }

  .swiper-slide {
    display: block;
  }

  .__power-row {
    gap: 24px;
    padding: 24px 0;
    margin: 0;
  }

  .__power-row-item {
    flex: unset;
    width: 100%;
  }
  
  .__power-row-item img {
    object-fit: cover;
  }

  .__power-title {
    font-size: 28px;
    line-height: 44px;
  }

  .__power-content-text {
    font-size: 16px;
    line-height: 32px;
  }
}

/* ===== ELEMENTOR EDITOR MODE ===== */
body.elementor-editor-active .mySwiper {
  position: relative;
}

/* Hiển thị tất cả slides với border */
body.elementor-editor-active .mySwiper .swiper-slide {
  opacity: 0.3 !important;
  visibility: visible !important;
  position: relative !important;
  border: 2px dashed #e0e0e0;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
}

/* Hover effect */
body.elementor-editor-active .mySwiper .swiper-slide:hover {
  opacity: 0.8 !important;
  border-color: #0073aa;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.2);
}

/* Slide đang active */
body.elementor-editor-active .mySwiper .swiper-slide.editor-active {
  opacity: 1 !important;
  border-color: #00a32a;
  background: #f0f9ff;
}

/* Badge số slide */
body.elementor-editor-active .mySwiper .swiper-slide::before {
  content: "Slide " attr(data-slide-index);
  position: absolute;
  top: 10px;
  right: 10px;
  background: #0073aa;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  z-index: 10;
  pointer-events: none;
}

/* Badge cho slide active */
body.elementor-editor-active .mySwiper .swiper-slide.editor-active::before {
  background: #00a32a;
  content: "Slide " attr(data-slide-index) " ✓";
}

/* Ẩn các slide không active */
body.elementor-editor-active .mySwiper .swiper-slide:not(.editor-active) {
  display: none;
}

/* Chỉ hiển thị slide active */
body.elementor-editor-active .mySwiper .swiper-slide.editor-active {
  display: block;
}

/* Clickable area trong editor */
body.elementor-editor-active .__power-editor-clickable {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

body.elementor-editor-active .__power-editor-clickable:hover {
  background-color: rgba(0, 115, 170, 0.05);
}

body.elementor-editor-active .__power-model-content {
  position: relative !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  gap: 16px !important;
  height: auto !important;
  padding: 20px !important;
  background: #f5f5f5;
  border: 2px dashed #ccc;
  border-radius: 8px;
  margin-bottom: 20px;
}

body.elementor-editor-active .__power-model-content-item {
  position: relative !important;
  top: unset !important;
  left: unset !important;
  flex-shrink: 0;
}

body.elementor-editor-active .__power-model-img {
  display: none !important;
}