*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  line-height: 1.5;
  font-size: 1rem;
  font-weight: 400;
  font-style: normal;
  font-family: var(--font-default);
  background-color: var(--body-background-color);
  color: var(--text-color);
}

/* typografphy */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading-color);
  font-family: var(--font-heading);
  font-weight: 500;
  font-style: normal;
  margin: 1.5rem 0 0;
}

h1 {
  font-size: 3rem;
  font-weight: 500;
  line-height: 4.25rem;
}

h2 {
  font-size: 3rem;
  font-weight: 500;
  line-height: 3.75rem;
}

h3 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 4.25rem;
}

.page-title-section {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
}

svg,
img {
  display: block;
  max-width: 100%;
  height: auto;
}

hr {
  width: 100%;
  opacity: 0.3;
  margin: 2rem 0;

  &.minimal {
    margin: 0;
  }

  &.accent {
    border: 1px solid var(--border-accent-color);
  }
}

svg,
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* container */
.container {
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  padding-inline: 1rem;

  @media (width >= 768px) {
    max-width: 720px;
  }

  @media (width >= 992px) {
    max-width: 960px;
  }

  @media (width >= 1200px) {
    max-width: 1140px;
  }

  @media (width >= 1400px) {
    max-width: 1320px;
  }

  &.full {
    max-width: 100%;
  }
}

/* layouts */
.app-layout {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  height: 100dvh;
  padding: 1rem;
}

/* menus */
.menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 1.5rem;

  .menu-item {
    font-size: 1rem;

    &.menu-dropdown::after {
      content: "\f078";
      font-family: var(--font-fa);
      font-size: 1em;
      margin-left: 0.5rem;
    }

    .menu-item-link {
      color: var(--menu-link-accent-color);
      text-decoration: none;

      &:hover {
        color: var(--menu-link-accent-hover-color);
        text-underline-offset: 0.5rem;
        text-decoration: underline;
      }
    }
  }
}

/* buttons */
mobile-btn,
.btn {
  color: var(--button-text-color);
  background-color: var(--button-background-color);
  border: 1px solid var(--button-border-color);
  display: inline-block;
  padding: 0.9rem 1.5rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;

  transition:
    background-color 0.15s ease-in-out,
    color 0.15s ease-in-out border 0.15s ease-in-out;

  &::after {
    content: "\f054";
    font-family: var(--font-fa);
    font-weight: 900;
    font-size: 1rem;
    margin-left: 0.5rem;
  }

  &:hover {
    color: var(--button-text-hover-color);
    background-color: var(--button-background-hover-color);
    border: 1px solid var(--button-border-hover-color);
  }
}

.btn-accent {
  color: var(--button-text-color);
  background-color: var(--button-background-color);
  border: 1px solid var(--button-border-color);

  &:hover {
    color: var(--button-accent-text-hover-color);
    background-color: var(--button-accent-background-hover-color);
    border: 1px solid var(--button-accent-border-hover-color);
  }
}

/* form */
form {
  .form-group {
    display: grid;
    align-items: start;
    gap: 0.3rem;

    &:has(.form-field-validation) {
      margin: 0;
    }
  }

  .title {
    h3 {
      margin: 0;
    }

    p {
      color: var(--form-title-paragraph-color);
    }
  }

  .form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--form-label-text-color);
    font-family: var(--font-heading);
  }

  textarea {
    resize: none;
  }

  .form-input,
  textarea {
    padding: 1rem;
    border-radius: 10px;
    background-color: var(--form-input-background-color);
    border: 1px solid var(--form-input-border-color);
    color: var(--form-input-text-color);
    font-size: 1rem;
    font-family: var(--font-default);
    width: 100%;

    &::placeholder {
      opacity: 0.3;
      color: var(--form-input-text-color);
    }
  }

  .form-checkbox-input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;

    &:checked + .form-checkbox-checkmark {
      border-color: var(--form-checkbox-checked-background-color);
      background-color: var(--form-checkbox-checked-background-color);
      color: var(--input-text-color);
    }

    &:checked + .form-checkbox-checkmark::after {
      opacity: 1;
    }
  }

  .form-checkbox-checkmark {
    cursor: pointer;
    border: 1px solid var(--form-checkbox-border-color);
    background-color: var(--form-input-background-color);
    color: var(--form-input-text-color);
    height: 25px;
    width: 25px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;

    &::after {
      content: "\f00c";
      font-family: var(--font-fa);
      font-size: 0.8em;
      opacity: 0;
    }
  }

  .form-checkbox-validation:has(.form-checkbox-input.input-validation-error)
    .form-checkbox-checkmark {
    border: 1px solid var(--form-field-validation-error-text-color);
  }

  .field-validation {
    display: block;
    height: 0.9rem;
    margin: 0.3rem;
  }

  .field-validation-error {
    color: var(--danger-color);
    font-size: 0.9rem;
  }
}

header {
  background-color: var(--section-accent-background-color);
  background-image: url("/images/dark-section-img.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text-accent-color);
  border-radius: 20px;
  padding: 1rem 2rem 1rem;

  &:has(.section__hero) {
    padding-bottom: 0;
  }
}

footer {
  background-color: var(--section-accent-background-color);
  background-image: url("/images/dark-section-img.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--text-accent-color);
  border-radius: 20px;
  padding: 1rem 2rem 1rem;
}

.page-title {
  text-align: center;
  margin: 3rem 0;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0;

  .check-list-item {
    margin-bottom: 0.5rem;

    &:before {
      content: "\f058";
      font-family: var(--font-fa);
      font-weight: 400;
      font-size: 1em;
      color: var(--checklist-icon-color);
      margin-right: 0.7rem;
    }
  }
}

.section-title {
  display: inline-block;
  background-color: var(--section-title-background-color);
  color: var(--section-title-text-color);
  padding: 0 1rem 0.25rem;
  border-radius: 25px;
  font-family: var(--font-default);
  font-weight: 600;
  font-size: 14px;

  &::before {
    content: "\e7d1";
    color: var(--section-title-dot-color);
    font-family: var(--font-fa);
    font-weight: 900;
    font-size: 1.5em;
    position: relative;
    top: 3px;
    margin-right: 4px;
  }
}
