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

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

:root {
  /* Colors */
  --color-primary: rgba(136, 0, 255, 1);
  --color-secondary: rgba(166, 143, 255, 1);
  --color-bg: #ffffff;
  --color-text: rgba(25, 24, 26, 1);

  /* Typography */
  --font-base: "Roboto", sans-serif;
  --font-size-base: 20px;
  --font-weight-normal: 400;
  --font-weight-bold: 700;
  --line-height-base: 1.3;

  /* Borders & Radius */
  --border-radius: 3px;
  --border-color: rgba(163, 163, 163, 1);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}

html {
  scroll-behavior: smooth;
}

html,
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  background-color: transparent;
}

ul,
ol {
  list-style: none;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-base);
  letter-spacing: 0%;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

.link {
  color: var(--color-secondary);
  font-weight: var(--font-weight-bold);
}

.link:hover {
  text-decoration: underline;
}

/* Header */
.header {
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 10px 0px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 999;
}

.header-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.burger-icon {
  display: none;
}

.burger-icon img {
  width: 15px;
  height: auto;
}

.logo img {
  width: 80px;
}

.header-bottom {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.nav-link {
  font-weight: 300;
  font-size: 22px;
  line-height: 1;
  position: relative;
  padding-bottom: 5px;
  border: 1px solid transparent;
}

.nav-link.active {
  font-family: "Roboto Condensed", sans-serif;
  font-weight: 400;
  border-bottom: 1px solid var(--color-secondary);
}

.nav-link:hover {
  color: var(--color-secondary);
}

.social-icons {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}

.social-icons a:hover {
  opacity: 0.8;
}

.social-icons img {
  width: 20px;
  height: 20px;
}

/* Main */
.main-content {
  padding: 50px 0;
  display: flex;
  flex-direction: column;
  gap: 50px;
}

.article {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.article-title {
  font-family: "Roboto Condensed", sans-serif;
  font-size: 40px;
  font-weight: 700;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-secondary);
}

.article h2 {
  font-size: 32px;
  font-weight: 600;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-secondary);
}

/* Quiz */
#quiz-container {
  scroll-margin-top: 150px;
}

.quiz {
  padding: 22px 0;
  max-width: 687px;
  margin: 0 auto;
}

.quiz-question {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quiz-question-text {
  text-align: center;
  font-weight: 500;
}

.quiz-options {
  display: flex;
  justify-content: center;
  gap: 50px;
}

.quiz-option {
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quiz-option input[type="radio"] {
  appearance: none;
  width: 26px;
  height: 26px;
  border: 1px solid var(--color-text);
  border-radius: 50%;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.quiz-option input[type="radio"]:checked {
  border-color: #8e44ec;
}

.quiz-option input[type="radio"]:checked::before {
  content: "";
  display: flex;
  width: 14px;
  height: 14px;
  background-color: rgba(166, 143, 255, 1);
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.quiz-next {
  display: block;
  text-align: center;
  width: 273px;
  margin: 0 auto;
  padding: 2px 0px;
  font-size: 22px;
  line-height: 1.1;
  font-weight: 500;
  border: 1px solid var(--color-primary);
  border-radius: var(--border-radius);
  transition: background-color 0.2s ease;
}

.quiz-next:hover {
  border: 1px solid rgba(166, 143, 255, 1);
  background-color: rgba(166, 143, 255, 1);
  color: #ffffff;
}

.fade-in {
  animation: fadeIn 0.3s ease forwards;
}
.fade-out {
  animation: fadeOut 0.3s ease forwards;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.quiz-end {
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  padding: 30px 0;
}

/* Comments */
.comments-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.comments-title {
  font-size: 26px;
  font-weight: 600;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-secondary);
}

.comment-form {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-left: 40px;
}

.comment-input-container {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.comment-input {
  flex: 1;
  padding: 2px 10px 30px 10px;
  font-size: 22px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.comment-input::placeholder {
  color: var(--color-text);
  font-weight: 300;
}

.comment-send {
  background-color: var(--color-primary);
  color: white;
  padding: 2px 20px;
  font-size: 22px;
  font-weight: 300;
  border-radius: var(--border-radius);
}

.comments {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.comment {
  padding: 0px 0px 10px 40px;
  border-bottom: 1px solid var(--color-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 22px;
}

.comment-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.comment-avatar img {
  width: 100%;
  height: 100%;
}

.comment-author {
  font-weight: 500;
}

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

.comment-reactions {
  display: flex;
  gap: 16px;
  font-size: 18px;
}

.reaction {
  display: flex;
  align-items: center;
  gap: 3px;
}

.reaction img {
  vertical-align: middle;
}

.reaction:hover {
  opacity: 0.8;
}

/* Footer */
.footer {
  font-family: "Roboto Condensed", sans-serif;
  background-color: rgba(25, 24, 26, 1);
  color: rgba(255, 255, 255, 1);
  font-size: 22px;
  padding: 22px 0px 32px 0px;
}

.footer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}

.footer-content {
  display: flex;
  align-items: flex-start;
  font-size: 22px;
  gap: 20px;
}

.footer-links {
  min-width: 333px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.footer-nav a {
  font-weight: 300;
}

.footer-nav a:hover {
  color: #c8c8c8;
}

.footer-text {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.footer-license {
  font-size: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.footer-copyright {
  font-size: 22px;
  font-weight: var(--font-weight-bold);
}

@media (max-width: 1024px) {
  .container {
    max-width: 703px;
  }

  .nav-link {
    font-size: 18px;
  }

  .main-content {
    padding: 40px 0;
    gap: 40px;
  }

  .article-title {
    font-size: 34px;
  }

  .article h2 {
    font-size: 28px;
  }

  .comment-text,
  .footer-content {
    font-size: 20px;
  }

  .footer-links {
    min-width: 221px;
  }
}

@media (max-width: 768px) {
  .container {
    width: 100%;
    padding: 0px 20px;
  }

  .header {
    padding: 6px 0px;
  }

  .header-content {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
  }

  .header-content .logo {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .burger-icon {
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    display: block;
  }

  .main-nav {
    display: none;
  }

  .header-bottom {
    top: 50%;
    transform: translateY(-50%);
  }

  .main-content {
    padding: 20px 0;
    gap: 20px;
  }

  .article-title {
    font-size: 26px;
  }

  .article p {
    font-size: 18px;
  }

  .article h2 {
    font-size: 22px;
    line-height: 1.1;
  }

  .comment-form {
    flex-direction: column;
    padding-left: 10px;
  }

  .comment-input-container {
    width: 100%;
  }

  .comment-input {
    flex: 1;
    font-size: 18px;
  }

  .comment-send {
    align-self: flex-end;
  }

  .comment {
    padding-left: 10px;
  }

  .comment-author {
    font-size: 20px;
  }

  .comment-text {
    font-size: 18px;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
  }

  .footer-nav {
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
  }

  .footer-text {
    text-align: center;
    font-size: 18px;
  }

  .footer-license {
    font-size: 16px;
    font-weight: 300;
  }

  .footer-copyright {
    font-size: 18px;
  }
}
