/* ===== Modern Events Page (RTL, clean, expressive) ===== */

:root{
  --blue:#0054cc;
  --orange:#f97316;
  --green:#16a34a;

  --bg:#f3f6fb;
  --surface:#ffffff;
  --text:#0f172a;
  --muted:#64748b;

  --border: rgba(15,23,42,.08);
  --shadow: 0 12px 30px rgba(15,23,42,.08);
  --shadowHover: 0 16px 38px rgba(15,23,42,.12);

  --r:18px;
}

body{
  background: var(--bg);
  direction: rtl;
  text-align: right;
}

.events-page{ margin: 20px 0 30px; }
a:hover{ text-decoration:none !important; }

.row.content{ row-gap: 16px; }

/* ===== MAIN DETAILS ===== */
.ev-details{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 18px;
}

.ev-details__head{ margin-bottom: 10px; }

.ev-kicker{
  display:inline-block;
  font-size: 12px;
  font-weight: 900;
  color: var(--blue);
  background: rgba(0,84,204,.08);
  border: 1px solid rgba(0,84,204,.18);
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.ev-details__title{
  margin: 0 0 12px;
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 1000;
  line-height: 1.3;
  color: var(--text);
}

/* ===== META CHIPS ===== */
.ev-details__meta{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-top:20px;
}

.ev-details__meta > div{
  color:#fff;
  font-weight: 900;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  box-shadow: 0 10px 18px rgba(15,23,42,.12);
  transition: transform .12s ease;
}

.ev-details__meta > div:hover{ transform: translateY(-1px); }

.ev-details__meta > div:nth-child(1){ background: var(--green); }
.ev-details__meta > div:nth-child(2){ background: #15803d; }
.ev-details__meta > div:nth-child(3){ background: var(--blue); }


.ev-details__meta .fb-share-button{
  display:inline-flex;
  align-items:center;
  gap:8px;
  filter: brightness(1.05);
}
.ev-details__meta .fb-share-button iframe{
  border-radius: 12px;
  overflow: hidden;
}

/* ===== IMAGE ===== */
.ev-details__image{
  width:100%;
  max-height: 520px;
  object-fit: cover;
  border-radius: var(--r);
  margin: 14px 0 12px;
  box-shadow: 0 18px 34px rgba(15,23,42,.10);
}

/* ===== GALLERY ===== */
.ev-gallery{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.ev-thumb{
  width: 126px;
  height: 94px;
  border-radius: 16px;
  overflow:hidden;
  box-shadow: 0 12px 20px rgba(15,23,42,.10);
}
.ev-thumb img{ width:100%; height:100%; object-fit:cover; }

/* ===== BODY ===== */
.ev-details__body{
  font-size: 16px;
  line-height: 2.05;
  color: var(--text);
}
.ev-details__body a{
  color: var(--blue);
  font-weight: 900;
}

/* ===== SIDEBAR ===== */
.ev-panel{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
}

.ev-panel__head{
  padding: 14px;
  border-bottom: 1px solid rgba(15,23,42,.06);
}

.ev-panel__title{
  margin:0;
  font-weight: 1000;
  color: var(--text);
}

/* ===== EVENT ITEM ===== */
.ev-item{
  display:flex;
  flex-direction: row-reverse;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(15,23,42,.06);
  position: relative;
  transition: background .12s ease, transform .12s ease;
}

.ev-item:hover{
  background:#fbfdff;
  transform: translateY(-2px);
}

/* ✅ ACTIVE EVENT ACCENT */
.ev-item.is-active-event{
  background: rgba(0,84,204,.06);
}
.ev-item.is-active-event::after{
  content:"";
  position:absolute;
  top: 10px;
  bottom: 10px;
  right: 0;
  width: 4px;
  border-radius: 999px;
  background: var(--blue);
}

/* thumb */
.ev-item__media{
  position:relative;
  width: 108px;
  min-width: 108px;
  height: 82px;
  border-radius: 16px;
  overflow:hidden;
  background:#eef2ff;
}
.ev-item__img{ width:100%; height:100%; object-fit:cover; }

/* badge */
.ev-badge{
  position:absolute;
  bottom: 6px;
  right: 6px;
  padding: 6px 8px;
  border-radius: 12px;
  color:#fff;
  font-weight: 900;
}
.ev-badge.is-upcoming{ background: var(--blue); }
.ev-badge.is-ended{ background: #64748b; }

/* text */
.ev-item__title{
  font-weight: 900;
  font-size: 14px;
  color: var(--text);
}
.ev-item__desc{
  font-size: 12.8px;
  color: var(--muted);
}

/* Sticky sidebar */
@media (min-width: 992px){
  .ev-panel{ position: sticky; top: 90px; }
}

/* ===== Page breathing room (modern margins) ===== */

.events-page{
  padding-inline: clamp(14px, 4vw, 48px);
}

/* Keep content readable on very wide screens */
.events-page > .row.content{
  max-width: 1440px;        /* sweet spot */
  margin-inline: auto;      /* RTL-safe centering */
}

/* ===== Equal height panels (desktop) ===== */
@media (min-width: 992px){
  /* make the row act like equal-height columns */
  .events-page .row.content{
    align-items: stretch;
  }

  /* ensure the columns can stretch */
  .events-page .row.content > .col-lg-8,
  .events-page .row.content > .col-lg-4{
    display: flex;
  }

  /* make the panels fill the column height */
  .events-page .ev-details,
  .events-page .ev-panel{
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
  }

  /* keep header fixed, make body scroll */
  .events-page .ev-details__head{
    flex: 0 0 auto;
  }

  /* scroll area inside the details card */
  .events-page .ev-details__image,
  .events-page .ev-gallery,
  .events-page .ev-details__body{
    flex: 0 0 auto;
  }

  /* make ONLY the description scroll if it’s long */
  .events-page .ev-details__body{
    flex: 1 1 auto;
    overflow: auto;
    padding-left: 6px;   /* scrollbar room */
  }

  /* optional: make sidebar list scroll too (if long) */
  .events-page .ev-list{
    flex: 1 1 auto;
    overflow: auto;
  }
}