/* ==========================================================================
   RHER CALCULATOR PAGE
   Warm, trustworthy, highly readable - designed for older UK audiences
   Mobile-first responsive design. All classes prefixed `calc-`.
   Shorter page focused on the calculator as the main focal point.
   ========================================================================== */


/* Draft Notice - shared with other pages */
.adv-draft-notice {
  background: #FFF3E0;
  border-bottom: 1px solid rgba(230, 81, 0, 0.2);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  color: var(--color-primary);
  text-align: center;
}


/* ==========================================================================
   SHARED SECTION STYLES
   ========================================================================== */

.calc-section {
  padding: var(--space-12) 0;
}

@media (min-width: 768px) {
  .calc-section {
    padding: var(--space-16) 0;
  }
}

@media (min-width: 1200px) {
  .calc-section {
    padding: var(--space-20) 0;
  }
}

.calc-section-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: var(--space-4);
  text-align: center;
  line-height: 1.2;
  text-wrap: balance;
}

.calc-section-intro {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text-muted);
  text-align: center;
  max-width: 64ch;
  margin: 0 auto var(--space-8);
  line-height: 1.65;
}

.calc-body-text {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.7;
}

.calc-body-text p + p {
  margin-top: var(--space-4);
}


/* ==========================================================================
   BUTTON VARIANTS
   ========================================================================== */

/* White-background button (for use on coloured section backgrounds) */
.calc-btn-white {
  background: #FFFFFF;
  color: var(--color-primary);
  font-weight: 600;
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-base);
  min-height: 52px;
  border-radius: var(--radius-md);
}

.calc-btn-white:hover {
  background: #F5F5F5;
  color: var(--color-primary-hover);
}


/* ==========================================================================
   SECTION 1: HERO (.calc-hero)
   Full-width background image, navy overlay, centred white text
   Slightly shorter than main service pages
   ========================================================================== */

.calc-hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}

@media (min-width: 768px) {
  .calc-hero {
    min-height: 520px;
  }
}

@media (min-width: 1200px) {
  .calc-hero {
    min-height: 560px;
  }
}

.calc-hero-bg {
  position: absolute;
  inset: 0;
}

.calc-hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

/* Warm-tinted navy overlay */
.calc-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    170deg,
    rgba(30, 42, 74, 0.82) 0%,
    rgba(30, 42, 74, 0.66) 45%,
    rgba(30, 42, 74, 0.84) 100%
  );
}

.calc-hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto;
  padding: var(--space-10) var(--space-6);
  text-align: center;
  box-sizing: border-box;
  width: 100%;
}

@media (min-width: 480px) {
  .calc-hero-content {
    padding: var(--space-12) var(--space-8);
  }
}

@media (min-width: 768px) {
  .calc-hero-content {
    padding: var(--space-16) var(--space-8);
  }
}

.calc-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-4);
}

.calc-hero-headline {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1rem + 2.2vw, 2.7rem);
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.15;
  margin-bottom: var(--space-5);
  text-wrap: balance;
}

.calc-hero-subhead {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
  margin-bottom: var(--space-5);
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (min-width: 480px) {
  .calc-hero-subhead {
    font-size: var(--text-base);
  }
}

.calc-hero-trust {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.58);
  max-width: 54ch;
  margin: 0 auto var(--space-6);
  line-height: 1.5;
}

.calc-hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
}

.calc-hero-actions .btn {
  width: 100%;
  max-width: 420px;
  font-size: var(--text-sm);
  text-align: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .calc-hero-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
  }
  .calc-hero-actions .btn {
    width: auto;
    max-width: none;
    font-size: var(--text-base);
  }
}


/* ==========================================================================
   SECTION 2: CALCULATOR EMBED (.calc-embed-section)
   White bg, centred, prominent calculator placeholder
   ========================================================================== */

.calc-embed-section {
  background: var(--color-bg);
}

.calc-embed-placeholder {
  max-width: 820px;
  margin: 0 auto;
  background: var(--color-bg-alt);
  border: 2px dashed rgba(30, 42, 74, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-12) var(--space-6);
  text-align: center;
  transition: border-color var(--transition-interactive);
}

.calc-embed-placeholder:hover {
  border-color: rgba(230, 81, 0, 0.3);
}

.calc-embed-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.calc-embed-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.calc-embed-icon svg {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
}

.calc-embed-placeholder-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-navy);
  line-height: 1.3;
  margin: 0;
}

.calc-embed-placeholder-subtitle {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

.calc-embed-note {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  max-width: 64ch;
  margin: var(--space-6) auto 0;
  line-height: 1.6;
  font-style: italic;
}

.calc-iframe-wrap {
  max-width: 900px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.calc-iframe-wrap iframe {
  max-width: 100%;
}


/* ==========================================================================
   SECTION 3: LIMITATIONS (.calc-limitations)
   Alt bg, centred text with icon bullet list
   ========================================================================== */

.calc-limitations {
  background: var(--color-bg-alt);
}

.calc-limitations-inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.calc-limitations-inner .calc-section-title {
  margin-bottom: var(--space-4);
}

.calc-limitations-inner .calc-body-text {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 64ch;
  margin: 0 auto var(--space-8);
  line-height: 1.65;
}

.calc-limitations-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  width: 100%;
  max-width: 680px;
}

.calc-limitations-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.6;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  transition: box-shadow var(--transition-interactive);
}

.calc-limitations-list li:hover {
  box-shadow: var(--shadow-sm);
}

.calc-list-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.calc-list-icon svg {
  width: 18px;
  height: 18px;
  color: var(--color-primary);
}

.calc-limitations-closing {
  text-align: center;
  margin-top: var(--space-8);
  font-weight: 500;
  color: var(--color-navy);
}


/* ==========================================================================
   SECTION 4: ADVICE REASSURANCE (.calc-advice)
   Navy background, white text, centred. Clean and authoritative.
   ========================================================================== */

.calc-advice {
  background: var(--color-navy);
  text-align: center;
}

.calc-advice-inner {
  max-width: 680px;
  margin: 0 auto;
}

.calc-advice-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: rgba(230, 81, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-6);
}

.calc-advice-icon-wrap svg {
  width: 28px;
  height: 28px;
  color: #FFB380;
}

.calc-advice .calc-section-title {
  color: #FFFFFF;
}

.calc-advice .calc-body-text {
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
  text-align: center;
}

.calc-advice .calc-body-text p + p {
  margin-top: var(--space-4);
}


/* ==========================================================================
   SECTION 5: FINAL CTA (.calc-final-cta)
   Orange background, white text, centred. Single white CTA button.
   ========================================================================== */

.calc-final-cta {
  background: var(--color-primary);
  text-align: center;
  padding: var(--space-12) 0;
}

@media (min-width: 768px) {
  .calc-final-cta {
    padding: var(--space-16) 0;
  }
}

.calc-final-cta h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: var(--space-4);
  line-height: 1.15;
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
  text-wrap: balance;
}

.calc-final-cta-lead {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.9);
  max-width: 60ch;
  margin: 0 auto var(--space-8);
  line-height: 1.65;
}

.calc-final-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: center;
  margin-bottom: var(--space-5);
}

.calc-final-cta-actions .btn {
  max-width: 100%;
  box-sizing: border-box;
}

/* White button on orange bg */
.calc-final-cta-actions .calc-btn-white {
  background: #FFFFFF;
  color: var(--color-primary);
}

.calc-final-cta-actions .calc-btn-white:hover {
  background: #F5F5F5;
}

.calc-final-cta-supporting {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.68);
  max-width: 52ch;
  margin: 0 auto;
  line-height: 1.5;
}


/* ==========================================================================
   RISK DISCLAIMER (.calc-risk)
   Warm bg, small regulatory text
   ========================================================================== */

.calc-risk {
  background: var(--color-bg-warm);
  border-top: 1px solid rgba(230, 81, 0, 0.1);
  padding: var(--space-10) 0;
}

.calc-risk-inner {
  max-width: 820px;
  margin: 0 auto;
}

.calc-risk-inner p {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.75;
  max-width: 100%;
}

.calc-risk-inner p + p {
  margin-top: var(--space-3);
}


/* ==========================================================================
   FOOTER MARGIN OVERRIDE
   Remove default footer top margin - page ends with the CTA strip.
   ========================================================================== */

body:has(.calc-final-cta) .site-footer {
  margin-top: 0;
}


/* ==========================================================================
   RESPONSIVE REFINEMENTS
   ========================================================================== */

/* Tablet: slightly adjust embed placeholder padding */
@media (min-width: 640px) and (max-width: 899px) {
  .calc-embed-placeholder {
    padding: var(--space-16) var(--space-8);
  }
}

/* Desktop: extra vertical breathing room */
@media (min-width: 1200px) {
  .calc-embed-placeholder {
    padding: var(--space-16) var(--space-10);
  }

  .calc-limitations-list {
    gap: var(--space-5);
  }
}
