/* ===== Tool Pages Premium Design System ===== */
/* Uses redesign.css variables: --primary, --primary-bg, --primary-light, --bg-*, --text-*, --border-color, --radius-*, --shadow-*, --transition */

/* ── Hero Section (Title + Meta Description Centered) ── */
.tool-header,
.tool-header-wrapper {
  position: relative !important;
  background: linear-gradient(135deg, var(--bg-dark) 0%, #1e1b4b 50%, #312e81 100%) !important;
  padding: 60px 24px 50px !important;
  text-align: center !important;
  overflow: hidden !important;
}
.tool-header::before,
.tool-header-wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(79,70,229,0.15) 0%, transparent 60%),
              radial-gradient(ellipse at 70% 50%, rgba(129,140,248,0.1) 0%, transparent 60%);
  pointer-events: none;
}
.tool-header .container,
.tool-header-wrapper .container {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}
.tool-header h1,
.tool-header-wrapper h1 {
  font-size: 2.4rem !important;
  font-weight: 800 !important;
  color: #fff !important;
  margin: 0 0 12px 0 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em;
}
.tool-header p,
.tool-header-wrapper p {
  font-size: 1.05rem !important;
  color: rgba(255,255,255,0.75) !important;
  max-width: 680px !important;
  margin: 0 auto !important;
  line-height: 1.7 !important;
}
.tool-header .tool-icon-badge,
.tool-header-wrapper .tool-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(8px);
  font-size: 1.8rem;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ── Breadcrumb ── */
.breadcrumb {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
  font-size: 0.84rem;
}
.breadcrumb .container {
  display: flex;
  align-items: center;
  gap: 8px;
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.breadcrumb-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}
.breadcrumb-list li + li::before {
  content: '/';
  color: var(--text-muted);
  font-size: 0.8rem;
}
.breadcrumb a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition-fast);
}
.breadcrumb a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ── Tool Workspace Card ── */
.tool-workspace {
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 32px;
  margin: 32px 0;
  transition: var(--transition);
}

/* ── SEO Content Section ── */
.seo-content {
  margin-top: 48px;
  padding-bottom: 40px;
}
.seo-content h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 48px 0 20px;
  padding-bottom: 12px;
  position: relative;
  letter-spacing: -0.01em;
}
.seo-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
}
.seo-content h2:first-child {
  margin-top: 0;
}
.seo-content p {
  color: var(--text-primary);
  line-height: 1.8;
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.seo-content strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ── About Section ── */
.seo-content > p:first-of-type {
  font-size: 1rem;
  line-height: 1.85;
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.feature-card,
.feature-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 24px 22px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::before,
.feature-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: var(--transition);
}
.feature-card:hover::before,
.feature-item:hover::before {
  opacity: 1;
}
.feature-card:hover,
.feature-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.feature-card h3,
.feature-item strong {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.feature-card p,
.feature-item span {
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.6;
  display: block;
}
.feature-item {
  display: flex;
  flex-direction: column;
}

/* ── Steps List ── */
.steps-list {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  counter-reset: step-counter;
}
.steps-list li {
  counter-increment: step-counter;
  position: relative;
  padding: 16px 20px 16px 56px;
  margin-bottom: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.6;
  transition: var(--transition);
}
.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps-list li:hover {
  border-color: var(--primary-light);
  transform: translateX(4px);
}
.steps-list li strong {
  color: var(--text-secondary);
}

/* ── Benefits & Use Cases ── */
.seo-content p:has(strong) {
  background: var(--bg-secondary);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin-bottom: 16px;
}

/* ── Why TooliFyra ── */
.seo-content h2:has(+ p:only-of-type) + p {
  background: linear-gradient(135deg, var(--primary-bg), rgba(129,140,248,0.08));
  border: 1px solid rgba(79,70,229,0.15);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  font-size: 0.95rem;
  line-height: 1.8;
}
.seo-content h2:has(+ p:only-of-type) + p strong {
  color: var(--primary);
}

/* ── FAQ Accordion ── */
.faq-list {
  margin: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}
.faq-item:hover {
  border-color: var(--primary-light);
}
.faq-question,
.faq-item h4 {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition-fast);
  margin: 0;
}
.faq-question::after {
  content: '+';
  font-size: 1.3rem;
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  transition: var(--transition-fast);
}
.faq-question.active::after {
  content: '−';
  transform: rotate(0deg);
}
.faq-answer {
  padding: 0 20px 16px;
  display: none;
}
.faq-answer p {
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0;
}
.faq-item h4 {
  cursor: default;
  padding: 16px 20px 4px;
}
.faq-item h4 + p {
  padding: 0 20px 16px;
  color: var(--text-primary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin: 0;
}

/* ── Related Tools ── */
.section-dark {
  background: var(--bg-secondary);
  padding: 60px 0;
  margin-top: 60px;
}
.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 8px;
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: 0.95rem;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}
.related-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  transition: var(--transition);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.related-card-icon {
  font-size: 1.8rem;
  line-height: 1;
}
.related-card h4 {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0;
}
.related-card:hover h4 {
  color: var(--primary);
}

/* ── Animations ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.5s ease forwards;
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.feature-card:nth-child(1),
.feature-item:nth-child(1) { animation-delay: 0.05s; }
.feature-card:nth-child(2),
.feature-item:nth-child(2) { animation-delay: 0.1s; }
.feature-card:nth-child(3),
.feature-item:nth-child(3) { animation-delay: 0.15s; }
.feature-card:nth-child(4),
.feature-item:nth-child(4) { animation-delay: 0.2s; }
.feature-card:nth-child(5),
.feature-item:nth-child(5) { animation-delay: 0.25s; }
.feature-card:nth-child(6),
.feature-item:nth-child(6) { animation-delay: 0.3s; }

/* ── Dark Mode ── */
.dark-mode .tool-header,
.dark-mode .tool-header-wrapper {
  background: linear-gradient(135deg, #0f0a1a 0%, #1a1040 50%, #0f172a 100%) !important;
}
.dark-mode .tool-header h1,
.dark-mode .tool-header-wrapper h1 {
  color: #f1f5f9 !important;
}
.dark-mode .tool-header p,
.dark-mode .tool-header-wrapper p {
  color: rgba(241,245,249,0.65) !important;
}
.dark-mode .breadcrumb {
  background: var(--bg-dark);
  border-bottom-color: #1e293b;
}
.dark-mode .tool-workspace {
  background: #1e293b;
  border-color: #334155;
}
.dark-mode .feature-card,
.dark-mode .feature-item {
  background: #1e293b;
  border-color: #334155;
}
.dark-mode .steps-list li {
  background: #1e293b;
  border-color: #334155;
}
.dark-mode .faq-item {
  background: #1e293b;
  border-color: #334155;
}
.dark-mode .related-card {
  background: #1e293b;
  border-color: #334155;
}
.dark-mode .section-dark {
  background: #0f172a;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .tool-header,
  .tool-header-wrapper {
    padding: 40px 16px 36px;
  }
  .tool-header h1,
  .tool-header-wrapper h1 {
    font-size: 1.6rem;
  }
  .tool-header p,
  .tool-header-wrapper p {
    font-size: 0.92rem;
  }
  .tool-workspace {
    padding: 20px;
    margin: 20px 0;
  }
  .seo-content h2 {
    font-size: 1.3rem;
    margin-top: 36px;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .related-grid {
    grid-template-columns: 1fr 1fr;
  }
  .breadcrumb {
    font-size: 0.78rem;
  }
}
