/* Services extends the Home's tokens, type, buttons, header and footer. */
.services-page { background: #fff; }
.services-page .svc-hero { padding-top: clamp(88px, 9vw, 145px); }
.svc-hero-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 30px; margin-top: clamp(34px, 5vw, 70px); align-items: end; }
.svc-hero h1 { max-width: 1050px; color: var(--green); font-size: clamp(46px, 7vw, 100px); line-height: 1.01; overflow-wrap: anywhere; }
.svc-hero h1 em { color: var(--beige-ink); }
.svc-hero-grid p { max-width: 470px; color: #425246; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.65; }
.svc-hero-photo { position: relative; width: min(calc(100% - var(--gutter) * 2), 1500px); height: clamp(360px, 45vw, 650px); margin: clamp(55px, 7vw, 95px) auto 0; overflow: hidden; border-radius: var(--radius-md) var(--radius-md) 46px var(--radius-md); background: var(--green); }
.svc-hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 54%; }
.svc-hero-photo::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent,rgba(0,0,0,.38)); pointer-events: none; }
.svc-hero-photo figcaption { position: absolute; z-index: 1; bottom: 22px; left: clamp(20px,4vw,55px); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .13em; }

.svc-explore { position: relative; padding-top: clamp(90px, 10vw, 150px); background: #fff; }
.svc-layout { display: grid; grid-template-columns: minmax(0,1fr); }
.svc-sidebar { display: none; }
.svc-articles { min-width: 0; }
.svc-entry { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; padding: clamp(72px, 8vw, 118px) 0 clamp(84px, 9vw, 145px); border-top: 1px solid var(--line); scroll-margin-top: 165px; }
.svc-entry:first-child { padding-top: 0; border-top: 0; }
.svc-entry-head { min-width: 0; }
.svc-entry-rule { display: block; width: 74px; height: 2px; margin-bottom: clamp(28px, 3vw, 43px); background: var(--orange); }
.svc-entry h2 { max-width: 960px; color: var(--green); font-size: clamp(40px, 5.2vw, 69px); line-height: 1.07; overflow-wrap: anywhere; }
.svc-intro { width: min(100%, 720px); max-width: 720px; margin-top: clamp(24px, 3.3vw, 43px); color: #43544a; font-size: clamp(15px, 1.22vw, 17px); line-height: 1.76; }
.svc-intro p + p { margin-top: 1.15em; }
.svc-photo { position: relative; height: clamp(310px, 41vw, 530px); margin: clamp(38px, 5vw, 64px) 0 0; background: #e5e9e1; }
.svc-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .65s ease; }
.svc-photo:hover img { transform: scale(1.018); }
.svc-photo figcaption { position: absolute; left: 18px; bottom: 17px; padding: 8px 10px; border-radius: 4px; background: rgba(4,21,9,.79); color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .095em; line-height: 1.45; }
.svc-portrait .svc-photo img { object-position: center 80%; }
.svc-cave .svc-photo { height: clamp(370px, 45vw, 590px); background: var(--green); }
.svc-cave .svc-photo img { object-position: center 55%; }
.svc-recovery .svc-photo { height: auto; background: #fff; }
.svc-recovery .svc-photo img { height: auto; object-fit: contain; }
.svc-recovery .svc-photo figcaption { position: static; display: inline-block; margin-top: 8px; padding: 0; background: none; color: #59645a; }

.svc-specialties { min-width: 0; margin-top: clamp(48px, 6vw, 85px); }
.svc-specialties > .section-label { margin-bottom: 28px; }
.svc-accordion { border-top: 1px solid #d4ddd2; }
.svc-accordion:last-child { border-bottom: 1px solid #d4ddd2; }
.svc-accordion h3 { margin: 0; font-family: var(--display); }
.svc-accordion-trigger { display: flex; justify-content: space-between; align-items: center; gap: 22px; width: 100%; min-height: 72px; padding: 21px 2px; border: 0; background: transparent; color: var(--green); text-align: left; cursor: pointer; font-family: var(--display); font-size: clamp(18px, 1.7vw, 24px); font-weight: 500; letter-spacing: -.05em; line-height: 1.25; transition: color .25s ease; }
.svc-accordion-trigger:hover { color: var(--orange-ink); }
.svc-accordion-icon { position: relative; flex: 0 0 22px; width: 22px; height: 22px; transition: transform .28s ease; }
.svc-accordion-icon::before, .svc-accordion-icon::after { content: ""; position: absolute; top: 10px; left: 3px; width: 16px; height: 2px; background: var(--orange); }
.svc-accordion-icon::after { transform: rotate(90deg); }
.svc-accordion.is-open .svc-accordion-icon { transform: rotate(45deg); }
.svc-accordion-panel { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .36s ease, opacity .3s ease; }
.svc-accordion.is-open .svc-accordion-panel { opacity: 1; }
.svc-accordion-inner { max-width: 70ch; padding: 2px 10px 32px 2px; color: #46564b; font-size: clamp(15px, 1.2vw, 17px); line-height: 1.76; }
.svc-technical-list { display: grid; gap: 9px; margin: 22px 0 0; padding-left: 21px; }
.svc-technical-list li::marker { color: var(--orange-ink); }

.svc-mobile-index { position: sticky; z-index: 42; top: 76px; margin: -22px 0 42px; background: #fff; border-block: 1px solid #e7ece5; box-shadow: 0 10px 24px rgba(7,56,19,.045); }
.svc-mobile-index-inner { position: relative; display: flex; align-items: center; gap: 12px; min-height: 69px; }
.svc-mobile-label, .svc-sidebar-label { color: var(--beige-ink); font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.svc-selector { display: flex; align-items: center; justify-content: space-between; gap: 15px; min-width: 0; flex: 1; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--green); font-size: 12px; font-weight: 700; text-align: left; cursor: pointer; }
.svc-selector-current { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-selector > span:last-child { flex: 0 0 auto; color: var(--orange-ink); font-size: 21px; line-height: .5; transition: transform .25s ease; }
.svc-selector[aria-expanded="true"] > span:last-child { transform: rotate(180deg); }
.svc-selector-panel { position: absolute; top: calc(100% - 2px); left: 0; right: 0; max-height: min(62vh, 500px); overflow-y: auto; padding: 12px; border: 1px solid var(--line); border-radius: 0 0 var(--radius-md) var(--radius-md); background: #fff; box-shadow: 0 20px 30px rgba(7,56,19,.14); }
.svc-selector-panel .svc-nav-item { display: block; width: 100%; min-height: 47px; padding: 12px 10px; border: 0; border-bottom: 1px solid #ebeee8; background: transparent; color: #3d5041; text-align: left; font-size: 13px; cursor: pointer; }
.svc-selector-panel .svc-nav-item:last-child { border-bottom: 0; }
.svc-selector-panel .svc-nav-item.is-active { color: var(--green); font-weight: 700; }
.svc-selector-panel .svc-nav-item:hover { color: var(--orange-ink); }

.svc-final-contact { padding-block: clamp(90px, 10vw, 150px); background: var(--green); color: #fff; }
.svc-final-contact h2 { max-width: 1150px; margin-top: clamp(40px, 5vw, 75px); font-size: clamp(44px, 6vw, 84px); line-height: 1.07; }
.svc-final-contact h2 em { color: #d2bb91; }
.svc-final-contact-row { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; margin-top: clamp(40px, 5vw, 75px); }
.svc-final-contact-row p { max-width: 450px; color: #d6e5d7; font-size: 17px; line-height: 1.65; }
.svc-final-contact-row .button { min-width: min(100%, 265px); }

@media (min-width: 700px) {
  .svc-hero-grid { grid-template-columns: minmax(0,1.5fr) minmax(0,.5fr); gap: 60px; }
  .svc-final-contact-row { flex-direction: row; justify-content: space-between; align-items: end; }
}
@media (min-width: 1000px) {
  .svc-mobile-index { display: none; }
  .svc-layout { grid-template-columns: minmax(205px,24%) minmax(0,1fr); gap: clamp(48px,6vw,90px); }
  .svc-sidebar { display: block; }
  .svc-sidebar-inner { position: sticky; top: 112px; padding-bottom: 24px; }
  .svc-sidebar-label { display: block; margin: 0 0 25px 17px; }
  .svc-sidebar nav { display: grid; border-left: 1px solid #d5dfd4; }
  .svc-sidebar .svc-nav-item { position: relative; width: 100%; padding: 10px 14px 10px 17px; border: 0; background: none; color: #5b695e; text-align: left; cursor: pointer; font-family: var(--body); font-size: clamp(11px,.9vw,13px); line-height: 1.35; transition: color .2s ease, transform .2s ease; }
  .svc-sidebar .svc-nav-item:hover { color: var(--orange-ink); transform: translateX(2px); }
  .svc-sidebar .svc-nav-item.is-active { color: var(--green); font-weight: 700; }
  .svc-sidebar .svc-nav-item.is-active::before { content: ""; position: absolute; left: -2px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--orange); }
  .svc-entry { scroll-margin-top: 118px; }
  .svc-entry.svc-split { grid-template-columns: minmax(0,1fr) minmax(0,.86fr); column-gap: clamp(30px,4vw,65px); align-items: start; }
  .svc-split h2 { font-size: clamp(32px, 3.1vw, 47px); overflow-wrap: normal; hyphens: auto; }
  .svc-split .svc-entry-head { grid-column: 1; grid-row: 1; }
  .svc-split .svc-photo { grid-column: 2; grid-row: 1; height: clamp(340px,36vw,560px); margin-top: 0; }
  .svc-split.svc-reverse .svc-entry-head { grid-column: 2; }
  .svc-split.svc-reverse .svc-photo { grid-column: 1; }
  .svc-split .svc-specialties { grid-column: 1 / -1; }
  .svc-portrait .svc-photo { width: 82%; height: 440px; }
  .svc-portrait .svc-specialties { width: 82%; margin-left: auto; }
}
@media (max-width: 699px) {
  .svc-hero h1 { font-size: clamp(42px, 11vw, 58px); }
  .svc-hero-photo { height: 370px; }
  .svc-entry h2 { font-size: clamp(37px, 9.5vw, 52px); }
  .svc-photo { height: 300px; }
  .svc-cave .svc-photo { height: 350px; }
  .svc-portrait .svc-photo img { object-position: center 82%; }
}
@media (max-width: 359px) {
  .svc-mobile-label { font-size: 9px; }
  .svc-selector { font-size: 11px; padding-inline: 10px; }
  .svc-entry h2 { font-size: 35px; }
}
@media (prefers-reduced-motion: reduce) {
  .svc-photo img, .svc-accordion-panel, .svc-accordion-icon, .svc-sidebar .svc-nav-item { transition: none !important; }
}
.svc-motion-ready .svc-reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.svc-motion-ready .svc-reveal.svc-visible { opacity: 1; transform: none; }

/* Requested service-page visual corrections. */
.svc-entry h2,
.svc-split h2 { max-width: 960px; color: var(--green); font-size: clamp(32px, 3.1vw, 47px); font-weight: 500; line-height: 1.07; letter-spacing: -.065em; overflow-wrap: anywhere; }

.svc-photo,
.svc-cave .svc-photo,
.svc-portrait .svc-photo,
.svc-recovery .svc-photo,
.svc-split .svc-photo { width: 100%; height: auto; aspect-ratio: 16 / 9; background: var(--paper); }
.svc-photo img,
.svc-portrait .svc-photo img,
.svc-cave .svc-photo img,
.svc-recovery .svc-photo img { width: 100%; height: 100%; object-fit: contain; object-position: center; }
.svc-photo:hover img { transform: scale(1.006); }
.svc-recovery .svc-photo figcaption { position: absolute; left: 18px; bottom: 17px; margin: 0; padding: 8px 10px; background: rgba(4,21,9,.79); color: #fff; }
.svc-portrait .svc-specialties { width: 100%; margin-left: 0; }

.svc-explore { isolation: isolate; }
.svc-explore::before { content: ""; position: absolute; z-index: 0; inset: 0 0 auto; height: var(--svc-intro-height, 0); background: var(--green); pointer-events: none; }
.svc-explore > * { position: relative; z-index: 1; }
.svc-entry:first-child { position: relative; color: #fff; }
.svc-entry:first-child h2 { color: #fff; }
.svc-entry:first-child .svc-intro,
.svc-entry:first-child .svc-accordion-inner { color: #dde9df; }
.svc-entry:first-child .section-label { color: #d7e5d9; }
.svc-entry:first-child .svc-accordion { border-color: rgba(255,255,255,.28); }
.svc-entry:first-child .svc-accordion-trigger { color: #fff; }
.svc-entry:first-child .svc-accordion-trigger:hover { color: #f4c49f; }

.svc-explore.is-intro-active .svc-sidebar-label { color: #d9c69f; }
.svc-explore.is-intro-active .svc-sidebar nav { border-color: rgba(255,255,255,.28); }
.svc-explore.is-intro-active .svc-sidebar .svc-nav-item { color: #d8e5da; }
.svc-explore.is-intro-active .svc-sidebar .svc-nav-item:hover,
.svc-explore.is-intro-active .svc-sidebar .svc-nav-item.is-active { color: #fff; }
.svc-explore.is-intro-active .svc-mobile-index { background: var(--green); border-color: rgba(255,255,255,.25); }
.svc-explore.is-intro-active .svc-mobile-label { color: #d9c69f; }
.svc-explore.is-intro-active .svc-selector { border-color: rgba(255,255,255,.32); background: #0b4619; color: #fff; }

.svc-accordion-icon::before,
.svc-accordion-icon::after { height: 3px; }
.svc-selector > span:last-child { font-weight: 800; }

@media (max-width: 699px) {
  .svc-entry h2,
  .svc-split h2 { font-size: clamp(32px, 8.7vw, 42px); line-height: 1.08; }
  .svc-photo,
  .svc-cave .svc-photo,
  .svc-portrait .svc-photo,
  .svc-recovery .svc-photo { height: auto; aspect-ratio: 16 / 9; }
}

/* Preserve each service photo's original orientation and add breathing room
   between the opening photograph and the green services area. */
.svc-hero { padding-bottom: clamp(42px, 5.5vw, 82px); }

.svc-photo,
.svc-cave .svc-photo,
.svc-portrait .svc-photo,
.svc-recovery .svc-photo,
.svc-split .svc-photo {
  height: auto;
  aspect-ratio: auto;
  background: transparent;
}

.svc-photo img,
.svc-portrait .svc-photo img,
.svc-cave .svc-photo img,
.svc-recovery .svc-photo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

.svc-entry .svc-photo--portrait {
  width: min(68%, 520px);
  margin-inline: auto;
}

@media (max-width: 699px) {
  .svc-entry .svc-photo--portrait { width: min(82%, 390px); }
}

/* Show one service at a time; the index works as a service switcher. */
.svc-entry[hidden] { display: none !important; }
.svc-entry.is-active { display: grid; }

/* Every selected service uses the same institutional green treatment. */
.svc-explore::before { height: 100%; }
.svc-entry.is-active { color: #fff; border-color: rgba(255,255,255,.28); }
.svc-entry.is-active h2 { color: #fff; }
.svc-entry.is-active .svc-intro,
.svc-entry.is-active .svc-accordion-inner { color: #dde9df; }
.svc-entry.is-active .section-label { color: #d7e5d9; }
.svc-entry.is-active .svc-accordion { border-color: rgba(255,255,255,.28); }
.svc-entry.is-active .svc-accordion-trigger { color: #fff; }
.svc-entry.is-active .svc-accordion-trigger:hover { color: #f4c49f; }

/* A consistent medium image area that preserves each source proportion. */
.svc-entry .svc-photo,
.svc-entry.svc-cave .svc-photo,
.svc-entry.svc-portrait .svc-photo,
.svc-entry.svc-recovery .svc-photo,
.svc-entry.svc-split .svc-photo {
  width: min(100%, 720px);
  height: auto;
  max-height: none;
  margin-inline: auto;
  aspect-ratio: auto;
}

.svc-entry .svc-photo img,
.svc-entry.svc-portrait .svc-photo img,
.svc-entry.svc-cave .svc-photo img,
.svc-entry.svc-recovery .svc-photo img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  object-position: center;
}

.svc-entry .svc-photo--portrait { width: min(100%, 320px); }

@media (max-width: 699px) {
  .svc-entry .svc-photo,
  .svc-entry.svc-cave .svc-photo,
  .svc-entry.svc-recovery .svc-photo,
  .svc-entry.svc-split .svc-photo { width: 100%; }
  .svc-entry .svc-photo--portrait { width: min(82%, 320px); }
}

/* Match every horizontal photograph to the Recovery service's 8:5 frame. */
.svc-entry .svc-photo:not(.svc-photo--portrait) {
  width: min(100%, 720px);
  margin-left: 0;
  margin-right: auto;
  aspect-ratio: 8 / 5;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  border-radius: 22px 22px 44px 22px;
  background: var(--green);
}

.svc-entry .svc-photo:not(.svc-photo--portrait) img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: left center;
  border-radius: 22px 22px 44px 22px;
  clip-path: inset(0 round 22px 22px 44px 22px);
}

/* Keep the first source vertical, at a medium size, with clearly rounded edges. */
.svc-entry .svc-photo--portrait {
  width: min(100%, 300px);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-radius: 32px 32px 48px 32px;
  clip-path: inset(0 round 32px 32px 48px 32px);
  background: var(--green);
}

.svc-entry .svc-photo--portrait.svc-photo--aligned {
  margin-left: 0;
  margin-right: auto;
}

.svc-entry .svc-photo--portrait img {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  object-position: center;
  border-radius: 32px 32px 48px 32px;
  clip-path: inset(0 round 32px 32px 48px 32px);
}

@media (min-width: 1000px) {
  .svc-entry.svc-split { grid-template-columns: minmax(0, 1fr); }
  .svc-split .svc-entry-head,
  .svc-split.svc-reverse .svc-entry-head,
  .svc-split .svc-photo,
  .svc-split.svc-reverse .svc-photo,
  .svc-split .svc-specialties {
    grid-column: 1;
    grid-row: auto;
  }
  .svc-split .svc-photo,
  .svc-split.svc-reverse .svc-photo { margin-top: clamp(38px, 5vw, 64px); }

  .svc-entry.svc-portrait.is-active {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    column-gap: clamp(48px, 6vw, 90px);
    align-items: start;
  }
  .svc-portrait .svc-entry-head { grid-column: 1; grid-row: 1; }
  .svc-portrait .svc-photo--portrait {
    grid-column: 2;
    grid-row: 1;
    width: 300px;
    max-width: 100%;
    margin: 0 0 0 auto;
  }
  .svc-portrait .svc-specialties { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 699px) {
  .svc-entry .svc-photo--portrait { width: min(78%, 300px); }
}

/* Mobile service picker: compact, readable and always above the content. */
@media (max-width: 999px) {
  .svc-explore { padding-top: 16px; }
  .svc-explore > .svc-mobile-index {
    z-index: 60;
    top: 74px;
    margin: 0 0 72px;
    border-block: 1px solid rgba(255,255,255,.2);
    background: var(--green);
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
  }
  .svc-mobile-index-inner {
    display: grid;
    grid-template-columns: minmax(0,1fr);
    align-items: stretch;
    gap: 9px;
    min-height: 0;
    padding-block: 14px;
  }
  .svc-mobile-label {
    color: #d9c69f;
    font-size: 11px;
    line-height: 1.2;
  }
  .svc-selector {
    width: 100%;
    min-height: 52px;
    padding: 14px 16px;
    border-color: rgba(255,255,255,.38);
    border-radius: 10px;
    background: #0b4619;
    color: #fff;
    font-size: 14px;
    line-height: 1.35;
  }
  .svc-selector-current {
    text-overflow: clip;
    white-space: normal;
  }
  .svc-selector > span:last-child {
    color: var(--orange);
    font-size: 24px;
  }
  .svc-selector-panel {
    z-index: 70;
    top: calc(100% - 14px);
    max-height: min(58vh, 470px);
    padding: 8px;
    border: 1px solid #d7dfd5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 42px rgba(0,0,0,.24);
  }
  .svc-selector-panel .svc-nav-item {
    min-height: 52px;
    padding: 14px 13px;
    border-bottom-color: #e3e8e1;
    color: #213d28;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
  }
  .svc-selector-panel .svc-nav-item.is-active {
    border-radius: 8px;
    background: #edf3ed;
    color: var(--green);
    font-weight: 700;
  }
  .svc-selector-panel .svc-nav-item:hover { background: #f4f6f2; }
}

/* Explicit finish for the Estudos Ambientais em UC's portrait. */
.svc-entry .svc-photo--portrait {
  box-sizing: border-box;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,.32);
  border-radius: 42px !important;
  clip-path: inset(0 round 42px) !important;
  isolation: isolate;
}

.svc-entry .svc-photo--portrait img {
  border-radius: 40px !important;
  clip-path: inset(0 round 40px) !important;
}

.svc-entry.svc-portrait .svc-photo.svc-photo--portrait {
  width: min(100%, 300px);
  height: auto;
  aspect-ratio: 2 / 3;
}

.svc-entry.svc-portrait .svc-photo.svc-photo--portrait img {
  width: 100%;
  height: 100%;
  max-height: none;
}

@media (max-width: 699px) {
  .svc-entry.svc-portrait .svc-photo.svc-photo--portrait {
    width: min(78%, 300px);
  }
}

/* Levantamentos uses the same compact portrait dimensions as Estudos Ambientais. */
.svc-entry.svc-split .svc-photo.svc-photo--portrait.svc-photo--aligned {
  width: min(100%, 300px);
  height: auto;
  aspect-ratio: 2 / 3;
  margin-left: 0;
  margin-right: auto;
}

.svc-entry.svc-split .svc-photo.svc-photo--portrait.svc-photo--aligned img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center 68%;
  transform: scale(1.12);
  transform-origin: center 68%;
}

.svc-entry.svc-split .svc-photo.svc-photo--portrait.svc-photo--aligned:hover img {
  transform: scale(1.14);
}

@media (max-width: 699px) {
  .svc-entry.svc-split .svc-photo.svc-photo--portrait.svc-photo--aligned {
    width: min(78%, 300px);
  }
}
