/* NGF: supermercados, obras selecionadas e depoimentos. */
:root {
  --ngf-market-navy: #07162d;
  --ngf-market-blue: #003890;
  --ngf-market-light: #9ed8ff;
  --ngf-market-ink: #111827;
  --ngf-market-muted: #526476;
}

section[id], main[id], footer[id] {
  scroll-margin-top: 100px;
}

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #1687d9;
  outline-offset: 5px;
}

[hidden] { display: none !important; }
.skip-link {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 2000;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  color: #fff;
  background: #07162d;
  border: 2px solid #9ed8ff;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 3px;
  transform: translateY(-200%);
}
.skip-link:focus, .skip-link:focus-visible { transform: translateY(0); }
.menu-toggle, .mobile-menu-toggle, .nav-toggle, button[aria-controls="mobile-menu"] {
  min-width: 44px;
  min-height: 44px;
}

.nav-market { color: #9ed8ff !important; }
.nav-market:hover { color: #fff !important; }

.hero-market-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  max-width: 100%;
  margin: 0 0 26px;
  padding: 9px 0;
  color: #a9ddff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: rgba(169, 221, 255, .45);
}
.hero-market-link:hover { color: #fff; text-decoration-color: currentColor; }

/* The supermarket card receives a full row of the existing services grid. */
.services-grid .supermarket-feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  align-items: stretch;
  min-width: 0;
  margin: 0 0 10px;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: var(--ngf-market-navy);
  border: 1px solid #238aca;
  border-radius: 18px;
  box-shadow: 0 16px 42px rgba(11, 32, 56, .13);
}
.supermarket-feature .feature-photo {
  position: relative;
  min-height: 380px;
  margin: 0;
  overflow: hidden;
}
.supermarket-feature .feature-photo img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  object-position: center;
}
.supermarket-feature .feature-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  padding: clamp(28px, 3.2vw, 48px);
}
.feature-label {
  display: inline-block;
  margin-bottom: 16px;
  color: #a9ddff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .1em;
}
.supermarket-feature .feature-copy h3 {
  max-width: 20ch;
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(28px, 2.7vw, 38px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.025em;
}
.supermarket-feature .feature-copy p {
  margin: 0 0 20px;
  color: #dbe7f1;
  font-size: 16px;
  line-height: 1.7;
}
.feature-services {
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.feature-services li {
  position: relative;
  margin: 0;
  padding-left: 22px;
  color: #e6eff7;
  font-size: 15px;
  line-height: 1.5;
}
.feature-services li::before {
  position: absolute;
  top: .48em;
  left: 1px;
  width: 7px;
  height: 7px;
  content: "";
  background: #70c5fc;
  border-radius: 50%;
}
.supermarket-feature .btn-light,
.market-hero .btn-light {
  min-height: 48px;
  color: #0b2038;
  background: #fff;
  border: 1px solid #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}
.supermarket-feature .btn-light:hover,
.market-hero .btn-light:hover { color: #0b2038; background: #e9f5ff; border-color: #e9f5ff; }
.supermarket-feature a:focus-visible,
.market-hero a:focus-visible { outline-color: #b6e3ff; }

/* All selected works have equal visual weight, with native links as fallback. */
.projects-grid.curated-gallery,
.projects-grid.market-gallery {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: auto;
}
.projects-grid.market-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.projects-grid.curated-gallery .project-card,
.projects-grid.market-gallery .project-card {
  position: relative;
  grid-column: auto;
  grid-row: auto;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  background: #0b2038;
  border-radius: 14px;
}
.projects-grid.curated-gallery .project-card::before,
.projects-grid.curated-gallery .project-card::after,
.projects-grid.market-gallery .project-card::before,
.projects-grid.market-gallery .project-card::after { content: none; }
.project-card .project-open {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
}
.project-card .project-open img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  transition: transform .35s ease;
}
.project-card .project-open::after {
  position: absolute;
  inset: 38% 0 0;
  content: "";
  background: linear-gradient(180deg, transparent 0%, rgba(5, 18, 30, .88) 100%);
  pointer-events: none;
}
.project-card .project-open figcaption,
.project-card > figcaption {
  position: absolute;
  z-index: 1;
  inset: auto 20px 20px;
  margin: 0;
  padding: 0;
  color: #fff;
  background: transparent;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  pointer-events: none;
}
.project-card .project-open figcaption span,
.project-card .project-open figcaption small,
.project-card > figcaption span,
.project-card > figcaption small {
  display: block;
  margin-top: 5px;
  color: #e2edf6;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}
.photo-zoom {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(11, 32, 56, .86);
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
}
.project-card .project-open:hover img { transform: scale(1.045); }
.project-card .project-open:focus-visible { outline-offset: -6px; outline-color: #b6e3ff; }

.photo-dialog {
  position: fixed;
  inset: 0;
  width: min(1120px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 56px 20px 20px;
  overflow: auto;
  color: #fff;
  background: #0b2038;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 16px;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .4);
}
.photo-dialog::backdrop { background: rgba(2, 12, 23, .9); }
.photo-dialog img {
  display: block;
  width: 100%;
  max-height: calc(100dvh - 170px);
  margin: 0 auto;
  object-fit: contain;
}
.photo-close {
  position: absolute;
  top: 8px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  color: #fff;
  background: transparent;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}
.photo-close:hover { background: rgba(255, 255, 255, .12); }
.photo-close:focus-visible { outline-color: #b6e3ff; outline-offset: -2px; }
.photo-dialog .photo-caption {
  margin: 16px 4px 0;
  color: #e4eff8;
  font-size: 15px;
  line-height: 1.5;
  text-align: center;
}
body.photo-view-open, body.photo-open { overflow: hidden; }

.reviews-section {
  color: var(--ngf-market-ink);
  background: #f4f7fb;
}
.review-kicker {
  display: inline-block;
  margin: 0 0 12px;
  color: #17659a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 22px;
}
.review-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 28px;
  color: var(--ngf-market-ink);
  background: #fff;
  border: 1px solid #dce6ee;
  border-radius: 14px;
  box-shadow: 0 7px 24px rgba(11, 32, 56, .035);
}
.review-header { display: flex; align-items: center; gap: 12px; }
.review-avatar {
  display: flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: #275575;
  border-radius: 50%;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
}
.review-card:nth-child(2) .review-avatar { background: #765242; }
.review-card:nth-child(3) .review-avatar { background: #555ba3; }
.review-name {
  display: block;
  margin: 0 0 3px;
  color: #172d43;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}
.review-source { margin: 0; color: #526476; font-size: 14px; line-height: 1.5; }
.review-stars {
  margin: 20px 0 14px;
  color: #936300;
  font-size: 20px;
  line-height: 1;
  letter-spacing: 2px;
}
.review-card blockquote {
  margin: 0;
  padding: 0;
  color: #243b50;
  border: 0;
  font-size: 16px;
  font-weight: 400;
  font-style: normal;
  line-height: 1.75;
}
.review-card blockquote p { margin: 0; font-size: inherit; line-height: inherit; }
.review-excerpt { margin: 16px 0 0; color: #526476; font-size: 14px; line-height: 1.5; }

/* Dedicated supermarket page, retaining the existing NGF visual language. */
.market-hero { overflow: hidden; }
.market-hero .hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 4vw, 64px);
}
.market-hero .hero-copy { min-width: 0; }
.market-hero .hero-copy h1 { font-size: clamp(36px, 4.1vw, 58px); line-height: 1.09; }
.market-hero .hero-sub { max-width: 57ch; font-size: 17px; line-height: 1.7; }
.market-hero .feature-label { color: #a9ddff; }
.market-hero-photo {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(158, 216, 255, .28);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .24);
}
figure.market-hero-photo { background: #0b2038; }
.market-hero-photo img, img.market-hero-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  object-position: center;
}
.market-hero-photo figcaption {
  padding: 14px 18px;
  color: #e4eff8;
  background: #0b2038;
  font-size: 14px;
  line-height: 1.5;
}
.services-grid.market-services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}
.market-services .service-card { min-width: 0; height: auto; }
.market-services .service-card p,
.market-services .service-card li { font-size: 16px; line-height: 1.7; }
.process-grid.market-process {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 24px;
}
.market-process > * { min-width: 0; }
.market-process p { font-size: 16px; line-height: 1.7; }
.market-intro { max-width: 760px; font-size: 17px; line-height: 1.75; }
.market-note { max-width: 780px; margin-top: 24px; color: #526476; font-size: 15px; line-height: 1.65; }
.contact-form[data-segment="supermercados"] label { grid-column: auto; }
.contact-form[data-segment="supermercados"] label:nth-of-type(n+5) { grid-column: 1 / -1; }
.contact-form .form-status, .contact-form noscript {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
}
.contact-form noscript { display: block; }
.form-status a {
  color: #003890;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Content is readable even if JavaScript is unavailable. */
.reveal { opacity: 1; transform: none; }
body.js-motion .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s ease, transform .6s ease;
}
body.js-motion .reveal.visible,
body.js-motion .reveal.is-visible,
body.js-motion .reveal.in-view { opacity: 1; transform: none; }

@media (min-width: 1001px) and (max-width: 1180px) {
  .desktop-nav { gap: 18px; }
  .nav { gap: 22px; }
}

@media (max-width: 1000px) {
  .reviews-grid { gap: 16px; }
  .review-card { padding: 24px 20px; }
  .projects-grid.curated-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supermarket-feature .feature-copy { padding: 30px; }
  .market-hero .hero-layout { gap: 28px; }
  .market-hero .hero-copy h1 { font-size: clamp(36px, 4.5vw, 46px); }
}

@media (max-width: 760px) {
  section[id], main[id], footer[id] { scroll-margin-top: 84px; }
  .hero-market-link { margin-bottom: 22px; font-size: 15px; }
  .services-grid .supermarket-feature { grid-template-columns: minmax(0, 1fr); border-radius: 14px; }
  .supermarket-feature .feature-photo,
  .supermarket-feature .feature-photo img { min-height: 0; height: 240px; }
  .supermarket-feature .feature-copy { padding: 30px 26px; }
  .supermarket-feature .feature-copy h3 { max-width: 26ch; font-size: 30px; }
  .feature-label { margin-bottom: 13px; font-size: 14px; letter-spacing: .065em; }
  .reviews-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .review-card { padding: 26px; }
  .market-hero .hero-layout { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .market-hero .hero-copy h1 { max-width: 20ch; font-size: clamp(34px, 7.1vw, 46px); }
  .market-hero-photo img, img.market-hero-photo { aspect-ratio: 16 / 10; }
  .services-grid.market-services { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .process-grid.market-process { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .projects-grid.curated-gallery, .projects-grid.market-gallery { gap: 16px; }
  .project-card .project-open figcaption, .project-card > figcaption { inset: auto 16px 16px; font-size: 14px; }
  .project-card .project-open figcaption span, .project-card .project-open figcaption small,
  .project-card > figcaption span, .project-card > figcaption small { font-size: 12px; }
  .photo-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 54px 12px 18px; border-radius: 12px; }
  .photo-dialog img { max-height: calc(100dvh - 154px); }
}

@media (max-width: 520px) {
  .projects-grid.curated-gallery, .projects-grid.market-gallery { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .project-card .project-open { aspect-ratio: 4 / 3; }
  .project-card .project-open figcaption, .project-card > figcaption { inset: auto 20px 20px; font-size: 14px; }
  .supermarket-feature .feature-photo,
  .supermarket-feature .feature-photo img { height: 225px; }
  .supermarket-feature .feature-copy { padding: 28px 22px; }
  .supermarket-feature .feature-copy h3 { font-size: 28px; }
  .supermarket-feature .btn-light { width: 100%; justify-content: center; white-space: normal; }
  .feature-services { margin-bottom: 24px; }
  .review-card { padding: 24px; }
  .market-hero .hero-sub { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  .reveal, body.js-motion .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .project-card .project-open img { transition: none; }
  .project-card .project-open:hover img { transform: none; }
}
