/* Imports fonts from Google Fonts (Inter, Playfair Display */
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Playfair+Display:ital,wght@0,400..900;1,400..900&display=swap");

/* GLOBAL */
:root {
  --font-family-inter: "Inter", "Arial", sans-serif;
  --font-family-playfair: "Playfair Display", "Times New Roman", serif;
  --color-background: #fbfcf6;
  --color-text: #030d0f;
  --color-primary: #45523e;
  --color-accent: #a1a08f;
  --color-error: #ff0033;
}

html {
  background-color: var(--color-background);
  font-family: var(--font-family-inter);
  font-size: 16px;
}

/* BODY */

body {
  font-family: var(--font-family-inter);
  background-color: var(--color-background);
  margin: 0px;
  padding: 0px;
  display: grid;
  grid-template-areas:
    "header"
    "main"
    "footer";
  grid-template-columns: 1fr;
}

main {
  grid-area: main;
  padding: 80px 15px;
  max-width: 800px;
  margin: 0 auto;
}

/* Links */
main a:link,
main a:visited {
  color: var(--color-accent);
  font-weight: bold;
}

/* Hero images, iframe */
div[id*="hero"] > img,
iframe {
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 800px;
  width: 100%;
  display: block;
  height: auto;
  margin: auto;
  border-radius: 10px;
}

/* Headings */
section h2,
section h3 {
  font-family: var(--font-family-playfair);
  color: var(--color-primary);
  text-align: center;
  font-weight: lighter;
}
section h2 {
  font-size: 2rem;
  margin: 0px;
  padding: 20px 20px 0px;
}
section[id="index-welcome"] h2 {
  padding: 0px 20px 20px;
}
section h3 {
  font-size: 1.75rem;
}

/* Text */
section p,
section ul,
section address {
  font-family: var(--font-family-inter);
  color: var(--color-primary);
  text-align: center;
  font-size: 0.8rem;
}

/* Lists */
section ul {
  list-style-type: none;
  padding-left: 0px;
  margin: 1rem 0;
}
section li {
  margin-bottom: 0.5rem;
}

/* Action call on index.html */
.action-call {
  display: flex;
  justify-content: center;
}
.action-call a:link,
.action-call a:visited {
  text-decoration: none;
  color: var(--color-background);
}
.action-call a {
  margin: 20px;
  padding: 15px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-family: var(--font-family-playfair);
  font-size: 1.5rem;
  font-weight: normal;
  color: var(--color-background);
  background-color: var(--color-primary);
  border: none;
  border-radius: 10px;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.action-call a:hover,
.action-call a:active {
  background-color: var(--color-accent);
  color: var(--color-text);
}

/* Forms */
.forms {
  max-width: 700px;
  margin: 20px auto;
  padding: 20px 0px 20px;
  background-color: var(--color-primary);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.forms label,
.forms p {
  font-family: var(--font-family-playfair);
  font-size: 1.2rem;
  color: var(--color-background);
  display: block;
}
.forms p {
  font-size: 2rem;
  margin: 15px 0px;
}
.forms input,
.forms select,
.forms textarea,
.forms button {
  width: 60vw;
  max-width: 500px;
  padding: 10px;
  margin: 20px;
  font-size: 0.8rem;
  font-family: var(--font-family-inter);
  color: var(--color-text);
  border: 2px solid var(--color-accent);
  border-radius: 10px;
  background-color: var(--color-background);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.forms input[type="submit"],
.forms input[type="date"],
.forms input[type="file"],
.forms button {
  max-width: 250px;
  cursor: pointer;
}
.forms input[type="submit"]:hover,
.forms input[type="submit"]:active,
.forms button:hover,
.forms button:active {
  background-color: var(--color-accent);
}
form .error-message {
  font-size: 1rem;
  color: var(--color-error);
  padding: 0px 0px 30px;
}
/* Form buttons and challenges select */
.delete-button-td {
  text-align: center;
}
.sort-button,
.delete-button,
.challenge-status {
  cursor: pointer;
  padding: 10px;
  font-size: 0.8rem;
  font-family: var(--font-family-inter);
  color: var(--color-primary);
  background-color: var(--color-background);
  border: 2px solid var(--color-accent);
  border-radius: 10px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.sort-button:hover,
.sort-button:active,
.delete-button:hover,
.delete-button:active {
  background-color: var(--color-accent);
  color: var(--color-text);
}
.sort-button {
  font-size: 0.8rem;
  padding: 5px;
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
}
table {
  table-layout: fixed;
  width: 150%;
  max-width: 700px;
  margin: 2rem auto 0px;
  font-family: var(--font-family-inter);
  color: var(--color-text);
  border-collapse: separate;
  border-spacing: 0px;
  overflow: hidden;
  border-radius: 10px;
}
thead {
  font-family: var(--font-family-playfair);
  background-color: var(--color-primary);
  color: var(--color-background);
}
thead th:first-child {
  border-top-left-radius: 10px;
}
thead th:last-child {
  border-top-right-radius: 10px;
}
th {
  font-size: 0.8rem;
  padding: 1rem;
  font-weight: normal;
}
td {
  padding: 1rem;
  font-size: 0.8rem;
  border: 1px solid var(--color-accent);
  word-wrap: break-word;
}
tr:last-child td:first-child {
  border-bottom-left-radius: 10px;
}
tr:last-child td:last-child {
  border-bottom-right-radius: 10px;
}
/* Tables: Empty row */
.empty-row {
  text-align: center;
  font-style: italic;
  color: var(--color-accent);
  font-weight: bold;
}
/* Tables: Challenges */
.challenge-status-td {
  text-align: center;
}
/* Tables: Achievements */
.achievement-badge {
  font-family: var(--font-family-playfair);
  font-style: italic;
  font-weight: bold;
}
.achievement-checkbox-td {
  text-align: center;
}
.achievement-checkbox {
  cursor: pointer;
  width: 25px;
  height: 25px;
}

/* Devs section */
#contact-devs {
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#contact-devs > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}
#contact-devs > div img {
  border-radius: 10px;
  border: 5px solid var(--color-accent);
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  display: block;
  height: auto;
  margin: auto;
}

/* Profile: Profile info (will be shown if logged in) */
#profile-info {
  display: none;
}
/* Profile: Actions */
#profile-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px;
  gap: 30px;
}

/* Contact: Address */
section address {
  padding: 20px;
}
/* Contact: Google Maps iframe */
iframe {
  max-width: 700px;
  border: 1px solid var(--color-accent);
}

/* UI Buttons */
.ui-button {
  cursor: pointer;
  width: 60vw;
  max-width: 250px;
  padding: 10px;
  font-size: 1rem;
  font-family: var(--font-family-inter);
  color: var(--color-background);
  background-color: var(--color-primary);
  border: 2px solid var(--color-accent);
  border-radius: 10px;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.ui-button:hover,
.ui-button:active {
  background-color: var(--color-accent);
  color: var(--color-text);
}

/* RESPONSIVE DESIGN */

/* RD: PHONE */
@media (max-width: 767px) {
}

/* RD: PHONE + TABLET */
@media (max-width: 1024px) {
}

/* RD: TABLET */
@media (min-width: 768px) and (max-width: 1024px) {
}

/* RD: TABLET + COMPUTER */
@media (min-width: 768px) {
  body {
    grid-template-areas:
      "nav header"
      "nav main"
      "nav footer";
    grid-template-columns: 0 1fr;
  }

  section h2 {
    font-size: 3rem;
  }

  section p,
  section ul,
  section address {
    font-size: 1rem;
  }

  th,
  td {
    font-size: 1rem;
  }
}

/* RD: COMPUTER */
@media (min-width: 1025px) {
  body {
    grid-template-areas:
      "header header header"
      "nav main sidebar"
      "footer footer footer";
    grid-template-columns: 0 1fr 0;
  }

  main {
    padding-top: 120px;
  }

  #contact-devs {
    flex-direction: row;
  }
}
