/* === BASIC RESET === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Merriweather', serif;
  background-color: #fefefe;
  color: #333;
  line-height: 1.8;
}

/* === WRAPPER === */
.wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
  min-height: 100vh;
}

/* === SIDEBAR / MENU === */
.sidebar {
  width: 220px;
  background-color: #2c3e50;
  color: #fff;
  padding: 20px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.sidebar h2 {
  font-size: 20px;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
}

.sidebar ul {
  list-style: none;
  width: 100%;
}

.sidebar li {
  margin: 10px 0;
}

.sidebar a {
  color: #ecf0f1;
  text-decoration: none;
  display: block;
  padding: 10px 15px;
  border-radius: 8px;
  background-color: #34495e;
  transition: background 0.3s, transform 0.2s;
  font-weight: 500;
}

.sidebar a:hover {
  background-color: #3d5a73;
  transform: translateX(3px);
}

/* === BANNERS === */
.banner {
  background-color: #f0f0f0;
  border-radius: 10px;
  overflow: hidden;
  display: block;
  margin: 15px auto;
}

.banner-menu {
  width: 160px;
  height: 300px;
  margin-top: 15px; 
  margin-left: auto;
  margin-right: auto;
}

/* === MAIN CONTENT === */
main {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: nowrap;
}

.content-text {
  flex: 1 1 auto;
  min-width: 450px;
  font-size: 18px;
  color: #2c3e50;
  line-height: 1.9;
}

.center {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.main-header-block {
  margin-bottom: 30px;
}

.book-info-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
  padding-bottom: 12px;
  margin-bottom: 20px;
}

.book-title-small {
  font-size: 14px;
  color: #666;
  font-weight: 400;
  font-style: italic;
  line-height: 1.2;
}

.content-button {
  padding: 5px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  background-color: transparent;
  color: #34495e;
  border: 1px solid #34495e;
  transition: all 0.2s ease-in-out;
  flex-shrink: 0;
}

.content-button:hover {
  background-color: #34495e;
  color: #fff;
  border-color: #34495e;
  transform: translateY(-1px);
}

.content-text h2 {
  color: #555;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.4;
  margin-top: 5px;
  margin-bottom: 0;
  text-align: center;
}

.content-text h1 {
  color: #1a1a1a;
  font-weight: 700;
  font-size: 40px;
  line-height: 1.1;
  margin-top: 15px;
  margin-bottom: 10px;
  text-align: center;
}

.banner-right-wrapper {
  width: 160px;
  height: 600px;
  flex-shrink: 0;
  margin-top: 30px;
}

.content-text p:not(.i2):not(.i3):not(.i4) {
  margin-bottom: 18px;
  text-align: justify;
}

.content-text strong {
  color: #2c3e50;
  font-weight: 600;
}

.content-text em {
  font-style: italic;
  color: #555;
}

.content-text table {
  width: 100%;
  border-collapse: collapse;
  margin: 25px 0;
  font-size: 16px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(0,0,0,0.05);
}

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

.content-text table th {
  background-color: #34495e;
  color: #fff;
  font-weight: 600;
}

.content-text table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.content-text table tr:hover {
  background-color: #f1f1f1;
}

.content-text blockquote {
  border-left: 4px solid #34495e;
  background-color: #f7f8fa;
  padding: 15px 20px;
  margin: 20px 0;
  font-style: italic;
  color: #555;
  border-radius: 6px;
  position: relative;
}

.content-text blockquote::before {
  content: "“";
  font-size: 40px;
  position: absolute;
  left: 10px;
  top: -10px;
  color: #34495e;
}

.content-text ul, .content-text ol {
  margin-left: 30px;
  margin-bottom: 18px;
  padding-left: 15px;
}

.content-text li {
  margin-bottom: 10px;
}

.list {
  display: flex;
  gap: 15px;
  margin-top: 40px;
  justify-content: center;
}

.list a {
  padding: 12px 25px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  color: #ecf0f1;
  background-color: #34495e;
  transition: background 0.3s, transform 0.2s;
}

.list a:hover {
  background-color: #3d5a73;
  transform: translateY(-2px);
}

.i2 {
  font-weight: bold;
  font-size: 24px;
  margin: 10px 0;
  text-align: center;
}

.content-text p.i2 {
    text-align: center;
}

.i3 {
  font-weight: 600;
  font-size: 20px;
  margin: 6px 0;
}

.i4 {
  font-size: 18px;
  margin: 4px 0 4px 20px;
}

@media (max-width: 900px) {
  .wrapper {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
  }
  .sidebar h2 {
    display: none;
  }
  .sidebar ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
  }
  .sidebar li {
    margin: 5px;
  }
  main {
    padding: 15px;
    width: 100%;
    overflow-x: hidden;
  }
  .content-wrapper {
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    width: 100%;
  }
  .content-text {
    min-width: unset;
    width: 100%;
  }
  .banner-right-wrapper {
    display: none;
    width: auto;
    height: auto;
  }
  .banner-menu {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 1 / 2;
    flex-shrink: 0;
    margin: 15px auto;
  }
  .center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
  }
  .book-info-bar {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    width: 100%;
  }
  .book-title-small {
    text-align: center;
    order: 2; 
  }
  .content-button {
    width: 100%;
    text-align: center;
    order: 1; 
  }
  .content-text h1, .content-text h2 {
      text-align: center;
  }
  .list {
    flex-direction: column;
    gap: 10px;
  }
  .list a {
    width: 100%;
    text-align: center;
  }
}

footer {
  background-color: #2c3e50;
  color: #fff;
  text-align: center;
  padding: 15px;
  font-size: 14px;
}

/* === INTEGRATED KID-CONTENT STYLES === */
.kid-content {
  font-size: 1.15em;
  line-height: 1.6;
  color: #2c3e50;
}

.hero-box {
  background: #f0f4ff;
  border-radius: 20px;
  padding: 30px;
  border: 2px solid #3f51b5;
  margin: 25px 0;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.hero-box h3 {
  margin-top: 0;
  color: #1a237e;
}

.myth-buster {
  background: #fff1f0;
  border-left: 8px solid #ff4d4f;
  padding: 20px;
  margin: 20px 0;
  border-radius: 6px;
}

.example-cloud {
  background: #f6ffed;
  border: 2px dashed #52c41a;
  padding: 25px;
  border-radius: 15px;
  margin: 25px 0;
}

.highlight-blue {
  color: #1a237e;
  font-weight: bold;
  text-decoration: underline;
}

.badge {
  background: #3f51b5;
  color: white;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 0.8em;
  text-transform: uppercase;
}

.quote-card {
  background: #ffffff;
  border-left: 6px solid #3f51b5;
  padding: 18px 22px;
  margin: 22px 0;
  font-style: italic;
  color: #1a237e;
  border-radius: 6px;
}

.think-box {
  background: #fffbe6;
  border-left: 6px solid #faad14;
  padding: 20px;
  margin: 20px 0;
  border-radius: 6px;
  font-weight: 500;
}

.kid-content h2 {
  margin-top: 50px;
  padding-bottom: 8px;
  border-bottom: 3px solid #e0e7ff;
  color: #1a237e;
}
