/* --- Unified and modern Summa styles --- */

.summa-main-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 0;
  background: #fffbe6;
  min-height: 80vh;
  width: 100%;
  box-sizing: border-box;
}

.summa-sidebar {
  flex: 1 1 0;
  min-width: 0;
}

.summa-content {
  flex: 3 1 600px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 32px 20px 32px 20px;
  max-width: 700px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
}

.summa-title {
  text-align: center;
  font-size: 2.2rem;
  font-family: 'Skranji', 'MedievalSharp', 'Eagle Lake', serif;
  color: #3a5a7a;
  letter-spacing: 1px;
  margin-bottom: 0.2em;
}

.summa-subtitle {
  margin-top: -18px;
  font-family: 'Tagesschrift', serif;
  font-size: 1.1rem;
  color: #bfa14a;
  letter-spacing: 2px;
  text-transform: lowercase;
  margin-bottom: 10px;
  display: block;
}

.summa-divider {
  width: 90%;
  height: 1px;
  background-color: #bfa14a;
  border: none;
  margin: 18px 0 24px 0;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.summa-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
}

.summa-cover {
  max-width: 220px;
  width: 100%;
  height: auto;
  min-width: 120px;
  min-height: 120px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  background: #fff;
}

.summa-description {
  text-align: center;
  font-size: 1.08rem;
  color: #3a3a3a;
  margin: 0 0 8px 0;
}

.summa-parts {
  width: 100%;
  margin-top: 18px;
}

.summa-parts-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #fff;
  border-radius: 8px;
  padding: 8px 0 2px 0;
  margin-bottom: 0.5em;
}

.summa-parts-label {
  font-size: 1rem;
  color: #bfa14a;
  font-family: 'Tagesschrift', serif;
  margin-top: -8px;
}

.summa-parts-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.summa-part-link {
  color: #4d6c82;
  font-size: 1.15rem;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: color 0.2s;
}
.summa-part-link:visited {
  color: #014475;
}
.summa-part-link:hover {
  color: #bfa14a;
}

.questions-header, .summa-questions-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 18px;
  gap: 0;
  flex-wrap: wrap;
}

.questions-header > *, .summa-questions-header > * {
  flex: 0 1 auto;
}

.back-container {
  flex: 0 0 auto;
  align-items: flex-start;
}

.summa-back-link {
  text-decoration: none;
  color: #4d6c82;
  font-size: 1rem;
  transition: color 0.2s;
}
.summa-back-link:hover {
  color: #bfa14a;
}

.summa-header-info {
  flex: 1 1 0;
  min-width: 120px;
  text-align: center;
  word-break: break-word;
  margin-left: 0;
  margin-right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.part-container {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 100px;
  max-width: 115px;
  width: 115px;
  height: 38px;
  overflow: hidden;
}

.summa-part-name {
  font-weight: bold;
  color: #afa11b;
  font-size: 1.05rem;
  white-space: normal;
  overflow: hidden;
  text-overflow: unset;
  max-width: 100%;
  width: 100%;
  height: 38px;
  line-height: 1.2;
  display: flex;
  align-items: center;
}

.summa-question-number {
  color: #bfa14a;
  font-size: 0.98rem;
}

.summa-question-content {
  background: #fff;
  border-radius: 8px;
  padding: 24px 18px 24px 32px;
  width: 100%;
  margin-top: 12px;
  font-size: 1.08rem;
  color: #222;
  box-sizing: border-box;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
  word-break: break-word;
  white-space: pre-line;
  overflow: visible;
  margin-left: 8px;
  list-style-position: inside;
}
.summa-question-content h1,
.summa-question-content h2,
.summa-question-content h3 {
  color: #222;
  font-family: inherit;
  font-weight: bold;
}
.summa-question-content ol,
.summa-question-content ul {
  list-style-position: inside;
  padding-left: 0;
  margin-left: 0;
}
.summa-question-content li {
  padding-left: 0.5em;
  word-break: break-word;
}

.summa-questions-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  width: 100%;
}

.summa-questions-list li {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
  word-break: break-word;
  display: flex;
  justify-content: center;
}

@media (max-width: 900px) {
  .summa-main-container {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 0;
  }
  .summa-sidebar {
    display: none;
  }
  .summa-content {
    max-width: 100vw;
    border-radius: 0;
    box-shadow: none;
    padding: 18px 4vw;
  }
  .questions-header, .summa-questions-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    width: 100%;
    text-align: center;
    flex-wrap: wrap;
  }
  .part-container {
    align-items: flex-end;
    max-width: 100%;
    min-width: 100px;
    width: 115px;
    height: 38px;
  }
  .summa-part-name {
    white-space: normal;
    max-width: 100%;
    overflow: hidden;
    text-overflow: unset;
    width: 100%;
    height: 38px;
    line-height: 1.2;
    display: flex;
    align-items: center;
  }
  .summa-header-info {
    min-width: 80px;
    flex: 1 1 0;
    height: auto;
    max-height: 48px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-left: 0;
    margin-right: 0;
  }
  .part-container {
    align-items: flex-end;
    align-self: flex-start;
  }
}

@media (max-width: 600px) {
  .summa-content {
    padding: 10px 2vw;
  }
  .summa-title {
    font-size: 1.4rem;
  }
  .summa-description {
    font-size: 0.98rem;
  }
  .summa-cover {
    max-width: 140px;
  }
  .summa-question-content {
    padding: 12px 8px 12px 16px;
    font-size: 0.98rem;
    margin-left: 4px;
    overflow-x: auto;
    word-break: break-word;
    white-space: pre-line;
    list-style-position: inside;
  }
  .summa-question-content ol,
  .summa-question-content ul {
    list-style-position: inside;
    padding-left: 0;
    margin-left: 0;
  }
  .summa-question-content li {
    padding-left: 0.5em;
  }
}

/* Legacy .summa layout (kept for backward compatibility, can be removed when unused) */
.summa {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
}

.summa .summa_info {
  display: flex;
  flex-direction: column;
  width: fit-content;
  align-items: center;
}

.summa .summa_cover {
  height: 412px;
}

.summa .summa_info p {
  margin: 15px;
  width: 320px;
  text-align: center;
}

.summa .summa_parts {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
}

.summa .summa_parts #parts_title {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #fcfad9;
  margin-bottom: -20px;
}

.summa .summa_parts #parts_list {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  margin-top: 25px;
}

.summa .summa_parts #parts_list li {
  text-decoration: none;
  font-size: 20px;
}

.summa .summa_parts #parts_list li a:link {
  color: #4d6c82;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.summa .summa_parts #parts_list li a:visited {
  color: #014475;
}

.summa .summa_parts hr {
  position: relative;
  width: 120%;
  height: 1px;
  top: -35px;
  z-index: -1;
  color: Black;
}

.summa #subtitle {
  margin-top: -30px;
}

.summa .content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 20px;
  align-items: center;
  gap: 30px;
  margin-bottom: 30px;
}

.summa .content h1 {
  text-align: center;
}

.summa .summa_questions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  list-style: none;
  gap: 20px;
}

.summa .questions_header {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: center;
  width: 100%;
}

.summa .questions_header .back_container {
  margin-right: 10px;
  text-align: center;
}

.summa .questions_header .back_container #back {
  text-decoration: none;
}

.summa .questions_header .part_container {
  display: flex;
  flex-direction: column;
  text-align: center;
  width: 95px;
}
