/* ============================================
   ENVI Portal — Inner Pages Modern Styles
   Shared by envi.ejs and suporte.ejs
   ============================================ */

:root {
  --c-primary:   #0B3D91;
  --c-secondary: #2BAE66;
  --c-dark:      #0D1117;
  --c-dark2:     #1A2436;
  --c-text:      #2D3748;
  --c-muted:     #718096;
  --c-light:     #F7F9FC;
  --c-white:     #FFFFFF;
  --c-border:    #E2E8F0;
  --radius:      10px;
  --shadow:      0 4px 20px rgba(0,0,0,.10);
  --shadow-lg:   0 8px 40px rgba(0,0,0,.18);
  --transition:  0.25s ease;
}

/* ---- Base overrides (envi_styles.css sets body + section) ---- */

body {
  background: var(--c-white);
  display: block;
  align-items: unset;
  justify-content: unset;
}

section {
  max-width: 100%;
  width: 100%;
  padding: 5rem 2rem;
  margin: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* #s4 na página envi: sobresôme a altura fixa do styles.css */
#s4 {
  height: auto !important;
  max-width: 100% !important;
}

#s4 .wrapper { min-height: 640px; }

/* ======================================================
   HERO (#conheca)
   ====================================================== */

/* #conheca volta ao estilo hero padrão com overlay */
#conheca {
  position: relative;
  padding: 6rem 2rem 4rem;
  max-width: none !important;
  width: 100%;
}

#conheca::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(155deg, rgba(11,61,145,.80) 0%, rgba(13,17,23,.88) 65%);
  z-index: 0;
}

#conheca > * { position: relative; z-index: 1; }

.hero-content {
  display: flex;
  flex-direction: column !important;  /* anula envi_styles.css @media que vira row */
  align-items: center;
  text-align: center;
  gap: .75rem;
  width: 100% !important;
}

.hero-content .support-visual { margin-top: 1.75rem; }

#conheca h1 {
  font-size: clamp(2.5rem, 7vw, 5rem) !important;
  font-weight: 700 !important;
  color: var(--c-white) !important;
  font-family: 'Inter', 'IBM Plex Sans', sans-serif !important;
  padding-bottom: 0.75rem !important;
  text-shadow: 0 2px 20px rgba(0,0,0,.45);
  margin: 0;
}

.hero-content > p:first-of-type,
#conheca > p:first-of-type {
  font-size: clamp(.95rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.72);
  max-width: 680px;
  margin-bottom: 1.5rem;
  font-weight: 400;
  letter-spacing: .02em;
}

#conheca .lead {
  max-width: 760px;
  color: rgba(255,255,255,.82);
  font-size: 1.02rem;
  line-height: 1.82;
  font-weight: 300;
  margin-bottom: .25rem;
}

#conheca > div,
.hero-content > div {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
  margin-top: 1.75rem;
}

/* ======================================================
   BUTTONS
   ====================================================== */

.button-5 {
  background-color: var(--c-secondary) !important;
  border-radius: 8px !important;
  padding: .65rem 1.4rem !important;
  font-size: .9rem !important;
  font-weight: 600 !important;
  min-height: unset !important;
  margin: 4px !important;
  box-shadow: none !important;
  transition: background var(--transition), transform var(--transition),
    box-shadow var(--transition) !important;
}

.button-5:hover,
.button-5:focus {
  background-color: #1f9952 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 4px 14px rgba(0,0,0,.2) !important;
}

.button-5:active {
  background-color: #187840 !important;
  transform: translateY(0) !important;
}

/* ======================================================
   FUNCIONALIDADES
   ====================================================== */

#funcionalidades {
  position: relative;
  max-width: 100%;
  border-radius: 0;
  padding: 5rem 2rem;
  overflow: hidden;
}

#funcionalidades::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.56);
  z-index: 0;
}

#funcionalidades > * { position: relative; z-index: 1; }

#funcionalidades h2 {
  font-size: clamp(1.6rem, 4vw, 2.4rem) !important;
  color: var(--c-white) !important;
  font-family: 'Inter', 'IBM Plex Sans', sans-serif !important;
  font-weight: 700 !important;
  padding-bottom: 1rem !important;
  text-align: center;
}

#funcionalidades > p {
  max-width: 780px;
  color: rgba(255,255,255,.82);
  text-align: center;
  font-size: 1rem;
  line-height: 1.75;
  padding-bottom: 2rem !important;
}

/* grid of feature rows */
#funcionalidades > div:not(:last-child) {
  width: 100%;
  max-width: 960px;
  flex-direction: column;
  display: flex;
  gap: .5rem;
}

.funcionalidades-upper,
.funcionalidades-lower {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
  justify-content: unset;
}

.funcionalidades-upper div,
.funcionalidades-lower div {
  max-width: unset;
  width: auto;        /* anula width: 100vw do envi_styles.css */
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  padding: 1.25rem;
}

#funcionalidades p {
  font-size: .88rem !important;
  color: rgba(255,255,255,.82) !important;
  padding-bottom: .4rem !important;
  text-align: left;
  line-height: 1.6;
}

#funcionalidades i {
  color: var(--c-secondary) !important;
  margin-right: 6px;
}

#funcionalidades > div:last-child {
  margin-top: 2rem;
  text-align: center;
  flex-direction: column;
  align-items: center;
}

#funcionalidades > div:last-child > p {
  max-width: 700px;
  text-align: center;
  font-size: 1rem !important;
  color: rgba(255,255,255,.82) !important;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .funcionalidades-upper,
  .funcionalidades-lower { grid-template-columns: 1fr; }
}

/* ======================================================
   "PORQUE" SECTIONS
   ====================================================== */

.porque {
  position: relative;
  padding: 5rem 2rem;
  text-align: center;
  overflow: hidden;
}

.porque::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.60); /* padrão (nunca chega a aplicar: cada bg-sup-* sobrescreve) */
  z-index: 0;
}

/* === Paleta por seção — suporte.ejs ===
   Para reverter ao preto uniforme: remova os 3 blocos abaixo.
   O .porque::before acima volta a ser o overlay de todas. */
section.porque.bg-sup-1::before {
  background: linear-gradient(135deg, rgba(11,50,130,.78) 0%, rgba(5,25,75,.72) 100%);
}
section.porque.bg-sup-2::before {
  background: linear-gradient(135deg, rgba(5,95,80,.78) 0%, rgba(2,55,50,.72) 100%);
}
section.porque.bg-sup-3::before {
  background: linear-gradient(135deg, rgba(50,15,95,.78) 0%, rgba(25,5,60,.72) 100%);
}

.porque > * {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.porque h2 {
  font-size: clamp(1.3rem, 3.5vw, 1.9rem) !important;
  color: var(--c-white) !important;
  font-family: 'Inter', 'IBM Plex Sans', sans-serif !important;
  font-weight: 600 !important;
  line-height: 1.3;
  margin-bottom: 1rem;
  padding-bottom: 0;
}

.porque p {
  color: rgba(255,255,255,.82);
  font-size: 1rem;
  line-height: 1.82;
  margin-bottom: .25rem;
}

/* links inside porque and section paragraphs */
.porque p a,
section p a,
section p a.hyperlink {
  color: var(--c-secondary) !important;
  text-decoration: underline;
  transition: color var(--transition);
}

.porque p a:hover,
section p a:hover,
section p a.hyperlink:hover {
  color: var(--c-white) !important;
}

/* ======================================================
   REQUIREMENTS (#requisitos)
   ====================================================== */

#requisitos {
  position: relative;
  flex-direction: row !important;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  padding: 5rem 2rem;
  background-color: transparent !important;
  margin-top: 0;
  border-radius: 0;
  overflow: hidden;
}

#requisitos::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.60);
  z-index: 0;
}

#requisitos > * { position: relative; z-index: 1; }

.requisitos-left,
.requisitos-right {
  flex: 1;
  max-width: 480px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius);
  padding: 2rem;
}

.requisitos-left { padding-right: 2rem; }

#requisitos h3 {
  font-size: 1.1rem !important;
  font-weight: 600 !important;
  color: var(--c-secondary) !important;
  font-family: 'Inter', 'IBM Plex Sans', sans-serif !important;
  margin-bottom: .9rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

#requisitos p {
  font-size: .88rem;
  color: rgba(255,255,255,.82) !important;
  padding: .25rem 0;
  line-height: 1.65;
  text-align: left !important;
}

#requisitos a {
  color: var(--c-secondary) !important;
  text-decoration: underline;
}

#requisitos a:hover { color: var(--c-white) !important; }

@media (max-width: 700px) {
  #requisitos { flex-direction: column !important; }
  .requisitos-left { padding-right: 0; padding-bottom: 0; }
  .requisitos-left,
  .requisitos-right { max-width: 100%; }
}

.support-icons-top {
  background: var(--c-dark2);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

/* ======================================================
   SUPORTE — icon visual row
   ====================================================== */

.support-visual {
  display: flex;
  gap: 1.25rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.support-visual-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  min-width: 130px;
  transition: background var(--transition), border-color var(--transition);
  cursor: default;
  pointer-events: none;   /* puramente decorativo */
}

.support-visual-icon:hover {
  background: rgba(43,174,102,.1);
  border-color: rgba(43,174,102,.25);
  /* sem transform: o tile é decorativo, não um botão */
}

.support-visual-icon i {
  font-size: 2.4rem;
  color: var(--c-secondary);
}

.support-visual-icon span {
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,.65);
  text-transform: uppercase;
  letter-spacing: .07em;
  text-align: center;
}

/* ---- botão Aplicações com thumbnail ---- */
.btn-aplicacoes {
  background: var(--c-secondary);
  border: none;
  border-radius: var(--radius);
  padding: 4px 4px 0;   /* borda verde de 4px: topo e laterais; sem separação na base */
  overflow: hidden;
  cursor: pointer;
  width: min(520px, 90%);
  display: inline-flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  margin-top: 1rem;
}

.btn-aplicacoes img {
  width: 100%;
  height: auto;       /* mantém a proporção original da faixa de 7 imagens */
  display: block;
  object-fit: unset;
}

.btn-aplicacoes span {
  display: block;
  padding: .65rem 1rem;
  color: var(--c-white);
  font-weight: 600;
  font-size: .92rem;
  text-align: center;
  letter-spacing: .03em;
  background: var(--c-secondary);
}

.btn-aplicacoes:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ======================================================
   ENVI PAGE — funcionalidades 2-col layout
   ====================================================== */

.funcionalidades-layout {
  flex-direction: row !important;
  align-items: flex-start;
  max-width: 1150px !important;
  gap: 2.5rem !important;
}

.funcionalidades-grids {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

/* ======================================================
   ENVI PAGE — image placeholders
   ====================================================== */

.envi-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  border: 2px dashed rgba(255,255,255,.18);
  border-radius: var(--radius);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.3);
  padding: 2rem;
}

.envi-img-placeholder i { font-size: 2.8rem; }

.envi-img-placeholder span {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* quando <img> substitui o placeholder div, aplica object-fit automaticamente */
.funcionalidades-layout > img,
.funcionalidades-layout > .envi-img-placeholder img,
.porque > img,
.porque > .envi-img-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
}

/* funcionalidades placeholder: fixed width on desktop */
.funcionalidades-layout > .envi-img-placeholder {
  flex: 0 0 280px;
  aspect-ratio: 3/4;
  flex-shrink: 0;
}

/* porque placeholder: full-width strip */
.porque > .envi-img-placeholder {
  max-width: 820px;
  width: 100%;
  aspect-ratio: 16/6;
}

@media (max-width: 900px) {
  .funcionalidades-layout {
    flex-direction: column !important;
  }
  .funcionalidades-layout > .envi-img-placeholder {
    flex: none;
    width: 100%;
    aspect-ratio: 16/9;
  }
}

/* ======================================================
   PAGE CAROUSEL BANNER
   ====================================================== */

.page-carousel {
  position: relative;
  width: 100%;
  height: 280px;
  overflow: hidden;
  background: var(--c-dark2);
  user-select: none;
}

.carousel-track {
  display: flex;
  height: 100%;
  transition: transform .55s cubic-bezier(.4,0,.2,1);
}

.carousel-slide {
  min-width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* placeholder until real images arrive */
.carousel-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: rgba(255,255,255,.2);
  border: 2px dashed rgba(255,255,255,.08);
}

.carousel-placeholder i    { font-size: 2.8rem; }
.carousel-placeholder span {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* gradient overlays so controls stay readable over real photos */
.carousel-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right,
    rgba(0,0,0,.35) 0%, transparent 30%,
    transparent 70%, rgba(0,0,0,.35) 100%);
  pointer-events: none;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,.45);
  color: #fff;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transition: background var(--transition);
  line-height: 1;
}

.carousel-btn:hover { background: rgba(0,0,0,.75); }
.carousel-btn.prev  { left: 1rem; }
.carousel-btn.next  { right: 1rem; }

.carousel-nav {
  position: absolute;
  bottom: .85rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .4rem;
  z-index: 10;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), width var(--transition),
    border-radius var(--transition);
}

.carousel-dot.active {
  background: var(--c-secondary);
  width: 22px;
  border-radius: 4px;
}

@media (max-width: 600px) {
  .page-carousel { height: 200px; }
  .carousel-btn  { width: 34px; height: 34px; font-size: 1rem; }
}

/* ======================================================
   PDF MODAL
   ====================================================== */

.pdf-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.88);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

.pdf-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.pdf-modal-box {
  position: relative;
  width: 90vw;
  height: 90vh;
  background: #111;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: flex;
  flex-direction: column;
}

/* --- option 1: iframe --- */
.pdf-modal-box iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  flex: 1;
}

.pdf-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 10;
  background: rgba(0,0,0,.65);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}

.pdf-modal-close:hover { background: rgba(220,30,30,.85); }

/* --- option 2: PDF.js gallery --- */
.pdf-gallery-header {
  flex-shrink: 0;
  padding: .6rem 3.5rem .6rem 1rem;  /* padding-right reserva espaço para o botão × */
  background: #0d1117;
  color: rgba(255,255,255,.5);
  font-size: .82rem;
  text-align: center;
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.pdf-download-btn {
  margin-left: auto;
  padding: .3rem .85rem;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.75);
  border-radius: 4px;
  font-size: .78rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
  white-space: nowrap;
}

.pdf-download-btn:hover { background: rgba(255,255,255,.2); color: #fff; }

.pdf-gallery-scroll {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: #1a1a2e;
}

.pdf-page-wrapper {
  flex-shrink: 0;   /* impede encolhimento; o scroll é feito pelo container */
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.5);
}

.pdf-page-canvas {
  width: 100%;
  height: auto;
  display: block;
}

.pdf-loading {
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 2rem;
  font-size: .9rem;
}


#s6 {
  background: linear-gradient(135deg, var(--c-primary) 0%, #072470 100%) !important;
  padding: 3.5rem 2rem !important;
  text-align: center;
  max-width: 100% !important;
  width: 100%;
  margin-top: 0 !important;
  background-attachment: unset !important;
}

#s6 h2 {
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  color: rgba(255,255,255,.9);
}

#s6 h2 a {
  color: var(--c-secondary) !important;
  font-weight: 700;
  text-decoration: underline;
  transition: color var(--transition);
}

#s6 h2 a:hover { color: var(--c-white) !important; }
