/* ==========================================================================
   SEO Analyzer — Color overrides & SEO-specific components
   Loaded AFTER scanner.css, scoped to .seo-page
   ========================================================================== */

/* ===== BLUE ACCENT OVERRIDES ===== */
.seo-page {
  --c-primary: #2563eb;
  --c-primary-light: #3b82f6;
  --c-primary-dark: #1d4ed8;
  --c-primary-bg: rgba(37, 99, 235, 0.08);
}


.seo-page .scanner__submit:hover {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ===== CATEGORY SCORE BARS ===== */
.category-scores {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

.category-bar {
  display: grid;
  grid-template-columns: 120px 1fr 40px;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
}

.category-bar:last-child {
  margin-bottom: 0;
}

.category-bar__label {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  font-weight: var(--fw-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-bar__track {
  height: 8px;
  background: var(--c-border-light);
  border-radius: var(--r-full);
  overflow: hidden;
}

.category-bar__fill {
  height: 100%;
  border-radius: var(--r-full);
  transition: width 1s var(--ease);
  min-width: 0;
}

.category-bar__fill--good { background: var(--c-green); }
.category-bar__fill--ok { background: var(--c-amber); }
.category-bar__fill--bad { background: var(--c-red); }

.category-bar__value {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--c-text);
  text-align: right;
}

/* ===== PAGE INFO BLOCK ===== */
.page-info {
  margin-top: var(--sp-6);
  padding: var(--sp-5);
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
}

.page-info__title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--c-text);
  margin-bottom: var(--sp-3);
}

.page-info__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-2);
}

.page-info__row {
  display: flex;
  gap: var(--sp-2);
  font-size: var(--fs-xs);
  line-height: 1.5;
}

.page-info__label {
  color: var(--c-text-muted);
  white-space: nowrap;
  min-width: 100px;
}

.page-info__value {
  color: var(--c-text-sec);
  word-break: break-word;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===== IMPACT BADGE (replaces fine) ===== */
.violation-card__impact {
  font-size: var(--fs-xs);
  color: var(--c-text-sec);
  font-weight: var(--fw-medium);
  white-space: nowrap;
}

/* ===== COMBO CHECKBOX ===== */
.combo-option {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  cursor: pointer;
  transition: all var(--dur) var(--ease);
}

.combo-option:hover {
  border-color: var(--c-primary);
  background: var(--c-primary-bg);
}

.combo-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--c-primary);
  cursor: pointer;
}

.combo-option__text {
  flex: 1;
  font-size: var(--fs-sm);
  color: var(--c-text);
}

.combo-option__price {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--c-primary);
  white-space: nowrap;
}

/* ===== LOW severity (SEO uses it more than FZ-152) ===== */
.violation-card--low {
  border-left-color: var(--c-green);
}

.violation-card__severity--low {
  background: var(--c-green-bg);
  color: var(--c-green);
}

.severity-pill--low {
  background: var(--c-green-bg);
  color: var(--c-green);
}

/* ===== PRINT overrides for SEO ===== */
@media print {
  .seo-page .print-header__brand {
    color: #2563eb;
  }
  .seo-page .print-header {
    border-bottom-color: #2563eb;
  }
  .seo-page .violation-card__steps li::before {
    color: #2563eb !important;
  }
  .seo-page .results__funnel {
    background: #f0f5ff !important;
    border-color: #2563eb !important;
  }
  .seo-page .print-contacts {
    color: #2563eb;
  }
  .combo-option {
    display: none !important;
  }
  .page-info {
    break-inside: avoid;
  }
  .category-scores {
    break-inside: avoid;
  }
}

/* ===== GROWTH INFOGRAPHIC ===== */
.seo-growth {
  overflow: hidden;
}

.growth-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  margin-bottom: var(--sp-12);
}

.growth-stat {
  text-align: center;
  padding: var(--sp-6) var(--sp-4) var(--sp-5);
  background: var(--c-bg-card);
  border-radius: var(--r-xl);
  border: 1px solid var(--c-border);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.growth-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.12);
}

.growth-stat__visual {
  width: 100%;
  max-width: 260px;
  height: 150px;
  margin: 0 auto var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.growth-stat__visual--ring {
  height: 160px;
}

.growth-stat__chart,
.growth-stat__bars {
  width: 100%;
  max-width: 260px;
  height: 150px;
}

.growth-stat__ring {
  width: 160px;
  height: 160px;
}

.growth-ring-text {
  font-size: 18px;
  font-weight: 700;
  fill: #64748b;
  font-family: inherit;
  letter-spacing: 2px;
}

.growth-ring-num {
  font-size: 32px;
  font-weight: 800;
  fill: #2563eb;
  font-family: inherit;
}

.growth-stat__number {
  font-size: 2.25rem;
  font-weight: 800;
  color: var(--c-primary);
  margin-bottom: var(--sp-1);
  letter-spacing: -0.02em;
}

.growth-stat__label {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  color: var(--c-text);
  margin-bottom: var(--sp-1);
}

.growth-stat__sub {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
}

/* Growth line + area animation */
.growth-line--after {
  stroke-dasharray: 350;
  stroke-dashoffset: 350;
}

.growth-area {
  opacity: 0;
}

.growth-dot {
  opacity: 0;
}

.growth-dot-pulse {
  opacity: 0;
}

.growth-stat.is-visible .growth-line--after {
  animation: drawLine 2s ease-out 0.3s forwards;
}

.growth-stat.is-visible .growth-area {
  animation: fadeIn 0.8s ease-out 1s forwards;
}

.growth-stat.is-visible .growth-dot {
  animation: fadeIn 0.4s ease-out 2s forwards;
}

.growth-stat.is-visible .growth-dot-pulse {
  animation: dotPulse 2s ease-out 2.2s infinite;
}

/* Ring animation — 390 circumference, fill to 75% (TOP-5 of 10 = ~292) */
.growth-ring-fill {
  stroke-dasharray: 390;
  stroke-dashoffset: 390;
}

.growth-stat.is-visible .growth-ring-fill {
  animation: fillRing 2s ease-out 0.3s forwards;
}

/* Bar animation */
.growth-bar-anim {
  transform-origin: bottom;
  transform: scaleY(0);
}

.growth-stat.is-visible .growth-bar-anim {
  animation: growBar 0.8s ease-out forwards;
}

.growth-stat.is-visible .growth-bar-anim:nth-of-type(1) { animation-delay: 0.15s; }
.growth-stat.is-visible .growth-bar-anim:nth-of-type(2) { animation-delay: 0.3s; }
.growth-stat.is-visible .growth-bar-anim:nth-of-type(3) { animation-delay: 0.45s; }
.growth-stat.is-visible .growth-bar-anim:nth-of-type(4) { animation-delay: 0.6s; }
.growth-stat.is-visible .growth-bar-anim:nth-of-type(5) { animation-delay: 0.75s; }

@keyframes drawLine {
  to { stroke-dashoffset: 0; }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes fillRing {
  to { stroke-dashoffset: 98; }
}

@keyframes growBar {
  to { transform: scaleY(1); }
}

@keyframes dotPulse {
  0% { opacity: 0.4; r: 5; }
  50% { opacity: 0.15; r: 14; }
  100% { opacity: 0; r: 18; }
}

/* Number counter animation class */
.growth-stat__number.is-counting {
  transition: none;
}

/* ===== GROWTH JOURNEY TIMELINE ===== */
.growth-journey {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  padding: var(--sp-8) 0 var(--sp-4);
  max-width: 900px;
  margin: 0 auto;
}

.growth-journey__line {
  position: absolute;
  top: calc(var(--sp-8) + 30px);
  left: 60px;
  right: 60px;
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
}

.growth-journey__line-fill {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #2563eb, #1d4ed8);
  border-radius: 2px;
  transition: width 1.5s ease-out;
}

.growth-journey.is-visible .growth-journey__line-fill {
  width: 100%;
}

.growth-journey__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
  flex: 1;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.growth-journey.is-visible .growth-journey__step:nth-child(2) {
  opacity: 1; transform: translateY(0); transition-delay: 0.1s;
}
.growth-journey.is-visible .growth-journey__step:nth-child(3) {
  opacity: 1; transform: translateY(0); transition-delay: 0.35s;
}
.growth-journey.is-visible .growth-journey__step:nth-child(4) {
  opacity: 1; transform: translateY(0); transition-delay: 0.6s;
}
.growth-journey.is-visible .growth-journey__step:nth-child(5) {
  opacity: 1; transform: translateY(0); transition-delay: 0.85s;
}

.growth-journey__num {
  position: absolute;
  top: -8px;
  right: calc(50% - 32px);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--c-primary);
  color: var(--c-primary);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.growth-journey__icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--sp-4);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.growth-journey__step:hover .growth-journey__icon {
  transform: scale(1.1);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.4);
}

.growth-journey__card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  max-width: 160px;
  transition: box-shadow var(--dur) var(--ease);
}

.growth-journey__step:hover .growth-journey__card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.growth-journey__card strong {
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  color: var(--c-text);
}

.growth-journey__card span {
  font-size: var(--fs-xs);
  color: var(--c-text-muted);
  line-height: 1.4;
}

/* ===== PRICING CARDS ===== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
  align-items: stretch;
}

.pricing-card {
  background: var(--c-bg-card);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--sp-8) var(--sp-6);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.pricing-card--featured {
  border-color: var(--c-primary);
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.12);
}

.pricing-card--featured:hover {
  box-shadow: 0 12px 40px rgba(37, 99, 235, 0.18);
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--c-primary);
  color: #fff;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  padding: 4px 16px;
  border-radius: var(--r-full);
  white-space: nowrap;
}

.pricing-card__header {
  margin-bottom: var(--sp-4);
}

.pricing-card__title {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--c-text);
  margin-bottom: var(--sp-1);
}

.pricing-card__desc {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-6);
  border-bottom: 1px solid var(--c-border);
}

.pricing-card__amount {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  color: var(--c-text);
}

.pricing-card__period {
  font-size: var(--fs-sm);
  color: var(--c-text-muted);
}

.pricing-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--sp-8) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  flex: 1;
}

.pricing-card__features li {
  font-size: var(--fs-sm);
  color: var(--c-text-sec);
  padding-left: 24px;
  position: relative;
  line-height: 1.5;
}

.pricing-card__features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 16px;
  background: var(--c-primary-bg);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4 8l3 3 5-5' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
}

.pricing-card__btn {
  display: block;
  text-align: center;
  padding: var(--sp-3) var(--sp-6);
  border-radius: var(--r-lg);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition: all var(--dur) var(--ease);
  border: 1.5px solid var(--c-primary);
  color: var(--c-primary);
  background: transparent;
  margin-top: auto;
}

.pricing-card__btn:hover {
  background: var(--c-primary-bg);
}

.pricing-card__btn--primary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

.pricing-card__btn--primary:hover {
  background: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .category-bar {
    grid-template-columns: 90px 1fr 36px;
    gap: var(--sp-2);
  }

  .page-info__label {
    min-width: 80px;
    font-size: var(--fs-xs);
  }

  /* Growth stats — compact cards */
  .growth-stats {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-2);
    margin-bottom: var(--sp-6);
  }

  .growth-stat {
    padding: var(--sp-3) var(--sp-2);
  }

  .growth-stat:hover { transform: none; box-shadow: none; }

  .growth-stat__visual {
    height: 80px;
    margin-bottom: var(--sp-2);
  }

  .growth-stat__visual--ring { height: 80px; }
  .growth-stat__chart,
  .growth-stat__bars { height: 80px; }
  .growth-stat__ring { width: 80px; height: 80px; }

  .growth-stat__number {
    font-size: var(--fs-xl);
  }

  .growth-stat__label {
    font-size: var(--fs-xs);
  }

  .growth-stat__sub {
    font-size: 10px;
    display: none;
  }

  /* Growth journey — compact */
  .growth-journey {
    flex-direction: column;
    gap: var(--sp-4);
    align-items: flex-start;
    padding-left: var(--sp-8);
    padding-top: var(--sp-3);
    padding-bottom: var(--sp-3);
  }

  .growth-journey__line {
    width: 4px;
    top: 0;
    bottom: 0;
    height: auto;
    left: calc(var(--sp-8) + 20px);
    right: auto;
    border-radius: 2px;
    background: linear-gradient(180deg, transparent 0%, #e2e8f0 8%, #e2e8f0 92%, transparent 100%);
  }

  .growth-journey__line-fill {
    background: linear-gradient(180deg, transparent 0%, #60a5fa 8%, #2563eb 50%, #1d4ed8 92%, transparent 100%);
    width: 100%;
    height: 0;
    transition: height 1.5s ease-out;
  }

  .growth-journey.is-visible .growth-journey__line-fill {
    width: 100%;
    height: 100%;
  }

  .growth-journey__step {
    flex-direction: row;
    text-align: left;
    gap: var(--sp-3);
  }

  .growth-journey__num {
    top: -6px;
    right: auto;
    left: -6px;
  }

  .growth-journey__icon {
    margin-bottom: 0;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
  }

  .growth-journey__card {
    max-width: none;
  }

  .growth-journey__title { font-size: var(--fs-sm); }
  .growth-journey__text { font-size: var(--fs-xs); }

  /* SEO pricing — single column (3 cards don't split evenly in 2-col) */
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  .pricing-card {
    padding: var(--sp-5) var(--sp-4);
  }

  .pricing-card__title { font-size: var(--fs-lg); }
  .pricing-card__desc { font-size: var(--fs-xs); }
  .pricing-card__amount { font-size: var(--fs-2xl); }
  .pricing-card__period { font-size: var(--fs-xs); }
  .pricing-card__features li { font-size: var(--fs-sm); }
  .pricing-card__btn { font-size: var(--fs-sm); padding: var(--sp-3) var(--sp-4); }

  .pricing-card--featured {
    order: -1;
  }
}

@media (max-width: 480px) {
  .growth-stats {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }

  .growth-stat {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-3);
    text-align: left;
    padding: var(--sp-3);
  }

  .growth-stat__visual {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    margin: 0;
  }

  .growth-stat__visual--ring { height: 60px; }
  .growth-stat__ring { width: 60px; height: 60px; }
  .growth-stat__chart,
  .growth-stat__bars { height: 60px; max-width: 60px; }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }
}
