/* ==============================================
   Widget 1 — Expandable Card Slider
   expandable-card-slider/assets/css/ecs-slider.css
============================================== */

.ecs-wrapper { display: block; width: 100%; box-sizing: border-box; }

/* ── Navigation row ── */
.ecs-nav-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 16px;
}

.ecs-nav-arrow {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1.5px solid #ddd;
  background: #f5f5f5;
  color: #333;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .25s, border-color .25s, color .25s;
  flex-shrink: 0;
  line-height: 1;
}
.ecs-nav-arrow:hover { background: #7c2d55; border-color: #7c2d55; color: #fff; }

/* ── Track ── */
.ecs-track {
  display: flex;
  gap: 16px;
  height: 400px;
  overflow-x: auto;
  overflow-y: visible;
  align-items: stretch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ecs-track::-webkit-scrollbar { display: none; }

/* ── Card ── */
.ecs-card {
  position: relative;
  flex-shrink: 0;
  height: 400px;
  width: 300px;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  outline: none;
  background: #eeebe8;
  transition: width 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}
.ecs-card:focus-visible { box-shadow: 0 0 0 3px #7c2d55; }

/* ── Inactive layer ── */
.ecs-inactive-layer {
  position: absolute; inset: 0;
  padding: 28px 24px;
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 1; pointer-events: all;
  transition: opacity .22s ease;
  box-sizing: border-box;
}
.ecs-inactive-title { font-size: 22px; font-weight: 700; color: #1a1a1a; line-height: 1.25; }
.ecs-inactive-footer { display: flex; align-items: flex-end; justify-content: space-between; }
.ecs-inactive-btn {
  display: inline-flex; align-items: center;
  padding: 10px 20px; border: 1.5px solid #bbb; border-radius: 8px;
  background: transparent; font-size: 13px; font-weight: 600; color: #1a1a1a;
  cursor: pointer; font-family: inherit;
  transition: border-color .2s, color .2s;
}
.ecs-inactive-btn:hover { border-color: #7c2d55; color: #7c2d55; }
.ecs-card-icon { width: 68px; height: 68px; opacity: .12; flex-shrink: 0; color: #444; }

/* ── Active layer ── */
.ecs-active-layer {
  position: absolute; inset: 0;
  padding: 32px 28px;
  display: flex; flex-direction: row; align-items: stretch; gap: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease;
  box-sizing: border-box;
}
.ecs-active-left { flex: 1; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.ecs-active-title { font-size: 21px; font-weight: 800; color: #fff; line-height: 1.22; margin-bottom: 16px; opacity: 0; transform: translateY(14px); }
.ecs-active-list { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateY(14px); }
.ecs-active-list li { font-size: 13px; font-weight: 400; color: rgba(255,255,255,.88); line-height: 1.4; display: flex; align-items: flex-start; gap: 10px; }
.ecs-active-list li::before { content: ''; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.75); margin-top: 4px; }
.ecs-active-btn {
  display: inline-flex; align-items: center;
  padding: 11px 22px; border: 1.5px solid rgba(255,255,255,.65); border-radius: 8px;
  background: transparent; font-size: 13px; font-weight: 600; color: #fff;
  cursor: pointer; width: fit-content; text-decoration: none; font-family: inherit;
  opacity: 0; transform: translateY(14px);
  transition: background .25s, border-color .25s;
  pointer-events: none;
}
.ecs-active-btn:hover { background: rgba(255,255,255,.15); }
.ecs-active-right { flex-shrink: 0; width: 195px; border-radius: 14px; overflow: hidden; opacity: 0; transform: scale(0.94); }
.ecs-active-right img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── Active state ── */
.ecs-card.is-active { width: 580px; background: #7c2d55; }
.ecs-card.is-active .ecs-inactive-layer { opacity: 0; pointer-events: none; }
.ecs-card.is-active .ecs-active-layer { opacity: 1; pointer-events: all; }
.ecs-card.is-active .ecs-active-btn { pointer-events: all; }

/* ── Dots ── */
.ecs-dots-row { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 24px; }
.ecs-dot { width: 10px; height: 10px; border-radius: 50%; border: none; background: rgba(0,0,0,.25); cursor: pointer; padding: 0; transition: background .3s, transform .3s; }
.ecs-dot.is-active { background: #7c2d55; transform: scale(1.35); }

/* ── Responsive ── */
@media (max-width: 960px) {
  .ecs-card.is-active { width: 420px !important; }
  .ecs-card           { width: 240px !important; }
  .ecs-active-right   { width: 150px; }
}
@media (max-width: 640px) {
  .ecs-wrapper .ecs-track          { height: 450px !important; }
  .ecs-wrapper .ecs-card           { height: 450px !important; }
  .ecs-wrapper .ecs-card.is-active { width: 320px !important; }
  .ecs-wrapper .ecs-card           { width: 200px !important; }
  .ecs-wrapper .ecs-active-layer {
    flex-direction: column;
    gap: 14px;
    padding: 20px !important;
  }
  .ecs-wrapper .ecs-active-right {
    display: block;
    order: -1;
    width: 100% !important;
    height: 150px;
    border-radius: 12px;
  }
  .ecs-wrapper .ecs-active-left {
    width: 100%;
    justify-content: flex-start;
  }
  .ecs-wrapper .ecs-active-list    { margin: 0 0 12px; gap: 6px; }
  .ecs-wrapper .ecs-active-btn     { margin-top: 8px; }
  .ecs-wrapper .ecs-active-title   { font-size: 18px; }
  .ecs-wrapper .ecs-active-list li { font-size: 12px; }
}
@media (max-width: 420px) {
  .ecs-wrapper .ecs-track          { height: 450px !important; }
  .ecs-wrapper .ecs-card           { height: 450px !important; }
  .ecs-wrapper .ecs-card.is-active { width: 270px !important; }
  .ecs-wrapper .ecs-card           { width: 170px !important; }
  .ecs-wrapper .ecs-active-layer   { padding: 16px !important; }
  .ecs-wrapper .ecs-active-right   { height: 140px; }
  .ecs-wrapper .ecs-active-title   { font-size: 16px; margin-bottom: 10px; }
  .ecs-wrapper .ecs-active-list li { font-size: 11px; line-height: 1.3; }
  .ecs-wrapper .ecs-active-btn     { padding: 9px 16px; font-size: 12px; }
}
