/* ===== BASE STYLES ===== */
:root {
  --primary: #667eea;
  --primary-dark: #5a6fd8;
  --secondary: #764ba2;
  --accent: #f093fb;
  --accent-alt: #f5576c;
  --text-dark: #2d3748;
  --text-light: #4a5568;
  --text-lighter: #718096;
  --bg-light: #f7fafc;
  --bg-lighter: #edf2f7;
  --white: #ffffff;
  --success: #48bb78;
  --warning: #ed8936;
  --danger: #f56565;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== HEADER STYLES ===== */
.blog-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: var(--white);
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none"><path d="M0,0 L1000,0 L1000,100 L0,100 Z" fill="rgba(255,255,255,0.1)"></path></svg>');
  background-size: cover;
}

.header-content {
  position: relative;
  z-index: 1;
}

.blog-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.blog-subtitle {
  font-size: 1.3rem;
  opacity: 0.9;
  margin-bottom: 30px;
  font-weight: 400;
}

.blog-meta {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}

.meta-item {
  background: rgba(255, 255, 255, 0.2);
  padding: 10px 20px;
  border-radius: 50px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

/* ===== BUTTON STYLES ===== */
.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--white);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: green;
  color: var(--white);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--text-dark);
  border: 2px solid var(--border);
}

.btn-secondary:hover {
  background: var(--white);
  border-color: var(--primary);
  color: var(--primary);
}

/* ===== MAIN CONTENT STYLES ===== */
.blog-content {
  padding: 40px 0;
}

.section-title {
  font-size: 2rem;
  color: var(--text-dark);
  margin: 40px 0 25px;
  padding-bottom: 15px;
  border-bottom: 3px solid var(--primary);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 80px;
  height: 3px;
  background: var(--accent-alt);
}

/* ===== INTRODUCTION SECTION ===== */
.intro-section {
  margin-bottom: 40px;
}

.intro-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.intro-text {
  font-size: 1.1rem;
  color: var(--text-light);
  line-height: 1.7;
}

.intro-text p {
  margin-bottom: 15px;
}

.features-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 25px;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--primary);
}

.features-box h3 {
  color: var(--text-dark);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.features-box ul {
  list-style: none;
}

.features-box li {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.features-box i.fa-check {
  color: var(--success);
}

/* ===== STATS CONTAINER ===== */
.stats-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 40px 0;
}

.stat-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 25px 15px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 5px;
}

.stat-label {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* ===== TIP BOX ===== */
.tip-box {
  background: linear-gradient(135deg, #fff9e6 0%, #ffeaa7 100%);
  border-radius: var(--radius);
  padding: 25px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin: 30px 0;
  border-left: 4px solid var(--warning);
}

.tip-icon {
  font-size: 1.5rem;
  color: var(--warning);
}

.tip-content h3 {
  margin-bottom: 10px;
  color: var(--text-dark);
}

.tip-content p {
  color: var(--text-light);
}

/* ===== CONTROLS ===== */
.controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 40px 0;
  flex-wrap: wrap;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ===== QUESTION STYLES ===== */
.group-section {
  margin-bottom: 50px;
}

.group-title {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin: 30px 0 20px;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-alt) 100%);
  color: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.question-container {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 20px;
  overflow: hidden;
  transition: var(--transition);
  background: var(--white);
}

.question-container:hover {
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
  transform: translateY(-2px);
  border-color: #a3bffa;
}

.question-header {
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--bg-light);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.question-header:hover {
  background: var(--bg-lighter);
}

.question-number {
  background: var(--primary);
  color: var(--white);
  border-radius: 8px;
  padding: 8px 15px;
  min-width: 50px;
  text-align: center;
  font-size: 0.95em;
  font-weight: 700;
  margin-right: 15px;
  flex-shrink: 0;
}

.question-text {
  flex-grow: 1;
  line-height: 1.6;
  white-space: pre-wrap;
  font-size: 1.05rem;
  color: var(--text-dark);
}

.expand-icon {
  font-size: 1.2em;
  color: var(--text-light);
  user-select: none;
  transition: transform 0.3s;
  margin-left: 10px;
  flex-shrink: 0;
}

.question-container.expanded .expand-icon {
  transform: rotate(180deg);
}

.answer-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.3s ease;
  background: linear-gradient(to bottom, var(--bg-light), var(--bg-lighter));
}

.question-container.expanded .answer-content {
  max-height: 2000px;
  padding: 20px;
}

.answer-box {
  border-left: 5px solid var(--success);
  padding: 20px;
  background: var(--white);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.answer-header {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.correct-answer {
  color: var(--success);
  font-weight: 600;
  font-size: 1.1rem;
}

.explanation {
  font-size: 1rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 15px;
}

.explanation strong {
  color: var(--text-dark);
  display: inline;
}

.concept-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-lighter);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== CONCLUSION SECTION ===== */
.conclusion-section {
  margin: 60px 0 40px;
}

.conclusion-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.conclusion-box h2 {
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-top: 30px;
}

.tip-card {
  padding: 25px 20px;
  border-radius: var(--radius);
  background: var(--bg-light);
  transition: var(--transition);
}

.tip-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.tip-icon.blue {
  color: var(--primary);
}

.tip-icon.green {
  color: var(--success);
}

.tip-icon.purple {
  color: var(--secondary);
}

.tip-card h3 {
  margin: 15px 0 10px;
  color: var(--text-dark);
}

.tip-card p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ===== FOOTER STYLES ===== */
.blog-footer {
  background: var(--text-dark);
  color: var(--white);
  padding: 50px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 20px;
  color: var(--white);
}

.footer-section p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 10px;
}

.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
  .intro-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-container {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tips-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .blog-title {
    font-size: 2.2rem;
  }
  
  .blog-subtitle {
    font-size: 1.1rem;
  }
  
  .blog-meta {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  
  .meta-item {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }
  
  .header-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 250px;
    justify-content: center;
  }
  
  .question-header {
    padding: 15px;
    flex-direction: column;
    position: relative;
  }
  
  .question-number {
    margin-bottom: 10px;
    margin-right: 0;
    align-self: flex-start;
  }
  
  .expand-icon {
    position: absolute;
    right: 15px;
    top: 15px;
  }
  
  .controls {
    flex-direction: column;
    align-items: center;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 15px;
  }
  
  .blog-header {
    padding: 40px 0 30px;
  }
  
  .blog-content {
    padding: 30px 0;
  }
  
  .section-title {
    font-size: 1.7rem;
  }
  
  .stats-container {
    grid-template-columns: 1fr;
  }
  
  .tip-box {
    flex-direction: column;
    text-align: center;
  }
}