/* css/style.css */

/* =========================================
   1. VARIÁVEIS E GLOBAIS
   ========================================= */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");

:root {
  --navbar-height: 76px;
  --primary-color: #0d6efd;
  --primary-gradient: linear-gradient(135deg, #0f9b0f 0%, #00d2ff 100%);
  --card-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Poppins", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  overflow-x: hidden;
  /* padding-top removido para o index fluir com a status-bar */
}

main {
  flex: 1; /* Garante que o footer vá para baixo */
}

a {
  text-decoration: none;
}

/* =========================================
   2. NAVBAR & HEADER (Glassmorphism)
   ========================================= */
.navbar-glass,
.navbar {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  z-index: 1030;
}

.navbar-brand img {
  height: 40px;
  width: auto;
  transition: transform 0.3s;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.nav-link {
  font-weight: 500;
  color: var(--bs-body-color);
  margin: 0 5px;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary-color);
}

/* =========================================
   3. BOTÃO DE TEMA (DARK MODE)
   ========================================= */
.btn-theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--bs-body-color);
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 1050;
}

.btn-theme-toggle i {
  pointer-events: none;
}

.btn-theme-toggle:hover {
  background-color: rgba(13, 110, 253, 0.1);
  color: var(--primary-color);
  transform: rotate(15deg);
}

.btn-theme-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.3);
}

/* =========================================
   4. STATUS BAR (AVANÇADA)
   ========================================= */
.status-bar {
  background-color: #212529;
  color: white;
  padding: 10px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: var(--navbar-height);
  position: relative;
  z-index: 10; /* Garante que fique acima de outros elementos do fundo */
  display: block;
}

.status-indicator {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
}
.status-open {
  background-color: #00ff00;
  box-shadow: 0 0 8px #00ff00;
}
.status-closed {
  background-color: #ff0000;
}

/* Box de Alerta (Aberto/Fechado/Aviso) */
.status-alert-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.bg-status-open {
  background-color: rgba(25, 135, 84, 0.2);
  color: #2ecc71;
  border: 1px solid #2ecc71;
}
.bg-status-warning {
  background-color: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid #ffc107;
}
.bg-status-closed {
  background-color: rgba(220, 53, 69, 0.2);
  color: #ff6b6b;
  border: 1px solid #ff6b6b;
}

/* =========================================
   5. HERO & CAROUSEL
   ========================================= */
.hero-carousel {
  height: 550px;
  overflow: hidden;
  position: relative;
  background-color: #000;
}

.hero-carousel img {
  height: 550px;
  width: 100%;
  object-fit: cover;
  filter: brightness(0.65);
}

.carousel-caption {
  bottom: 20%;
  z-index: 10;
}

.carousel-caption h1 {
  font-size: 3.5rem;
  font-weight: 800;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
}

/* Divisória de Onda */
.wave-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
  z-index: 5;
}
.wave-divider svg {
  position: relative;
  display: block;
  width: calc(100% + 1.3px);
  height: 80px;
}
.wave-divider .shape-fill {
  fill: var(--bs-body-bg);
}

/* =========================================
   6. CARDS DE BIKE (SWIPER)
   ========================================= */
.swiper {
  width: 100%;
  padding-top: 20px;
  padding-bottom: 50px;
}
.swiper-slide {
  height: auto;
  display: flex;
  justify-content: center;
}
.swiper-pagination-bullet-active {
  background-color: var(--primary-color) !important;
}

.bike-card-modern {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

.bike-card-modern:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(13, 110, 253, 0.15);
  border-color: var(--primary-color);
}

.bike-img-modern {
  height: 240px;
  background: radial-gradient(
    circle at center,
    var(--bs-tertiary-bg) 0%,
    var(--bs-body-bg) 70%
  );
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.bike-img-modern img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
  transition: transform 0.5s;
}

.bike-card-modern:hover .bike-img-modern img {
  transform: scale(1.1) rotate(-3deg);
}

.bike-info-modern {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* =========================================
   7. SEÇÃO DE MONITORES
   ========================================= */
.monitor-card {
  position: relative;
  display: inline-block;
}

.monitor-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 15px;
  border: 5px solid var(--bs-body-bg);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}
.monitor-avatar:hover {
  transform: scale(1.1) rotate(5deg);
}

/* Status Online (Bolinha Pulsante) */
.monitor-status-dot {
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid var(--bs-body-bg);
  z-index: 2;
}

.is-online {
  background-color: #198754;
  box-shadow: 0 0 0 2px rgba(25, 135, 84, 0.3);
  animation: pulse-green 2s infinite;
}
.is-offline {
  background-color: #6c757d;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(25, 135, 84, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
  }
}

/* =========================================
   8. SEÇÃO DE AVALIAÇÕES (REVIEWS)
   ========================================= */
.swiper-reviews {
  padding: 20px;
  padding-bottom: 50px;
}

.review-card {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 20px;
  padding: 30px;
  height: 100%;
  position: relative;
  transition: transform 0.3s;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.review-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.review-stars {
  color: #ffc107;
  font-size: 1rem;
}

.review-text {
  font-size: 0.95rem;
  color: var(--bs-body-color);
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.6;
  opacity: 0.85;

  /* Lógica de 'cortar' o texto com ... */
  display: -webkit-box;
  -webkit-line-clamp: 4; /* Para navegadores antigos/Webkit */
  line-clamp: 4; /* Propriedade padrão moderna */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--bs-border-color);
  padding-top: 15px;
}

.review-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.2rem;
}

/* =========================================
   9. ELEMENTOS GERAIS (CTA, TITULOS, FOOTER)
   ========================================= */
.section-header-modern {
  text-align: center;
  margin-bottom: 3rem;
}
.section-header-modern h2 {
  font-weight: 800;
  font-size: 2.5rem;

  /* Lógica do Texto com Gradiente */
  background: var(--primary-gradient);
  -webkit-background-clip: text; /* Para navegadores baseados em Webkit (Chrome, Safari) */
  background-clip: text; /* Propriedade padrão moderna */
  -webkit-text-fill-color: transparent;

  display: inline-block;
}
.section-header-modern p {
  font-size: 1.1rem;
  color: var(--bs-secondary-color);
  max-width: 600px;
  margin: 10px auto 0;
}

.cta-section {
  background: var(--primary-gradient);
  color: white;
  padding: 70px 0;
  border-radius: 30px;
  margin: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hover-scale {
  transition: transform 0.2s;
}
.hover-scale:hover {
  transform: scale(1.05);
}

.sponsor-logo {
  max-height: 70px;
  filter: grayscale(100%);
  opacity: 0.5;
  transition: all 0.4s;
}
.sponsor-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.1);
}

/* Animação do Sino */
.animated-bell {
  display: inline-block;
  animation: bellShake 2s infinite;
}
@keyframes bellShake {
  0% {
    transform: rotate(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: rotate(5deg);
  }
  20%,
  40%,
  60%,
  80% {
    transform: rotate(-5deg);
  }
  100% {
    transform: rotate(0);
  }
}

/* Footer */
.site-footer {
  background-color: #f8f9fa;
  color: #6c757d;
  padding-top: 60px;
  padding-bottom: 30px;
  margin-top: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}
.footer-heading {
  color: #212529;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
}
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links a {
  color: #6c757d;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: #0d6efd;
  padding-left: 5px;
}
.social-icons {
  display: flex;
  gap: 10px;
}
.social-link {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: rgba(0, 0, 0, 0.05);
  color: #495057;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.social-link:hover {
  background-color: #0d6efd;
  color: #fff;
  transform: translateY(-3px);
}
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 0.85rem;
}

/* =========================================
   10. AJUSTES FINAIS DARK MODE
   ========================================= */
[data-bs-theme="dark"] .navbar-glass,
[data-bs-theme="dark"] .navbar {
  background: rgba(33, 37, 41, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
[data-bs-theme="dark"] .btn-theme-toggle {
  border-color: rgba(255, 255, 255, 0.2);
  color: #e9ecef;
}
[data-bs-theme="dark"] .site-footer {
  background-color: #111;
  color: #adb5bd;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
[data-bs-theme="dark"] .footer-heading {
  color: #fff;
}
[data-bs-theme="dark"] .footer-links a {
  color: #adb5bd;
}
[data-bs-theme="dark"] .footer-links a:hover {
  color: #0d6efd;
}
[data-bs-theme="dark"] .social-link {
  background-color: rgba(255, 255, 255, 0.1);
  color: #e9ecef;
}
[data-bs-theme="dark"] .footer-bottom {
  border-top-color: rgba(255, 255, 255, 0.05);
}
[data-bs-theme="dark"] .status-bar {
  border-bottom: 1px solid #333;
}

/* Cards de Configuração */
.card {
  transition:
    background-color 0.3s,
    border-color 0.3s;
}

/* Inputs de Formulário Modernos */
.form-control,
.form-select,
.input-group-text {
  background-color: var(--bs-body-bg);
  border-color: var(--bs-border-color);
  color: var(--bs-body-color);
  transition: all 0.2s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15); /* Glow suave */
  border-color: var(--primary-color);
}

/* Ajustes Específicos para Dark Mode nos Inputs */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="dark"] .input-group-text {
  background-color: #2b3035; /* Um pouco mais claro que o fundo preto */
  border-color: #495057;
}

[data-bs-theme="dark"] .form-control::placeholder {
  color: #6c757d;
}

/* Área de Destaque (bg-body-tertiary) */
.bg-body-tertiary {
  transition: background-color 0.3s;
}

/* Switch (Toggle) Customizado */
.form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.form-check-input {
  cursor: pointer;
  width: 3em !important; /* Mais largo */
  height: 1.5em !important;
}

.cursor-pointer {
  cursor: pointer;
}

/* Texto Pequeno (Labels) */
.ls-1 {
  letter-spacing: 1px;
}

/* Alert Box Suave (Warning) */
.bg-warning-subtle {
  background-color: rgba(255, 193, 7, 0.15) !important;
  color: #856404;
}

[data-bs-theme="dark"] .bg-warning-subtle {
  background-color: rgba(255, 193, 7, 0.1) !important;
  color: #ffc107;
}

.navbar {
  z-index: 9999 !important; /* Valor altíssimo para garantir prioridade */
}

/* Garante que o botão seja clicável */
.btn-theme-toggle {
  position: relative;
  z-index: 10000 !important;
  cursor: pointer;
}
/* Fix para Paginação Mobile */
.pagination {
  flex-wrap: wrap; /* Permite quebrar linha se for muito pequeno */
  align-items: center;
  gap: 5px;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; /* Garante tamanho mínimo para o dedo */
  min-height: 40px;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.page-link:active {
  transform: scale(0.95); /* Efeito de clique no celular */
}

/* Responsividade da Tabela no Mobile */
@media (max-width: 768px) {
  .table-responsive {
    border-radius: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Scroll suave no iPhone */
  }

  /* Aumenta área de clique dos botões de ação na tabela */
  .btn-sm {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }
}
