/* ============================================================
   BOX EXPRESS — SERVIÇOS V3.3 | FASE 3
   CSS exclusivo. Carregar depois de css/style.css.
   Não modifica navbar, footer nem botões globais.
   ============================================================ */
.service-v3-main {
  --sv-navy: #1b3563;
  --sv-navy-deep: #142e53;
  --sv-yellow: #f3cc1f;
  --sv-ink: #203858;
  --sv-muted: #63758c;
  --sv-border: #dce6f2;
  color: var(--sv-ink);
  background: #fff;
}
.service-v3-main * { box-sizing: border-box; }
.service-v3-main h1,
.service-v3-main h2,
.service-v3-main h3 { font-family: 'Quicksand', sans-serif; font-weight: 700; }
.service-v3-main a:focus-visible,
.service-v3-main button:focus-visible { outline: 3px solid var(--sv-yellow); outline-offset: 4px; }
.service-v3-skip {
  position: fixed; top: -90px; left: 15px; z-index: 100000;
  padding: 12px 18px; border-radius: 0 0 10px 10px;
  background: #f3cc1f; color: #142e53; font-weight: 700;
}
.service-v3-skip:focus { top: 0; }
.service-v3-eyebrow {
  display: inline-block; color: #947009; font-size: .77rem;
  font-weight: 800; letter-spacing: .13em; line-height: 1.5;
  text-transform: uppercase;
}
.service-v3-eyebrow--light { color: var(--sv-yellow); }

/* ----------------------------- CABEÇALHO ----------------------------- */
.service-v3-hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(120deg, #142c50 3%, #1b3563 52%, #284e7c 100%);
  color: #fff;
}
.service-v3-hero::before {
  content: ''; position: absolute; z-index: -1; inset: 0;
  background: radial-gradient(circle at 77% 38%, rgba(243,204,31,.12), transparent 32%),
              radial-gradient(circle at 10% 100%, rgba(120,178,224,.10), transparent 40%);
  pointer-events: none;
}
.service-v3-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1; opacity: .26;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
                    linear-gradient(90deg,rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to right, transparent, #000);
  pointer-events: none;
}
.service-v3-hero__grid {
  display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, .84fr);
  align-items: center; gap: 4%; min-height: 485px;
  padding-top: 76px; padding-bottom: 70px;
}
.service-v3-hero__copy { position: relative; z-index: 2; max-width: 700px; }
.service-v3-hero h1 {
  color: #fff; margin: 13px 0 19px;
  font-size: clamp(2.15rem, 4.1vw, 3.7rem);
  line-height: 1.13; letter-spacing: -.035em;
}
.service-v3-hero__copy > p {
  max-width: 600px; margin: 0 0 27px; color: #e2ecf8;
  font-size: clamp(1rem, 1.45vw, 1.12rem); line-height: 1.77;
}
.service-v3-hero__button {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 50px; padding: 12px 22px; border-radius: 10px;
  color: var(--sv-navy-deep); background: var(--sv-yellow);
  text-decoration: none; font-weight: 800;
  box-shadow: 0 8px 23px rgba(0,0,0,.16);
  transition: background .2s ease, transform .2s ease;
}
.service-v3-hero__button:hover { color: var(--sv-navy-deep); background: #ffe16a; transform: translateY(-2px); }
.service-v3-breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 11px;
  margin-top: 34px; font-size: .84rem; color: #dae7f6;
}
.service-v3-breadcrumb a { color: #fff; text-decoration: none; }
.service-v3-breadcrumb a:hover { text-decoration: underline; }
.service-v3-breadcrumb i { font-size: .65rem; color: var(--sv-yellow); }
.service-v3-hero__art { position: relative; width: min(100%, 400px); aspect-ratio: 1; margin-inline: auto; }
.service-v3-hero__ring { position: absolute; border: 1px solid rgba(225,237,255,.22); border-radius: 50%; }
.service-v3-hero__ring--outer { inset: 2%; }
.service-v3-hero__ring--inner { inset: 16%; border-style: dashed; border-color: rgba(243,204,31,.48); }
.service-v3-hero__center {
  position: absolute; inset: 27%; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.24);
  background: radial-gradient(circle at 30% 20%, #43709d, #19365e 74%);
  box-shadow: inset 0 0 25px rgba(255,255,255,.04), 0 10px 45px rgba(5,20,40,.35);
}
.service-v3-hero__center i { color: #edf5fc; font-size: clamp(3.5rem, 7vw, 5.6rem); }
.service-v3-hero__point {
  position: absolute; z-index: 2; width: 59px; height: 59px;
  display: grid; place-items: center; border-radius: 16px;
  background: #fff; color: var(--sv-navy); font-size: 1.45rem;
  box-shadow: 0 12px 28px rgba(0,10,25,.25);
}
.service-v3-hero__point--one { left: 10%; top: 12%; transform: rotate(-7deg); }
.service-v3-hero__point--two { right: 2%; top: 47%; background: var(--sv-yellow); transform: rotate(8deg); }
.service-v3-hero__point--three { left: 22%; bottom: 8%; width: 50px; height: 50px; font-size: 1.2rem; }
.service-v3-hero__route {
  position: absolute; width: 67%; left: 17%; bottom: 26%;
  border-top: 2px dashed rgba(243,204,31,.55);
  transform: rotate(-33deg); transform-origin: left center;
}

/* ----------------------------- PERCURSO ------------------------------ */
.service-v3-journey { padding: 37px 0 31px; background: #f5f8fc; border-bottom: 1px solid #e9eef6; }
.service-v3-journey__heading { text-align: center; margin-bottom: 22px; }
.service-v3-journey__heading h2 {
  margin: 7px 0 0; color: var(--sv-navy);
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
}
.service-v3-journey__steps {
  display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px;
  list-style: none; margin: 0; padding: 0;
}
.service-v3-journey__steps li {
  min-width: 0; padding: 12px 10px; display: flex;
  flex-direction: column; align-items: center; gap: 9px;
  text-align: center; color: #314b6a;
}
.service-v3-journey__steps li > span {
  width: 39px; height: 39px; display: grid; place-items: center;
  border: 1px solid #ead485; border-radius: 50%; background: #fff5c8;
  color: #29476a; font: 800 .82rem 'Quicksand',sans-serif;
}
.service-v3-journey__steps strong { line-height: 1.38; font-size: .88rem; font-weight: 700; }

/* ----------------------------- SERVIÇOS ------------------------------ */
.services-accordion-section { padding: clamp(65px,7vw,98px) 0; scroll-margin-top: 70px; }
.services-accordion-section > .container { max-width: 1240px; }
.service-v3-section-heading { margin: 0 auto 35px; max-width: 790px; text-align: center; }
.service-v3-section-heading h2 {
  margin: 10px auto 15px; color: var(--sv-navy);
  font-size: clamp(1.85rem, 3.4vw, 2.8rem); line-height: 1.19;
}
.service-v3-section-heading p { margin: 0 auto; color: #4d627d; line-height: 1.75; font-size: 1.04rem; }
.service-v3-section-heading small { display: block; margin-top: 12px; color: #6d7e93; font-size: .83rem; }

/* Modo sem JS: seis cartões completos e acessíveis. */
.services-accordion { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 17px; }
.service-panel {
  position: relative; min-width: 0; min-height: 430px; isolation: isolate;
  overflow: hidden; background: #142c4c; border: 1px solid rgba(27,53,99,.14);
  border-radius: 18px; box-shadow: 0 9px 26px rgba(27,53,99,.12);
}
.service-panel > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center; display: block;
  transition: transform .55s ease;
}
.service-panel.active > img { transform: scale(1.03); }
.service-panel .service-overlay {
  position: absolute; z-index: 1; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(5,18,38,.94),rgba(5,18,38,.67) 42%,rgba(5,18,38,.20) 100%);
}
.service-panel .service-content {
  position: relative; z-index: 2; min-height: 430px;
  display: flex; flex-direction: column; align-items: flex-start;
  justify-content: flex-end; padding: clamp(23px, 3vw, 37px);
  text-align: left; color: #fff;
}
.service-panel .service-number {
  display: inline-grid; place-items: center; flex: 0 0 auto;
  width: 44px; height: 44px; border: 1px solid rgba(243,204,31,.75);
  border-radius: 50%; color: #f8dd60; background: rgba(27,53,99,.78);
  font-size: .83rem; font-weight: 800; margin-bottom: 16px;
}
.service-panel .service-content h3 {
  max-width: 550px; margin: 0 0 12px; color: #fff;
  font-size: clamp(1.18rem,2vw,1.7rem); line-height: 1.23;
  overflow-wrap: break-word;
}
.service-panel .service-content p {
  max-width: 540px; margin: 0 0 19px; color: #fff;
  font-size: .94rem; line-height: 1.7; font-weight: 500;
}
.service-panel .service-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 47px; max-width: 100%; padding: 12px 18px;
  border-radius: 9px; border: 1px solid #eebd10; color: #142e53;
  background: var(--sv-yellow); text-decoration: none;
  font: 800 .88rem/1.3 'Quicksand',sans-serif;
  box-shadow: 0 5px 16px rgba(0,0,0,.18);
  transition: background .2s ease;
}
.service-panel .service-btn:hover { color: #142e53; background: #ffe477; }
/* Trigger está visível apenas no accordion de desktop inicializado pelo JS. */
.service-panel__trigger { display: none; }

/* Accordion horizontal: desktop com JS. */
@media (min-width: 992px) {
  .services-accordion.is-enhanced {
    display: flex; flex-direction: row; align-items: stretch;
    height: clamp(480px, 38vw, 530px); gap: clamp(9px, 1vw, 15px);
  }
  .services-accordion.is-enhanced .service-panel {
    flex: 1 1 0; min-width: 0; min-height: 0; height: 100%;
    transition: flex-grow .45s cubic-bezier(.2,.75,.2,1), box-shadow .3s ease;
  }
  .services-accordion.is-enhanced .service-panel.active {
    flex-grow: 6.2; box-shadow: 0 15px 40px rgba(27,53,99,.17);
  }
  .services-accordion.is-enhanced .service-content { min-height: 0; height: 100%; }
  .services-accordion.is-enhanced .service-panel:not(.active) .service-content { display: none; }
  .services-accordion.is-enhanced .service-panel:not(.active) .service-overlay {
    background: linear-gradient(90deg,rgba(8,23,43,.82),rgba(8,23,43,.48));
  }
  .services-accordion.is-enhanced .service-panel__trigger {
    position: absolute; z-index: 4; display: flex; border: 0; cursor: pointer;
    color: #fff; font-family: 'Quicksand',sans-serif; font-weight: 800;
  }
  .services-accordion.is-enhanced .service-panel:not(.active) .service-panel__trigger {
    inset: 0; width: 100%; height: 100%; padding: 16px 6px;
    flex-direction: column; align-items: center; justify-content: center;
    background: transparent; gap: 16px;
  }
  .services-accordion.is-enhanced .service-panel__trigger-number {
    display: grid; place-items: center; flex: 0 0 auto;
    width: 41px; height: 41px; border-radius: 50%;
    border: 1px solid rgba(243,204,31,.75);
    background: rgba(27,53,99,.85); color: #ffdf54; font-size: .8rem;
  }
  .services-accordion.is-enhanced .service-panel:not(.active) .service-panel__trigger-title {
    writing-mode: vertical-rl; transform: rotate(180deg);
    font-size: clamp(.88rem, 1.1vw, 1.13rem); letter-spacing: .03em;
    line-height: 1.15; max-height: calc(100% - 100px); overflow: hidden;
  }
  .services-accordion.is-enhanced .service-panel.active .service-panel__trigger {
    top: 18px; right: 18px; width: 43px; height: 43px;
    align-items: center; justify-content: center; border-radius: 50%;
    background: rgba(20,46,83,.82); border: 1px solid rgba(255,255,255,.38);
  }
  .services-accordion.is-enhanced .service-panel.active .service-panel__trigger-number { width: auto; height: auto; border: 0; background: none; }
  .services-accordion.is-enhanced .service-panel.active .service-panel__trigger-title { display: none; }
  .services-accordion.is-enhanced .service-panel .service-panel__trigger:focus-visible {
    outline: 3px solid #f3cc1f; outline-offset: -4px;
  }
}

/* Tablet: cartões em duas colunas; Mobile: uma coluna. */
@media (max-width: 991.98px) {
  .services-accordion { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .service-panel, .service-panel .service-content { min-height: 375px; }
  .service-panel .service-content { padding: 25px; }
  .service-panel .service-content h3 { font-size: clamp(1.16rem,2.6vw,1.55rem); }
  .service-v3-journey__steps { grid-template-columns: repeat(3,minmax(0,1fr)); row-gap: 13px; }
  .service-v3-hero__grid { min-height: 420px; }
}
@media (max-width: 767.98px) {
  .service-v3-hero__grid { grid-template-columns: 1fr; min-height: 0; padding-top: 62px; padding-bottom: 51px; }
  .service-v3-hero__art { display: none; }
  .service-v3-breadcrumb { margin-top: 28px; }
  .service-v3-journey { padding: 28px 0; }
  .services-accordion-section { padding: 55px 0 64px; }
  .service-v3-section-heading { margin-bottom: 28px; }
  .services-accordion { grid-template-columns: 1fr; gap: 17px; }
  .service-panel, .service-panel .service-content { min-height: 380px; }
  .service-panel .service-content { padding: 25px 22px; }
  .service-panel .service-btn { width: 100%; }
}
@media (max-width: 420px) {
  .service-v3-journey__steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .service-v3-hero h1 { font-size: 2.18rem; }
  .service-panel, .service-panel .service-content { min-height: 405px; }
}

/* ----------------------------- CTA FINAL ------------------------------ */
.service-final-cta { padding: clamp(12px, 3vw, 34px) 0 clamp(70px,7vw,105px); }
.service-final-cta > .container { max-width: 1230px; }
.service-final-cta__card {
  position: relative; display: grid; grid-template-columns: minmax(0,1.12fr) minmax(0,.88fr);
  min-height: 425px; overflow: hidden; border: 1px solid var(--sv-border);
  border-radius: 22px; background: #fff;
  box-shadow: 0 19px 55px rgba(27,53,99,.10);
}
.service-final-cta__card::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0;
  width: 5px; background: var(--sv-yellow); z-index: 2;
}
.service-final-cta__body {
  min-width: 0; padding: clamp(28px,3.7vw,57px);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
}
.service-final-cta__eyebrow {
  color: #947009; font-size: .78rem; font-weight: 800;
  letter-spacing: .13em; text-transform: uppercase; margin-bottom: 12px;
}
.service-final-cta__body h2 {
  color: var(--sv-navy); font-size: clamp(1.75rem,3vw,2.6rem);
  line-height: 1.2; margin: 0 0 16px;
}
.service-final-cta__body > p { color: #4b607b; line-height: 1.77; margin-bottom: 26px; }
.service-final-cta__actions { display: flex; flex-wrap: wrap; gap: 11px; margin-bottom: 27px; }
.service-final-cta__actions a {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 49px; padding: 12px 17px; border-radius: 9px;
  font: 700 .91rem/1.35 'Quicksand',sans-serif; text-decoration: none;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
.service-final-cta__primary { color: #142e53; background: var(--sv-yellow); border: 2px solid var(--sv-yellow); }
.service-final-cta__primary:hover { color: #fff; background: var(--sv-navy); border-color: var(--sv-navy); transform: translateY(-2px); }
.service-final-cta__secondary { color: var(--sv-navy); background: #fff; border: 2px solid #d7e2ee; }
.service-final-cta__secondary:hover { color: var(--sv-navy); background: #f2f6fb; border-color: var(--sv-navy); }
.service-final-cta__benefits {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 17px;
  padding-top: 23px; border-top: 1px solid #e8eef5;
}
.service-final-cta__benefits span { display: inline-flex; align-items: baseline; gap: 7px; color: #4c627d; font-size: .85rem; font-weight: 600; }
.service-final-cta__benefits i { color: #21845a; }
.service-final-cta__visual { min-width: 0; overflow: hidden; background: #1b3563; }
.service-final-cta__visual img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
@media (max-width: 991.98px) {
  .service-final-cta__card { grid-template-columns: 1fr; }
  .service-final-cta__body { padding: 36px 27px; align-items: center; text-align: center; }
  .service-final-cta__actions, .service-final-cta__benefits { justify-content: center; }
  .service-final-cta__visual { height: clamp(230px,36vw,370px); }
}
@media (max-width: 575.98px) {
  .service-final-cta { padding-bottom: 65px; }
  .service-final-cta__card { border-radius: 16px; }
  .service-final-cta__body { padding: 34px 20px; }
  .service-final-cta__actions { flex-direction: column; width: 100%; }
  .service-final-cta__actions a { width: 100%; }
  .service-final-cta__benefits { align-items: flex-start; flex-direction: column; gap: 9px; }
  .service-final-cta__visual { height: 230px; }
}
@media (prefers-reduced-motion: reduce) {
  .service-v3-main *, .service-v3-main *::before, .service-v3-main *::after {
    transition: none !important; scroll-behavior: auto !important;
  }
}


/* ============================================================
   BOX EXPRESS — SERVIÇOS V3.2 | FASE 2
   Melhorias em ecrãs táteis, leitura e acessibilidade.
   Mantém o accordion horizontal do desktop.
   ============================================================ */

/* As instruções acompanham a apresentação real. */
.service-v3-help--cards { display: none !important; }
@media (max-width: 991.98px) {
  .service-v3-help--desktop { display: none !important; }
  .service-v3-help--cards { display: block !important; }
}

/* Transições somente no desktop com movimento permitido. */
@media (min-width: 992px) {
  .services-accordion.is-enhanced .service-panel { will-change: flex-grow; }
  .services-accordion.is-enhanced .service-panel__trigger { touch-action: manipulation; }
  .services-accordion.is-enhanced .service-panel.active .service-content {
    padding-right: clamp(56px, 6vw, 82px);
  }
  .services-accordion.is-enhanced .service-panel:not(.active) .service-panel__trigger:hover,
  .services-accordion.is-enhanced .service-panel:not(.active) .service-panel__trigger:focus-visible {
    background: rgba(14, 38, 67, .22);
  }
}

/* No tablet, a imagem passa a cabeçalho do cartão e o texto fica legível
   sobre branco. Reduz altura e facilita o toque nos botões. */
@media (max-width: 991.98px) {
  .services-accordion {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 18px;
  }
  .service-panel,
  .service-panel.active {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    border: 1px solid #dce6f2;
    background: #fff;
    box-shadow: 0 8px 24px rgba(27,53,99,.09);
    cursor: default;
  }
  .service-panel > img,
  .service-panel.active > img {
    display: block;
    position: relative;
    inset: auto;
    flex: 0 0 auto;
    width: 100%;
    height: 205px;
    object-fit: cover;
    transform: none;
  }
  .service-panel .service-overlay { display: none; }
  .service-panel .service-content,
  .service-panel.active .service-content {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    padding: 24px;
    background: #fff;
    color: #203858;
    justify-content: flex-start;
  }
  .service-panel .service-number {
    width: 38px;
    height: 38px;
    margin-bottom: 13px;
    border-color: #e4c05e;
    color: #1b3563;
    background: #fff2bc;
  }
  .service-panel .service-content h3 {
    margin-bottom: 12px;
    color: #1b3563;
    font-size: clamp(1.23rem, 2.6vw, 1.55rem);
  }
  .service-panel .service-content p {
    margin: 0 0 20px;
    color: #405570;
    font-size: .95rem;
    font-weight: 400;
    line-height: 1.72;
  }
  .service-panel .service-btn {
    display: inline-flex;
    margin-top: auto;
    min-height: 48px;
    color: #142e53;
    background: #f3cc1f;
    box-shadow: none;
    touch-action: manipulation;
  }
  .service-panel .service-btn:focus-visible { outline: 3px solid #1b3563; outline-offset: 3px; }
  .service-panel__trigger { display: none !important; }
}

/* Telemóvel: um cartão por linha e fotografia mais compacta. */
@media (max-width: 767.98px) {
  .services-accordion { grid-template-columns: minmax(0, 1fr); gap: 17px; }
  .service-panel > img,
  .service-panel.active > img { height: clamp(172px, 49vw, 225px); }
  .service-panel .service-content,
  .service-panel.active .service-content { padding: 22px 20px 23px; }
  .service-panel .service-btn { width: 100%; }
}

@media (max-width: 360px) {
  .service-panel > img,
  .service-panel.active > img { height: 168px; }
  .service-panel .service-content,
  .service-panel.active .service-content { padding: 20px 17px 21px; }
}

@media (prefers-reduced-motion: reduce) {
  .services-accordion .service-panel,
  .services-accordion .service-panel > img,
  .services-accordion .service-btn { transition: none !important; animation: none !important; }
}
@media (prefers-reduced-motion: reduce) and (min-width: 992px) {
  .services-accordion.is-enhanced .service-panel { will-change: auto; }
}


/* ============================================================
   BOX EXPRESS — SERVIÇOS V3.3 | ACABAMENTOS FINAIS
   O CSS continua isolado da navegação e rodapé globais.
   ============================================================ */

/* Âncoras sob a barra de navegação fixa: manter título visível. */
#services-v3-list { scroll-margin-top: 105px; }

/* Evitar que palavras longas ou traduções criem overflow. */
.service-v3-main .service-final-cta__body,
.service-v3-main .service-final-cta__actions,
.service-v3-main .service-v3-section-heading { min-width: 0; }
.service-v3-main .service-final-cta__body h2,
.service-v3-main .service-final-cta__body > p,
.service-v3-main .service-panel .service-content h3,
.service-v3-main .service-panel .service-content p { overflow-wrap: break-word; }

/* Foco mais claro no CTA e na área de serviços. */
.service-v3-main .service-final-cta__actions a:focus-visible,
.service-v3-main .service-panel .service-btn:focus-visible {
  outline: 3px solid #1b3563;
  outline-offset: 3px;
}

/* Não reservar permanentemente camadas de composição para todos os painéis. */
@media (min-width: 992px) {
  .services-accordion.is-enhanced .service-panel { will-change: auto; }
  .services-accordion.is-enhanced .service-panel:focus-within { box-shadow: 0 15px 38px rgba(27,53,99,.19); }
}

/* Em tablets pequenos, evitar CTA com imagem esmagada. */
@media (max-width: 991.98px) {
  .service-final-cta__visual img { object-position: center center; }
  .service-final-cta__benefits span { align-items: flex-start; }
}

@media (max-width: 575.98px) {
  #services-v3-list { scroll-margin-top: 80px; }
  .service-final-cta__card { max-width: 100%; }
  .service-final-cta__actions a { min-height: 50px; }
  .service-final-cta__visual { height: clamp(205px, 57vw, 245px); }
  .service-v3-main .service-panel .service-content p { line-height: 1.65; }
}