/* ==========================================================================
   tool.css — Individual Tool Detail Page
   www.aelabrak.com | v1.0
   ========================================================================== */

/* ─── LOADING & ERROR STATES ──────────────────────────────────────────────── */

.tld-loading {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: calc(var(--nav-height-mobile) + 48px);
}

@media (min-width: 1024px) {
  .tld-loading { padding-top: calc(var(--nav-height-desktop) + 48px); }
}

.tld-loading-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-bg-navy);
  border-radius: 50%;
  animation: tld-spin 0.7s linear infinite;
}

@keyframes tld-spin { to { transform: rotate(360deg); } }

.tld-error {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: calc(var(--nav-height-mobile) + 48px) 24px 80px;
}

@media (min-width: 1024px) {
  .tld-error { padding-top: calc(var(--nav-height-desktop) + 48px); }
}

.tld-error h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.tld-error p {
  color: var(--color-text-muted);
  margin: 0;
}

/* ─── BREADCRUMB ──────────────────────────────────────────────────────────── */

.tld-breadcrumb {
  background: var(--color-bg-alt);
  border-bottom: 1px solid var(--color-border);
  padding-top: var(--nav-height-mobile);
}

@media (min-width: 1024px) {
  .tld-breadcrumb { padding-top: var(--nav-height-desktop); }
}

.tld-breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  flex-wrap: wrap;
}

.tld-breadcrumb-inner a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.tld-breadcrumb-inner a:hover { color: var(--color-text); }

.tld-breadcrumb-sep {
  color: var(--color-border);
  font-size: 0.75rem;
}

.tld-breadcrumb-cat {
  color: var(--color-text-muted);
}

.tld-breadcrumb-current {
  color: var(--color-text);
  font-weight: 500;
}

/* ─── HERO ────────────────────────────────────────────────────────────────── */

.tld-hero {
  background: var(--color-bg-navy);
  padding: 56px 0 52px;
  position: relative;
  overflow: hidden;
}

.tld-hero::before {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.tld-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.tld-hero-top {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.tld-hero-icon {
  font-size: 3rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 4px;
}

.tld-hero-meta {
  flex: 1;
  min-width: 0;
}

.tld-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tld-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.tld-badge--primary {
  background: rgba(37, 211, 102, 0.15);
  color: #4ade80;
}

.tld-badge--category {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}

.tld-hero-name {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.tld-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  align-items: center;
}

.tld-hero-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.tld-hero-stat-dot {
  display: none;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
}

@media (min-width: 600px) {
  .tld-hero-stat-dot { display: block; }
}

.tld-hero-tagline {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  max-width: 680px;
}

/* ─── BODY LAYOUT ─────────────────────────────────────────────────────────── */

.tld-body {
  background: var(--color-bg);
  padding: 48px 0 80px;
}

.tld-body-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 1024px) {
  .tld-body-inner {
    grid-template-columns: 1fr 360px;
    gap: 48px;
    align-items: start;
  }
}

/* ─── TOOL INTERACTIVE AREA ───────────────────────────────────────────────── */

.tld-tool-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 4px 24px rgba(13, 34, 64, 0.07);
}

.tld-tool-card-header {
  margin-bottom: 28px;
}

.tld-tool-card-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 6px;
  display: block;
}

.tld-tool-card-title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

/* Progress bar */
.tld-progress {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tld-progress-bar {
  height: 5px;
  background: var(--color-border);
  border-radius: 3px;
  overflow: hidden;
}

.tld-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-bg-navy), var(--color-cta-primary));
  border-radius: 3px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.tld-progress-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-weight: 500;
  text-align: right;
}

/* Question */
.tld-q-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  display: block;
}

.tld-q-text {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.45;
  margin: 0 0 24px;
  transition: opacity 0.2s;
}

/* Yes/No buttons for readiness tool */
.tld-yn-buttons {
  display: flex;
  gap: 12px;
}

.tld-yn-btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 10px;
  border: 1.5px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.tld-yn-btn:hover {
  border-color: var(--color-bg-navy);
  background: rgba(13, 34, 64, 0.04);
  transform: translateY(-1px);
}

.tld-yn-btn--yes:hover { border-color: #25d366; color: #0f7a3c; background: rgba(37,211,102,0.06); }
.tld-yn-btn--no:hover { border-color: var(--color-bg-navy); }

/* Select options (growth planner) */
.tld-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.tld-option {
  background: var(--color-bg-alt);
  border: 1.5px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.tld-option:hover {
  background: rgba(13, 34, 64, 0.04);
  border-color: var(--color-bg-navy);
  transform: translateX(3px);
}

.tld-option.selected {
  background: rgba(13, 34, 64, 0.06);
  border-color: var(--color-bg-navy);
  color: var(--color-text);
  font-weight: 500;
}

.tld-option.selected::before {
  content: '✓ ';
  color: var(--color-cta-primary);
  font-weight: 700;
}

/* Nav buttons for growth planner */
.tld-nav-btns {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* RESULT — readiness checker */
.tld-result {
  text-align: center;
}

.tld-result-ring-wrap {
  position: relative;
  width: 130px;
  height: 130px;
  margin: 0 auto 20px;
}

.tld-result-ring {
  width: 100%;
  height: 100%;
}

.tld-result-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.tld-result-score-num {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-bg-navy);
  line-height: 1;
}

.tld-result-score-denom {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.tld-result-band {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.tld-result-band--green  { background: rgba(37, 211, 102, 0.12); color: #0f7a3c; }
.tld-result-band--blue   { background: rgba(37, 99, 235, 0.1);  color: #1d4ed8; }
.tld-result-band--amber  { background: rgba(249, 115, 22, 0.1);  color: #b45309; }
.tld-result-band--red    { background: rgba(229, 62, 62, 0.1);   color: #c53030; }

.tld-result-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 10px;
}

.tld-result-body {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  margin: 0 0 24px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.tld-result-recs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
  margin-bottom: 24px;
}

.tld-result-rec {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--color-bg-alt);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.tld-result-rec-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.tld-result-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

/* RESULT — growth planner */
.tld-plan-result { text-align: left; }

.tld-plan-header {
  text-align: center;
  margin-bottom: 28px;
}

.tld-plan-badge {
  font-size: 2rem;
  display: block;
  margin-bottom: 10px;
}

.tld-plan-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 6px;
}

.tld-plan-sub {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
}

.tld-plan-blocks {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.tld-plan-block {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 18px 22px;
}

.tld-plan-block--1 { border-left: 4px solid var(--color-cta-primary); }
.tld-plan-block--2 { border-left: 4px solid var(--color-bg-navy); }
.tld-plan-block--3 { border-left: 4px solid var(--color-highlight); }

.tld-plan-phase {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  display: block;
}

.tld-plan-block-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 10px;
}

.tld-plan-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.tld-plan-items li {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
  padding-left: 18px;
  position: relative;
}

.tld-plan-items li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--color-bg-navy);
  font-weight: 700;
  font-size: 0.875rem;
}

.tld-plan-disclaimer {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  font-style: italic;
  line-height: 1.5;
  margin: 0;
  padding: 14px;
  background: rgba(13, 34, 64, 0.03);
  border-radius: 8px;
  margin-bottom: 24px;
}

/* ─── HOW IT WORKS SECTION ────────────────────────────────────────────────── */

.tld-section {
  margin-bottom: 40px;
}

.tld-section:last-child { margin-bottom: 0; }

.tld-section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

/* Steps */
.tld-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tld-step {
  display: flex;
  gap: 16px;
}

.tld-step-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  width: 32px;
}

.tld-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-bg-navy);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tld-step-line {
  width: 1px;
  flex: 1;
  min-height: 20px;
  background: var(--color-border);
  margin: 4px 0;
}

.tld-step:last-child .tld-step-line { display: none; }

.tld-step-content {
  padding-bottom: 24px;
  flex: 1;
}

.tld-step:last-child .tld-step-content { padding-bottom: 0; }

.tld-step-title {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 4px 0 6px;
}

.tld-step-desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin: 0;
}

/* FAQ */
.tld-faq { display: flex; flex-direction: column; gap: 0; }

.tld-faq-item {
  border-bottom: 1px solid var(--color-border);
}

.tld-faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.tld-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  transition: color 0.2s;
}

.tld-faq-q:hover { color: var(--color-bg-navy); }

.tld-faq-arrow {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

.tld-faq-item.open .tld-faq-arrow { transform: rotate(180deg); }

.tld-faq-a {
  max-height: 0;
  overflow: hidden;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--color-text-muted);
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding-bottom: 0;
}

.tld-faq-item.open .tld-faq-a {
  max-height: 300px;
  padding-bottom: 16px;
}

/* ─── SIDEBAR ─────────────────────────────────────────────────────────────── */

.tld-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 1024px) {
  .tld-sidebar {
    position: sticky;
    top: calc(var(--nav-height-desktop) + 24px);
  }
}

/* Info card */
.tld-info-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  overflow: hidden;
}

.tld-info-card-header {
  background: var(--color-bg-alt);
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.tld-info-card-title {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 4px;
}

.tld-info-card-subtitle {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
}

.tld-info-card-body {
  padding: 4px 0;
}

.tld-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-border);
  gap: 12px;
}

.tld-info-row:last-child { border-bottom: none; }

.tld-info-label {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.tld-info-value {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text);
  text-align: right;
}

/* What you get card */
.tld-get-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 20px;
}

.tld-get-card-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.tld-get-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tld-get-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.tld-get-list li::before {
  content: '✓';
  color: #25d366;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* CTA card */
.tld-cta-card {
  background: var(--color-bg-navy);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
}

.tld-cta-card-icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 12px;
}

.tld-cta-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 8px;
}

.tld-cta-card-sub {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 18px;
}

.tld-cta-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: #ffffff;
  padding: 13px 20px;
  border-radius: 10px;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.15s ease;
}

.tld-cta-btn:hover {
  background: #1fba58;
  transform: translateY(-1px);
}

.tld-back-link {
  display: inline-block;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-decoration: none;
  padding: 10px 0;
  transition: color 0.2s;
  text-align: center;
  width: 100%;
}

.tld-back-link:hover { color: var(--color-text); }

/* ─── RELATED TOOLS ───────────────────────────────────────────────────────── */

.tld-related {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: 56px 0;
}

.tld-related-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.tld-related-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}

.tld-related-card {
  display: block;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 22px 24px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  max-width: 460px;
}

.tld-related-card:hover {
  border-color: var(--color-bg-navy);
  box-shadow: 0 4px 20px rgba(13, 34, 64, 0.08);
  transform: translateY(-2px);
}

.tld-related-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.tld-related-icon { font-size: 1.5rem; flex-shrink: 0; }

.tld-related-name {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 2px;
}

.tld-related-cat {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  margin: 0;
}

.tld-related-desc {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-text-muted);
  margin: 0 0 14px;
}

.tld-related-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-bg-navy);
}
