/* Сброс */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Базовая разметка */
html,
body {
  height: 100%;
}

html {
  overflow-y: scroll;
  overflow-x: scroll;
}

body {
  background: url("pict.jpg") center/cover no-repeat fixed;
  background-color: #838585;
  display: flex;
  flex-direction: column;
  font-family: Calibri, sans-serif;
  color: #efefef;
  text-align: center;
}

 /*body {
  display: flex;
  flex-direction: column;
  font-family: Calibri, sans-serif;
  color: #efefef;
  text-align: center;
  background-image: url("Pict_22.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}*/

/* Хедер / навигация */
.header {
  background-color: #ac2617;
  padding: 1rem;
}

.navigation ul {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
}

.navigation a {
  color: inherit;
  text-decoration: none;
  font-size: 16px;
}

.navigation a:hover {
  color: #838585; /* цвет шрифта при наведении */
}

.navigation .nav-brand {
  color: #fff;
  font-size: 30px;
  font-weight: 400;
  display: inline-block;
  vertical-align: middle;
  transform: translateY(-4px);
  line-height: 1;
}

.navigation span,
.navigation li:first-child > a {
  color: #fff;
}

.intro {
  max-width: 475px;      /* нужная ширина блока */
  margin: 0 auto;        /* центрируем по горизонтали */
  text-align: justify;   /* если нужно выравнивание по ширине */
}

/* Основной контент */
.main-content {
  flex: 1 0 auto;
  padding: 1rem;
}

.schedule-section {
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

#heading-section {
  margin-top: 1rem;
}

/* Кастомный select */
#date-select-container {
  display: inline-flex;
  align-items: center;
  
}

#date-select-label {
  font-size: 1.2em;
  
}

.custom-select {
  position: relative;
  display: inline-block;
  cursor: pointer;
  outline: none;
  margin-top: 3px;
}

.custom-select__selected {
  padding: 0.3rem 1.5rem 0.3rem 0.8rem;
  border-radius: 2px;
  background-color: #838585;
  color: #fff;
  text-align: left;
  user-select: none;
  position: relative;
  white-space: nowrap;
  font-size: 1rem;
}

.custom-select__selected::after {
  content: "";
  position: absolute;
  right: 0.5rem;
  top: 50%;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid #fff;
  transform: translateY(-50%);
  pointer-events: none;
}

.custom-select__list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  list-style: none;
  border-radius: 0 0 2px 2px;
  background-color: #838585;
  max-height: 220px;
  overflow-y: auto;
  display: none;
  z-index: 1000;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.custom-select.open .custom-select__list {
  display: block;
}

.custom-select__item {
  padding: 0.3rem 0.8rem;
  background-color: #838585;
  color: #fff;
  transition: background-color 0.08s ease, color 0.08s ease;
  font-size: 1rem;
  text-align: left;
}

.custom-select__item:hover,
.custom-select__item--prev-selected {
  background-color: #ac2617;
  color: #fff;
}

/* Обёртка iframe и лоадер */
#iframe-wrapper {
  width: 100%;
  margin-top: 0.5rem;
  position: relative;
}

.loader {
  width: 36px;
  height: 36px;
  margin: 12px auto;
  display: none;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: #ac2617;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#iframe-wrapper.loading .loader {
  display: block;
}

/* Таблица */
.table-container {
  max-width: 700px;
  width: 100%;
  margin: 0 auto 2rem;
  /*background: #838585;*/ /*transparent;*/
  color: #254554;
  overflow: hidden;
  border-radius: 2px;
  position: relative;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
}

th,
td {
  padding: 8px;
  border: none;
  word-wrap: break-word;
  vertical-align: middle;
}

thead {
  background-color: #ac2617;
  color: #fff;
}

tbody tr {
  background-color: #e7eff5;
}

tbody td {
  color: #000;
  border-bottom: 1px solid #fff;
}

.match-name,
.time-cell,
.action-button {
  text-align: center;
  color: #000;
}

.time-cell,
.action-button {
  width: 20%;
}

/* Кнопки */
input[type="button"] {
  background-color: #c48e77;
  color: #254554;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
  border-radius: 2px;
}

  input[type="button"]:hover {
  background-color: #b37d6a;
}

/* iframe */
#match-chart {
  width: 100%;
  border: none;
  transition: opacity 0.25s ease-out, height 0.35s ease-out;
  opacity: 0;
  height: 100px;
  will-change: height, opacity;
  backface-visibility: hidden;
  display: block;
}

/* Футер */
.footer {
  background-color: #ac2617;
  color: #fff;
  padding: 1.4rem;
  width: 100%;
  flex-shrink: 0;
  text-align: center;
}

.footer small,
.footer a {
  color: inherit;
  text-decoration: none;
  font-size: 16px;
}

/* Адаптив */
@media (max-width: 768px) {
  .navigation ul {
    flex-direction: column;
    gap: 0.5rem;
  }

  .table-container {
    width: 100%;
    padding: 0 10px;
  }
}