/* Style Sheet Template 1 - Two-Panel Layout */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Playfair+Display:wght@600;700;800&display=swap');


/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -'Lora', Georgia, serif;
  line-height: 1.6;
  color: #333;
  background: #fbfbfc; /* keep soft base */
}

html, body {
  height: 100%;
}

/* Two-Panel Container Layout */
.container {
  display: flex;
  /*height: 100vh;*/ /* keep container sized to viewport */
  overflow: hidden; /* prevent container from scrolling */
}

/* Left Sidebar (Navigation) */
.sidebar {
  width: 280px;
  background: #1aa3c8;
  color: #ecf7f8;
  padding: 20px;
  overflow-y: auto; /* sidebar scrolls when overflowing */
  flex-shrink: 0;
  min-height: 0; /* allow internal scrolling inside flex child */
}

.sidebar h2 {
  color: #ecf7f8;
  font-size: 1.5em;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #2e6a73; /* swapped: was #3b7b84 */
}

.sidebar nav ul {
  list-style: none;
}

.sidebar nav li {
  margin: 8px 0;
}

.sidebar nav a {
  display: block;
  color: #d7eef2; /* lighter nav text for contrast */
  text-decoration: none;
  padding: 10px 12px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.sidebar nav a:hover {
  background: #1aa3c8; /* swapped: was #3b7b84 */
  color: #fff;
  transform: translateX(5px);
}

.sidebar nav a.active {
  background: #3b7b84; /* swapped: was #1aa3c8 */
  color: #fff;
  font-weight: 600;
}

/* Right Content Panel */
.content {
  flex: 1;
  background: #fff;
  padding: 40px;
  overflow-y: auto; /* content scrolls when overflowing */
  max-width: 100%;
  font-size: 1.2em;
  min-height: 0; /* allow internal scrolling inside flex child */
}

main {
  max-width: 900px;
  margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  font-weight: 600;
  line-height: 1.3;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

h1 {
  font-size: 2.5em;
  border-bottom: 2px solid #eee;
  padding-bottom: 0.3em;
  color: #1aa3c8; /* brighter heading tone */
}

h2 {
  font-size: 2em;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.3em;
  color: #1aa3c8; /* complementary heading tone */
}

h3 {
  font-size: 1.5em;
  color: #1aa3c8; /* consistent tone */
}

h4 {
  font-size: 1.25em;
}

h5 {
  font-size: 1.1em;
}

h6 {
  font-size: 1em;
}

p {
  margin: 1em 0;
}

/* Code Blocks - Styled by Prism.js */

/* Blockquotes */
blockquote {
  border-left: 4px solid #1aa3c8; /* swapped: was #1aa3c8 */
  margin: 1em 0;
  padding-left: 1em;
  color: #666;
  font-style: italic;
  background: #f9fbfb;
  padding: 10px 10px 10px 20px;
  border-radius: 0 5px 5px 0;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5em 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table th,
table td {
  border: 1px solid #ddd;
  padding: 12px 15px;
  text-align: left;
}

table th {
  background: #3b7b84; /* swapped: was #1aa3c8 */
  color: white;
  font-weight: 600;
}

table tr:nth-child(even) {
  background: #f9f9f9;
}

table tr:hover {
  background: #f1f1f1;
}

/* Lists */
ul, ol {
  padding-left: 2em;
  margin: 1em 0;
}

li {
  margin: 0.5em 0;
}

/* Links */
a {
  color: #3b7b84; /* swapped: was #1aa3c8 */
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #1290a5; /* slightly deeper hover */
  text-decoration: underline;
}

/* Horizontal Rule */
hr {
  border: none;
  border-top: 2px solid #eee;
  margin: 2em 0;
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin: 1em 0;
}

/* Mark/Highlight */
mark {
  background: #fff3cd;
  padding: 2px 4px;
  border-radius: 3px;
}

/* Math Display - KaTeX Support */
.katex-display {
  margin: 1.5em 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.math-error {
  color: #e74c3c;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    max-height: 200px;
  }

  .content {
    padding: 20px;
  }

  main {
    max-width: 100%;
  }
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar,
.content::-webkit-scrollbar {
  width: 8px;
}

.sidebar::-webkit-scrollbar-track {
  background: #1aa3c8; /* swapped: was #3b7b84 */
}

.sidebar::-webkit-scrollbar-thumb {
  background: #86c7d1; /* brighter thumb */
  border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: #b7e8ec;
}

.content::-webkit-scrollbar-track {
  background: #f6fbfc; /* light content track */
}

.content::-webkit-scrollbar-thumb {
  background: #cfeff3; /* soft, vivid content thumb */
  border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover {
  background: #bff0ef;
}
