/* Shared photo opening for Empresa and Ambiente; other page headers are untouched. */
body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade) {
  --interior-admin-offset: 0px;
  --interior-header-height: 95px;
}
body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade).admin-bar { --interior-admin-offset: 32px; }

body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade) .site-header {
  position: fixed;
  inset: var(--interior-admin-offset) 0 auto;
  width: 100%;
  background: linear-gradient(180deg, #0b1414d9, #0b141465 74%, #0b141400);
  border-bottom-color: transparent;
  backdrop-filter: none;
  box-shadow: none;
}
body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade) .site-header.motion-header-scrolled,
body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade) .site-header.motion-menu-is-open {
  background: #101710fc;
  border-bottom-color: #cfb18b45;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 28px #00000030;
}
body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade) .header-inner { min-height: var(--interior-header-height); }
body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade) .site-header .navigation > a { text-shadow: 0 1px 8px #000000a6; }

.interior-photo-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 520px;
  min-height: calc(100svh - var(--interior-admin-offset, 0px));
  padding-block: calc(var(--interior-header-height, 95px) + 36px) 22px;
  background: #161d17;
  color: #f2f0e9;
}
.interior-photo-hero > img {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--interior-photo-position, center 52%);
}
.interior-photo-shade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: linear-gradient(180deg, #07100b42, #07100b26 50%, #07100b8c), radial-gradient(ellipse at 50% 48%, #08110ca6, #08110c25 85%);
  pointer-events: none;
}
.interior-photo-copy {
  flex: 0 0 auto;
  max-width: 1050px;
  margin-block: auto;
  padding-block: 24px 32px;
  text-align: center;
}
.interior-photo-copy h1 {
  margin: 0 0 22px;
  font-size: 72px;
  font-weight: 400;
  line-height: 1.07;
  letter-spacing: -.04em;
  text-wrap: balance;
  text-shadow: 0 2px 18px #00000040;
}
.interior-breadcrumb { display:flex; justify-content:center; align-items:center; gap:10px; min-height:44px; margin-bottom:12px; color:#e7e8df; font-size:11px; line-height:1.5; letter-spacing:.05em; }
.interior-breadcrumb a { display:inline-flex; align-items:center; min-height:44px; }
.interior-photo-copy > p {
  max-width: 690px;
  margin: 0 auto;
  color: #e7e8df;
  font-size: 20px;
  line-height: 1.65;
  text-wrap: pretty;
  text-shadow: 0 1px 12px #00000075;
}
.interior-photo-next {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  margin-top: 12px;
  border: 1px solid #ffffff50;
  background: #10171045;
  color: #f2f0e9;
  font-size: 25px;
  line-height: 1;
  transition: background-color 200ms ease, border-color 200ms ease;
}
.interior-photo-next:hover { background: #101710b3; border-color: #cfb18b; }
.interior-photo-next:focus-visible { outline: 2px solid #ead2b2; outline-offset: 5px; }
.interior-photo-hero--environment { --interior-photo-position: 65% 54%; min-height: clamp(560px, 70svh, 700px); }

.interior-topic-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding-block: 30px 44px;
}
.interior-topic-nav > a {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-content: start;
  gap: 10px 12px;
  min-width: 0;
  min-height: 116px;
  padding: 14px 24px 18px;
  border-right: 1px solid #ffffff26;
  border-bottom: 1px solid #ffffff26;
  transition: background-color 200ms ease, border-color 200ms ease;
}
.interior-topic-nav > a:first-child { padding-left: 0; }
.interior-topic-nav > a:last-child { border-right: 0; }
.interior-topic-number {
  grid-column: 1 / -1;
  color: #cfb18b;
  font-size: 12px;
  line-height: 1.6;
}
.interior-topic-title { font-size: 15px; font-weight: 500; line-height: 1.55; }
.interior-topic-arrow { justify-self: end; align-self: end; color: #cfb18b; font-size: 21px; line-height: 1.1; }
.interior-topic-nav > a:hover { background: #cfb18b08; border-bottom-color: #cfb18b; }
.interior-topic-nav > a:focus-visible { outline: 2px solid #ead2b2; outline-offset: -3px; }
/* The base html already reserves 110px (96px mobile) for anchors. */
body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade) main [id] { scroll-margin-top: var(--interior-admin-offset); }

@media (max-width: 950px) {
  body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade) { --interior-header-height: 82px; }
  body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade) .site-header .navigation {
    max-height: calc(100vh - var(--interior-header-height) - var(--interior-admin-offset));
    max-height: calc(100svh - var(--interior-header-height) - var(--interior-admin-offset));
  }
  .interior-photo-copy h1 { font-size: 60px; }
  .interior-topic-nav > a { padding-inline: 18px; }
}
@media (max-width: 782px) {
  body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade).admin-bar { --interior-admin-offset: 46px; }
}
@media (max-width: 700px) {
  .interior-topic-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 22px 32px; }
  .interior-topic-nav > a { min-height: 116px; padding: 16px 18px; }
  .interior-topic-nav > a:first-child { padding-left: 18px; }
  .interior-topic-nav > a:nth-child(even) { border-right: 0; }
}
@media (max-width: 650px) {
  body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade) { --interior-header-height: 78px; }
  .interior-photo-hero { min-height: 400px; padding-block: calc(var(--interior-header-height) + 20px) 18px; }
  .interior-photo-copy { padding-block: 18px 22px; }
  .interior-photo-copy h1 { font-size: clamp(32px, 10vw, 40px); line-height: 1.08; margin-bottom: 18px; }
  .interior-photo-copy > p { max-width: 440px; font-size: 16px; line-height: 1.55; }
  .interior-photo-hero--environment { --interior-photo-position: 74% center; min-height: 400px; }
  .interior-photo-next { margin-top: 8px; }
  .interior-topic-title { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .interior-photo-next,
  .interior-topic-nav > a { transition: none; }
}
@media (forced-colors: active) {
  body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade) .site-header,
  body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade) .site-header.motion-header-scrolled,
  body:is(.page-empresa, .page-ambiente, .page-produtos, .page-producao, .page-noticias, .page-contactos, .page-sustentabilidade) .site-header.motion-menu-is-open { background: Canvas; border-bottom-color: CanvasText; }
  .interior-photo-shade { background: Canvas; }
  .interior-photo-copy h1,
  .interior-photo-copy > p { text-shadow: none; }
  .interior-photo-next { color: LinkText; border-color: LinkText; }
}

@media (min-width:951px) and (max-width:1100px) { .site-header .navigation { gap:18px; } }

/* Integrate the inverted logo background with one uniform navigation band. */
body[class] .site-header,
body[class] .site-header:is(.motion-header-scrolled, .motion-menu-is-open) {
  background: #000;
  backdrop-filter: none;
  border-bottom-color: #ffffff26;
}
@media (forced-colors: active) {
  body[class] .site-header,
  body[class] .site-header:is(.motion-header-scrolled, .motion-menu-is-open) {
    background: Canvas;
    border-bottom-color: CanvasText;
  }
}
