:root {
  --color-white-smoke: #f5f5f5;
  --color-white-smoke-dark: #e8e8e8;
  --color-accent: #ffbc42;
  --color-accent-dark: #e0a439;

  font-family: Arial, Helvetica, sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-white-smoke);
  margin: 0;
}

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

  > * {
    max-width: 750px;
  }
}

.headline {
  text-align: center;

  h1 {
    font-size: 42px;
    font-weight: bold;
  }

  p {
    font-size: 20px;
  }
}

.calculator {
  background-color: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 3px 2px 22px 1px rgba(0, 0, 0, 0.24);

  display: flex;
  flex-direction: row;
  gap: 20px;

  .left-pane {
    flex: 1;
  }

  .right-pane {
    flex: 1;

    h1 {
      border-bottom: 2px solid var(--color-accent);
    }
  }

  .right-pane > * {
    margin-block: 0;
    margin-bottom: 10px;
  }
}

button {
  background-color: var(--color-accent);
  color: black;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background-color: var(--color-accent-dark);
}

button:active {
  transform: scale(0.98);
  box-shadow: 3px 2px 22px 1px rgba(0, 0, 0, 0.24);
}

input {
  padding: 4px;
  font-size: 16px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 5px 0 var(--color-accent);
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-row {
  display: flex;

  label {
    width: 150px;
  }
}

.nav-bar-placeholder {
  min-height: 60px;
}

.nav-bar {
  min-height: 60px;
  display: flex;
  align-items: center;
  background-color: white;
  border-bottom: 2px solid var(--color-white-smoke-dark);

  .title {
    margin-left: 20px;
    display: flex;
    flex-direction: row;

    h1 {
      font-size: 24px;
      font-weight: bold;
      color: black;
    }

    svg {
      width: 20px;
      height: 20px;
      margin: auto;
      margin-left: 5px;
      padding-right: 25px;
    }
  }

  a {
    width: 75px;
    text-decoration: none;
    padding: 19px 20px;

    &:hover {
      background-color: var(--color-white-smoke);
      border-bottom: 2px solid var(--color-accent);
    }

    div {
      color: black;
      text-align: center;
    }
  }
}

.result {
  border-radius: 5px;
  border: 2px solid var(--color-white-smoke-dark);
  padding: 25px;
  margin: 25px 0px;
  display: none;

  &.visible {
    display: block;
  }

  .result-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
  }

  .left-pane {
    flex: 2;
  }

  .right-pane {
    flex: 1;

    p {
      border-bottom: 2px solid var(--color-accent);
    }

    .label {
      font-weight: bold;
      text-align: right;
      padding-right: 6px;
    }
  }
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  /* flex-wrap: wrap; */

  a {
    flex-grow: 1;
    text-decoration: none;
    color: black;
    cursor: pointer;
  }
}

.article {
  display: flex;
  gap: 20px;
  /* margin: 20px; */
  padding: 20px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 3px 2px 22px 1px rgba(0, 0, 0, 0.24);

  img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
  }
}

/* Article Page Styles */
.article-content {
  width: 75vw;
  margin: auto;
  line-height: 1.6;
}

.article-content img {
  width: 50vw;
  display: block;
  margin: auto;
}

.article-content h2 {
  margin-top: 2em;
}

.article-content ul, .article-content ol {
  margin: 1em 0;
  padding-left: 1.5em;
}

.article-content li {
  margin: 0.5em 0;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .content {
    padding-bottom: 20px;
  }

  .content > * {
    max-width: 100%;
  }

  .headline {
    margin: 0 8px;
  }

  .headline h1 {
    font-size: 32px;
  }

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

  .calculator {
    flex-direction: column;
    padding: 15px;
  }

  .form-row {
    flex-direction: column;
    gap: 5px;
  }

  .form-row label {
    width: 100%;
  }

  .result-container {
    flex-direction: column;
  }

  .nav-bar {
    flex-direction: column;
    padding: 10px 0;
  }

  .nav-bar .title {
    margin-left: 15px;
    margin-bottom: 10px;
  }

  .nav-bar a {
    padding: 10px 15px;
  }

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

  .article img {
    width: 100%;
    height: 200px;
  }

  button {
    width: 100%;
    margin-top: 10px;
  }

  input {
    width: 100%;
    box-sizing: border-box;
  }

  .article-content {
    width: 100%;

    > * {
      margin: 8px;
    }
  }

  .article-content img {
    width: 100%;
    height: auto;
  }

  .article-content h1 {
    font-size: 28px;
    padding: 0 15px;
  }

  .article-content h2 {
    font-size: 24px;
  }

  .article-content p {
    font-size: 16px;
  }
}

/* Tablet Styles */
@media (min-width: 769px) and (max-width: 1024px) {
  .content > * {
    max-width: 90%;
  }

  .article-content {
    width: 85%;
  }

  .article-content img {
    width: 70%;
  }
}
