/* === Tool Page Content Modules === */
/* Shared styles for How to Use / Use Cases / FAQ sections on all tool pages */

.tool-content-modules {
  max-width: 780px;
  margin: 48px auto 0;
  padding: 0 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  position: relative;
}

.tool-content-modules::before {
  content: "";
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #e9e8ff 20%, #c9c7f5 50%, #e9e8ff 80%, transparent 100%);
  margin-bottom: 40px;
}

.tool-info-card {
  background: #f8f9fc;
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 48px;
}

.tool-info-card:last-child {
  margin-bottom: 0;
}

.tool-info-title {
  position: relative;
  font-size: 24px;
  font-weight: 700;
  color: #5b5bd6;
  margin: 0 0 20px;
  padding-left: 16px;
  line-height: 1.3;
  letter-spacing: -0.2px;
}

.tool-info-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: #5b5bd6;
  border-radius: 2px;
}

/* === How to Use steps === */
.tool-steps {
  counter-reset: tool-step;
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-steps > li {
  counter-increment: tool-step;
  position: relative;
  padding-left: 44px;
  margin-bottom: 16px;
  font-size: 15px;
  color: #4a5568;
  line-height: 1.7;
}

.tool-steps > li:last-child {
  margin-bottom: 0;
}

.tool-steps > li::before {
  content: counter(tool-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #5b5bd6;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* === Use Cases === */
.tool-use-cases {
  list-style: none;
  padding: 0;
  margin: 0;
}

.tool-use-cases > li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
  font-size: 15px;
  color: #4a5568;
  line-height: 1.7;
}

.tool-use-cases > li:last-child {
  margin-bottom: 0;
}

.tool-use-cases > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><circle cx='10' cy='10' r='10' fill='%235b5bd6'/><path d='M5.5 10.2l2.8 2.8 6.2-6.2' stroke='white' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-size: contain;
}

.tool-use-cases > li strong {
  color: #1a1a2e;
  font-weight: 600;
}

/* === FAQ === */
.tool-faq {
  display: flex;
  flex-direction: column;
}

.tool-faq-item {
  padding: 20px 0;
  border-bottom: 1px solid #e9e8ff;
}

.tool-faq-item:first-child {
  padding-top: 0;
}

.tool-faq-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.tool-faq-q {
  position: relative;
  padding-left: 36px;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.5;
  margin-bottom: 10px;
}

.tool-faq-q::before {
  content: "Q";
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #5b5bd6;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.tool-faq-a {
  font-size: 15px;
  color: #4a5568;
  line-height: 1.7;
  margin: 0;
  padding-left: 36px;
}

.tool-faq-a code {
  background: #efeefd;
  color: #5b5bd6;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
}

/* === Visual Enhancements (scoped) === */

/* 1. Hide placeholder ad slots (no real ads loaded yet) */
.ad-slot:empty {
  display: none !important;
}
.ad-slot.ad-top {
  display: none !important;
}

/* === Tool Page Layout Polish === */
/* Tool-first: minimal header, visual weight on the tool card itself */

nav[aria-label="breadcrumb"] {
  text-align: left !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 10px 24px 6px !important;
  font-size: 13px !important;
  color: #94a3b8 !important;
}
nav[aria-label="breadcrumb"] a {
  color: #5b5bd6 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}
nav[aria-label="breadcrumb"] a:hover {
  text-decoration: underline !important;
}

/* Compact header — subtle purple accent background */
.main-area > header,
.container > header,
main > header {
  margin-bottom: 20px;
  padding: 16px 20px !important;
  text-align: left;
  background: linear-gradient(135deg, #f6f5ff 0%, #efeeff 100%);
  border-radius: 12px;
  border-left: 4px solid #5b5bd6;
  position: relative;
}

.main-area > header h1,
.container > header h1,
main > header h1 {
  font-size: 26px !important;
  font-weight: 800 !important;
  letter-spacing: -0.4px;
  color: #1a1a2e !important;
  margin: 0 0 6px !important;
  line-height: 1.3;
}

.main-area > header > p,
.container > header > p,
main > header > p {
  color: #5a6578 !important;
  font-size: 14.5px !important;
  margin: 0 !important;
  line-height: 1.55;
}

/* Tool card: the real hero — elevated with subtle purple accent */
/* Scope tightly: only .card directly inside main-area, NOT .related-card etc. */
.main-area > .card,
.tool-card-main {
  border: 1.5px solid #e8e9ed;
  border-radius: 14px;
  box-shadow: 0 2px 16px rgba(91, 91, 214, 0.07), 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow 0.25s, border-color 0.25s;
  background: #ffffff;
}

/* Focused state: when user interacts, card gets subtle glow */
.main-area > .card:focus-within,
.tool-card-main:focus-within {
  border-color: #c7c7f0;
  box-shadow: 0 4px 24px rgba(91, 91, 214, 0.12), 0 1px 3px rgba(0,0,0,0.04);
}

/* Reset: prevent related-tools from inheriting card-like styles */
.related-tools {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* === Common Form Elements === */
.card input[type="text"],
.card input[type="number"],
.card input[type="url"],
.card input[type="email"],
.card input[type="search"],
.card select {
  border: 1.5px solid #e2e4ea !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  color: #1a1a2e !important;
  background: #f9fafb !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  outline: none !important;
}
.card input[type="text"]:focus,
.card input[type="number"]:focus,
.card input[type="url"]:focus,
.card input[type="email"]:focus,
.card input[type="search"]:focus,
.card select:focus {
  border-color: #5b5bd6 !important;
  box-shadow: 0 0 0 3px rgba(91, 91, 214, 0.1) !important;
  background: #fff !important;
}

.card textarea {
  border: 1.5px solid #e2e4ea !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  font-size: 14px !important;
  color: #1a1a2e !important;
  background: #f9fafb !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  outline: none !important;
  resize: vertical;
}
.card textarea:focus {
  border-color: #5b5bd6 !important;
  box-shadow: 0 0 0 3px rgba(91, 91, 214, 0.1) !important;
  background: #fff !important;
}

/* === Buttons — universal styling for tool page buttons === */
.card button,
.card .btn,
.card [class*="copy"] {
  border: none !important;
  border-radius: 8px !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  font-family: inherit !important;
}

/* Primary action buttons */
.card button:not([class*="copy"]):not(.secondary),
.card .btn:not(.secondary) {
  background: #5b5bd6 !important;
  color: #fff !important;
}
.card button:not([class*="copy"]):not(.secondary):hover,
.card .btn:not(.secondary):hover {
  background: #4a4ac4 !important;
  box-shadow: 0 2px 8px rgba(91, 91, 214, 0.25) !important;
}

/* Copy / secondary buttons */
.card [class*="copy"],
.card button.secondary {
  background: #f0effd !important;
  color: #5b5bd6 !important;
}
.card [class*="copy"]:hover,
.card button.secondary:hover {
  background: #e4e3fb !important;
  box-shadow: 0 2px 6px rgba(91, 91, 214, 0.15) !important;
}

/* === Related Tools Section === */
.related-tools {
  max-width: 780px;
  margin: 40px auto 0 !important;
  padding: 0 24px !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
}
.related-title {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #1a1a2e !important;
  margin-bottom: 14px !important;
  padding-left: 14px !important;
  border-left: 3px solid #5b5bd6 !important;
  text-align: left !important;
}
.related-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
}
.related-card {
  background: #f8f9fc !important;
  border: 1px solid #ededf5 !important;
  border-radius: 10px !important;
  padding: 12px 16px !important;
  text-decoration: none !important;
  transition: all 0.2s !important;
  flex: 0 0 auto;
  box-shadow: none !important;
}
.related-card:hover {
  border-color: #c7c7f0 !important;
  background: #f0effd !important;
  box-shadow: 0 2px 8px rgba(91, 91, 214, 0.1) !important;
}
.rc-name {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1a1a2e !important;
}
.rc-desc {
  font-size: 12px !important;
  color: #64748b !important;
  margin-top: 2px;
}

/* === Back to Top Button === */
#back-to-top {
  box-shadow: 0 4px 12px rgba(91, 91, 214, 0.2) !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}
#back-to-top:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(91, 91, 214, 0.3) !important;
}

/* Sidebar ad placeholders */
.sidebar .ad-slot,
.sidebar .ad-box {
  display: none !important;
}

@media (max-width: 768px) {
  .main-area > header,
  .container > header,
  main > header {
    padding: 12px 16px !important;
    border-radius: 10px;
  }
  .main-area > header h1,
  .container > header h1,
  main > header h1 {
    font-size: 22px !important;
  }
  .related-tools {
    padding: 0 16px;
  }
}

/* 2. Enhanced card shadow — scoped to content-modules only */
.tool-content-modules .tool-info-card {
  box-shadow: 0 4px 24px rgba(91, 91, 214, 0.08), 0 1px 4px rgba(0,0,0,0.04);
  border: 1px solid rgba(91, 91, 214, 0.08);
  background: #ffffff;
}

/* === Mobile === */
@media (max-width: 768px) {
  .tool-content-modules {
    padding: 0 16px;
    margin-top: 36px;
  }
  .tool-content-modules::before {
    margin-bottom: 28px;
  }
  .tool-info-card {
    padding: 20px;
    margin-bottom: 32px;
    border-radius: 10px;
  }
  .tool-info-title {
    font-size: 20px;
    margin-bottom: 16px;
  }
  .tool-info-title::before {
    height: 20px;
  }
  .tool-steps > li,
  .tool-use-cases > li,
  .tool-faq-q,
  .tool-faq-a {
    font-size: 14px;
  }
  .tool-faq-item {
    padding: 16px 0;
  }
}

/* === Guide Cards (shared between homepage and blog) === */
.guides-section {
  background: linear-gradient(180deg, #fafafe 0%, #ffffff 100%);
  padding: 64px 24px;
  margin-top: 20px;
}
.guides-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.guides-decor {
  width: 60px;
  height: 4px;
  background: #5b5bd6;
  border-radius: 2px;
  margin: 0 auto 20px;
}
.guides-heading {
  font-size: 36px;
  font-weight: 800;
  color: #1a1a2e;
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.guides-sub {
  font-size: 16px;
  color: #64748b;
  text-align: center;
  margin-bottom: 36px;
  line-height: 1.6;
}
.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.guide-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 16px rgba(91, 91, 214, 0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}
.guide-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(91, 91, 214, 0.16);
}
.guide-card-bar {
  height: 4px;
  width: 100%;
  flex-shrink: 0;
}
.guide-card-body {
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.guide-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.guide-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  display: inline-block;
}
.guide-card-title {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.4;
  margin-bottom: 10px;
  transition: color 0.15s;
}
.guide-card:hover .guide-card-title {
  color: #5b5bd6;
}
.guide-card-excerpt {
  font-size: 14px;
  color: #555;
  line-height: 1.65;
  flex: 1;
  margin-bottom: 14px;
}
.guide-card-link {
  font-size: 13px;
  font-weight: 600;
  color: #5b5bd6;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}
.guide-card-link .arrow {
  display: inline-block;
  transition: transform 0.18s;
}
.guide-card:hover .guide-card-link .arrow {
  transform: translateX(3px);
}
.guides-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}
.guides-view-all {
  font-size: 14px;
  font-weight: 600;
  color: #5b5bd6;
  text-decoration: none;
}
.guides-view-all:hover {
  text-decoration: underline;
}
@media (max-width: 900px) {
  .guides-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .guides-heading {
    font-size: 28px;
  }
}
@media (max-width: 600px) {
  .guides-grid {
    grid-template-columns: 1fr;
  }
  .guides-section {
    padding: 40px 16px;
  }
  .guides-heading {
    font-size: 24px;
  }
  .guides-sub {
    font-size: 14px;
  }
}
