/* Interactive events calendar — isolated from the public homepage theme. */
.events-calendar-hero {
  position: relative;
  padding: 104px 0 55px;
  color: #fff;
  background:
    radial-gradient(circle at 11% 20%, rgba(19, 145, 128, .38), transparent 28rem),
    radial-gradient(circle at 92% 75%, rgba(178, 86, 102, .32), transparent 25rem),
    linear-gradient(125deg, #071b34, #0b5b61 60%, #512b3e);
  overflow: hidden;
}

.events-calendar-hero::after {
  content: "\f073";
  position: absolute;
  inset: auto 8% -90px auto;
  color: rgba(255, 255, 255, .055);
  font: 900 270px/1 "Font Awesome 6 Free";
}

.events-calendar-hero .page-hero-inner {
  position: relative;
  z-index: 1;
}

.events-calendar-hero .tag {
  color: #f1cd86;
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .16);
}

.events-calendar-hero h1 {
  margin: 14px 0 8px;
  color: #fff;
  font-size: clamp(2.3rem, 4vw, 4.2rem);
  font-weight: 900;
}

.events-calendar-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, .72);
  font-size: 1rem;
  line-height: 1.8;
}

.events-calendar-section {
  padding: 38px 0 64px;
  background:
    linear-gradient(90deg, rgba(7, 27, 52, .027) 1px, transparent 1px) 0 0 / 68px 68px,
    #f3f6f4;
}

.event-calendar-shell {
  display: grid;
  grid-template-columns: minmax(245px, .34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.calendar-side-panel,
.calendar-main-panel,
.events-timeline-panel {
  border: 1px solid rgba(7, 27, 52, .12);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 20px 48px rgba(7, 27, 52, .09);
}

.calendar-side-panel {
  display: flex;
  flex-direction: column;
  gap: 17px;
  padding: 19px;
  border-radius: 5px 5px 25px 5px;
}

.calendar-today-card {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 21px 14px;
  border-radius: 4px 4px 21px 4px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(circle at 10% 10%, rgba(193, 138, 53, .28), transparent 10rem),
    linear-gradient(145deg, #0a615d, #071b34);
}

.calendar-today-card > span {
  color: #e5c57f;
  font-size: .76rem;
  font-weight: 900;
}

.calendar-today-card > strong {
  margin: 4px 0;
  color: #f2cf8a;
  font-size: 3.25rem;
  line-height: 1;
}

.calendar-today-card > b {
  font-size: .85rem;
}

.calendar-today-card p {
  margin: 9px 0 0;
  color: rgba(255, 255, 255, .7);
  font-size: .77rem;
  line-height: 1.6;
}

.calendar-category-filter {
  display: grid;
  gap: 7px;
}

.calendar-category-filter > strong {
  margin-bottom: 3px;
  color: #071b34;
  font-size: .88rem;
}

.calendar-category-filter button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 43px;
  padding: 9px 11px;
  border: 1px solid #e0e7e7;
  border-radius: 12px;
  color: #435269;
  text-align: right;
  background: #f8faf9;
  font-weight: 800;
  transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.calendar-category-filter button:hover,
.calendar-category-filter button.active {
  border-color: rgba(8, 106, 98, .36);
  color: #086a62;
  background: #edf7f5;
}

.calendar-category-filter button i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #64748b;
}

.calendar-note {
  display: flex;
  gap: 9px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid #ead9ac;
  border-radius: 13px;
  color: #6e6047;
  background: #fff9eb;
}

.calendar-note i {
  margin-top: 3px;
  color: #b68129;
}

.calendar-note p {
  margin: 0;
  font-size: .72rem;
  line-height: 1.65;
}

.calendar-main-panel {
  min-width: 0;
  padding: 20px;
  border-radius: 5px 5px 25px 5px;
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  margin-bottom: 17px;
}

.calendar-nav {
  display: flex;
  gap: 6px;
}

.calendar-nav button,
.calendar-today-button,
.events-timeline-head button {
  display: inline-grid;
  min-width: 41px;
  min-height: 41px;
  place-items: center;
  border: 1px solid rgba(8, 106, 98, .22);
  border-radius: 11px;
  color: #086a62;
  background: #edf7f5;
  font-weight: 900;
}

.calendar-selectors {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.calendar-selectors select {
  min-width: 125px;
  padding: 9px 12px;
  border: 1px solid #d7e2e2;
  border-radius: 11px;
  color: #071b34;
  background: #fff;
  font-weight: 900;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  margin-bottom: 6px;
  color: #718093;
  text-align: center;
  font-size: .73rem;
  font-weight: 900;
}

.calendar-weekdays span {
  padding: 7px 2px;
}

.calendar-grid {
  border-top: 1px solid #dde6e6;
  border-right: 1px solid #dde6e6;
  border-radius: 4px 4px 17px 4px;
  overflow: hidden;
}

.calendar-day {
  position: relative;
  min-width: 0;
  min-height: 103px;
  padding: 8px;
  border: 0;
  border-left: 1px solid #dde6e6;
  border-bottom: 1px solid #dde6e6;
  color: #071b34;
  text-align: right;
  background: #fff;
  overflow: hidden;
}

.calendar-day:hover {
  z-index: 1;
  background: #f2f8f6;
  box-shadow: inset 0 0 0 2px rgba(8, 106, 98, .3);
}

.calendar-day.outside {
  color: #a4afb9;
  background: #f8faf9;
}

.calendar-day.today > b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #086a62;
}

.calendar-day.selected {
  background: #edf7f5;
  box-shadow: inset 0 0 0 2px #0a8177;
}

.calendar-day-events {
  display: grid;
  gap: 4px;
  margin-top: 6px;
}

.calendar-day-events i {
  display: block;
  padding: 4px 6px;
  border-right: 3px solid var(--category-color, #086a62);
  border-radius: 5px;
  color: #30465e;
  background: #eef4f3;
  font-size: .64rem;
  font-style: normal;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day-events em {
  color: #64748b;
  font-size: .65rem;
  font-style: normal;
}

.cat-family { --category-color: #087169; }
.cat-palestinian { --category-color: #178247; }
.cat-islamic { --category-color: #b27b1e; }
.cat-community { --category-color: #7b4bb7; }

.calendar-category-filter .cat-family { background: #087169; }
.calendar-category-filter .cat-palestinian { background: #178247; }
.calendar-category-filter .cat-islamic { background: #b27b1e; }
.calendar-category-filter .cat-community { background: #7b4bb7; }

.events-timeline-panel {
  margin-top: 22px;
  padding: 24px;
  border-radius: 5px 5px 26px 5px;
}

.events-timeline-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 17px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(7, 27, 52, .12);
}

.events-timeline-head span {
  color: #9c732c;
  font-size: .74rem;
  font-weight: 900;
}

.events-timeline-head h2 {
  margin: 3px 0 0;
  color: #071b34;
  font-size: 1.65rem;
}

.events-timeline-head > div:last-child {
  display: flex;
  align-items: center;
  gap: 11px;
}

.events-timeline-head b {
  color: #66758a;
  font-size: .78rem;
}

.events-timeline {
  position: relative;
  display: grid;
  gap: 11px;
}

.events-timeline::before {
  content: "";
  position: absolute;
  inset: 8px 41px 8px auto;
  width: 2px;
  background: linear-gradient(#0c8278, #dce8e6);
}

.timeline-event {
  position: relative;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 16px;
  padding: 14px 15px;
  border: 1px solid #dde6e6;
  border-right: 4px solid var(--category-color, #086a62);
  border-radius: 4px 4px 18px 4px;
  color: #071b34;
  text-decoration: none;
  background: #fbfdfc;
  transition: transform .2s ease, box-shadow .2s ease;
}

.timeline-event:hover {
  color: #071b34;
  transform: translateX(-3px);
  box-shadow: 0 14px 28px rgba(7, 27, 52, .09);
}

.timeline-event time {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  padding: 9px;
  border: 4px solid #fff;
  border-radius: 4px 4px 15px 4px;
  color: #fff;
  background: var(--category-color, #086a62);
  box-shadow: 0 0 0 1px #d7e2e2;
}

.timeline-event time strong {
  font-size: 1.45rem;
  line-height: 1;
}

.timeline-event time span,
.timeline-event time small {
  font-size: .65rem;
}

.timeline-category {
  color: var(--category-color, #086a62);
  font-size: .68rem;
  font-weight: 900;
}

.timeline-event h3 {
  margin: 4px 0 5px;
  font-size: 1.02rem;
}

.timeline-event p {
  margin: 3px 0;
  color: #64748b;
  font-size: .79rem;
  line-height: 1.5;
}

.timeline-event > i {
  color: var(--category-color, #086a62);
}

.calendar-empty {
  display: grid;
  justify-items: center;
  padding: 38px 20px;
  border: 1px dashed #b9ceca;
  border-radius: 15px;
  color: #66758a;
  text-align: center;
  background: #f6faf9;
}

.calendar-empty i {
  margin-bottom: 9px;
  color: #6ca59f;
  font-size: 2rem;
}

.calendar-empty p {
  margin: 4px 0 0;
}

@media (max-width: 900px) {
  .events-calendar-hero {
    padding-top: 88px;
  }

  .event-calendar-shell {
    grid-template-columns: 1fr;
  }

  .calendar-main-panel {
    order: -1;
  }

  .calendar-side-panel {
    display: grid;
    grid-template-columns: minmax(175px, .65fr) 1fr;
  }

  .calendar-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .events-calendar-hero {
    padding: 76px 0 35px;
  }

  .events-calendar-hero h1 {
    font-size: 2.2rem;
  }

  .events-calendar-section {
    padding: 18px 0 40px;
  }

  .events-calendar-section .family-container {
    width: calc(100% - 20px);
  }

  .calendar-side-panel {
    display: flex;
    padding: 14px;
    border-radius: 4px 4px 20px 4px;
  }

  .calendar-category-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-category-filter > strong {
    grid-column: 1 / -1;
  }

  .calendar-main-panel,
  .events-timeline-panel {
    padding: 13px;
    border-radius: 4px 4px 20px 4px;
  }

  .calendar-toolbar {
    grid-template-columns: 1fr auto;
    gap: 9px;
  }

  .calendar-selectors {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .calendar-selectors select {
    flex: 1;
    min-width: 0;
  }

  .calendar-weekdays {
    font-size: .57rem;
  }

  .calendar-weekdays span {
    padding-inline: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .calendar-day {
    min-height: 66px;
    padding: 4px;
    font-size: .72rem;
  }

  .calendar-day.today > b {
    width: 24px;
    height: 24px;
  }

  .calendar-day-events {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
  }

  .calendar-day-events i {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: transparent;
    background: var(--category-color, #086a62);
  }

  .events-timeline-head,
  .events-timeline-head > div:last-child {
    align-items: flex-start;
    flex-direction: column;
  }

  .timeline-event {
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 11px;
    padding: 11px;
  }

  .timeline-event > i {
    display: none;
  }

  .timeline-event p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
}

/* Compact mobile introduction: show the actual calendar sooner. */
@media (max-width: 900px) {
  .events-calendar-hero {
    padding: 34px 0 30px;
  }

  .events-calendar-hero .page-hero-inner {
    padding-block: 0;
  }
}

@media (max-width: 680px) {
  .events-calendar-hero {
    padding: 20px 0 22px;
  }

  .events-calendar-hero::after {
    inset: auto 1rem -50px auto;
    font-size: 150px;
  }

  .events-calendar-hero .tag {
    font-size: .7rem;
  }

  .events-calendar-hero h1 {
    margin: 9px 0 5px;
    font-size: 1.75rem;
    line-height: 1.2;
  }

  .events-calendar-hero p {
    display: -webkit-box;
    overflow: hidden;
    font-size: .78rem;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .events-calendar-section {
    padding-top: 10px;
  }
}
