* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a:visited {
  color: #f1dbb7;
}
a:link {color: #f1dbb7;
}

:root {
  --bg: #000000;
  --gold: #c9a56a;
  --gold-soft: rgba(201, 165, 106, 0.35);
  --paper: #f2e7d2;
  --label-bg: rgba(16, 11, 8, 0.55);
  --label-border: rgba(201, 165, 106, 0.22);
  --hover-bg: rgba(255, 220, 160, 0.08);
  --shadow: rgba(0, 0, 0, 0.85);
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  background: #000;
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  overflow: hidden;
}

/* CENTRALIZA INTERFACE */
#interface {
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 0;
}

/* CONTAINER RESPONSIVO DA CENA */
#escala {
  position: relative;
  width: min(100vw, calc(100vh * 1024 / 768));
  aspect-ratio: 1024 / 768;
  margin-top: 0;
  transform: none;
}

/* BASE ÚNICA PARA CENAS */
.scene,
.sceneV,
.sceneInformacoes,
.scene-wrapper,
#scene-gravador,
#scene-jornaisRevistas,
#scene-arquivos,
#scene-videos {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  background-color: #000;
}

/* FUNDOS ESPECÍFICOS */
#scene-gravador {
  background-image: url("img/fundoGravador.jpg");
}

#scene-jornaisRevistas {
  background-image: url("img/fundoJornaisRevistas.jpg");
}

#scene-arquivos {
  background-image: url("img/arquivosFundo.jpg");
}

/* CAMADAS DE FUNDO */
.office-layer,
.livro01-layer,
.informacoes-layer,
.radio-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

.office-layer {
  background-image: url("img/fundoPrincipal.png");
}

.livro01-layer {
  background-image: url("img/fundolivro01.png");
}

.informacoes-layer {
  background-image: url("img/fundoParede.jpg");
}

.radio-layer {
  background-image: url("img/fundoRadio.jpg");
}

/*AJUSTES DO RÁDIO*/
.radio-button {
  position: absolute;
  z-index: 6;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
}

#radioLA {
  top: 56%;
  left: 70%;
  width: 56px;
}

#radioAM {
  top: 58%;
  left: 43%;
  width: 54px;
}

#radioRA {
  top: 56%;
  left: 76%;
  width: 56px;
}

#radioPower {
  top: 55.6%;
  left: 36%;
  width: 48px;
}

#radioSintonia {
  top: 55.6%;
  left: 49.9%;
  width: 4px;
  transition: left 1s ease;
}

/* AJUSTES DO ARQUIVO*/
/* Arquivos - LISTA DE CASOS */

#lista-casos{
  display: none;
  position: absolute;
  inset: 0;
  transition: opacity 0.4s ease;
}

/* Arquivos - IMAGEM DA PASTA DE CASOS */

#imagem-casos{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Arquivos - ÁREAS DOS CASOS */

.caso{
  position: absolute;
  cursor: pointer;
}

/* Arquivos - PASTA ABERTA */

#pasta-aberta{
  display: none;
  position: absolute;
  inset: 0;
}

/* Arquivos - IMAGEM DA PASTA */

#img-pasta{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Arquivos  - PÁGINAS */

.paginaArquivo{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* AJUSTES DE TEXTO E CONTROLES */
.brand {
  position: absolute;
  left: 50%;
  bottom: 2.21%;
  transform: translateX(-50%);
  text-align: center;
  z-index: 5;
  pointer-events: none;

  text-shadow:
    0 2px 4px rgba(0,0,0,0.95),
    0 0 18px rgba(0,0,0,0.65);

  animation: titleFade 3s ease;
}

@keyframes titleFade {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.brand h1 {
  font-size: clamp(1.4rem, 3.2vw, 3.2rem);
  font-family: "Special Elite", monospace;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin-bottom: clamp(4px, 0.6vw, 6px);
}

.brand p {
  font-family: "Special Elite", monospace;
  font-size: clamp(0.55rem, 1.1vw, 0.92rem);
  color: var(--paper);
  opacity: 0.95;
  letter-spacing: 0.06em;
  margin-top: clamp(6px, 1vw, 6px);
  margin-bottom: clamp(6px, 1vw, 6px);
}

.ui-button,
.audio-toggle {
  position: absolute;
  height: 34px;
  min-width: 110px;
  padding: 0 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: 1px solid rgba(201, 165, 106, 0.28);
  border-radius: 4px;

  background: rgba(14, 10, 8, 0.78);
  color: #f2e7d2;

  font-family: "Special Elite", monospace;
  font-size: clamp(0.52rem, 1.2vw, 0.74rem);
  letter-spacing: 0.08em;

  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;

  cursor: pointer;

  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.45),
    inset 0 0 0 1px rgba(255, 255, 255, 0.02);

  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease;
}

.ui-button:hover{
  background: rgba(24, 18, 12, 0.92);
  border-color: rgba(201, 165, 106, 0.50);
  transform: translateY(-1px);
  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.55),
    0 0 12px rgba(201, 165, 106, 0.08);
}

.ui-button:active{
  transform: translateY(0);
}

.ui-button:focus-visible{
  outline: none;
  border-color: rgba(201, 165, 106, 0.65);
  box-shadow:
    0 0 0 2px rgba(201, 165, 106, 0.14),
    0 6px 18px rgba(0, 0, 0, 0.55);
}

.btn-voltar{
  position: absolute;
  top: 3%;
  right: 3%;
  z-index: 20;
}


.btn-audio{
  position: absolute;
  bottom: 3%;
  right: 3%;
  z-index: 20;
}

/* BOTÃO FECHAR X - Arquivos */
.fechar{
	position:absolute;
	left:84.5%;
	top:18.5%;
	width:25px;
	height:25px;
	cursor:pointer;
	z-index: 10;
	display: none;
}

/* SETAS DOS CASOS */
.nav{
	position:absolute;
	width:30px;
	cursor:pointer;
	}

#btn-prev{
	top:82%;
	left:11.4%;
}

#btn-next{
	top:79%;
	right:11%;
}


/* VÍDEO */
#tv-container .plyr {
  position: absolute;
  width: 48.82%;
  height: 53.39%;
  top: 14.32%;
  left: 18.55%;
  z-index: 2;
}

#tv-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 3;
}

#tv-vidro {
  position: absolute;
  inset: 0;
  background: url("img/tv-vidro2.png") no-repeat center;
  background-size: contain;
  pointer-events: none;
  z-index: 20;
}

/* HOTSPOTS */
.hotspot {
  position: absolute;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--paper);
  border-radius: 10px;
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.hotspot:hover {
  transform: scale(1.035);
  background: var(--hover-bg);
  box-shadow: inset 0 0 0 1px rgba(201, 165, 106, 0.08);
  /*filter: brightness(1.08);*/
}

/* Hotspot escondido */
.secret {
    background: transparent !important;
    border-radius: 0;
}

.secret:hover {
    /*background: rgba(255, 230, 170, 0.15) !important;
    outline: 1px dashed rgba(201,165,106,0.22);*/
}

.label {
  display: inline-block;
  padding: 6px 12px;
  font-family: "Special Elite", monospace;
  font-size: 0.84rem;
  line-height: 1.2;
  text-align: center;
  color: #f6ebd8;
  background: var(--label-bg);
  border: 1px solid var(--label-border);
  border-radius: 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.38),
    0 0 12px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(1px);
}

.hotspot:hover .label {
  border-color: rgba(201, 165, 106, 0.45);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.48),
    0 0 16px rgba(201, 165, 106, 0.10);
}

.listaArquivos {
  position: absolute;
  left: 1.95%;
  top: 35.81%;
  width: 41.02%;
  height: 44.27%;
  clip-path: polygon(
    3% 13%,
    69% 0%,
    100% 70%,
    24% 92%
  );
}

.caso1{
  top: 23.44%;
  left: 12.70%;
  width: 33.20%;
  height: 6.51%;
}

.caso2{
  top: 30.21%;
  left: 12.70%;
  width: 33.20%;
  height: 6.51%;
}

.depoimentos {
    left: 5.5%;
    top: 69%;
    width: 209px;
    height: 58px;
}

.arquivos {
  left: 38%;
  top: 58%;
  width: 118px;
  height: 58px;
}

.filmes {
    left: 37%;
    top: 72%;
    width: 188px;
    height: 58px;
}

.jornais {
    left: 60%;
    top: 69%;
    width: 189px;
    height: 58px;
}

.sistema {
    left: 82.5%;
    top: 46%;
    width: 154px;
    height: 58px;
}

.livro01 {
    left: 68.2%;
    top: 54%;
    width: 96px;
    height: 58px;
}

.radio {
    left: 2%;
    top: 46%;
    width: 98px;
    height: 58px;
}

.informacoes {
    left: 30%;
    top: 5%;
    width: 155px;
    height: 58px;
}

.jogo {
    left: 91%;
    top: 68%;
    width: 82px;
    height: 58px;
}

/* Hotspot livro01 */

.listaLivro01 {
  position: absolute;
  left: 39%;
  top: 16.92%;
  width: 32%;
  height: 56.55%;
   clip-path: polygon(
    13.1% 0%,
    95% 2%,
    93% 98%,
    14.5% 94%
  );
}

.listalivro01Alterada {
  left: 47.46%;
  top: 40.89%;
  height: 32.94%;
}

/* casos */

.caso10781 {
  position: absolute;
  left: 82.2%;
  top: 76.5%;
  width: 12.5%;
  height: 6.8%;
 /* clip-path: polygon(
    11.1% 0%,
    97% 6%,
    86% 99%,
    0% 94%
  );*/
}


/* Jornais e Revistas */

.listaJornais01 {
  position: absolute;
  left: 0%;
  top: 61.20%;
  width: 35.16%;
  height: 26.69%;
  clip-path: polygon(
    50% 0%,
    98% 14%,
    50% 97%,
    -2% 77%
  );
}

.listaJornais02 {
  position: absolute;
  left: 19.53%;
  top: 17.58%;
  width: 43.95%;
  height: 26.69%;
  clip-path: polygon(
    0% 21%,
    64% 2%,
    99% 57%,
    29% 96%
  );
}

.listaJornais03 {
  position: absolute;
  left: 39.55%;
  top: 59.24%;
  width: 40.04%;
  height: 33.20%;
  clip-path: polygon(
    0% 18%,
    50% 0%,
    100% 80%,
    42% 99%
  );
}

.jornaisRevistasFundo {
  position: absolute;
  z-index: 6;

  display: none;

  align-items: center;
  justify-content: center;

  text-decoration: none;
  color: var(--paper);

  border-radius: 10px;
  background: var(--hover-bg);

  left: 5.86%;
  top: 10.42%;
  width: 87.89%;
  height: 78.13%;
}

.paginaJR{
  position: absolute;
  width: 88.22%;
  height: 93.83%;
  top: 4.67%;
  left: 5.89%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
}

.paginaJR::-webkit-scrollbar{
  display: none;
}

.paginaJR img{
  width: 100%;
  height: auto;
  display: block;
}

.nav-arrow{
  color: var(--paper);
  position:absolute;

  width: clamp(36px, 4.5vw, 46px);
  height: clamp(36px, 4.5vw, 46px);

  border:1px solid rgba(201,165,106,0.45);
  border-radius:4px;

  background:rgba(14,10,8,0.75);

  display:flex;
  align-items:center;
  justify-content:center;

  cursor:pointer;

  transition:all 0.25s ease;

  box-shadow:
    0 4px 14px rgba(0,0,0,0.45),
    inset 0 0 0 1px rgba(255,255,255,0.02);

  font-size: clamp(1.6rem, 2.5vw, 2.5rem);
  font-family: "Special Elite", monospace;

  padding:0;
  line-height:1.0;
}

.btn-fecharJR.fecharJR::before{
  content:"X";
}

.nav-arrow::before{
  display:block;
  transform:translateY(-1px);
}

.nav-arrow.right::before{
  content:">"; 
  padding-left: 0.5em;
  padding-top: 0.5em;
}

.nav-arrow.left::before{
  content:"<";
  padding-left: 0.5em;
  padding-top: 0.5em;
}

.nav-arrow.left {
  top: 50%;
  left: 0.3%;
}

.nav-arrow.right {
  top: 50%;
  left: 94.3%;
}

.nav-arrow.fecharJR::before{
	content:"X";
}

.nav-arrow.fecharJR {
  top: 0.5%;
  left: 94.3%;
  padding-top: 10px;
  padding-left: 0px;
}

.nav-arrow.fecharLivro::before{
	content:"X";
}

.nav-arrow.fecharLivro {
  top: 0.5%;
  left: 93.3%;
  padding-top: 10px;
  padding-left: 0px;
}
.nav-arrow:hover{
  border-color:rgba(201,165,106,0.7);
  background:rgba(24,18,12,0.92);
  transform:translateY(-1px);

  box-shadow:
    0 6px 18px rgba(0,0,0,0.55),
    0 0 12px rgba(201,165,106,0.08);
}




/* efeito opcional de entrada */
.scene {
  animation: sceneFade 1.4s ease;
}

@keyframes sceneFade {
  from {
    opacity: 0;
    transform: scale(0.985);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* GRAVADOR - DEPOIMENTOS K7 */
#gravador {
  position: absolute;
  left: 3.91%;
  top: 10.42%;
  width: 32.23%;
}

/* DISPLAY */
#caption-display {
  position: absolute;
  left: 4.59%;
  top: 18.23%;
  width: 37.60%;
  height: 5.21%;

  color: #00ff65;
  background: rgba(0, 0, 0, 0.7);
  padding: 10px;
  font-size: clamp(0.7rem, 1.2vw, 1.125rem);
  white-space: pre;
  overflow: hidden;
}

/* CONTAINER DAS FITAS */
#fitas-container {
  position: absolute;
  right: 9.77%;
  top: 13.02%;
  width: 15.63%;
  height: 67.71%;
  pointer-events: none;
}

/* Cada fita */
.fita {
  position: absolute;
  width: 112.5%;
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.2s ease;
}

.fita:hover {
  transform: scale(1.06);
}

.caixaFita {
  position: absolute;
  left: 46.88%;
  top: 42.32%;
  width: 21.48%;
  display: none;
}

.caixaFita:hover {
  transform: scale(1.06);
}

#area-gravador {
  position: absolute;
  inset: 0;
}

.gravadorFundo {
  position: absolute;
  top: 42.97%;
  left: 18.55%;
  width: 19.53%;
}

.gravadorTopo {
  position: absolute;
  top: 7.81%;
  left: 2.93%;
  width: 41.99%;
}

/* RainWindow - Index e livro01 */

.rain-window {
  position: absolute;
  left: 65.43%;
  top: 9.11%;
  width: 30.27%;
  height: 29.30%;
  background: url("img/rain.gif") center / cover no-repeat;
  z-index: 1;
  opacity: 0.85;
}

.rain-window::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
}

.rain-window-livro01 {
  position: absolute;
  right: 0;
  top: 0;
  width: 11.72%;
  height: 27.99%;
  background: url("img/rain.gif") center / cover no-repeat;
  z-index: 1;
  opacity: 0.25;
}

.rain-window-livro01::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
}


/* Cinzeiro - Index */

.cinzeiro-smoke {
  position: absolute;
  left: 30.27%;
  top: 16.41%;
  width: 12.40%;
  height: 53.39%;
  pointer-events: none;
  z-index: 999;
  overflow: visible;
}

.cinzeiro-smoke span {
  display: block;
  position: absolute;
  bottom: 0;
  left: 7.87%;
  width: 18.90%;
  height: 15.61%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  filter: blur(8px);
  opacity: 0;
  animation: smokeRise 6s infinite ease-in-out;
}

.cinzeiro-smoke span:nth-child(1) {
  animation-delay: 0s;
}

.cinzeiro-smoke span:nth-child(2) {
  animation-delay: 1.2s;
  left: 4.72%;
}

.cinzeiro-smoke span:nth-child(3) {
  animation-delay: 2.4s;
  left: 9.45%;
}

.cinzeiro-smoke span:nth-child(4) {
  animation-delay: 3.6s;
  left: 6.30%;
}

.cinzeiro-smoke span:nth-child(5) {
  animation-delay: 4.8s;
  left: 7.87%;
}

@keyframes smokeRise {
  0% {
    transform: translate(0, 0) scale(0.4);
    opacity: 0;
  }

  10% {
    opacity: 0.35;
  }

  30% {
    transform: translate(8px, -30px) scale(0.7);
    opacity: 0.28;
  }

  50% {
    transform: translate(-6px, -60px) scale(1);
    opacity: 0.2;
  }

  75% {
    transform: translate(10px, -100px) scale(1.3);
    opacity: 0.1;
  }

  100% {
    transform: translate(-4px, -140px) scale(1.7);
    opacity: 0;
  }
}

@keyframes smokeDrift {
  from {
    transform: translateX(-2px);
  }

  to {
    transform: translateX(4px);
  }
}

/* LampGlow - Index */

.lamp-glow {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;

  background:
    radial-gradient(
      ellipse at var(--lamp-x1) var(--lamp-y1),
      rgba(255, 210, 120, 0.45) 0%,
      rgba(255, 210, 120, 0.20) 14%,
      rgba(255, 210, 120, 0.08) 24%,
      rgba(255, 210, 120, 0.00) 40%
    ),
    radial-gradient(
      ellipse at var(--lamp-x2) var(--lamp-y2),
      rgba(255, 190, 90, 0.18) 0%,
      rgba(255, 190, 90, 0.08) 18%,
      rgba(255, 190, 90, 0.00) 34%
    );

  transform-origin: var(--lamp-x1) var(--lamp-y1);
  animation: lampFlicker 28s infinite, lampShift 58s infinite alternate;
}

.lamp-glow-informacoes {
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;

	background:
	radial-gradient(
		ellipse 100% 100% at var(--lamp-x1) var(--lamp-y1),
		rgba(255, 210, 120, 0.45) 0%,
		rgba(255, 210, 120, 0.20) 20%,
		rgba(255, 210, 120, 0.08) 35%,
		rgba(255, 210, 120, 0.00) 60%
	);

	transform-origin: var(--lamp-x1) var(--lamp-y1);
	animation: lampFlicker 28s infinite, lampShift 58s infinite alternate;
}

@keyframes lampShift {
  from { transform: translateX(0px); }
  to   { transform: translateX(3px); }
}

@keyframes lampFlicker {
  0%   { opacity: 0.95; }
  15%  { opacity: 1; }
  16%  { opacity: 0.2; }
  18%  { opacity: 0.95; }
  30%  { opacity: 0.90; }
  42%  { opacity: 0.3; }
  44%  { opacity: 0.95; }
  60%  { opacity: 0.92; }
  72%  { opacity: 0.25; }
  74%  { opacity: 0.95; }
  100% { opacity: 0.90; }
}

@keyframes lampPulse {
  0%   { opacity: 0.85; }
  18%  { opacity: 0.95; }
  20%  { opacity: 0.35; }
  22%  { opacity: 0.95; }
  40%  { opacity: 0.90; }
  58%  { opacity: 0.30; }
  60%  { opacity: 0.95; }
  78%  { opacity: 0.88; }
  92%  { opacity: 0.40; }
  94%  { opacity: 0.92; }
  100% { opacity: 0.85; }
}

.lamp-home {
  --lamp-x1: 28%;
  --lamp-y1: 34%;
  --lamp-x2: 33%;
  --lamp-y2: 48%;
}

.lamp-livro01 {
  --lamp-x1: 12%;
  --lamp-y1: 25%;
  --lamp-x2: 15%;
  --lamp-y2: 28%;
}

.lamp-informacoes {
  --lamp-x1: 50%;
  --lamp-y1: -5%;
}

.lamp-arquivos {
  --lamp-x1: 28%;
  --lamp-y1: 10%;
  --lamp-x2: 33%;
  --lamp-y2: 18%;
}

/*----------------*/
/* AJUSTES MOBILE */
/*----------------*/
@media (max-width: 768px) {
  #interface {
    padding: 0;
  }

  #escala {
    width: 100vw;
    max-height: 100vh;
  }

#caption-display {
 height: 10%;
}

#fitas-container {
 width: 20%;
 height: 80%;
}

#radioLA {
  width: 27px;
}

#radioAM {
  width: 22px;
}

#radioRA {
  width: 27px;
}

#radioPower {
  width: 20px;
}

#radioSintonia {
  width: 1.7px;
}
 
.label {
  padding: 3px 6px;
  font-family: "Special Elite", monospace;
  font-size: 0.54rem;
}

.depoimentos {
    left: 3%;
    top: 70%;
    width: 117px;
    height: 27px;
}

.arquivos {
  left: 37%;
  top: 59%;
  width: 59px;
  height: 27px;
  }
  
 
.filmes {
    left: 35%;
    top: 76%;
    width: 102px;
    height: 24px;
}

.jornais {
    left: 58%;
    top: 70%;
    width: 106px;
    height: 26px;
}

.sistema {
    left: 80%;
    top: 48%;
    width: 82px;
    height: 24px;
}

.livro01 {
    left: 67.5%;
    top: 58%;
    width: 55px;
    height: 30px;
}

.radio {
    left: 2%;
    top: 49%;
    width: 45px;
    height: 26px;
}

.informacoes {
    left: 28%;
    top: 6%;
    width: 85px;
    height: 25px;
}

.jogo {
    left: 91%;
    top: 68%;
    width: 44px;
    height: 29px;
}

.brand {
    bottom: 0%;	
  }

.brand p {
	margin-bottom: 2px;
}
  .ui-button,
  .audio-toggle {
    height: 30px;
    min-width: 58px;
    padding-inline: 8px;
  }

  .nav-arrow,
  .nav-arrowFechar {
    width: 20px;
    height: 20px;
	line-height: 1.1;
	font-size: clamp(1.1rem, 2.5vw, 2.5rem);
  }

.nav-arrow.left {
	display:flex;
    align-items:center;
    justify-content:center;

    width:100%;
    height:100%;

    transform:none;
	padding-left:0;
}

.nav-arrow.right {
	padding-left: 5px;
}


.nav-arrow.fecharJR {
  
  padding-top: 10px;
}

  .item-video:hover,
  .hotspot:hover,
  .fita:hover,
  .caixaFita:hover,
  .nav-btn:hover,
  .ui-button:hover,
  .audio-toggle:hover {
    transform: none;
  }
}


/* BOTÃO FECHAR X - Arquivos */
.fechar{
	left:85%;
	top:18.5%;
	width:10px;
	height:10px;
}

/* SETAS DOS CASOS */
.nav{
	width:15px;
	cursor:pointer;
	}

#btn-prev{
	top:82%;
	left:11.4%;
}

#btn-next{
	top:79%;
	right:11%;
}

/* VIDEOS */
#tv-container .plyr {
  position: absolute;
  inset: 0;
  width: 48.83%;
  height: 53.39%;
  top: 14.32%;
  left: 18.55%;
  z-index: 2;
}

#tv-frame-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 3;
}

#tv-vidro {
  position: absolute;
  inset: 0;
  background: url("img/tv-vidro2.png") no-repeat center;
  background-size: contain;
  pointer-events: none;
  z-index: 20;
}

#video-overlay {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 15;
}

.item-video {
  position: absolute;
  width: 20%;
  height: auto;
  cursor: pointer;
  z-index: 16;
}


@media (max-width: 480px) {
  .ui-button,
  .audio-toggle {
    height: 28px;
    min-width: 58px;
    font-size: 0.5rem;
  }

  .brand h1 {
    letter-spacing: 0.02em;
  }

  .brand p {
    margin-top: 6px;
  }
}



.modal-livro {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3%;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(2px);
}

.modal-livro.ativo {
  display: flex;
}

.modal-livro-box {
  position: relative;
  width: 88%;
  height: 84%;
  border: 1px solid rgba(201, 165, 106, 0.28);
  border-radius: 10px;
  background:
    linear-gradient(rgba(10, 8, 7, 0.88), rgba(16, 12, 10, 0.92));
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.72),
    inset 0 0 0 1px rgba(255,255,255,0.02);
  overflow: hidden;
}

.modal-livro-grid {
  display: grid;
  grid-template-columns: 29% 1fr;
  width: 100%;
  height: 100%;
}

/* FECHAR */
#fechar-modal-livro {
  position: absolute;
  top: 2.2%;
  right: 1.8%;
  z-index: 10;
}

/* PAINEL ESQUERDO */
.livro-sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 8% 7% 6% 7%;
  background:
    linear-gradient(to bottom, rgba(22,16,12,0.88), rgba(10,8,7,0.70));
  border-right: 1px solid rgba(201,165,106,0.14);
}

.livro-capa {
  width: 82%;
  max-height: 64%;
  object-fit: contain;
  border: 1px solid rgba(201,165,106,0.20);
  border-radius: 6px;
  box-shadow:
    0 8px 22px rgba(0,0,0,0.55),
    0 0 14px rgba(201,165,106,0.05);
  margin-bottom: 10%;
}

.livro-compra {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
}

.btn-modal-compra {
  position: static;
  width: 100%;
  min-width: unset;
  height: 38px;
  padding: 0 12px;
}

.btn-icon {
  padding-right: 5px;
}

/* PAINEL DIREITO */
.livro-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 6.5% 5.5% 2.5% 5.5%;
}

.livro-texto-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.livro-titulo {
  flex-shrink: 0;
  font-family: "Special Elite", monospace;
  font-size: clamp(1rem, 1.9vw, 1.7rem);
  color: var(--gold);
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}

.livro-texto {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 10px;

  font-family: "Cormorant Garamond", serif;
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.5em;
  color: var(--paper);
  text-align: justify;
}

.livro-texto p {
  margin-bottom: 0.8em;
}

.livro-texto p:last-child {
  margin-bottom: 0;
}

.livro-texto::-webkit-scrollbar {
  width: 8px;
}

.livro-texto::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.12);
}

.livro-texto::-webkit-scrollbar-thumb {
  background: rgba(201,165,106,0.28);
  border-radius: 6px;
}

/* BOTÕES INFERIORES */
.livro-acoes {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(201,165,106,0.14);
}

.btn-aba-livro {
  position: static;
  min-width: 120px;
  height: 36px;
  padding: 0 14px;
}

.btn-aba-livro.active {
  background: rgba(24,18,12,0.92);
  border-color: rgba(201,165,106,0.58);
  box-shadow:
    0 6px 18px rgba(0,0,0,0.55),
    0 0 12px rgba(201,165,106,0.08);
}

.btn-playlist {
  text-decoration: none;
}


/* MOBILE */
@media (max-width: 768px) {
  .modal-livro {
    padding: 2.5%;
  }

  .modal-livro-box {
    width: 96%;
    height: 90%;
  }

  .modal-livro-grid {
    grid-template-columns: 24% 1fr;
    grid-template-rows: 1fr;
  }

  .livro-sidebar {
    padding: 10% 5% 5% 5%;
    border-right: 1px solid rgba(201,165,106,0.14);
    border-bottom: none;
  }

  .livro-capa {
    width: 100%;
    max-height: 180px;
    margin-bottom: 14px;
  }

  .livro-compra {
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }
  
  .livro-texto{
    font-size: clamp(0.95rem, 1.35vw, 1.2rem);
    line-height: 1.2;
  }



  .livro-content {
    min-width: 0;
    padding: 5% 4.5% 1.6% 4.5%;
  }

  .livro-acoes {
    gap: 8px;
  }

  .btn-aba-livro {
    min-width: calc(50% - 4px);
    height: 26px;
    font-size: 0.50rem;
    padding: 0 8px;
  }
  
  .btn-modal-compra {
    width: 100%;
    min-width: 0;
    height: 26px;
    font-size: 0.50rem;
    letter-spacing: 0.04em;
    padding: 0 6px;
  }
}

/* MODAL DO LIVRO EM TELA INTEIRA NO CELULAR
   A classe é aplicada pelo JavaScript depois que o modal é movido para o body. */
@media (max-width: 768px) {
  body.modal-livro-aberto {
    overflow: hidden;
    width: 100%;
    height: 100%;
    touch-action: none;
  }

  .modal-livro.modal-viewport-mobile {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    padding: 0;
    margin: 0;
    z-index: 9999;
    align-items: stretch;
    justify-content: stretch;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: none;
  }

  .modal-livro.modal-viewport-mobile .modal-livro-box {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .modal-livro.modal-viewport-mobile .modal-livro-grid {
    width: 100%;
    height: 100%;
    grid-template-columns: 28% minmax(0, 1fr);
  }

  .modal-livro.modal-viewport-mobile #fechar-modal-livro {
    position: fixed;
    top: max(10px, env(safe-area-inset-top));
    right: max(10px, env(safe-area-inset-right));
    left: auto;
    width: 36px;
    height: 36px;
    z-index: 10001;
    padding: 0;
    line-height: 1;
  }

  .modal-livro.modal-viewport-mobile .livro-sidebar {
    min-height: 0;
    padding-top: max(48px, calc(env(safe-area-inset-top) + 40px));
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .modal-livro.modal-viewport-mobile .livro-content {
    min-height: 0;
    padding-top: max(48px, calc(env(safe-area-inset-top) + 40px));
    padding-right: max(12px, env(safe-area-inset-right));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}


/* =========================================================
   JORNAIS E REVISTAS EM TELA INTEIRA SOMENTE NO CELULAR
   O desktop continua usando as regras originais.
   ========================================================= */
@media (max-width: 768px) {
  body.jornal-mobile-aberto {
    overflow: hidden;
    width: 100%;
    height: 100%;
    touch-action: none;
  }

  #jornalAberto.jornal-viewport-mobile {
    position: fixed;
    inset: 0;
    display: flex;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    max-height: none;
    padding: 0;
    margin: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: rgba(5, 4, 3, 0.98);
  }

  #jornalAberto.jornal-viewport-mobile .paginaJR {
    position: absolute;
    inset: 0;
    top: max(52px, calc(env(safe-area-inset-top) + 42px));
    right: max(42px, calc(env(safe-area-inset-right) + 34px));
    bottom: max(16px, env(safe-area-inset-bottom));
    left: max(42px, calc(env(safe-area-inset-left) + 34px));
    width: auto;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  #jornalAberto.jornal-viewport-mobile .paginaJR img {
    width: auto;
    max-width: 100%;
    height: auto;
    min-height: 0;
    object-fit: contain;
    margin: 0 auto;
  }

  #jornalAberto.jornal-viewport-mobile .nav-arrow {
    position: fixed;
    z-index: 10001;
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    line-height: 1;
    font-size: 1.55rem;
  }

  #jornalAberto.jornal-viewport-mobile .nav-arrow.fecharJR {
    top: max(8px, env(safe-area-inset-top));
    right: max(8px, env(safe-area-inset-right));
    left: auto;
    padding: 0;
  }

  #jornalAberto.jornal-viewport-mobile .nav-arrow.left {
    top: 50%;
    left: max(4px, env(safe-area-inset-left));
    transform: translateY(-50%);
    padding-left: 0;
  }

  #jornalAberto.jornal-viewport-mobile .nav-arrow.right {
    top: 50%;
    right: max(4px, env(safe-area-inset-right));
    left: auto;
    transform: translateY(-50%);
    padding-left: 0;
  }

  #jornalAberto.jornal-viewport-mobile .nav-arrow:hover {
    transform: translateY(-50%);
  }

  #jornalAberto.jornal-viewport-mobile .nav-arrow.fecharJR:hover {
    transform: none;
  }
}
