.fg-cta {
  --fg-cta-backdrop: var(--text-accent);
  --fg-cta-ink: var(--text-primary);
  --fg-cta-muted: var(--text-primary);
  --fg-cta-green: var(--text-primary);
  --fg-cta-sage: var(--text-primary);
  --fg-cta-icon-invert: 1;
  box-sizing: border-box;
  height: auto;
  min-height: 380px;
  display: grid;
  grid-template-columns: minmax(0, 55%) minmax(0, 45%);
  align-items: stretch;
  margin-bottom: 44px;
  padding: 0;
  overflow: hidden;
  border-radius: 24px;
  color: var(--fg-cta-ink);
  background-color: var(--fg-cta-backdrop);
  background-image: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.fg-cta__content {
  box-sizing: border-box;
  grid-column: 1;
  align-self: start;
  justify-self: start;
  min-width: 0;
  width: min(76%, 500px);
  margin: 16px 0 16px 16px;
  padding: 18px;
  border: 1px solid var(--cta-border);
  border-radius: 24px;
  background: var(--cta-bg);
  box-shadow: var(--cta-shadow);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
}

.fg-cta__content h2 {
  max-width: 100%;
  margin: 0;
  color: var(--fg-cta-ink);
  font-size: clamp(2rem, 3vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -.03em;
}

.fg-cta__description {
  max-width: 100%;
  margin: 14px 0 0;
  color: var(--fg-cta-muted);
  font-size: 1rem;
  line-height: 1.55;
}

.fg-cta__actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  margin-top: 16px;
}

.fg-cta__action {
  box-sizing: border-box;
  min-width: 0;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 8px;
  border: 0;
  border-radius: 0;
  color: var(--fg-cta-ink);
  background: transparent;
  appearance: none;
  font: inherit;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.fg-cta__action:visited {
  color: var(--fg-cta-ink);
}

.fg-cta__action:hover {
  color: var(--fg-cta-ink);
  background: transparent;
}

.fg-cta__action:focus-visible {
  outline: 3px solid var(--fg-cta-green);
  outline-offset: 3px;
  color: var(--fg-cta-ink);
  background: transparent;
}

.fg-cta__action-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  border-radius: 50%;
  background: var(--fg-cta-sage);
}

.fg-cta__action-icon img {
  width: 20px;
  height: 20px;
  display: block;
  box-sizing: border-box;
  object-fit: contain;
  filter: brightness(0) saturate(100%) invert(var(--fg-cta-icon-invert)) opacity(1);
  transition: filter .2s ease;
}

.fg-cta__action:first-child .fg-cta__action-icon img {
  padding: 1px;
}

.fg-cta__action:hover .fg-cta__action-icon img {
  filter: brightness(0) saturate(100%) invert(var(--fg-cta-icon-invert)) opacity(.8);
}

.fg-cta__action-text {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  color: var(--fg-cta-ink);
  text-align: center;
}

.fg-cta__action-label {
  min-width: 0;
}

.fg-cta__action-chevron {
  flex: 0 0 auto;
  color: var(--fg-cta-green);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1;
  transition: transform .2s ease;
}

.fg-cta__action:hover .fg-cta__action-chevron,
.fg-cta__action:focus-visible .fg-cta__action-chevron {
  transform: translateX(3px);
}

.fg-cta .cta-contact-status {
  margin: 12px 0 0;
  color: var(--fg-cta-muted);
}

@media (min-width: 621px) {
  .fg-cta__action {
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  /* Contact and landing hero images share the same framing on phones. */
  :root {
    --fg-image-inset: clamp(14px, 3vw, 24px);
    --fg-image-height: clamp(220px, 52vw, 320px);
    --fg-image-position: center center;
    --fg-image-radius: 16px;
  }

  .fg-cta {
    --fg-cta-inset: var(--fg-image-inset);
    height: auto;
    min-height: 0;
    display: block;
    background: var(--fg-cta-backdrop);
  }

  .fg-cta::before {
    height: var(--fg-image-height);
    display: block;
    margin: var(--fg-cta-inset) var(--fg-cta-inset) 0;
    border-radius: var(--fg-image-radius);
    content: "";
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  }

  .fg-cta__content {
    max-width: none;
    width: auto;
    margin: 18px var(--fg-cta-inset) var(--fg-cta-inset);
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .fg-cta__content h2,
  .fg-cta__description {
    max-width: none;
  }

  .fg-cta__actions {
    margin-top: 24px;
  }

  .fg-cta__action {
    min-height: 124px;
    border-radius: 14px;
    background: var(--fg-cta-tile-bg);
    font-size: 1rem;
  }

  .fg-cta__action:hover,
  .fg-cta__action:focus-visible {
    background: var(--fg-cta-tile-hover);
  }

  .fg-cta__action-icon {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
  }

  .fg-cta__action-icon img {
    width: 26px;
    height: 26px;
  }

  .fg-cta__action-label {
    overflow-wrap: anywhere;
  }

  .fg-cta__action-chevron {
    color: var(--fg-cta-tile-accent);
  }
}

@media (max-width: 900px) and (prefers-color-scheme: light) {
  .fg-cta {
    --fg-cta-backdrop: #f4efe6;
    --fg-cta-ink: #002d3e;
    --fg-cta-muted: #465a6b;
    --fg-cta-green: #006d78;
    --fg-cta-sage: var(--fg-cta-green);
    --fg-cta-tile-bg: #edf8fa;
    --fg-cta-tile-hover: #deeff2;
    --fg-cta-tile-accent: var(--fg-cta-ink);
  }
}

@media (max-width: 620px) {
  :root {
    --fg-image-height: clamp(210px, 62vw, 280px);
    --fg-image-position: right center;
  }

  .fg-cta {
    max-width: calc(100% - 28px);
    border-radius: 18px;
  }

  .fg-cta__content h2 {
    font-size: clamp(1.75rem, 8vw, 2.2rem);
  }

  .fg-cta__actions {
    grid-template-columns: 1fr;
    gap: 8px;
    width: auto;
  }

  .fg-cta__action {
    min-height: 60px;
    flex-direction: row;
    gap: 14px;
    padding: 8px 14px;
  }

  .fg-cta__action-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .fg-cta__action-icon img {
    width: 22px;
    height: 22px;
  }

  .fg-cta__action-text {
    min-width: 0;
    flex: 1;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fg-cta__action {
    transition: none;
  }

  .fg-cta__action-icon img,
  .fg-cta__action-chevron,
  .fg-cta__action:hover .fg-cta__action-chevron,
  .fg-cta__action:focus-visible .fg-cta__action-chevron {
    transition: none;
    transform: none;
  }
}

@media (min-width: 901px) {
  .fg-cta--third-pillar .fg-cta__content,
  .fg-cta--articles .fg-cta__content,
  .fg-cta--mortgages .fg-cta__content,
  .fg-cta--investments .fg-cta__content,
  .fg-cta--investment-calculator .fg-cta__content,
  .fg-cta--children-future .fg-cta__content,
  .fg-cta--own-home .fg-cta__content,
  .fg-cta--big-purchases .fg-cta__content,
  .fg-cta--dignified-retirement .fg-cta__content,
  .fg-cta--insurance .fg-cta__content,
  .fg-cta--car-insurance .fg-cta__content,
  .fg-cta--life-insurance .fg-cta__content,
  .fg-cta--property-insurance .fg-cta__content,
  .fg-cta--travel-insurance .fg-cta__content,
  .fg-cta--retirement .fg-cta__content,
  .fg-cta--second-pillar .fg-cta__content,
  .fg-cta--useful .fg-cta__content,
  .fg-cta--glossary .fg-cta__content {
    align-self: stretch;
    display: flex;
    flex-direction: column;
  }

  .fg-cta--third-pillar .fg-cta__actions,
  .fg-cta--articles .fg-cta__actions,
  .fg-cta--mortgages .fg-cta__actions,
  .fg-cta--investments .fg-cta__actions,
  .fg-cta--investment-calculator .fg-cta__actions,
  .fg-cta--children-future .fg-cta__actions,
  .fg-cta--own-home .fg-cta__actions,
  .fg-cta--big-purchases .fg-cta__actions,
  .fg-cta--dignified-retirement .fg-cta__actions,
  .fg-cta--insurance .fg-cta__actions,
  .fg-cta--car-insurance .fg-cta__actions,
  .fg-cta--life-insurance .fg-cta__actions,
  .fg-cta--property-insurance .fg-cta__actions,
  .fg-cta--travel-insurance .fg-cta__actions,
  .fg-cta--retirement .fg-cta__actions,
  .fg-cta--second-pillar .fg-cta__actions,
  .fg-cta--useful .fg-cta__actions,
  .fg-cta--glossary .fg-cta__actions {
    margin-top: auto;
  }

  .fg-cta--articles {
    background-image: url("../../articles/index/hero.png");
    background-position: center;
  }

  .fg-cta--mortgages {
    background-image: url("../../mortgages/hero.png");
    background-position: center;
  }

  .fg-cta--investments {
    background-image: url("../../investments/index/hero.png");
    background-position: center;
  }

  .fg-cta--investment-calculator {
    background-image: url("../images/calculator/investment-calculator-hero.png?v=20261028-1");
    background-position: center;
  }

  .fg-cta--children-future {
    background-image: url("../images/investments/children-future-hero.png?v=20261028-1");
    background-position: center;
  }

  .fg-cta--own-home {
    background-image: url("../images/investments/own-home-hero.png?v=20261028-2");
    background-position: center;
  }

  .fg-cta--big-purchases {
    background-image: url("../images/investments/big-purchases-hero.png?v=20261028-1");
    background-position: center;
  }

  .fg-cta--dignified-retirement {
    background-image: url("../images/investments/dignified-retirement-hero.png?v=20261028-1");
    background-position: center;
  }

  .fg-cta--insurance {
    background-image: url("../../insurance/hero.png");
    background-position: center;
  }

  .fg-cta--retirement {
    background-image: url("../../retirement/hero.png?v=20261028-1");
    background-position: center;
  }

  .fg-cta--second-pillar {
    background-image: url("../../retirement/second-pillar/hero.png");
    background-position: center;
  }

  .fg-cta--third-pillar {
    background-image: url("../../retirement/third-pillar/hero.png");
    background-position: center;
  }

  html[lang="sk"] .fg-cta--glossary {
    background-image: url("../../glossary/hero-sk.png");
    background-position: center;
  }

  html[lang="uk"] .fg-cta--glossary {
    background-image: url("../../glossary/hero-uk.png");
    background-position: center;
  }

  html[lang="en"] .fg-cta--glossary {
    background-image: url("../../glossary/hero-en.png");
    background-position: center;
  }

  .car-insurance-page .ci-final-cta {
    background-image: url("../../insurance/car/assets/hero-car.jpg");
    background-position: center;
  }

  .travel-insurance-page .ti-final-cta {
    background-image: url("../../insurance/travel/assets/hero-traveller.png");
    background-position: center;
  }
}

@media (max-width: 900px) {
  .fg-cta--articles::before {
    background-image: url("../../articles/index/hero.png");
    background-position: center center;
  }

  .fg-cta--mortgages::before {
    background-image: url("../../mortgages/hero.png");
    background-position: center center;
  }

  .fg-cta--investments::before {
    background-image: url("../../investments/index/hero.png");
    background-position: center center;
  }

  .fg-cta--investment-calculator::before {
    background-image: url("../images/calculator/investment-calculator-hero.png?v=20261028-1");
    background-position: center center;
  }

  .fg-cta--children-future::before {
    background-image: url("../images/investments/children-future-hero.png?v=20261028-1");
    background-position: center center;
  }

  .fg-cta--own-home::before {
    background-image: url("../images/investments/own-home-hero.png?v=20261028-2");
    background-position: center center;
  }

  .fg-cta--big-purchases::before {
    background-image: url("../images/investments/big-purchases-hero.png?v=20261028-1");
    background-position: center center;
  }

  .fg-cta--dignified-retirement::before {
    background-image: url("../images/investments/dignified-retirement-hero.png?v=20261028-1");
    background-position: center center;
  }

  .fg-cta--insurance::before {
    background-image: url("../../insurance/hero.png");
    background-position: center center;
  }

  .fg-cta--retirement::before {
    background-image: url("../../retirement/hero.png?v=20261028-1");
    background-position: center center;
  }

  .fg-cta--second-pillar::before {
    background-image: url("../../retirement/second-pillar/hero.png");
    background-position: center center;
  }

  .fg-cta--third-pillar::before {
    background-image: url("../../retirement/third-pillar/hero.png");
    background-position: center center;
  }

  html[lang="sk"] .fg-cta--glossary::before {
    background-image: url("../../glossary/hero-sk.png");
    background-position: center center;
  }

  html[lang="uk"] .fg-cta--glossary::before {
    background-image: url("../../glossary/hero-uk.png");
    background-position: center center;
  }

  html[lang="en"] .fg-cta--glossary::before {
    background-image: url("../../glossary/hero-en.png");
    background-position: center center;
  }

  .car-insurance-page .ci-final-cta::before {
    background-image: url("../../insurance/car/assets/hero-car.jpg");
    background-position: center center;
  }

  .travel-insurance-page .ti-final-cta::before {
    background-image: url("../../insurance/travel/assets/hero-traveller.png");
    background-position: center center;
  }
}

@media (max-width: 620px) {
  /* Match the localized Glossary selector's specificity and keep right-side subjects in frame. */
  html[lang] .fg-cta::before {
    background-position: var(--fg-image-position);
  }
}

@media (min-width: 901px) {
  .fg-cta {
    --fg-cta-backdrop: #f4efe6;
    --fg-cta-ink: #002d3e;
    --fg-cta-muted: #56657a;
    --fg-cta-tile-ink: #002d3e;
    --fg-cta-tile-bg: #f4fbfd;
    --fg-cta-tile-hover: color-mix(in srgb, #f4efe6 25%, var(--fg-cta-tile-bg));
    --fg-cta-tile-accent: #006d78;
    --fg-cta-tile-icon-bg: var(--fg-cta-tile-accent);
  }

  .fg-cta__content {
    border-color: rgba(255, 255, 255, .42);
    background: transparent;
    box-shadow: none;
  }

  .fg-cta__action {
    min-width: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--fg-cta-tile-bg);
  }

  .fg-cta__action,
  .fg-cta__action:visited,
  .fg-cta__action:hover,
  .fg-cta__action:focus-visible,
  .fg-cta__action-text {
    color: var(--fg-cta-tile-ink);
  }

  .fg-cta__action:hover,
  .fg-cta__action:focus-visible {
    background: var(--fg-cta-tile-hover, var(--fg-cta-tile-bg));
  }

  .fg-cta__action:focus-visible {
    outline: 3px solid var(--fg-cta-tile-accent);
    box-shadow: 0 0 0 3px var(--fg-cta-tile-bg);
  }

  .fg-cta__action-icon {
    background: var(--fg-cta-tile-icon-bg);
  }

  .fg-cta__action-icon img,
  .fg-cta__action:hover .fg-cta__action-icon img {
    filter: brightness(0) invert(1);
  }

  .fg-cta__action-chevron {
    color: var(--fg-cta-tile-accent);
  }
}

@media (prefers-color-scheme: dark) {
  .fg-cta {
    --fg-cta-backdrop: #0a1220;
    --fg-cta-ink: #e8f2fd;
    --fg-cta-muted: #8ea1bb;
    --fg-cta-tile-ink: #e8f2fd;
    --fg-cta-tile-bg: #1f334a;
    --fg-cta-tile-hover: #2a425a;
    --fg-cta-tile-accent: #53d0df;
    --fg-cta-tile-icon-bg: var(--fg-cta-backdrop);
  }
}

@media (max-width: 900px) and (prefers-color-scheme: dark) {
  .fg-cta {
    --fg-cta-green: var(--fg-cta-tile-accent);
    --fg-cta-sage: var(--fg-cta-tile-icon-bg);
  }

  .fg-cta::before {
    background-color: var(--fg-cta-backdrop);
  }
}

@media (min-width: 901px) and (prefers-color-scheme: dark) {
  .fg-cta__content {
    border-color: rgba(255, 255, 255, .2);
    background: rgba(10, 18, 32, .86);
    box-shadow: none;
  }
}
