/* ============================================================
   FRS DISTRIBUIDORA — Loader de Inicialização Premium + Scanner
   ============================================================ */

/* ===== Estado inicial e carregamento ===== */
body.preload #conteudo {
  opacity: 0;
  filter: blur(25px);
  transform: scale(1.05);
  transition: opacity 1.2s ease, filter 1.2s ease, transform 1.2s ease;
}

body.loaded #conteudo {
  opacity: 1;
  filter: none;
  transform: scale(1);
  transition: opacity 1.6s ease, filter 1.6s ease, transform 1.6s ease;
}

/* ======= Tela de carregamento ======= */
#preloader {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at center, #001b3a 60%, #000);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 9999;
  transition: opacity 1s ease;
}

#preloader.hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.loader-container {
  text-align: center;
  color: #FFD700;
  font-family: 'Poppins', sans-serif;
  position: relative;
}

/* === Engrenagem Real — Glass + Gold === */
.loader-gear {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  filter: drop-shadow(0 0 18px rgba(255, 215, 0, 0.65))
          brightness(1.08)
          contrast(1.15);
  animation: spinGear 3.8s linear infinite;
  transform-origin: center center;
}

@keyframes spinGear {
  from { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.03); }
  to { transform: rotate(360deg) scale(1); }
}

.loader-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255,215,0,0.25), transparent 70%);
  filter: blur(8px);
  z-index: -1;
}

/* ===== Texto e barra ===== */
.loader-text {
  margin-top: 20px;
  font-size: 1.15em;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.4);
}

.loader-bar {
  width: 240px;
  height: 6px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  margin: 20px auto 0;
  overflow: hidden;
  position: relative;
}

.loader-bar span {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #FFD700, #ffcc33);
  animation: progress 3.5s ease-in-out forwards;
  box-shadow: 0 0 15px rgba(255,215,0,0.4);
}

@keyframes progress {
  0% { width: 0%; }
  50% { width: 65%; }
  100% { width: 100%; }
}

/* ============================================================
   FRS DISTRIBUIDORA — Página de Manutenção Glass + Gold 3D
   ============================================================ */

body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background: radial-gradient(circle at center, #001b3a, #000);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== Reflexos e camadas ===== */
.reflexo {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: radial-gradient(circle at 30% 40%, rgba(255, 215, 0, 0.05), transparent 70%),
              radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.04), transparent 70%);
  animation: reflexos 10s ease-in-out infinite alternate;
  z-index: 1;
}

@keyframes reflexos {
  0% { opacity: 0.3; transform: scale(1); }
  100% { opacity: 0.7; transform: scale(1.05); }
}

.glass {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(25px) saturate(160%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 2;
}

/* ===== Neblina ===== */
.neblina {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 3;
}

.neblina span {
  position: absolute;
  display: block;
  width: 8px; height: 8px;
  background: radial-gradient(circle, #FFD700, rgba(255,255,255,0));
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255,215,0,0.8);
  animation: flutuar 20s infinite ease-in-out;
}

@keyframes flutuar {
  0% { transform: translateY(0) scale(1); opacity: 0.6; }
  50% { transform: translateY(-30px) scale(1.3); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 0.6; }
}

/* ===== Engrenagens de fundo ===== */
.engrenagens {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 1;
}

.gear {
  position: absolute;
  opacity: 0.08;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.2));
  animation: girar 60s linear infinite;
}

.gear1 { top: 10%; left: 8%; width: 220px; }
.gear2 { bottom: 10%; right: 8%; width: 180px; animation-direction: reverse; }

@keyframes girar {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== Scanner Dourado ===== */
.scanner-line {
  position: fixed;
  top: -100px; left: 0;
  width: 100%; height: 120px;
  background: linear-gradient(to bottom, transparent, rgba(255,215,0,0.25), transparent);
  animation: scanline 4s ease-in-out;
  z-index: 20;
  pointer-events: none;
}

@keyframes scanline {
  0% { top: -150px; opacity: 0; }
  25% { top: 30%; opacity: 1; }
  50% { top: 50%; opacity: 0.8; }
  100% { top: 110%; opacity: 0; }
}

/* ============================================================
   CONTEÚDO PRINCIPAL — Layout
   ============================================================ */

#conteudo {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 940px;
  padding: 70px 40px 40px;
  box-sizing: border-box;
}

h1 {
  font-size: 3em;
  color: #FFD700;
  text-shadow: 0 0 25px rgba(255, 215, 0, 0.7);
  margin-bottom: 25px;
  line-height: 1.2em;
}

p {
  font-size: 1.25em;
  color: #e8e8e8;
  line-height: 1.8em;
  margin: 0 auto 60px;
  max-width: 780px;
  letter-spacing: 0.3px;
}

/* ===== Carrossel ===== */
.carrossel-container {
  width: 100%;
  overflow: hidden;
  margin: 50px 0;
  position: relative;
}

.carrossel-track {
  display: flex;
  align-items: center;
  gap: 60px;
  width: calc(200% + 60px);
  animation: deslizarFRS 35s linear infinite;
}

.carrossel-track img {
  width: 150px;
  border-radius: 15px;
  filter: brightness(1.1) drop-shadow(0 0 20px rgba(255, 215, 0, 0.3));
  transition: transform 0.5s ease, filter 0.5s ease;
}

.carrossel-track img:hover {
  transform: scale(1.1);
  filter: brightness(1.3) drop-shadow(0 0 25px rgba(255,215,0,0.6));
}

@keyframes deslizarFRS {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ===== Botão Voltar ===== */
.container-voltar {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.btn-voltar {
  background: linear-gradient(90deg, #FFD700, #ffcc33);
  color: #001b3a;
  padding: 14px 28px;
  border-radius: 35px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 0 25px rgba(255,215,0,0.5);
  transition: all 0.3s ease;
  animation: brilho 3s infinite alternate;
}

.btn-voltar:hover {
  background: #ffe14d;
  box-shadow: 0 0 35px rgba(255,215,0,0.8);
  transform: translateY(-3px);
}

@keyframes brilho {
  0% { box-shadow: 0 0 10px rgba(255,215,0,0.4); }
  100% { box-shadow: 0 0 25px rgba(255,215,0,0.9); }
}

/* ===== Rodapé ===== */
footer {
  width: 100%;
  text-align: center;
  font-size: 0.95em;
  color: #bcbcbc;
  letter-spacing: 0.3px;
  margin-bottom: 25px;
  z-index: 5;
}

footer span {
  color: #FFD700;
  font-weight: 600;
}

.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* ============================================================
   RESPONSIVIDADE — MOBILE FULLSCREEN FRS
============================================================ */
@media (max-width: 768px) {
  html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
  }

  #preloader {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    height: 100vh !important;
    width: 100vw;
    padding: 0 15px;
    box-sizing: border-box;
  }

  .loader-container {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }

  .loader-gear {
    width: 80px !important;
    height: 80px !important;
    margin-bottom: 18px;
  }

  .loader-text {
    display: block;
    text-align: center;
    font-size: 0.95em;
    white-space: normal;
    line-height: 1.4em;
    word-break: break-word;
  }

  .loader-bar {
    width: 85%;
    height: 5px;
    margin: 14px auto 0;
  }

  main#conteudo {
    width: 100%;
    max-width: 100vw;
    padding: 50px 15px 30px;
    box-sizing: border-box;
    text-align: center;
  }

  .carrossel-container {
    width: 100%;
    overflow-x: auto;
    display: flex;
    justify-content: flex-start;
    padding: 5px 10px;
    box-sizing: border-box;
  }

  .carrossel-track {
    display: flex;
    gap: 20px;
  }

  .carrossel-track img {
    width: 90px;
    height: auto;
    flex-shrink: 0;
  }

  .titulo-brilhante {
    font-size: 1.25em;
    padding: 0 8px;
  }

  .btn-voltar {
    font-size: 0.9em;
    padding: 12px 22px;
  }

  footer {
    font-size: 0.78em;
    padding: 15px 10px;
    line-height: 1.4em;
  }
}

@media (max-width: 430px) {
  .loader-gear {
    width: 65px !important;
    height: 65px !important;
  }

  .loader-text {
    font-size: 0.85em;
  }

  h1 {
    font-size: 1.3em;
  }

  p {
    font-size: 0.9em;
  }

  .carrossel-track img {
    width: 80px;
  }

  .btn-voltar {
    font-size: 0.88em;
    padding: 10px 18px;
  }

  footer {
    font-size: 0.7em;
  }
}
