/* Global resets and typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
}

body {
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
}

body.dark-mode {
  background-color: #1a1a1a;
  color: #ffffff;
}

/* Container for page content */
.container {
  max-width: 880px;
  margin: 70px auto 28px auto;
  padding: 36px 30px 90px 30px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(100,100,140,0.07), 0 1.5px 8px rgba(0,0,0,0.06);
  min-height: 500px;
  transition: background 0.3s;
}

body.dark-mode .container {
  background: #232333;
  color: #fff;
  box-shadow: 0 8px 36px rgba(140,140,180,0.11);
}

/* Sticky bar at top of screen */
.sticky-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 2px 5px;
  background-color: #ffffff;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 1000;
}

.sticky-bar span {
  font-size: 15px;
  font-weight: 900;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.dark-mode-toggle {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6C63FF;
  padding: 0;
  margin-left: auto;
  margin-right: 30px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dark-mode-toggle:hover {
  background: rgba(108,99,255,0.1);
  border-radius: 50%;
}

body.dark-mode .sticky-bar {
  background-color: #2d2d2d;
  color: #6C63FF;
  box-shadow: 0 4px 6px rgba(255,255,255,0.1);
}

/* Bottom navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  border-top: 1px solid #ddd;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
  box-shadow: 0 -4px 6px rgba(0,0,0,0.1);
  z-index: 1000;
}

.bottom-nav a {
  text-decoration: none;
  color: #007bff;
  font-size: 0.9rem;
  text-align: center;
}

.bottom-nav a:hover {
  color: #0056b3;
}

.bottom-nav a span {
  display: block;
  font-size: 0.8rem;
}

body.dark-mode .bottom-nav {
  background: #222;
  border-top: 1px solid #444;
  box-shadow: 0 -4px 6px rgba(255,255,255,0.07);
}

body.dark-mode .bottom-nav a {
  color: #ccc;
}

body.dark-mode .bottom-nav a:hover {
  color: #9a8cff;
}

body.dark-mode .bottom-nav a span {
  color: #aaa;
}

/* Content styling */
.content {
  margin-top: 20px;
}

.content h1 {
  font-size: 28px;
  margin-bottom: 16px;
  color: #534ad6;
}

.content h2 {
  font-size: 22px;
  margin-top: 20px;
  margin-bottom: 10px;
  color: #6C63FF;
}

.content p {
  margin-bottom: 14px;
  font-size: 16px;
}

.content ul {
  margin-left: 20px;
  margin-bottom: 14px;
}

.content ul li {
  list-style-type: disc;
  margin-bottom: 8px;
}

/* Related links section */
.link-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e5e5e5;
}

.link-section h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: #534ad6;
}

.link-section a {
  color: #007bff;
  text-decoration: none;
}

.link-section a:hover {
  text-decoration: underline;
  color: #0056b3;
}

body.dark-mode .link-section {
  border-top: 1px solid #444;
}

body.dark-mode .link-section h3 {
  color: #9a8cff;
}

body.dark-mode .link-section a {
  color: #9a8cff;
}

body.dark-mode .link-section a:hover {
  color: #6C63FF;
}

/* --- Hero images for informational pages --- */
.hero-image {
  width: 100%;
  height: auto;
  border-radius: 18px;
  margin: 12px 0 24px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,0.07);
}

/* --- Related links displayed as cards --- */
.related-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px 16px;
  margin-top: 20px;
}

.related-card {
  background-color: #f5f6fc;
  border: 1px solid #ededfa;
  border-radius: 16px;
  padding: 20px 14px;
  box-shadow: 0 3px 14px rgba(110, 99, 255, 0.08);
  color: #333;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s, transform 0.18s;
  text-decoration: none !important;
}

.related-card:hover {
  box-shadow: 0 8px 32px rgba(110, 99, 255, 0.13);
  transform: translateY(-3px) scale(1.035);
}

.related-card .icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.related-card h4 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #534ad6;
}

.related-card p {
  font-size: 13px;
  color: #6a6a8e;
}

/* Dark mode styles for related cards */
body.dark-mode .related-card {
  background-color: #282844;
  border: 1px solid #383868;
  box-shadow: 0 3px 16px rgba(160, 140, 255, 0.07);
  color: #fff;
}

body.dark-mode .related-card:hover {
  box-shadow: 0 10px 40px rgba(120, 110, 255, 0.15);
}

body.dark-mode .related-card h4 {
  color: #9a8cff;
}

body.dark-mode .related-card p {
  color: #babade;
}