/* Global Styles */
:root {
  --primary-color: #667eea;
  --secondary-color: #764ba2;
  --accent-color: #f6ad55;
  --text-color: #2d3748;
  --light-text: #718096;
  --bg-color: #f7fafc;
  --card-bg: #ffffff;
  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius-md: 12px;
}

body {
  font-family: var(--font-main);
  line-height: 1.7;
  color: var(--text-color);
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  text-decoration: underline;
  opacity: 0.9;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  padding: 15px 0;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.logo-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

nav a {
  margin-left: 30px;
  color: var(--text-color);
  font-weight: 600;
  font-size: 15px;
}

nav a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* Blog Layout */
.blog-container {
  max-width: 800px;
  margin: 40px auto;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 50px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.blog-header {
  margin-bottom: 40px;
  text-align: center;
}

.blog-title {
  font-size: 2.75rem;
  font-weight: 800;
  color: #1a202c;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.blog-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light-text);
  font-size: 0.95rem;
  gap: 20px;
  margin-top: 20px;
}

.author-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 16px;
  border: 2px solid white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.blog-image {
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-md);
  margin: 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  padding: 40px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.blog-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
  pointer-events: none;
}

/* Content Typography */
.blog-content h2 {
  font-size: 1.9rem;
  font-weight: 700;
  color: #1a202c;
  margin: 50px 0 25px;
  letter-spacing: -0.5px;
}

.blog-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3748;
  margin: 35px 0 15px;
}

.blog-content p {
  margin-bottom: 24px;
  font-size: 1.125rem;
  color: #4a5568;
}

.blog-content ul,
.blog-content ol {
  margin: 25px 0;
  padding-left: 25px;
}

.blog-content li {
  margin-bottom: 12px;
  font-size: 1.125rem;
  padding-left: 5px;
}

/* Feature Boxes */
.tip-box,
.warning-box,
.example-box,
.technique-box,
.step-box {
  padding: 30px;
  margin: 35px 0;
  border-radius: 10px;
  font-size: 1.05rem;
  border-left: 5px solid;
}

.tip-box {
  background: #ebf8ff;
  border-color: #4299e1;
}

.warning-box {
  background: #fff5f5;
  border-color: #f56565;
}

.example-box {
  background: #f7fafc;
  border-color: #a0aec0;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #a0aec0;
}

.technique-box,
.step-box {
  background: #f0fdf4;
  border-color: #48bb78;
}

.example-title {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  color: var(--light-text);
  margin-bottom: 12px;
}

code,
.code-block {
  font-family: 'Fira Code', 'Courier New', monospace;
  background: #2d3748;
  color: #e2e8f0;
  border-radius: 6px;
  font-size: 0.95rem;
}

.code-block {
  padding: 25px;
  overflow-x: auto;
  white-space: pre-wrap;
  line-height: 1.6;
  margin: 25px 0;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
}

p code {
  background: #edf2f7;
  color: #c53030;
  padding: 2px 6px;
  font-size: 0.9em;
}

/* TOC */
.table-of-contents {
  background: #f7fafc;
  padding: 35px;
  border-radius: var(--radius-md);
  margin: 40px 0;
  border: 1px solid #e2e8f0;
}

.table-of-contents h3 {
  margin-top: 0;
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.table-of-contents ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.table-of-contents li {
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.table-of-contents a {
  color: #4a5568;
  display: block;
  padding: 2px 0;
}

.table-of-contents a:hover {
  color: var(--primary-color);
  transform: translateX(5px);
}

/* CTA and Footer */
/* FAQ Section */
.faq-section {
  margin-top: 60px;
  background: white;
  border-radius: 12px;
  padding: 40px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.faq-title {
  font-size: 2rem;
  color: #2d3748;
  margin-bottom: 30px;
  text-align: center;
}

.faq-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 20px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-weight: 600;
  font-size: 1.1rem;
  color: #4a5568;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}

.faq-question:hover {
  color: var(--primary-color);
}

.faq-toggle {
  font-size: 1.5rem;
  transform: rotate(0deg);
  transition: transform 0.3s;
}

.faq-item[open] .faq-toggle {
  transform: rotate(45deg);
  /* Simple rotation for a + to x */
}

.faq-answer {
  color: #4b5563;
  line-height: 1.8;
  margin-top: 10px;
  font-size: 1rem;
}

/* Enhancing CTA Box */
.cta-box {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 50px;
  border-radius: 12px;
  text-align: center;
  margin: 60px 0;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.cta-box h3 {
  color: white !important;
  font-size: 1.8rem;
  margin-bottom: 15px;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--primary-color);
  padding: 15px 40px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 25px;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: var(--secondary-color);
}

.conclusion {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  padding: 45px;
  border-radius: var(--radius-md);
  margin-top: 60px;
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.conclusion h2 {
  color: white !important;
  margin-top: 0;
}

.conclusion p {
  color: rgba(255, 255, 255, 0.9);
}

footer {
  background: #1a202c;
  color: white;
  padding: 60px 0;
  margin-top: 80px;
  text-align: center;
}

.footer-links a {
  color: #cbd5e0;
  margin: 0 15px;
}

.footer-links a:hover {
  color: white;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 25px;
}

.social-links a {
  transition: transform 0.3s, opacity 0.3s;
  display: inline-block;
}

.social-links a:hover {
  transform: translateY(-3px);
  opacity: 0.8;
}

.social-links svg {
  fill: white;
  height: 24px;
  width: 24px;
}

/* Responsiveness */
@media (max-width: 768px) {
  .blog-container {
    padding: 25px;
    margin: 20px auto;
  }

  .blog-title {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  nav {
    display: none;
  }
}