/*
 * Divulgacao da abertura (crandoria-promo.php): faixa do topo, banners das
 * laterais, contagem regressiva e modais. Usa as cores do crandoria-theme.css.
 */

.CrSrOnly {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* Faixa do topo: ocupa o espaco vazio entre a logo e o boosted. A coluna
   do conteudo comeca 155px abaixo do topo (#ContentRow), entao a faixa
   sobe para dentro dessa folga. */
.CrFaixa {
  position: absolute;
  left: 4px;
  right: 4px;
  top: -146px;
  height: 128px;
  overflow: hidden;
  border: 1px solid #8a6a2c;
  border-radius: 6px;
  background:
    radial-gradient(ellipse 60% 120% at 80% 50%, rgba(143, 31, 26, 0.55), transparent 70%),
    linear-gradient(180deg, #2c0c0b 0%, #120404 100%);
  box-shadow: 0 0 0 1px #000, 0 6px 18px rgba(0, 0, 0, 0.55), inset 0 0 24px rgba(0, 0, 0, 0.6);
  font-family: Verdana, Arial, sans-serif;
  animation: CrBorda 4s ease-in-out infinite;
}
.CrFaixa::after {
  /* filete dourado que corre pela borda de baixo */
  content: "";
  position: absolute;
  left: -40%;
  bottom: 0;
  width: 40%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #f3d48a, transparent);
  animation: CrFilete 5s linear infinite;
}
@keyframes CrBorda {
  0%, 100% { border-color: #8a6a2c; }
  50% { border-color: #e2b552; }
}
@keyframes CrFilete {
  to { left: 100%; }
}

.CrFaixaSlide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px 0 14px;
  text-decoration: none !important;
  color: #ead9b5;
  opacity: 0;
  visibility: hidden;
  transform: translateX(24px);
  transition: opacity 0.7s ease, transform 0.7s ease, visibility 0s 0.7s;
}
.CrFaixaSlide.ativo {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.CrFaixaMini {
  flex: none;
  width: 86px;
  height: 108px;
  object-fit: cover;
  border: 1px solid #8a6a2c;
  border-radius: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  transform: rotate(-4deg);
  transition: transform 0.3s ease;
}
.CrFaixaSlide:hover .CrFaixaMini {
  transform: rotate(0) scale(1.06);
}
.CrFaixaTexto {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}
.CrFaixaChamada {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c9a96a;
}
.CrFaixaTitulo {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: bold;
  font-size: clamp(20px, 2.4vw, 30px);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(180deg, #fff3c4 0%, #f3d48a 45%, #c8862a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.8));
}
.CrFaixaSub {
  font-size: 12px;
  color: #ead9b5;
}
.CrFaixaSub b {
  color: #f3d48a;
}
.CrDias {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.CrDia {
  font-size: 10px;
  padding: 1px 6px;
  border: 1px solid #5a2a1a;
  border-radius: 3px;
  color: #b9a07a;
  background: rgba(0, 0, 0, 0.3);
}
.CrDia.hoje {
  color: #1a0707;
  font-weight: bold;
  border-color: #f3d48a;
  background: linear-gradient(180deg, #f3d48a, #c8862a);
  animation: CrPulso 1.6s ease-in-out infinite;
}
@keyframes CrPulso {
  0%, 100% { box-shadow: 0 0 0 0 rgba(243, 212, 138, 0.6); }
  50% { box-shadow: 0 0 10px 2px rgba(243, 212, 138, 0.6); }
}

/* Esteira de recompensas do passe */
.CrEsteira {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.CrEsteiraTrilho {
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
  animation: CrEsteira 28s linear infinite;
}
.CrEsteiraTrilho span {
  font-size: 10px;
  padding: 1px 7px;
  border: 1px solid #6e3a1c;
  border-radius: 10px;
  color: #f3d48a;
  background: rgba(110, 21, 21, 0.45);
}
@keyframes CrEsteira {
  to { transform: translateX(-50%); }
}

.CrFaixaPontos {
  position: absolute;
  right: 10px;
  bottom: 8px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.CrFaixaPontos button {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid #c9a96a;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
}
.CrFaixaPontos button.ativo {
  background: #f3d48a;
}

/* Fagulhas subindo no fundo da faixa */
.CrFagulhas i {
  position: absolute;
  bottom: -6px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ffb347;
  box-shadow: 0 0 6px 1px rgba(255, 140, 40, 0.8);
  opacity: 0;
  animation: CrFagulha 6s linear infinite;
}
.CrFagulhas i:nth-child(1)  { left: 22%; animation-delay: 0s; }
.CrFagulhas i:nth-child(2)  { left: 31%; animation-delay: 1.3s; animation-duration: 7s; }
.CrFagulhas i:nth-child(3)  { left: 40%; animation-delay: 2.6s; }
.CrFagulhas i:nth-child(4)  { left: 48%; animation-delay: 0.7s; animation-duration: 5s; }
.CrFagulhas i:nth-child(5)  { left: 55%; animation-delay: 3.4s; }
.CrFagulhas i:nth-child(6)  { left: 61%; animation-delay: 4.1s; animation-duration: 8s; }
.CrFagulhas i:nth-child(7)  { left: 67%; animation-delay: 1.9s; }
.CrFagulhas i:nth-child(8)  { left: 72%; animation-delay: 5.2s; animation-duration: 6.5s; }
.CrFagulhas i:nth-child(9)  { left: 78%; animation-delay: 2.2s; }
.CrFagulhas i:nth-child(10) { left: 83%; animation-delay: 0.4s; animation-duration: 7.5s; }
.CrFagulhas i:nth-child(11) { left: 88%; animation-delay: 3.8s; }
.CrFagulhas i:nth-child(12) { left: 92%; animation-delay: 4.7s; animation-duration: 5.5s; }
.CrFagulhas i:nth-child(13) { left: 95%; animation-delay: 1.1s; }
.CrFagulhas i:nth-child(14) { left: 98%; animation-delay: 2.9s; animation-duration: 6.8s; }
@keyframes CrFagulha {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 1; }
  100% { transform: translate(-18px, -140px); opacity: 0; }
}

/* Contagem regressiva */
.CrContagem {
  display: flex;
  justify-content: center;
  gap: 8px;
  color: #f3d48a;
}
.CrContagemBloco {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  padding: 5px 4px 3px;
  border: 1px solid #8a6a2c;
  border-radius: 4px;
  background: linear-gradient(180deg, #5a1010 0%, #2a0b0a 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 2px 6px rgba(0, 0, 0, 0.6);
}
.CrContagemBloco b {
  font-family: Georgia, serif;
  font-size: 24px;
  line-height: 1;
  color: #fff3c4;
  text-shadow: 0 0 8px rgba(243, 212, 138, 0.5);
}
.CrContagemBloco small {
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #c9a96a;
}
.CrContagemFaixa {
  flex: none;
}
.CrContagemMini {
  gap: 4px;
}
.CrContagemMini .CrContagemBloco {
  min-width: 0;
  flex: 1;
  padding: 3px 2px 2px;
}
.CrContagemMini .CrContagemBloco b {
  font-size: 16px;
}
.CrContagemMini .CrContagemBloco small {
  font-size: 8px;
  letter-spacing: 0;
}
/* Coluna estreita (tela de ~1000px): a contagem da faixa encolhe. */
@media (max-width: 1180px) {
  .CrContagemFaixa .CrContagemBloco {
    min-width: 40px;
  }
  .CrContagemFaixa .CrContagemBloco b {
    font-size: 18px;
  }
  .CrFaixaChamada {
    display: none;
  }
}

/* Banners das laterais. Tela larga: fixos ao lado do site (que tem no
   maximo 1280px). Sem espaco: dentro das colunas, embaixo do menu e da
   caixa Mundos (crPromoLateral() sai nos dois lugares). */
.CrLateral.CrFixo {
  display: none;
}
.CrLateral.CrNaColuna {
  display: block;
  width: 172px;
  margin: 12px auto 0;
  text-align: left;
}
/* #Themeboxes div e #MenuColumn do basic.css mudam a fonte; aqui volta. */
#Themeboxes .CrLateralRodape,
#MenuColumn .CrLateralRodape {
  font-size: 11px;
}
@media (min-width: 1660px) {
  .CrLateral.CrNaColuna {
    display: none;
  }
  .CrLateral.CrFixo {
    --cr-lateral: min(250px, calc((100vw - 1280px) / 2 - 36px));
    display: block;
    position: fixed;
    top: 50%;
    z-index: 40;
    width: var(--cr-lateral);
    transform: translateY(-50%);
    animation: CrFlutua 6s ease-in-out infinite;
  }
  .CrLateralEsq.CrFixo {
    left: calc((100vw - 1280px) / 4 - var(--cr-lateral) / 2);
  }
  .CrLateralDir.CrFixo {
    right: calc((100vw - 1280px) / 4 - var(--cr-lateral) / 2);
    animation-delay: -3s;
  }
}
@keyframes CrFlutua {
  0%, 100% { transform: translateY(-50%); }
  50% { transform: translateY(calc(-50% - 8px)); }
}
.CrLateralQuadro {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 2px solid #8a6a2c;
  border-radius: 6px;
  box-shadow: 0 0 0 1px #000, 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 26px rgba(143, 31, 26, 0.5);
  animation: CrBorda 4s ease-in-out infinite;
}
.CrLateralQuadro img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.CrLateralQuadro:hover img {
  transform: scale(1.04);
}
.CrLateralDir .CrSlide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.9s ease, visibility 0s 0.9s;
}
.CrLateralDir .CrSlide.ativo {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.9s ease;
}
.CrLateralRodape {
  margin-top: 8px;
  padding: 6px 8px;
  text-align: center;
  font-family: Verdana, Arial, sans-serif;
  font-size: 11px;
  color: #ead9b5;
  border: 1px solid #8a6a2c;
  border-radius: 4px;
  background: linear-gradient(180deg, #2c0c0b 0%, #1a0707 100%);
}
.CrLateralRodape b {
  color: #f3d48a;
}
.CrSlideTexto {
  display: none;
}
.CrSlideTexto.ativo {
  display: inline;
}

/* Reflexo que passa sobre os cartazes */
.CrCartazBrilho {
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 236, 180, 0.28), transparent);
  transform: skewX(-15deg);
  animation: CrReflexo 5.5s ease-in-out infinite;
}
@keyframes CrReflexo {
  0%, 60% { left: -60%; }
  100% { left: 130%; }
}

/* Modais: abertura e cartaz ampliado */
.CrModalAberto,
.CrModalAberto body {
  overflow: hidden;
}
.CrModal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(5, 0, 0, 0.82);
  animation: CrModalFundo 0.3s ease;
}
.CrModal[hidden] {
  display: none;
}
@keyframes CrModalFundo {
  from { opacity: 0; }
}
.CrModalCaixa {
  position: relative;
  width: min(460px, 100%, calc((100vh - 200px) * 0.8));
  min-width: 260px;
  border: 2px solid #c8962e;
  border-radius: 8px;
  background: #120404;
  box-shadow: 0 0 0 1px #000, 0 0 50px rgba(143, 31, 26, 0.7), 0 20px 60px rgba(0, 0, 0, 0.8);
  animation: CrModalEntra 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2);
  overflow: hidden;
}
.CrModalSoImagem {
  width: min(720px, 100%, calc((100vh - 40px) * 0.8));
}
@keyframes CrModalEntra {
  from { transform: scale(0.85) translateY(20px); opacity: 0; }
}
.CrModalCaixa > img {
  display: block;
  width: 100%;
  height: auto;
}
.CrModalBase {
  padding: 12px 14px 14px;
  text-align: center;
  font-family: Verdana, Arial, sans-serif;
  border-top: 1px solid #8a6a2c;
  background: linear-gradient(180deg, #2c0c0b 0%, #120404 100%);
}
.CrModalAcoes {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
}
.CrBotao {
  display: inline-block;
  padding: 8px 16px;
  font-family: Verdana, Arial, sans-serif;
  font-weight: bold;
  font-size: 12px;
  color: #1a0707 !important;
  text-decoration: none !important;
  border: 1px solid #f3d48a;
  border-radius: 4px;
  background: linear-gradient(180deg, #f3d48a 0%, #c8862a 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}
.CrBotao:hover {
  filter: brightness(1.12);
}
.CrBotaoSec {
  color: #f3d48a !important;
  border-color: #8a6a2c;
  background: linear-gradient(180deg, #8f1f1a 0%, #5a1010 100%);
}
.CrModalFechar {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 24px;
  line-height: 30px;
  color: #f3d48a;
  border: 1px solid #8a6a2c;
  border-radius: 50%;
  background: rgba(20, 4, 4, 0.85);
  cursor: pointer;
}
.CrModalFechar:hover,
.CrModalFechar:focus-visible {
  background: #5a1010;
  outline: 2px solid #f3d48a;
}

/* Pagina nao encontrada (system/pages/404.php) */
.Cr404 {
  text-align: center;
  padding: 18px 10px 10px;
}
.Cr404Numero {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 64px;
  font-weight: bold;
  line-height: 1;
  color: #6e1515;
  text-shadow: 0 2px 0 #c8962e;
}
.Cr404 h2 {
  margin: 8px 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  color: #5a1010;
}
.Cr404 .Cr404Url {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 1px 6px;
  font-family: Consolas, monospace;
  background: rgba(110, 21, 21, 0.08);
  border: 1px solid rgba(110, 21, 21, 0.25);
  border-radius: 3px;
}
.Cr404Sugestoes {
  margin: 16px auto 4px;
  font-size: 13px;
}
.Cr404Sugestoes a {
  font-weight: bold;
}
.Cr404Atalhos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 8px;
}
.Cr404Atalhos a {
  display: inline-block;
  padding: 6px 12px;
  font-weight: bold;
  color: #f3d48a !important;
  text-decoration: none !important;
  border: 1px solid #8a6a2c;
  border-radius: 4px;
  background: linear-gradient(180deg, #8f1f1a 0%, #5a1010 100%);
}
.Cr404Atalhos a:hover {
  filter: brightness(1.15);
}
.Cr404 form {
  margin-top: 14px;
}

@media (prefers-reduced-motion: reduce) {
  .CrFaixa, .CrFaixa::after, .CrFagulhas i, .CrDia.hoje, .CrEsteiraTrilho,
  .CrLateral, .CrLateralQuadro, .CrCartazBrilho, .CrModal, .CrModalCaixa {
    animation: none !important;
  }
}
