@import url("fonts/fonts.css");

:root {
  --brown: #7c4a11;
  --dark-brown: #251a0c;
  --hover: #f5891b;
  --focus: #ffa600;
  --light: #fefeee;
  --dark-grey: #d9d9d9;
  --light-grey: #f8f8f8;
  --yellow: #ffffd8;
  --beige: #fefeee;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: inherit;
}

html {
  width: 100vw;
  overflow-x: hidden;
}

body {
  background-color: #251a0c;
  color: white;
  font-size: 16px;
  font-family: "Roboto-Regular";
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 30px solid #c1a380;
  pointer-events: none;
  z-index: 10;
}

.container {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 60px;
  box-sizing: content-box;
}

.wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

input,
textarea,
select {
  font-family: "Roboto-Regular";
  display: block;
  padding: 10px;
  border: none;
  border-radius: 4px 4px 0px 0px;
  font-size: 16px;
  color: var(--brown);
}

input::placeholder,
textarea::placeholder {
  color: #7c4a119a;
}

input:focus,
textarea:focus,
select:focus,
input[type="file"]::file-selector-button:focus {
  outline: 1px var(--focus) solid;
}

input[type="file"] {
  padding: 0;
}

input[type="file"]::file-selector-button {
  padding: 10px;
  color: inherit;
  border-radius: 4px 4px 0px 0px;
  border: none;
  background-color: white;
}

button {
  cursor: pointer;
}

a {
  text-decoration: none;
}

ul {
  list-style: none;
}

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

header a {
  display: block;
}

.header-links {
  display: flex;
  gap: 20px;
}

button,
.header-link {
  font-size: 16px;
  font-weight: bold;
  color: white;
  padding: 10px;
  border-radius: 6px;
  border: 3px white solid;
  background-color: var(--brown);
}

.link-page {
  display: table;
  background-color: var(--brown);
  color: white;
  font-size: 16px;
  padding: 10px;
  margin-bottom: 20px;
}

.create-form {
  margin-bottom: 50px;
}

.login,
.register,
.reset,
.forgot,
.create-announcement,
.admin {
  max-width: 400px;
  min-width: 280px;
}

.link-page,
input,
.error-box,
textarea,
select,
.form-item {
  width: 100%;
  display: block;
}

button:hover,
.header-link:hover,
.link-page:hover {
  background-color: var(--hover);
}

button:focus,
.header-link:focus,
.link-page:focus {
  background-color: var(--focus);
}

.form-item {
  margin-bottom: 10px;
}

.create-form .form-item:last-of-type {
  margin-bottom: 20px;
}

header,
footer {
  padding: 50px 0;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

main {
  flex: 1 0 auto;
}

.error-box {
  background-color: red;
}

h1,
h2,
h3,
h4 {
  font-family: "AdventPro-Bold";
}

h1 {
  margin-bottom: 30px;
  font-size: 36px;
}

footer {
  font-family: "Roboto-Black";
  color: #e3d0b9;
  font-size: 14px;
}

.form-message,
.alert-message,
.announcement-null {
  font-family: "Unbounded-Regular";
  color: var(--dark-brown);
  padding: 10px;
  background-color: bisque;
  margin-bottom: 10px;
}

.links-admin-tab {
  display: inline-block;
  font-size: 16px;
  font-weight: bold;
  color: white;
  background-color: var(--brown);
  padding: 10px;
  border-radius: 10px 0;
}

.links-admin-tab:hover {
  background-color: var(--hover);
}

.links-admin-tab:focus {
  background-color: var(--focus);
}

.active {
  background-color: var(--focus);
}

.substrate {
  background-color: var(--light);
  color: var(--dark-brown);
}

.substrate table {
  width: 100%;
  border-collapse: collapse;
}

.substrate thead {
  background-color: var(--dark-grey);
  padding: 10px;
  font-family: "Roboto-Medium";
}

.substrate tr {
  border-bottom: 1px solid var(--dark-grey);
}

.substrate td {
  padding: 10px;
}

.substrate tbody {
  background-color: var(--light-grey);
}

.right-td {
  text-align: center;
  background-color: var(--brown);
  color: white;
  border: 1px white solid;
  max-width: none;
  overflow: visible;
}

.table-form {
  margin: 0;
}

.table-form button {
  width: 100%;
  height: 100%;
  display: inline;
  padding: 0;
  border: none;
  background-color: inherit;
}

.table-link {
  display: block;
  width: 100%;
  height: 100%;
}

.table-form button:hover,
.table-link:hover {
  background-color: inherit;
  color: var(--hover);
}

.table-form button:focus,
.table-link:focus {
  background-color: inherit;
  color: var(--focus);
}

.bearer-edit-title {
  margin-top: 20px;
  margin-bottom: 20px;
}

.announcement-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
}

.announcement-category {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 155px;
  padding: 10px;
  background-color: var(--yellow);
  color: var(--brown);
  border-radius: 3px;
  cursor: pointer;
}

.announcement-category svg {
  display: block;
  width: 40px;
  height: 40px;
}

.announcement-category-title {
  font-size: 24px;
}

.announcement-category svg path,
.announcement-category-title,
.announcement-subcategory {
  transition: 0.5s;
}

.announcement-category:hover svg path {
  fill: var(--hover);
}

.announcement-category:hover {
  color: var(--hover);
}

.announcement-category.is-active,
.announcement-subcategory.is-active,
.announcement-action.is-active {
  color: var(--focus);
}

.announcement-categories li {
  order: 2;
}

.announcement-categories li.is-active {
  order: 1;
}

.announcement-category.is-active svg path {
  fill: var(--focus);
}

.announcement-subcategories {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.announcement-subcategory {
  background-color: var(--yellow);
  color: var(--brown);
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
}

.announcement-subcategory:hover {
  color: var(--hover);
}

.announcement-subcategory-title {
  font-size: 20px;
}

.announcements-area {
  background-color: var(--beige);
  color: var(--brown);
}

.announcement-item {
  display: flex;
  border-top: 2px grey dashed;
}

.announcement-img-box {
  background-image: url("img/camera.png");
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  width: 210px;
  height: 210px;
  background-color: #f3f3f3;
  object-fit: cover;
}

.announcement-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.announcement-text-box {
  padding: 10px;
}

.announcement-title {
  font-size: 20px;
  margin-bottom: 10px;
}

.announcement-text {
  max-height: 159px;
  line-height: 125%;
  font-size: 16px;
  font-weight: 400;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.announcements-actions {
  display: flex;
}

.announcement-action {
  background-color: #d9d9d9;
  border: 1px #c18c4e solid;
  color: #c18c4e;
  font-size: 16px;
  font-weight: bold;
  padding: 15px;
  cursor: pointer;
}

.create-label {
  display: block;
  font-style: italic;
  margin-bottom: 5px;
}

.announcement-photos-list {
  display: flex;
  margin-bottom: 10px;
  overflow: auto;
}

.announcement-photos-item {
  flex: 0 0 auto;
  aspect-ratio: 1 / 1;
  width: 210px;
  height: auto;
  overflow: hidden;
}

.announcement-photos-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.announcement-tags {
  display: flex;
}

.announcement-tag {
  padding: 10px;
  background-color: #d9d9d9;
  border: 1px #c18c4e solid;
  color: #c18c4e;
  font-weight: 700;
}

.announcement-box {
  margin-bottom: 20px;
}

.announcement-admin-btns {
  display: flex;
  gap: 15px;
}

.announcement-admin-btns button {
  border-color: #907250;
}

.announcement-admin-title,
.announcement-admin-text,
.announcement-text {
  margin-bottom: 15px;
}

.announcement-author {
  margin-bottom: 15px;
  font-style: italic;
}

.announcement-admin-margin {
  margin: 0 10px;
}

.announcement-text-show {
  font-size: 18px;
  line-height: 150%;
  margin-bottom: 30px;
}

.verify-text {
  margin-bottom: 10px;
}

@media (max-width: 1000px) {
  header {
    flex-direction: column;
    align-items: start;
  }

  .logo {
    width: 180px;
  }

  .logo-link {
    margin-bottom: 30px;
  }

  .announcement-item {
    flex-direction: column;
  }

  .header-links {
    flex-direction: column;
  }

  td:not(:first-child):not(:last-child) {
    display: none;
    padding: 0;
  }

  td:first-child {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 500px) {
  body::before {
    border: 20px solid #c1a380;
  }

  .container {
    padding: 0 30px;
  }

  h1 {
    font-size: 30px;
  }
}
