.ft-events{ direction: rtl; text-align:right; }
.ft-events__wrap{ padding: 28px 20px 70px; }

/* Search */
.ft-events-search{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:13px;
  max-width:359px;
  margin-left:auto;
}
.ft-events-search__title{
  font-size:20px;
  line-height:16px;
  color:#1076b4;
  font-weight:700;
}
.ft-events-search__box{
  width:100%;
  height:56px;
  border-radius:10px;
  border:1px solid #1076b4;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 10px;
  box-sizing:border-box;
}
.ft-events-search__input{
  width:100%;
  border:0;
  outline:none;
  background:transparent;
  text-align:right;
  font-size:20px;
  line-height:16px;
  font-weight:600;
  color:#1076b4;
}
.ft-events-search__input::placeholder{ color:#a9a9a9; }
.ft-events-search__clear{ text-decoration:none; font-size:22px; color:#a9a9a9; padding:0 8px; }

/* List */
.ft-events-list{ margin-top:40px; display:flex; flex-direction:column; gap:34px; }
.ft-event{ display:flex; align-items:flex-start; justify-content:space-between; gap:20px; }
.ft-event__media{ width:436px; flex:0 0 436px; }
.ft-event__media img{ width:100%; height:219px; object-fit:cover; border-radius:10px; display:block; }

.ft-event__content{
  width:760px; max-width:760px;
  display:flex; flex-direction:column; align-items:flex-start; gap:24px;
}
.ft-event__head{ width:400px; display:flex; align-items:center; justify-content:flex-end; gap:8px; cursor:pointer;    flex-direction: row-reverse; }
.ft-event__title{ font-size:24px; line-height:24px; font-weight:700; color:#1076b4; }

/* checkbox */
.ft-event__check{ position:absolute; opacity:0; pointer-events:none; }
.ft-event__fakecheck{
  width:40px; height:40px; border-radius:8px;
  border:2px solid #1076b4; box-sizing:border-box;
  display:inline-flex; align-items:center; justify-content:center;
}
.ft-event__check:checked + .ft-event__fakecheck{ background:#1076b4; }

.ft-event__desc{ font-size:20px; line-height:32px; font-weight:500; color:#4c4d4d; width:100%; }

/* Form */
.ft-events-form{ margin-top:40px; }
.ft-events-form__title{ margin:0 0 14px; font-size:22px; color:#1076b4; font-weight:800; }
.ft-events-form__inner{
  width:100%;
  border-radius:10px;
  background:#fff;
  border:3px solid #40aba7;
  box-sizing:border-box;
  padding:24px;
}

.ft-booking{ width:100%; display:flex; flex-direction:column; gap:12px; }
.ft-booking__field input,
.ft-booking__field textarea{
  width:100%;
  border-radius:5px;
  border:1px solid rgba(100,100,100,.5);
  box-sizing:border-box;
  padding:10px;
  font-family:inherit;
  direction:rtl;
  text-align:right;
  outline:none;
  color:#222;
}
.ft-booking__field input{ height:56px; }
.ft-booking__field--textarea textarea{ height:83px; resize:none; }

.ft-booking__field input::placeholder,
.ft-booking__field textarea::placeholder{ color:#a6a4a4; font-size:14px; }

.ft-booking__submit{
  width:100%;
  height:56px;
  border-radius:10px;
  border:0;
  cursor:pointer;
  background: linear-gradient(85.19deg, #1076b4, #40aba7);
  font-size:20px;
  color:#fff;
  font-weight:600;
}

/* Messages */
.ft-form-msg{
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 700;
}
.ft-form-msg--ok{ border:1px solid rgba(64,171,167,.5); color:#0a7a67; background:#f1fffd; }
.ft-form-msg--err{ border:1px solid rgba(255,0,0,.2); color:#a30000; background:#fff2f2; }

/* Responsive */
@media (max-width:1100px){
  .ft-event{ flex-direction:column; }
  .ft-event__media, .ft-event__content{ width:100%; max-width:100%; flex:0 0 auto; }
  .ft-event__head{ width:100%; }
}


/* Search should be LEFT */
.ft-events-search{
  margin-left: 0 !important;
  margin-right: auto !important;
  align-items: flex-start !important;
}
.ft-events-search__box{
  justify-content: flex-end !important;
}
.ft-events-search__input{
  text-align: right !important; /* الكتابة عربي */
}

/* Layout: text on RIGHT, image on LEFT */
.ft-event{
  flex-direction: row-reverse !important; /* يقلب توزيع العناصر */
}


/* Checkmark inside checkbox */
.ft-event__fakecheck{
  position: relative;
}

.ft-event__check:checked + .ft-event__fakecheck::after{
  content: "";
  width: 10px;
  height: 18px;
  border-right: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
  position: absolute;
  top: 8px;
  left: 14px;
}



/* =========================
   Events – Mobile Fix
   ========================= */
@media (max-width: 767px){

  .ft-events__wrap{
    padding: 20px 14px 50px;
  }

  /* Search */
  .ft-events-search{
    max-width: 100%;
    width: 100%;
    gap: 10px;
    align-items: flex-start !important;
    margin: 0 !important;
  }
  .ft-events-search__title{
    font-size: 16px;
    line-height: 1.2;
  }
  .ft-events-search__box{
    height: 48px;
    padding: 12px 10px;
  }
  .ft-events-search__input{
    font-size: 16px;
    line-height: 1.2;
  }
  .ft-events-search__clear{
    font-size: 20px;
  }

  /* List layout (STACK) */
  .ft-events-list{
    margin-top: 22px;
    gap: 18px;
  }

  .ft-event{
    flex-direction: column !important;  /* ✅ يكسر الـ row-reverse */
    gap: 12px;
  }

  .ft-event__media{
    width: 100% !important;
    flex: 0 0 auto !important;
  }
  .ft-event__media img{
    width: 100%;
    height: 180px;
    border-radius: 10px;
  }

  .ft-event__content{
    width: 100% !important;
    max-width: 100% !important;
    gap: 10px;
    align-items: flex-start;
  }

  .ft-event__head{
    width: 100% !important;
    justify-content: flex-end;
    gap: 8px;
  }

  .ft-event__title{
    font-size: 18px;
    line-height: 1.3;
  }

  .ft-event__fakecheck{
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }

  .ft-event__desc{
    font-size: 14px;
    line-height: 1.8;
  }

  /* Form */
  .ft-events-form{
    margin-top: 26px;
  }
  .ft-events-form__title{
    font-size: 18px;
    margin: 0 0 10px;
  }
  .ft-events-form__inner{
    padding: 16px;
    border-width: 2px;
  }

  .ft-booking__field input{
    height: 48px;
  }
  .ft-booking__submit{
    height: 50px;
    font-size: 16px;
  }

  /* Checkmark position tweak */
  .ft-event__check:checked + .ft-event__fakecheck::after{
    top: 6px;
    left: 11px;
    width: 9px;
    height: 16px;
  }
}

