.rmc-calendar {
  --rmc-green: #173f2f;
  --rmc-green-soft: #edf5ef;
  --rmc-gold: #c39a4a;
  --rmc-cream: #fbf6ec;
  --rmc-border: #e0d2bd;
  --rmc-text: #2f2924;
  --rmc-muted: #74695f;
  --rmc-red: #8f292d;
  --rmc-shadow: 0 18px 45px rgba(46, 34, 20, .10);
  direction: rtl;
  color: var(--rmc-text);
  font-family: inherit;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 64px) 18px;
}

.rmc-calendar *,
.rmc-calendar *::before,
.rmc-calendar *::after {
  box-sizing: border-box;
}

.rmc-calendar__hero {
  text-align: center;
  margin-bottom: 28px;
}

.rmc-calendar__kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(195, 154, 74, .13);
  color: #8b6424;
  font-weight: 800;
  font-size: 13px;
}

.rmc-calendar__hero h1 {
  margin: 12px 0 8px;
  color: var(--rmc-green);
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.35;
}

.rmc-calendar__hero p {
  margin: 0;
  color: var(--rmc-muted);
  font-size: 16px;
}

.rmc-calendar__filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  margin: 0 0 26px;
  padding: 16px;
  border: 1px solid var(--rmc-border);
  border-radius: 18px;
  background: rgba(255, 252, 246, .92);
  box-shadow: var(--rmc-shadow);
}

.rmc-calendar__filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rmc-filter-chip {
  position: relative;
  cursor: pointer;
}

.rmc-filter-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.rmc-filter-chip span,
.rmc-calendar__submit {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 12px;
  border: 1px solid var(--rmc-border);
  padding: 9px 15px;
  background: #fff;
  color: var(--rmc-text);
  font-weight: 800;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.rmc-filter-chip:hover span,
.rmc-filter-chip input:focus-visible + span {
  border-color: var(--rmc-gold);
  box-shadow: 0 8px 22px rgba(195, 154, 74, .14);
}

.rmc-filter-chip.is-active span,
.rmc-filter-chip input:checked + span {
  background: var(--rmc-green);
  border-color: var(--rmc-green);
  color: #fff;
}

.rmc-calendar__date {
  display: grid;
  gap: 6px;
  min-width: min(100%, 220px);
}

.rmc-calendar__date span {
  color: var(--rmc-muted);
  font-size: 12px;
  font-weight: 800;
}

.rmc-calendar__date input {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--rmc-border);
  border-radius: 12px;
  padding: 8px 12px;
  background: #fff;
  color: var(--rmc-text);
  font: inherit;
  outline: none;
  direction: ltr;
  text-align: center;
}

.rmc-calendar__date input:focus {
  border-color: var(--rmc-green);
  box-shadow: 0 0 0 3px rgba(23, 63, 47, .12);
}

.rmc-calendar__filter-group--type {
  margin-inline-start: auto;
}

.rmc-calendar__submit {
  border-color: var(--rmc-gold);
  background: var(--rmc-gold);
  color: #fff;
  cursor: pointer;
  font-family: inherit;
}

.rmc-calendar__submit:hover,
.rmc-calendar__submit:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(195, 154, 74, .20);
}

.rmc-calendar__status {
  min-height: 24px;
  margin: 0 4px 10px;
  color: var(--rmc-muted);
  font-size: 13px;
}

.rmc-calendar__results {
  transition: opacity .2s ease;
}

.rmc-calendar.is-loading .rmc-calendar__results {
  opacity: .55;
  pointer-events: none;
}

.rmc-calendar__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.rmc-calendar__month {
  margin-top: 30px;
}

.rmc-calendar__month:first-child {
  margin-top: 0;
}

.rmc-calendar__month > h2 {
  margin: 0 0 14px;
  color: var(--rmc-green);
  font-size: 22px;
}

.rmc-event-card {
  overflow: hidden;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  min-height: 190px;
  border: 1px solid var(--rmc-border);
  border-radius: 18px;
  background: #fffdf8;
  box-shadow: var(--rmc-shadow);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.rmc-event-card:hover {
  transform: translateY(-3px);
  border-color: rgba(195, 154, 74, .72);
  box-shadow: 0 22px 50px rgba(46, 34, 20, .14);
}

.rmc-event-card__media {
  display: block;
  min-height: 100%;
  background: linear-gradient(145deg, #efe5d5, #fff8eb);
  text-decoration: none;
}

.rmc-event-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 190px;
  object-fit: cover;
}

.rmc-event-card__placeholder {
  height: 100%;
  min-height: 190px;
  display: grid;
  place-items: center;
  color: rgba(23, 63, 47, .55);
  font-weight: 900;
}

.rmc-event-card__body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  min-width: 0;
}

.rmc-event-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rmc-event-card__top strong {
  color: var(--rmc-green);
  font-size: 13px;
}

.rmc-event-card__badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: var(--rmc-green);
}

.rmc-event-card--martyrdom .rmc-event-card__badge {
  background: var(--rmc-red);
}

.rmc-event-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.7;
}

.rmc-event-card h3 a {
  color: var(--rmc-text);
  text-decoration: none;
}

.rmc-event-card dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.rmc-event-card dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 7px;
  border-bottom: 1px dashed rgba(195, 154, 74, .28);
}

.rmc-event-card dt,
.rmc-event-card dd {
  margin: 0;
}

.rmc-event-card dt {
  color: var(--rmc-muted);
  font-size: 12px;
  font-weight: 800;
}

.rmc-event-card dd {
  color: var(--rmc-text);
  font-weight: 800;
}

.rmc-event-card__link {
  justify-self: start;
  color: var(--rmc-green);
  font-weight: 900;
  text-decoration: none;
}

.rmc-event-card__link:hover,
.rmc-event-card__link:focus-visible {
  color: var(--rmc-gold);
}

.rmc-calendar__empty {
  padding: 30px 20px;
  border: 1px dashed var(--rmc-border);
  border-radius: 18px;
  background: var(--rmc-cream);
  color: var(--rmc-muted);
  text-align: center;
  font-weight: 800;
}

@media (max-width: 1024px) {
  .rmc-calendar__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rmc-calendar__filter-group--type {
    margin-inline-start: 0;
  }
}

@media (max-width: 640px) {
  .rmc-calendar {
    padding: 28px 12px;
  }

  .rmc-calendar__filters {
    padding: 12px;
    border-radius: 16px;
  }

  .rmc-calendar__filter-group,
  .rmc-calendar__date,
  .rmc-calendar__submit {
    width: 100%;
  }

  .rmc-filter-chip {
    flex: 1 1 calc(50% - 8px);
  }

  .rmc-filter-chip span {
    width: 100%;
    padding-inline: 10px;
  }

  .rmc-calendar__grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .rmc-event-card {
    grid-template-columns: 104px minmax(0, 1fr);
    min-height: 166px;
    border-radius: 16px;
  }

  .rmc-event-card__media img,
  .rmc-event-card__placeholder {
    min-height: 166px;
  }

  .rmc-event-card__body {
    padding: 14px;
    gap: 9px;
  }

  .rmc-event-card h3 {
    font-size: 17px;
  }

  .rmc-event-card dl div {
    display: grid;
    gap: 2px;
  }
}

@media (max-width: 390px) {
  .rmc-event-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }
}
