/* Events section — qalam-primary.html.
   Depends on shared page tokens (--green-tint, --line, --green, --green-dark,
   --white, --ink-60, --ink-40, --yellow, --radius-lg, --shadow) and the
   shared carousel nav controls (.ev-nav/.ev-btn/.day-mobile-nav/.day-progress
   — static/shared/carousel-nav.css), also reused by the day section. */

.events {
  background: var(--green-tint);
  border-top: 1px solid var(--line);
}
.events-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.events-head .left {
  max-width: 600px;
}
.events-head h2 {
  margin: 10px 0 10px;
}
.events-head h2 em {
  font-style: normal;
  color: var(--green);
  font-weight: 700;
}
.events-head p {
  font-size: 16px;
  color: var(--ink-60);
  line-height: 1.65;
}
.events-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}
.events-track::-webkit-scrollbar {
  display: none;
}
.events-track.grabbing {
  cursor: grabbing;
  user-select: none;
}
.ecard {
  flex: 0 0 300px;
  scroll-snap-align: start;
  padding: 8px;
  background: var(--white);
  border: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}
.ecard:hover {
  transform: translateY(-4px);
}
.ecard-img {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: calc(var(--radius-lg) - 8px);
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--green) 0%,
    var(--green-dark) 100%
  );
  flex-shrink: 0;
}
.ecard-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
  display: block;
}
.ecard:hover .ecard-img img {
  transform: scale(1.06);
}
.ecard-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 8px 16px;
  background: #ff9d02;
  color: var(--white);
  border-radius: 100px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(1, 26, 20, 0.18);
}
.ecard-body {
  padding: 18px 10px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.ecard-date {
  font-size: 12px;
  color: var(--ink-60);
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.ecard-body h3 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  line-height: 1.25;
  color: var(--ink);
}
.ecard-body p {
  font-size: 14px;
  color: var(--ink-60);
  line-height: 1.6;
  flex: 1;
}
.events-scroll-hint {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--ink-40);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

@media (max-width: 640px) {
  .events-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .ecard {
    flex: 0 0 calc(100vw - 56px);
  }
}
