/* Shared solar calculator CTAs for category hero sections */

.category-hero-solar-calc {
  display: block;
  max-width: 920px;
  margin: 0 auto 40px;
  padding: 1.125rem 1.25rem;
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.category-hero-solar-calc:hover {
  transform: translateY(-2px);
  color: inherit;
}

.category-hero-solar-calc:focus-visible {
  outline: 3px solid #165ae0;
  outline-offset: 3px;
}

.category-hero-solar-calc__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}

.category-hero-solar-calc__title {
  display: block;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.category-hero-solar-calc__desc {
  display: block;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.category-hero-solar-calc__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: #3bb54a;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(59, 181, 74, 0.35);
  transition: background 0.2s ease;
}

.category-hero-solar-calc:hover .category-hero-solar-calc__action {
  background: #32a040;
}

.category-hero-solar-calc__chevron {
  flex-shrink: 0;
}

/* Grid-tied — blue info card */
.category-hero-solar-calc--grid-tied {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "badge badge badge"
    "icon body action";
  align-items: center;
  gap: 0 1rem;
  row-gap: 0.75rem;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 55%, #ecfdf5 100%);
  border: 2px solid #93c5fd;
  box-shadow:
    0 4px 18px rgba(22, 90, 224, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.category-hero-solar-calc--grid-tied:hover {
  border-color: #3b82f6;
  box-shadow:
    0 8px 28px rgba(22, 90, 224, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.category-hero-solar-calc--grid-tied .category-hero-solar-calc__badge {
  grid-area: badge;
  justify-self: start;
  background: #165ae0;
  color: #fff;
}

.category-hero-solar-calc--grid-tied .category-hero-solar-calc__icon {
  grid-area: icon;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(22, 90, 224, 0.14);
  flex-shrink: 0;
}

.category-hero-solar-calc--grid-tied .category-hero-solar-calc__icon img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.category-hero-solar-calc--grid-tied .category-hero-solar-calc__body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.category-hero-solar-calc--grid-tied .category-hero-solar-calc__title {
  color: #1e3a8a;
}

.category-hero-solar-calc--grid-tied .category-hero-solar-calc__desc {
  color: #1d4ed8;
}

.category-hero-solar-calc--grid-tied .category-hero-solar-calc__action {
  grid-area: action;
  flex-shrink: 0;
}

/* Off-grid — step guide card */
.category-hero-solar-calc--off-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) auto;
  grid-template-areas: "head steps action";
  align-items: center;
  gap: 0.75rem 1.25rem;
  padding: 1.125rem 1.25rem;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfccb 45%, #fef9c3 100%);
  border: 2px solid #86efac;
  border-top: 4px solid #166534;
  box-shadow: 0 4px 16px rgba(22, 101, 52, 0.12);
  text-decoration: none;
}

.category-hero-solar-calc--off-grid:hover,
.category-hero-solar-calc--off-grid:focus,
.category-hero-solar-calc--off-grid:visited {
  text-decoration: none;
  color: inherit;
}

.category-hero-solar-calc--off-grid:hover {
  border-color: #4ade80;
  border-top-color: #15803d;
  box-shadow: 0 8px 24px rgba(22, 101, 52, 0.18);
}

.category-hero-solar-calc--off-grid .category-hero-solar-calc__badge {
  background: #166534;
  color: #fff;
  width: fit-content;
}

.category-hero-solar-calc--off-grid .category-hero-solar-calc__off-grid-top {
  grid-area: head;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  min-width: 0;
}

.category-hero-solar-calc--off-grid .category-hero-solar-calc__title {
  color: #14532d;
  font-size: 16px;
}

.category-hero-solar-calc__steps {
  grid-area: steps;
  display: flex;
  flex-direction: row;
  gap: 0.375rem;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
  justify-content: space-between;
  flex-wrap: wrap;
}

.category-hero-solar-calc__steps li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 13px;
  font-weight: 500;
  color: #166534;
  line-height: 1.3;
}

.category-hero-solar-calc__step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.375rem;
  height: 1.375rem;
  border-radius: 50%;
  background: #166534;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.category-hero-solar-calc--off-grid .category-hero-solar-calc__action {
  grid-area: action;
  margin-left: 0;
  flex-shrink: 0;
  align-self: center;
}

/* RV — warm centered card (matches grid-tied layout, orange theme) */
.category-hero-solar-calc--rv {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "badge badge badge"
    "icon body action"
    "perks perks perks";
  align-items: center;
  gap: 0 1rem;
  row-gap: 0.75rem;
  text-decoration: none;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 55%, #fef3c7 100%);
  border: 2px solid #fdba74;
  box-shadow:
    0 4px 18px rgba(234, 88, 12, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.category-hero-solar-calc--rv:hover,
.category-hero-solar-calc--rv:focus,
.category-hero-solar-calc--rv:visited {
  text-decoration: none;
  color: inherit;
}

.category-hero-solar-calc--rv:hover {
  border-color: #f97316;
  box-shadow:
    0 8px 28px rgba(234, 88, 12, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.category-hero-solar-calc--rv .category-hero-solar-calc__badge {
  grid-area: badge;
  justify-self: center;
  background: #ea580c;
  color: #fff;
}

.category-hero-solar-calc--rv .category-hero-solar-calc__icon {
  grid-area: icon;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.14);
  flex-shrink: 0;
}

.category-hero-solar-calc--rv .category-hero-solar-calc__icon img {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.category-hero-solar-calc--rv .category-hero-solar-calc__body {
  grid-area: body;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.category-hero-solar-calc--rv .category-hero-solar-calc__title {
  color: #9a3412;
}

.category-hero-solar-calc--rv .category-hero-solar-calc__desc {
  color: #c2410c;
}

.category-hero-solar-calc--rv .category-hero-solar-calc__action {
  grid-area: action;
  flex-shrink: 0;
  background: #ea580c;
  color: #fff;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.35);
}

.category-hero-solar-calc--rv:hover .category-hero-solar-calc__action {
  background: #c2410c;
  color: #fff;
}

.category-hero-solar-calc__perks {
  grid-area: perks;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-hero-solar-calc__perks li {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #fdba74;
  color: #9a3412;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.category-hero-solar-calc__perks li::before {
  content: '✓';
  margin-right: 0.375rem;
  color: #ea580c;
  font-weight: 700;
}

@media (max-width: 1024px) and (min-width: 901px) {
  .category-hero-solar-calc--off-grid {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "head head"
      "steps action";
    align-items: start;
  }

  .category-hero-solar-calc--off-grid .category-hero-solar-calc__action {
    align-self: end;
  }
}

@media (max-width: 900px) {
  .category-hero-solar-calc--grid-tied {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "badge badge"
      "icon body"
      "action action";
    gap: 0.75rem;
    padding: 1rem;
  }

  .category-hero-solar-calc--grid-tied .category-hero-solar-calc__action {
    justify-content: center;
    width: 100%;
    white-space: normal;
    text-align: center;
  }

  .category-hero-solar-calc--off-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "steps"
      "action";
    gap: 0.75rem;
    padding: 1rem;
    align-items: stretch;
  }

  .category-hero-solar-calc--off-grid .category-hero-solar-calc__off-grid-top {
    align-items: stretch;
  }

  .category-hero-solar-calc--off-grid .category-hero-solar-calc__title {
    font-size: 15px;
  }

  .category-hero-solar-calc--off-grid .category-hero-solar-calc__steps li {
    padding: 0.5rem 0.625rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 10px;
  }

  .category-hero-solar-calc--off-grid .category-hero-solar-calc__action {
    width: 100%;
    align-self: stretch;
    white-space: normal;
    text-align: center;
    padding: 0.875rem 1rem;
  }

  .category-hero-solar-calc--rv {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "badge badge"
      "icon body"
      "action action"
      "perks perks";
    gap: 0.75rem;
    padding: 1rem;
  }

  .category-hero-solar-calc--rv .category-hero-solar-calc__action {
    justify-content: center;
    width: 100%;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .category-hero-solar-calc {
    margin-bottom: 24px;
    max-width: 100%;
  }

  .category-hero-solar-calc__title {
    font-size: 15px;
  }

  .category-hero-solar-calc__desc {
    font-size: 13px;
  }

  .category-hero-solar-calc__action {
    padding: 0.875rem 1rem;
    font-size: 15px;
  }

  .category-hero-solar-calc--off-grid {
    padding: 0.875rem;
    gap: 0.625rem;
  }

  .category-hero-solar-calc--off-grid .category-hero-solar-calc__steps {
    display: block;
    gap: 0.5rem;
  }

  .category-hero-solar-calc--off-grid .category-hero-solar-calc__steps li {
    font-size: 12px;
  }
}
