html,
:has(:target) {
  scroll-behavior: smooth;
}

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

:where(ul, ol):where([class]) {
  padding-left: 0;
}

img {
  display: block;
  max-width: 100%;
}

:where(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  ul,
  ol,
  dl
):where([class]) {
  margin-block: 0;
}

:where(fieldset[class]) {
  margin-left: 0;
  padding: 0;
  border: none;
}

:where(ul[class]) {
  list-style: none;
}

p {
  --paragraphMarginBottom: 24px;

  margin-block: 0;
}

p:where(:not([class]):not(:last-child)) {
  margin-bottom: var(--paragraphMarginBottom);
}

body,
:where(blockquote, figure):where([class]) {
  margin: 0;
}

:where(fieldset[class]) {
  margin-left: 0;
  padding: 0;
  border: none;
}

input,
textarea,
select,
button {
  font: inherit;
}

svg *[fill] { fill: currentColor }
svg *[stroke] { stroke: currentColor }

svg * {
  transition-property: fill, stroke;
}

/** Удаляем все анимации и переходы для людей, которые предпочитают их не использовать */
@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: 'Courier New', Courier, monospace;
  margin-top: 30px;
  padding-inline: 10px;
  display: flex;
  justify-content: center;
  column-gap: 30px;
  background-color: rgb(245, 239, 227);
}

.year-navigation-wrapper {
  padding-top: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  row-gap: 20px;
}

.year-navigation {
  display: flex;
  align-items: center;
  column-gap: 15px;
}

.current-year {
  font-size: 30px;
  font-weight: 600;
  border: 1px solid gray;
  border-radius: 10px;
  padding: 5px 15px;
}

button {
  position: relative;
  padding: 15px;
  background-color: #a9dce4;
  border: none;
  border-radius: 10px;
  transition-duration: 0.2s;
  font-size: 24px;
  cursor: pointer;
}

.previous-year::after {
  content: '<';
}

/* ХОВЕР НА ТАЧ УСТРОЙСТВАХ */

@media (hover: hover) {
  .previous-year:hover {
    transform: translateX(-5px);
    background-color: #1eb8d0;
  }

  .previous-year:active {
    background-color: #0c7f91;
  }

  .next-year:hover {
    transform: translateX(5px);
    background-color: #1eb8d0;
  }

  .next-year:active {
    background-color: #0c7f91;
  }
}
@media (hover: none) {
  .previous-year:active {
    transform: translateX(-5px);
    background-color: #1eb8d0;
  }

  .next-year:active {
    transform: translateX(5px);
    background-color: #1eb8d0;
  }
}

.next-year::after {
  content: '>';
}

.contacts-list {
  display: flex;
  column-gap: 20px;
}

.contacts-item {
  transition-duration: 0.2s;
}

.contacts-item:hover {
  scale: 1.2;
  transition-duration: 0.2s;
}

.container {
  max-width: 1400px;
  padding-block: 25px;
  width: 100%;
  display: flex;
  justify-content: space-around;
  gap: 15px;
  flex-wrap: wrap;
}

table {
  border-collapse: collapse;
}

table tbody {
  width: 183px;
  height: 180px;
}

.month__header {
  height: 140px;
  padding: 10px 0;
  background-color: #a9dce4;
  font-size: 18px;
  font-weight: 600;
  border: 1px solid gray;
  border-radius: 8px 8px 0 0;
  border-bottom: none;
  background-size: cover;
  background-position: center;
  position: relative;
}

.month__title {
  padding-top: 90px;
  color: rgb(241, 236, 245);
}

.january .month__header {
  background-image: url(../images/1.jpg);
}

.february .month__header {
  background-image: url(../images/2.jpg);
}

.march .month__header {
  background-image: url(../images/3.jpg);
}

.april .month__header {
  background-image: url(../images/4.jpg);
}

.may .month__header {
  background-image: url(../images/5.jpg);
}

.june .month__header {
  background-image: url(../images/6.jpg);
}

.july .month__header {
  background-image: url(../images/7.jpg);
}

.august .month__header {
  background-image: url(../images/8.jpg);
}

.september .month__header {
  background-image: url(../images/9.jpg);
}

.october .month__header {
  background-image: url(../images/10.jpg);
}

.november .month__header {
  background-image: url(../images/11.jpg);
}

.december .month__header {
  background-image: url(../images/12.jpg);
}

td,
th {
  border: 1px solid gray;
  text-align: center;
  font-size: 14px;
  transition-duration: 0.3s;
}

.cell-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  transition-duration: 0.3s;
  cursor: pointer;
}

.cell-inner:hover {
  border: 1px solid gray;
  background-color: rgb(255, 147, 107);

}

.cell-inner.is-active {
  background-color: rgb(170, 165, 165);
  border: 1px solid gray;
}

th {
  height: 30px;
  font-weight: bold;
  background-color: #a9dce4;
}

/* МЕДИА СТИЛИ */

@media (max-width: 481px) {
  body {
    flex-direction: column;
    padding-inline: 5px;
  }

  .container {
    column-gap: 5px;
    justify-content: center;
  }

  .year-navigation-wrapper {
    padding-top: 30px;
  }
}