/* math-hub.css */

.math-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.breadcrumbs {
  margin-bottom: 20px;
  font-size: 0.9em;
  color: #666;
}

.hero-section {
  background: linear-gradient(135deg, #3498db, #9b59b6);
  color: white;
  padding: 40px;
  border-radius: 8px;
  text-align: center;
  margin-bottom: 30px;
}

.search-box {
  display: flex;
  max-width: 500px;
  margin: 20px auto;
}

.search-box input {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 4px 0 0 4px;
  font-size: 1em;
}

.search-box button {
  background: #2c3e50;
  color: white;
  border: none;
  padding: 12px 16px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.quick-access h2,
.child-pages-section h2,
.educational-content h2,
.recent-articles h2,
.faq-section h2 {
  margin-top: 40px;
  margin-bottom: 20px;
  color: #2c3e50;
}

.quick-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  margin-bottom: 30px;
}

.quick-tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #f8f9fa;
  border: 1px solid #ddd;
  border-radius: 8px;
  text-align: center;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s, background 0.2s;
}

.quick-tool:hover {
  transform: translateY(-3px);
  background: #e9ecef;
  color: #2c3e50;
}

.tool-icon {
  font-size: 2em;
  margin-bottom: 10px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.category-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.category-header {
  display: flex;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  border-bottom: 1px solid #eee;
}

.category-icon {
  font-size: 1.5em;
  margin-right: 10px;
}

.category-card h3 {
  margin: 0;
  font-size: 1.2em;
  color: #2c3e50;
}

.category-card p {
  padding: 15px;
  color: #666;
  font-size: 0.95em;
}

.category-links {
  list-style: none;
  padding: 0 15px 15px;
}

.category-links li {
  margin-bottom: 8px;
}

.category-links a {
  text-decoration: none;
  color: #3498db;
  font-weight: 500;
}

.category-links a:hover {
  text-decoration: underline;
}

.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.edu-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.edu-card h3 {
  color: #2c3e50;
  margin-top: 0;
}

.edu-link {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

.edu-link:hover {
  text-decoration: underline;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.article-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.article-image img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.article-placeholder {
  width: 100%;
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9ecef;
  font-size: 3em;
}

.article-content {
  padding: 15px;
}

.article-content h3 {
  margin-top: 0;
}

.article-content h3 a {
  text-decoration: none;
  color: #2c3e50;
}

.article-content h3 a:hover {
  color: #3498db;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 0.9em;
  color: #666;
}

.read-more {
  color: #3498db;
  text-decoration: none;
}

.read-more:hover {
  text-decoration: underline;
}

.faq-list {
  margin-bottom: 30px;
}

.faq-item {
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: #f8f9fa;
  cursor: pointer;
}

.faq-question h3 {
  margin: 0;
  font-size: 1em;
}

.faq-toggle {
  font-size: 1.5em;
  font-weight: bold;
}

.faq-answer {
  padding: 0 15px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-answer[style*="display: block"] {
  max-height: 500px; /* Adjust as needed */
}

.cta-section {
  background: #2c3e50;
  color: white;
  padding: 40px;
  border-radius: 8px;
  text-align: center;
  margin: 40px 0;
}

.cta-button {
  display: inline-block;
  background: #3498db;
  color: white;
  padding: 12px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 15px;
}

.cta-button:hover {
  background: #2980b9;
  color: white;
}