/* Расписание богослужений — табличный формат */

.schedule-template-page {
  width: 100%;
}

.schedule-template-page h1 {
  text-align: center;
  margin: 0 0 22px;
  color: #7c1f18;
}

.schedule-container {
  width: 100%;
  margin: 0 auto;
  font-family: inherit;
  color: #222;
}

.schedule-container h3 {
  text-align: center;
  text-decoration: underline;
  margin: 0 0 12px;
  font-size: 22px;
  color: #7c1f18;
}

.schedule-container > div {
  margin-bottom: 12px;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  font-size: 15px;
  line-height: 1.35;
}

.schedule-table th,
.schedule-table td {
  border: 1px solid #d8c6a8;
  padding: 7px 8px;
  vertical-align: top;
}

.schedule-table th {
  background: #f2e6d2;
  text-align: center;
  font-weight: 700;
}

.schedule-table th:first-child {
  width: 74px;
}

.schedule-table th:last-child {
  width: 78px;
}

.schedule-table .date-cell {
  text-align: center;
  font-weight: 700;
  background: #fbf6ec;
  color: #7c1f18;
  width: 74px;
}

.date-num {
  font-size: 24px;
  line-height: 1;
  margin-bottom: 3px;
}

.date-month {
  font-size: 13px;
  line-height: 1.15;
  text-transform: lowercase;
}

.date-weekday {
  font-size: 13px;
  line-height: 1.15;
  margin-top: 2px;
}

.schedule-table .feast-name {
  font-weight: 700 !important;
}

.schedule-table .service-time,
.schedule-table td:last-child {
  text-align: center;
  font-weight: 700;
  white-space: nowrap;
}

.schedule-table .service-row td {
  background: #fff;
}

.schedule-table .schedule-date-row td {
  background: #fffdf8;
}

.schedule-table .schedule-date-row .feast-name {
  background: #fffdf8;
}

.schedule-table tr.sedmitsa-row td {
  background: #f2e6d2 !important;
  text-align: center;
  font-weight: 700;
  text-decoration: underline;
}

.schedule-table td:nth-child(2) {
  word-break: normal;
  overflow-wrap: anywhere;
}

/* Скрытие прошедших дней */
.schedule-table tr.is-past {
  display: none !important;
}

/* Мобильная версия: сохраняем таблицу, но делаем плотнее */
@media screen and (max-width: 700px) {
  .schedule-template-page h1 {
    font-size: 24px;
  }

  .schedule-container h3 {
    font-size: 18px;
  }

  .schedule-table {
    font-size: 12.5px;
    line-height: 1.28;
  }

  .schedule-table th,
  .schedule-table td {
    padding: 5px 4px;
  }

  .schedule-table th:first-child,
  .schedule-table .date-cell {
    width: 46px;
  }

  .schedule-table th:last-child,
  .schedule-table td:last-child {
    width: 54px;
  }

  .date-num {
    font-size: 19px;
  }

  .date-month,
  .date-weekday {
    font-size: 11px;
  }
}

/* month separators inside schedule table */
.schedule-table .schedule-month-row td {
  background: #f2e6d2 !important;
  color: #7c1f18;
  text-align: center;
  font-weight: 700;
  text-decoration: underline;
  font-size: 17px;
  padding: 9px 8px;
  letter-spacing: .03em;
}

.schedule-table .schedule-month-row.is-empty-month {
  display: none !important;
}

@media screen and (max-width: 700px) {
  .schedule-table .schedule-month-row td {
    font-size: 15px;
    padding: 8px 5px;
  }
}
