/* Core layout */
.sayeh-accordion-wrap{
  --accent: #54c5d0;
  --pill-h: 58px;
  --circle: 44px;
  --gap: 12px;
  --bg: color-mix(in srgb, var(--accent) 18%, white);
  --dot: color-mix(in srgb, var(--accent) 92%, black 6%);
  direction: rtl;
  font-family: inherit;
}
.sayeh-acc-grid{
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(20px, 4vw, 56px);
  align-items: start;
}
.sayeh-acc-media{
  border-radius: 20px;
  overflow: hidden;
  min-height: 260px;
  /*background: #e9ecef;*/
  /*box-shadow: 0 10px 30px rgba(0,0,0,.08) inset;*/
}

/* new rules */
.sayeh-acc-media-frame img,
.sayeh-acc-media-frame video,
.sayeh-acc-media-frame iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/*.sayeh-acc-media-el{ width:100%; height:100%; display:block; object-fit:cover; }*/
/*.sayeh-acc-media-ph{ aspect-ratio:16/9; background:linear-gradient(135deg,#eee,#ddd); }*/

.sayeh-acc-title{
  font-size: clamp(20px, 2.3vw, 28px);
  font-weight: 800;
  margin: 6px 6px 14px;
  color:#262626;
}

/* Each accordion item */
.sayeh-acc{ 
  margin: 12px 0; 
  border: none; 
}
.sayeh-acc > summary::-webkit-details-marker{ display:none; }

.sayeh-acc > summary{
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  height: var(--pill-h);
  border-radius: 999px;
  background: var(--bg);
  color: #222;
  font-weight: 700;
  padding: 0 18px;
  padding-right: calc(var(--circle) + var(--gap) + 18px); /* icon on right */
  width: min(560px, 100%);
  position: relative;
  box-shadow: 0 3px 10px rgba(0,0,0,.08);
  transition: box-shadow .2s ease, background .2s ease;
}
.sayeh-acc > summary:hover{ box-shadow: 0 8px 22px rgba(0,0,0,.14); }
.sayeh-acc > summary .s-title{
  font-size: clamp(14px, 1.05vw, 18px);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* right circular icon */
.sayeh-acc > summary .s-dot {
  position: absolute;
  right: var(--gap);
  top: 50%;
  transform: translateY(-50%);
  width: var(--circle);
  height: var(--circle);
  border-radius: 50%;
  background: var(--dot);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12) inset,
    0 6px 16px rgba(0, 0, 0, 0.1);
}


.sayeh-acc > summary .s-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 26px;
  height: 26px;
  margin: auto;
  background: #fff;
  /* Updated SVG for the closed state (right-facing arrow) */
  mask: url('data:image/svg+xml;utf8,<svg width="21" height="25" viewBox="0 0 21 25" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.499998 13.366C-0.166668 12.9811 -0.166667 12.0189 0.5 11.634L19.25 0.808657C19.9167 0.423757 20.75 0.904881 20.75 1.67468L20.75 23.3253C20.75 24.0951 19.9167 24.5762 19.25 24.1913L0.499998 13.366Z" fill="white"/></svg>') no-repeat center / contain;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg width="21" height="25" viewBox="0 0 21 25" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.499998 13.366C-0.166668 12.9811 -0.166667 12.0189 0.5 11.634L19.25 0.808657C19.9167 0.423757 20.75 0.904881 20.75 1.67468L20.75 23.3253C20.75 24.0951 19.9167 24.5762 19.25 24.1913L0.499998 13.366Z" fill="white"/></svg>') no-repeat center / contain;
  transition: transform 0.2s ease;
}

.sayeh-acc[open] > summary .s-dot::after {
  /* Rotate the icon 90 degrees when the accordion is open */
  transform: rotate(-90deg);
}

/* body */
.sayeh-acc .s-body{
  display:none;
  padding: 14px 18px;
  margin-right: 26px;
  background:#fff;
  border-radius: 12px;
  color:#333; line-height:1.85; font-size:.95rem;
  border: none;
}
.sayeh-acc[open] .s-body{ display:block; }
.sayeh-acc[open] > summary{ background: color-mix(in srgb, var(--accent) 10%, #fff); }
.sayeh-acc[open] > summary .s-dot::after{ transform: rotate(-90deg); }

/* CTA button */
.s-body .s-more{
	float:left;
  display:inline-block; margin-top:10px;
  padding:15px 18px 15px 18px; border-radius:999px;
  background: #f4f3f3; color:#000; text-decoration:none; font-weight:700;
  transition: transform .15s ease;
}
.s-body .s-more:hover{ transform: translateY(-1px); }

/* Responsive */
@media (max-width: 992px){
  .sayeh-acc-grid{ grid-template-columns: 1fr; }
  .sayeh-acc-media{ order: -1; }
}

/* لیست آکاردئون: چینش ستونی و بدون wrap */
.sayeh-acc-list{
  display: flex;        /* یا اگه دوست داری: display:block; */
  flex-direction: column;
  flex-wrap: nowrap;
}

/* جزئیات هر آیتم: ترتیب را ثابت کن */
.sayeh-acc-list > .sayeh-acc{ order: 0; }

/* وقتی باز است هم تغییر ترتیب نده */
.sayeh-acc-list > .sayeh-acc[open]{ order: 0; }

/* اگر جایی column-reverse ست شده بود، اینجا خنثی‌اش کن */
@media (min-width: 1px){
  .sayeh-acc-list{ flex-direction: column !important; }
}

/* فاصله بین آیتم‌ها (اختیاری) */
.sayeh-acc-list > .sayeh-acc + .sayeh-acc{ margin-top: 12px; }
