/* BRIDVIA responsive refinements
 * Kept separate from the theme bundle so mobile spacing can be tuned safely.
 */

/* Homepage hero: keep translated copy in a protected reading column. */
body.theme-finances main > .tp-fi-hero-ptb {
  min-height: 650px;
  padding-top: clamp(76px, 7vw, 112px) !important;
  padding-bottom: clamp(68px, 6vw, 96px) !important;
  background-position: center center;
}

body.theme-finances main > .tp-fi-hero-ptb.tp-fi-hero-overlay::before {
  right: 34%;
  background: linear-gradient(
    90deg,
    #f7f7f5 0%,
    rgba(247, 247, 245, 0.98) 48%,
    rgba(247, 247, 245, 0.74) 67%,
    rgba(247, 247, 245, 0) 100%
  );
}

body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-wrapper {
  display: flex;
  min-height: 442px;
  width: min(58%, 680px);
  flex-direction: column;
  justify-content: space-between;
}

body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-content {
  padding-bottom: 48px !important;
}

body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-title {
  max-width: 100%;
  margin-bottom: 28px;
  font-size: clamp(52px, 5.05vw, 70px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  hyphens: auto;
  text-wrap: balance;
}

body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-sub {
  max-width: 620px;
  gap: 24px;
  align-items: flex-start;
}

body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-sub > span {
  flex: 0 0 38px;
  margin-top: 3px;
  transform: none;
}

body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-sub p {
  max-width: 56ch;
  margin: 0;
  line-height: 1.55;
  hyphens: auto;
  text-wrap: pretty;
}

/* The portal is a discreet operational destination, not a second marketing CTA. */
.bridvia-header-portal-link {
  align-items: center;
  gap: 7px;
  margin-right: 18px;
  color: #222f30;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.bridvia-header-portal-link:hover,
.bridvia-header-portal-link:focus {
  color: #174f49;
}

.bridvia-portal-offcanvas {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.bridvia-portal-entry {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  border-radius: 3px;
  background: #222f30;
  color: #fff !important;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.bridvia-portal-entry:hover,
.bridvia-portal-entry:focus {
  background: #174f49;
  color: #fff !important;
}

.bridvia-portal-create-link {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #222f30;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.bridvia-intake-form {
  display: grid;
  gap: 14px;
  padding: 20px 0 4px;
}

.bridvia-intake-form[hidden] {
  display: none;
}

.bridvia-intake-form h3 {
  margin: 0;
  color: #222f30;
  font-size: 25px;
  line-height: 1.08;
}

.bridvia-intake-form p {
  margin: -4px 0 2px;
  color: #5f6765;
  font-size: 14px;
  line-height: 1.55;
}

.bridvia-intake-kicker {
  color: #174f49;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.bridvia-intake-form label {
  display: grid;
  gap: 7px;
  color: #222f30;
  font-size: 13px;
  font-weight: 600;
}

.bridvia-intake-form label span {
  color: #7e8783;
  font-weight: 400;
}

.bridvia-intake-form input,
.bridvia-intake-form select,
.bridvia-intake-form textarea {
  width: 100%;
  border: 1px solid #d7dad3;
  border-radius: 2px;
  background: #fff;
  color: #222f30;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  outline: none;
  padding: 11px 12px;
}

.bridvia-intake-form textarea {
  resize: vertical;
}

.bridvia-intake-form input:focus,
.bridvia-intake-form select:focus,
.bridvia-intake-form textarea:focus {
  border-color: #174f49;
  box-shadow: 0 0 0 3px rgba(23, 79, 73, .12);
}

.bridvia-intake-back {
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  color: #174f49;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.bridvia-intake-status {
  min-height: 22px;
}

.bridvia-intake-status.is-error {
  color: #a33a32;
}

.bridvia-intake-status.is-success {
  color: #174f49;
}

.bridvia-intake-submit {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border: 0;
  border-radius: 3px;
  background: #222f30;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.bridvia-intake-submit:hover,
.bridvia-intake-submit:focus {
  background: #174f49;
}

.bridvia-intake-submit:disabled {
  cursor: wait;
  opacity: .7;
}

html[lang="fr"] body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-title {
  font-size: clamp(46px, 4.3vw, 60px);
}

html[lang="de"] body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-title {
  font-size: clamp(48px, 4.55vw, 64px);
}

@media (min-width: 768px) and (max-width: 1199px) {
  body.theme-finances main > .tp-fi-hero-ptb {
    min-height: 610px;
    background-position: 62% center;
  }

  body.theme-finances main > .tp-fi-hero-ptb.tp-fi-hero-overlay::before {
    right: 18%;
  }

  body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-wrapper {
    min-height: 420px;
    width: 62%;
  }

  body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-title {
    font-size: clamp(48px, 5.4vw, 60px);
  }

  html[lang="fr"] body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-title,
  html[lang="de"] body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-title {
    font-size: clamp(42px, 4.8vw, 54px);
  }
}

@media (max-width: 767px) {
  /* Give every page a consistent, comfortable mobile gutter. */
  body.theme-finances .container,
  body.theme-finances .container-fluid {
    padding-right: 20px;
    padding-left: 20px;
  }

  /* Header */
  body.theme-finances .tp-header-area .container {
    padding-right: 20px;
    padding-left: 20px;
  }

  body.theme-finances .tp-header-logo img {
    width: 128px;
    max-width: 100%;
  }

  body.theme-finances .tp-header-action {
    gap: 10px;
  }

  body.theme-finances main > .tp-fi-hero-ptb {
    min-height: 620px;
    padding-top: 72px !important;
    padding-bottom: 64px !important;
    background-position: 68% center;
  }

  body.theme-finances main > .tp-fi-hero-ptb.tp-fi-hero-overlay::before {
    right: 0;
    background: rgba(247, 247, 245, 0.88);
  }

  body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-wrapper {
    min-height: 484px;
    width: 100%;
  }

  body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-content {
    padding-bottom: 40px !important;
  }

  body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-title,
  html[lang="fr"] body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-title,
  html[lang="de"] body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-title {
    max-width: 15ch;
    margin-right: auto;
    margin-bottom: 24px;
    margin-left: auto;
    font-size: clamp(38px, 11.4vw, 48px);
    line-height: 1;
  }

  html[lang="fr"] body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-title {
    font-size: clamp(34px, 10vw, 43px);
  }

  body.theme-finances main > .tp-fi-hero-ptb .tp-fi-hero-sub p {
    max-width: 40ch;
    line-height: 1.5;
  }

  /* Shared mobile alignment */
  body.theme-finances main .tp-section-sub,
  body.theme-finances main .tp-section-title,
  body.theme-finances main .tp-fi-stories-content,
  body.theme-finances main .tp-fi-stories-item-content,
  body.theme-finances main .tp-fi-about-content,
  body.theme-finances main .tp-fi-service-heading,
  body.theme-finances main .tp-fi-service-right,
  body.theme-finances main .tp-fi-value-content,
  body.theme-finances main .tp-fi-partner-wrapper,
  body.theme-finances main .tp-fi-faq-heading,
  body.theme-finances main .tp-fi-faq-support,
  body.theme-finances main .tp-fi-cta-wrapper,
  body.theme-finances main .tp-cc-team-heading,
  body.theme-finances main .tp-cc-team-item-content,
  body.theme-finances main .tp-breadcrumb-content,
  body.theme-finances main .tp-service-philosopy-heading,
  body.theme-finances main .tp-fa-control-heading,
  body.theme-finances main .tp-cn-cta-content {
    text-align: center;
  }

  body.theme-finances main .tp-section-title br,
  body.theme-finances main .tp-fi-about-content p br,
  body.theme-finances footer .tp-footer-text p br,
  body.theme-finances footer .tp-footer-contact-location br {
    display: none;
  }

  body.theme-finances main .tp-fi-about-btn-wrap,
  body.theme-finances main .tp-fi-partner-btn-wrap,
  body.theme-finances main .tp-cc-team-right,
  body.theme-finances main .tp-fa-control-right,
  body.theme-finances main .tp-fi-hero-contact {
    justify-content: center !important;
  }

  /* Replace desktop-scale section whitespace with a compact mobile rhythm. */
  body.theme-finances main .tp-sec-ptb {
    padding-top: 64px !important;
    padding-bottom: 52px !important;
  }

  body.theme-finances main .tp-fi-stories-ptb {
    padding-top: 56px !important;
    padding-bottom: 38px !important;
  }

  body.theme-finances main .tp-fi-about-ptb {
    margin-top: 0 !important;
    padding-top: 64px !important;
    padding-bottom: 52px !important;
  }

  body.theme-finances main .tp-fi-cta-ptb {
    padding-bottom: 52px !important;
  }

  /* Story cards used desktop spacer utilities as their visual height. */
  body.theme-finances main .tp-fi-stories-item {
    display: flex;
    min-height: 176px;
    padding: 28px 24px;
    align-items: center;
    justify-content: center;
  }

  body.theme-finances main .tp-fi-stories-item-content,
  body.theme-finances main .tp-fi-stories-item-content.style-2 {
    width: 100%;
    padding-bottom: 0 !important;
  }

  body.theme-finances main .tp-fi-stories-item-content span {
    margin-bottom: 12px;
  }

  body.theme-finances main .tp-fi-stories-item-title {
    font-size: clamp(34px, 10vw, 42px);
    line-height: 1.08;
  }

  /* Detail-page copy stays readable while headings and actions remain centred. */
  body[data-service] .tp-service-philosopy-heading > p,
  body[data-service] .tp-cn-cta-content p {
    margin-right: auto;
    margin-left: auto;
    text-align: center;
  }

  body[data-service] .tp-service-philosopy-heading .tp-team-details-exp-text {
    border-left: 0;
    border-top: 3px solid var(--tp-finance-primary);
    text-align: center;
  }

  body[data-service] .tp-fa-control-ptb .tp-fa-control-item {
    align-items: center;
    text-align: center;
  }

  body[data-service] .tp-fa-control-ptb .tp-fa-control-item-content p {
    margin-right: auto;
    margin-left: auto;
  }

  /* Footer columns and social widgets become one centred, compact stack. */
  body.theme-finances footer,
  body.theme-finances footer .tp-footer-widget,
  body.theme-finances footer .tp-footer-contact-wrap,
  body.theme-finances footer .tp-footer-copyright-text,
  body.theme-finances footer .tp-footer-copyright-link {
    text-align: center !important;
  }

  body.theme-finances footer .tp-footer-area,
  body.theme-finances footer .tp-footer-3-area {
    padding-top: 56px !important;
  }

  body.theme-finances footer .tp-footer-widget.mb-90,
  body.theme-finances footer .tp-footer-widget.mb-60 {
    margin-bottom: 46px !important;
  }

  body.theme-finances footer .tp-footer-logo {
    margin-bottom: 22px !important;
    text-align: center !important;
  }

  body.theme-finances footer .tp-footer-text {
    max-width: 35rem;
    margin-right: auto;
    margin-bottom: 24px !important;
    margin-left: auto;
  }

  body.theme-finances footer .tp-footer-text p {
    line-height: 1.65;
  }

  body.theme-finances footer .tp-footer-widget-title {
    margin-bottom: 18px;
  }

  body.theme-finances footer .tp-footer-widget-menu ul li:not(:last-of-type) {
    margin-bottom: 9px;
  }

  body.theme-finances footer .tp-footer-widget-social {
    width: 100%;
    justify-content: center;
  }

  body.theme-finances footer .tp-footer-contact-wrap > img {
    display: block;
    max-width: min(100%, 290px);
    margin-right: auto;
    margin-left: auto;
  }

  body.theme-finances footer .tp-footer-copyright-link {
    gap: 10px 20px;
    flex-wrap: wrap;
  }

  body.theme-finances footer .tp-footer-copyright-border {
    padding-top: 24px !important;
  }
}

@media (max-width: 420px) {
  body.theme-finances .container,
  body.theme-finances .container-fluid {
    padding-right: 18px;
    padding-left: 18px;
  }

  body.theme-finances main .tp-fi-stories-item {
    min-height: 164px;
    padding: 24px 18px;
  }

  body.theme-finances main .tp-fi-stories-item-title {
    font-size: 34px;
  }

  body.theme-finances footer .tp-footer-widget.mb-90,
  body.theme-finances footer .tp-footer-widget.mb-60 {
    margin-bottom: 40px !important;
  }
}
