* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  list-style: none;
  text-decoration: none;
}

:root {
  --clr-bg-primary: #ffffff;
  --clr-bg-secundary: #063c73;
  --clr-bg-terciary: #9d1414;
  --clr-border: #cccccc;
  --clr-black: #060606bd;
  --clr-text-light: #ffffff;
  --clr-muted: #555555;
  --clr-accent: #ffc508;

  --font-primary: "Roboto", sans-serif;
  --font-secondary: "Roboto Serif", serif;
}

html {
  scroll-padding-top: 120px;
}

body {
  background-color: var(--clr-bg-primary);
  font-family: var(--font-primary);
  line-height: 1.6;
  font-size: 16px;
}

h2 {
  font-family: var(--font-secondary);
  font-size: 2rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

hr {
  height: 2px;
  background-color: var(--clr-border);
  border: none;
}

header {
  background-color: var(--clr-bg-secundary);
  padding-top: 1rem;
  text-align: center;
}

header img {
  height: 7rem;
  margin-bottom: 1rem;
}

nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5px;
}

nav a {
  padding: 0.75rem 1rem;
  color: var(--clr-text-light);
  transition: all 0.3s ease;
  width: 100%;
  border-radius: 4px;
}

nav a:hover {
  background-color: var(--clr-accent);
  transform: translateY(0);
  color: var(--clr-black);
}

.start {
  padding: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
}

.start p {
  text-align: justify;
  padding: 1rem 0;
}

.start figure img {
  max-width: 15rem;
  width: 100%;
  display: block;
  margin: 1rem auto;
}

.start figure figcaption {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  color: var(--clr-muted);
}

#editions {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 2rem;
  padding: 2.5rem 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

#editions article {
  max-width: 300px;
  width: 100%;
  text-align: center;
  border: 1px solid var(--clr-border);
  padding: 1rem;
  border-radius: 8px;
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#editions article:hover {
  transform: translateY(-5px);
}

#editions img {
  width: 100%;
  height: 240px;
  object-fit: contain;
}

#editions h4 {
  margin-top: 1rem;
  font-family: var(--font-secondary);
  font-size: 1.1rem;
}

#editions p {
  color: var(--clr-muted);
  font-size: 0.9em;
  margin: 0.5rem 0;
}

#editions a {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: var(--clr-bg-terciary);
  color: var(--clr-text-light);
  border-radius: 5px;
  transition: all 0.3s ease-in-out;
}

#editions a:hover {
  color: var(--clr-bg-terciary);
  background-color: var(--clr-bg-primary);
  border: 1px solid var(--clr-bg-terciary);
}

#authors {
  background-color: var(--clr-bg-secundary);
  color: var(--clr-text-light);
  padding: 2.5rem 1.25rem;
  text-align: center;
}

#authors div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  margin-top: 1.25rem;
}

#authors img {
  height: 10rem;
  border-radius: 50%;
  border: 3px solid var(--clr-text-light);
  object-fit: cover;
}

#authors article {
  width: 100%;
  max-width: 250px;
}

#authors h3 {
  margin-top: 0.5rem;
}

.form fieldset {
  border: 1px solid var(--clr-border);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 8px var(--clr-border);
}

#profile-fieldset {
  margin-top: 20px;
}

#profile-fieldset input {
  margin-left: 30px;
}

.form legend {
  font-family: var(--font-secondary);
  font-size: 1.5rem;
  padding: 0 10px;
  background-color: var(--clr-bg-primary);
}

#form-title {
  color: var(--clr-bg-secundary);
  font-weight: bold;
}

#profile-title {
  font-size: 1.1rem;
}

#textarea {
  margin-top: 10px;
  width: 100%;
  resize: none;
  border-color: var(--clr-border);
  font-family: var(--font-primary);
  font-size: medium;
  padding: 10px 10px;
}

#textarea-p label {
  display: flex;
  margin-top: 30px;
  font-family: var(--font-primary);
  font-size: medium;
}

.form-input-text {
  margin-bottom: 15px;
  width: 100%;
  height: 30px;
  padding: 10px 10px;
}

.form button {
  display: flex;
  margin: 10px auto 0 auto;
  padding: 10px 20px;
  background-color: var(--clr-muted);
  color: var(--clr-text-light);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  max-width: 200px;
  justify-content: center;
}

#submit-button:hover {
  background-color: var(--clr-bg-secundary);
}

#clear-button:hover {
  background-color: var(--clr-bg-terciary);
}

#area {
  width: 100%;
  height: 34px;
  border-radius: 15px;
}

footer {
  background-color: var(--clr-bg-secundary);
  color: var(--clr-text-light);
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

footer a {
  color: var(--clr-accent);
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--clr-text-light);
}

.footer-social ul {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.footer-social i {
  font-size: 1.8rem;
  transition: transform 0.3s ease;
}

.footer-credits p {
  font-size: 0.8rem;
  color: var(--clr-border);
}

@media (min-width: 768px) {
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 10;
  }

  header img {
    height: 5rem;
    margin: 0;
    order: -1;
  }

  nav {
    flex-direction: row;
    gap: 1.25rem;
  }

  nav a:hover {
    transform: translateY(-3px);
  }

  #editions {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  #authors div {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  #area-perfil {
    display: flex;
    align-items: center;
  }

  #area {
    width: 100%;
  }

  .form {
    padding: 40px 100px;
  }

  .form-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
  }

  .form-field {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 250px;
  }

  #profile-fieldset {
    display: flex;
    gap: 20px;
    margin-top: 5px;
    align-items: center;
    border: none;
    padding: 0;
  }

  .radio-group {
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .form-input-text,
  #area,
  #textarea,
  #textarea-p {
    width: 100%;
  }

  #submit-button,
  #clear-button {
    padding: 10px 20px;
    margin-top: 10px;
    cursor: pointer;
  }

  footer {
    flex-direction: row;
    justify-content: space-around;
    align-items: flex-start;
    text-align: left;
  }

  .footer-social ul {
    justify-content: flex-start;
  }
}
