/* level3_style.css */

/* 
  ---------------
  GLOBAL STYLES
  ---------------
*/

/* 1) Body and Typography */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Roboto:wght@400;500&display=swap');
/* You can add more fonts if you want something even more playful; just be sure to import them above. */

body {
  margin: 0;
  background: linear-gradient(160deg, #fefaf5, #faf3ff); /* Soft background gradient */
  padding: 100px 20px 20px;
  font-family: 'Roboto', sans-serif;
  font-size: 17px; /* Slightly larger text for better readability */
  line-height: 1.75; /* Comfortable line height for reading */
  color: #333; 
  transition: background 0.3s ease; /* Smooth transitions if background changes */
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  color: #3f51b5; 
  font-weight: 700; 
  line-height: 1.3; 
  margin-top: 0;
}

/* 2) Primary Container (White Box) */
.content-container {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* 3) Section Boxes (e.g., big content sections) */
.section-box {
  border-left: 4px solid #3f51b5; 
  background: #fcfcfc;
  border-radius: 8px;
  padding: 20px 25px;
  margin: 30px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.section-box h2 {
  margin-top: 0;
  color: #3f51b5;
}

/* 4) Code / Formula / Example Boxes */
.fancy-code {
  background: #e8eaf6; 
  border: 1px solid #7986cb; 
  border-radius: 8px;
  padding: 10px;
  font-family: monospace;
  margin: 10px 0;
  text-align: center;
  overflow-x: auto; /* If code is too wide */
}

.formula-box {
  background-color: #e3f2fd; 
  border: 2px solid #bbdefb;
  border-radius: 10px;
  padding: 15px;
  margin: 20px 0;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.05);
  text-align: center;
}
.formula-box p {
  margin: 5px 0;
  font-weight: 700; 
}

.example-box {
  background-color: #fffde7; 
  border: 2px solid #fff9c4; 
  border-radius: 10px;
  padding: 15px;
  margin: 20px 0;
  box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.05);
}
.example-box p {
  margin-top: 0;
  font-weight: 500;
}
.example-box strong {
  font-weight: 700;
  color: #ffb300;
}

/* 
   If you have specialized "example-solution-box" or other boxes,
   match their styling to your theme similarly as above.
*/

/* 5) Specialized Boxes (Definition, Note, Identities, etc.) */
.definition-box {
  background-color: #e0e0ff; 
  border: 2px solid #b3b3ff; 
  border-radius: 10px;
  padding: 15px;
  margin: 20px 0;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
}
.definition-box p {
  margin-top: 0;
  font-weight: 500;
}
.definition-box strong {
  font-weight: 700;
  color: #303f9f; 
}

.note-box {
  background-color: #ffe0b2; 
  border: 2px solid #ffcc80; 
  border-radius: 10px;
  padding: 15px;
  margin: 20px 0;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.05);
}
.note-box p {
  margin-top: 0;
  font-weight: 500;
  color: #d84315;
}

.identity-box {
  background: rgba(255, 255, 255, 0.6); /* Soft transparent background */
  backdrop-filter: blur(8px);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 10px;
  padding: 15px 20px;
  margin: 10px auto;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 1.1em;
  color: #333;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
  display: inline-block;
  max-width: 80%;
  min-width: 250px;
  overflow-x: auto;
  white-space: nowrap;
  vertical-align: middle;
}

.identity-box p {
  margin: 5px 0;
  font-weight: 600;
  color: #2c3e50;
}

.identity-box:hover {
  transform: scale(1.01);
  transition: 0.2s ease-in-out;
  box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.12);
}

/* Ensure inline math equations align properly */
.math-inline {
  display: inline-block;
  vertical-align: middle;
  padding: 2px 4px;
  font-size: 1em;
}



/* 6) Question Boxes */
.question-list p {
  margin-bottom: 15px; /* Space between questions */
  padding-top: 5px;     /* Add a little padding above question text */
  padding-bottom: 5px;  /* Add a little padding below question text */
}
.fundamental-questions-box {
  background-color: #e8eaf6; 
  border: 2px dashed #5c6bc0; 
  border-radius: 10px;
  padding: 20px;
  margin: 20px 0;
  box-shadow: 1px 1px 5px rgba(0,0,0,0.03);
}
.challenging-questions-box {
  background-color: #f3e5f5; 
  border: 2px dashed #ab47bc; 
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
  display: block;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  white-space: normal;
}
.questions-box h3 {
  margin-top: 0; 
  color: #333;
}

/* 7) Lists and Paragraphs */
p {
  margin-bottom: 16px;
  transition: color 0.3s ease; 
}
li {
  margin-bottom: 8px; 
}

/* 8) Horizontal Rule */
hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 20px 0;
}

/* 
   ---------------
   BUTTONS & LINKS
   ---------------
*/

/* For "Next Topic" style links */
a.next-topic-btn {
  display: inline-block;
  background: #3f51b5; 
  color: #fff;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.3s, box-shadow 0.3s;
  margin-top: 20px;
  letter-spacing: 0.6px; 
}
a.next-topic-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Example "nav-button" from your existing code */
.nav-button {
  display: inline-block;
  background: #3f51b5;
  color: #fff;
  padding: 12px 24px;
  border-radius: 50px; /* More rounded for a fun look */
  text-decoration: none;
  font-weight: 500;
  letter-spacing: 0.6px;
  margin: 10px 10px 0 10px;
  box-shadow: 0 3px 10px rgba(63, 81, 181, 0.2);
  transition: all 0.3s ease;
}
.nav-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(63, 81, 181, 0.3);
}

/* 
   ---------------
   NEW: TOPIC SWITCH BUTTONS
   ---------------
   Use these for a "button box" at the end of the page to switch between topics.
   Example usage in your HTML:
   
   <div class="topic-switch-container">
       <a href="topic8.html" class="topic-switch-button">Previous Topic</a>
       <a href="topic10.html" class="topic-switch-button">Next Topic</a>
   </div>
*/

.topic-switch-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 40px;
}

.topic-switch-button {
  background: linear-gradient(135deg, #42a5f5 0%, #7e57c2 100%);
  color: #fff;
  padding: 14px 28px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.6px;
  box-shadow: 0 4px 12px rgba(66, 165, 245, 0.3);
  transition: all 0.3s ease;
}
.topic-switch-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(66, 165, 245, 0.4);
}

/* 
   ---------------
   MEDIA QUERIES
   ---------------
*/

@media (max-width: 768px) {
  body { 
    padding: 120px 10px 10px;
  }
  .content-container { 
    padding: 20px; 
  }
  h1 { 
    font-size: 1.8rem; 
  }
}
