* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #E5E5E5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background-color: #fff;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

header {
  background: linear-gradient(to bottom, #8FB7DA 0%, #6A9BC8 100%);
  padding: 30px 20px;
  text-align: center;
  border-bottom: 4px solid #5A8BB8;
}

h1 {
  color: #fff;
  font-size: 2.5em;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  margin: 0;
  padding: 20px 0;
}

.content-wrapper {
  display: flex;
  flex-wrap: wrap;
}

nav {
  background: linear-gradient(to right, #8FB7DA, #A5C7E3);
  width: 220px;
  padding: 0;
  border-right: 2px solid #7AA5CC;
}

nav ul {
  list-style: none;
}

nav ul li {
  border-bottom: 1px solid #7AA5CC;
}

nav ul li a {
  display: block;
  padding: 12px 20px;
  color: #003366;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.3);
}

nav ul li a:hover {
  background-color: #CDE4F7;
  padding-left: 30px;
  color: #001a33;
}

main {
  flex: 1;
  background-color: #CDE4F7;
  padding: 40px;
  min-height: 500px;
}

article {
  background-color: #fff;
  padding: 30px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

article p {
  margin-bottom: 15px;
  text-align: justify;
}

article h2 {
  color: #5A8BB8;
  margin: 25px 0 15px 0;
  font-size: 1.8em;
  border-bottom: 2px solid #8FB7DA;
  padding-bottom: 10px;
}

article h3 {
  color: #6A9BC8;
  margin: 20px 0 10px 0;
  font-size: 1.4em;
}

.transition-section {
  background-color: #fff;
  padding: 25px 30px;
  margin-bottom: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.transition-section p {
  margin-bottom: 15px;
}

{% if links %}
.links-section {
  background-color: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.links-section h3 {
  color: #5A8BB8;
  margin: 25px 0 15px 0;
  font-size: 1.5em;
  border-bottom: 2px solid #8FB7DA;
  padding-bottom: 10px;
}

.links-section h3:first-child {
  margin-top: 0;
}

.links-section ul {
  list-style: none;
  column-count: 2;
  column-gap: 30px;
  margin-bottom: 20px;
}

.links-section ul li {
  break-inside: avoid;
  margin-bottom: 10px;
}

.links-section ul li a {
  color: #003366;
  text-decoration: none;
  padding: 5px 0;
  display: inline-block;
  transition: all 0.3s ease;
  border-bottom: 1px solid transparent;
}

.links-section ul li a:hover {
  color: #5A8BB8;
  border-bottom: 1px solid #8FB7DA;
  padding-left: 5px;
}
{% endif %}

footer {
  background: linear-gradient(to top, #8FB7DA 0%, #6A9BC8 100%);
  padding: 20px;
  text-align: center;
  color: #fff;
  border-top: 4px solid #5A8BB8;
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.8em;
    padding: 10px 0;
  }

  .content-wrapper {
    flex-direction: column;
  }

  nav {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #7AA5CC;
  }

  nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  nav ul li {
    border-bottom: none;
    border-right: 1px solid #7AA5CC;
    flex: 1 1 auto;
    min-width: 150px;
  }

  nav ul li:last-child {
    border-right: none;
  }

  nav ul li a:hover {
    padding-left: 20px;
  }

  main {
    padding: 20px;
  }

  article, .transition-section, .links-section {
    padding: 20px;
  }

  {% if links %}
  .links-section ul {
    column-count: 1;
  }
  {% endif %}
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5em;
  }

  nav ul li {
    min-width: 100%;
    border-right: none;
    border-bottom: 1px solid #7AA5CC;
  }

  article h2 {
    font-size: 1.4em;
  }

  article h3 {
    font-size: 1.2em;
  }
}
    