/**
 * EduCodeVault - Article Styles
 * Styling for content, FAQ, guides, and related pages
 */

/* Article Section */
.article-section {
  margin-bottom: 60px;
  background-color: white;
}

.article-wrapper {
  background-color: #f9f9f9;
  border-left: 5px solid var(--primary-color);
  padding: 40px;
  border-radius: 8px;
}

/* Article Typography */
.article-section h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--secondary-color);
  line-height: 1.3;
}

.article-section h3 {
  font-size: 24px;
  font-weight: 600;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--secondary-color);
}

.article-section p {
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 15px;
  color: #555;
}

.article-section ul,
.article-section ol {
  margin-left: 25px;
  margin-bottom: 20px;
}

.article-section li {
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.8;
  color: #555;
}

/* Guide Content */
.guide-content {
  margin-bottom: 40px;
}

.guide-steps {
  list-style-type: decimal;
}

.guide-steps li {
  background-color: white;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.guide-steps li strong {
  color: var(--primary-color);
}

/* Features Content */
.features-content {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  margin-bottom: 40px;
}

.features-list {
  list-style: none;
  margin-left: 0;
}

.features-list li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.6;
}

.features-list li:before {
  content: "✓";
  position: absolute;
  left: 0;
  font-weight: 700;
  font-size: 18px;
  color: var(--success-color);
}

/* FAQ Section */
.faq-section {
  margin-bottom: 60px;
  background-color: white;
}

.faq-wrapper {
  padding: 40px;
  background-color: #f9f9f9;
  border-radius: 8px;
}

.faq-wrapper h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--secondary-color);
}

.faq-items {
  margin-top: 25px;
}

.faq-item {
  background-color: white;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--secondary-color);
  cursor: pointer;
  user-select: none;
  background-color: #fafafa;
  transition: background-color 0.3s ease;
}

.faq-question:hover {
  background-color: #f0f0f0;
}

.faq-question::-webkit-details-marker {
  color: var(--primary-color);
}

.faq-item[open] .faq-question {
  background-color: #f0f0f0;
  border-bottom: 2px solid var(--primary-color);
}

.faq-answer {
  padding: 20px;
  font-size: 15px;
  line-height: 1.8;
  color: #555;
  background-color: white;
}

.faq-answer p {
  margin: 0;
}

.faq-answer p + p {
  margin-top: 12px;
}

/* Related Pages Section */
.related-pages-section {
  margin-bottom: 60px;
  background-color: white;
}

.related-wrapper {
  padding: 40px;
  background-color: #f9f9f9;
  border-radius: 8px;
}

.related-wrapper h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 30px;
  color: var(--secondary-color);
  text-align: center;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-top: 25px;
}

.related-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.related-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background-color: var(--light-bg);
}

.related-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 15px 15px 10px;
  color: var(--secondary-color);
}

.related-card p {
  font-size: 14px;
  color: #666;
  margin: 0 15px 15px;
  flex-grow: 1;
  line-height: 1.6;
}

.related-link {
  display: inline-block;
  margin: 0 15px 15px;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-align: center;
  width: calc(100% - 30px);
}

.related-link:hover {
  background-color: #ff8500;
  text-decoration: none;
}

/* Blockquote */
blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 20px;
  margin: 25px 0;
  font-style: italic;
  color: #666;
  background-color: #f9f9f9;
  padding: 15px 20px;
  border-radius: 4px;
}

/* Code Blocks */
code {
  background-color: #f4f4f4;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", monospace;
  font-size: 14px;
}

pre {
  background-color: #2c2c2c;
  color: #f1f1f1;
  padding: 20px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 20px 0;
}

pre code {
  background: none;
  color: inherit;
  padding: 0;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  background-color: white;
}

th,
td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--light-bg);
  font-weight: 700;
  color: var(--secondary-color);
}

tr:hover {
  background-color: #fafafa;
}

/* Images in Content */
.article-section img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}

/* Links in Content */
.article-section a {
  color: var(--primary-color);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.article-section a:hover {
  color: #ff7502;
  text-decoration: none;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .related-card,
  .faq-item {
    transition: none;
  }
}

/* Focus Styles */
.faq-question:focus-visible,
.related-link:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}
