/* ================================
   Sultec Bombas — Bootstrap theme tokens
   Cores migradas 1:1 de css/style.css original (ver openspec/AUDIT-FASE0.md)
   ================================ */

:root {
  /* Mapeamento para variáveis nativas do Bootstrap 5.3 */
  --bs-primary: #0079c1;
  --bs-primary-rgb: 0, 121, 193;
  --bs-secondary: #6b7b8f;
  --bs-secondary-rgb: 107, 123, 143;
  --bs-dark: #0b1423;
  --bs-dark-rgb: 11, 20, 35;
  --bs-light: #f0f4f8;
  --bs-light-rgb: 240, 244, 248;
  --bs-body-color: #0b1423;
  --bs-link-color: #0079c1;
  --bs-link-hover-color: #005fa3;
  --bs-border-radius: 12px;
  --bs-border-radius-lg: 12px;

  /* Tokens sem equivalente direto no Bootstrap */
  --sultec-primary-dark: #005fa3;
  --sultec-accent: #00a8e8;
  --sultec-dark-light: #1a2940;
  --sultec-gray-light: #f0f4f8;
  --sultec-gray-medium: #6b7b8f;
  --sultec-brand-alt: #1a1a2e;
  --sultec-whatsapp: #25d366;
  --sultec-box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  --bs-btn-bg: var(--bs-primary);
  --bs-btn-border-color: var(--bs-primary);
  --bs-btn-hover-bg: var(--sultec-primary-dark);
  --bs-btn-hover-border-color: var(--sultec-primary-dark);
  --bs-btn-active-bg: var(--sultec-primary-dark);
  --bs-btn-active-border-color: var(--sultec-primary-dark);
}

a {
  color: var(--bs-primary);
}
a:hover {
  color: var(--sultec-primary-dark);
}

/* ================================
   Fixed header offset + sticky footer
   ================================ */
html {
  height: 100%;
}

body {
  padding-top: 78px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-footer {
  margin-top: auto;
}

.auth-section {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
}

.auth-section .container {
  width: 100%;
}

@media (max-width: 575.98px) {
  .auth-section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

#sobre,
#produtos,
#projetos,
#contato,
#galeria,
#manuais {
  scroll-margin-top: 88px;
}

/* ================================
   Buttons — micro-interactions
   ================================ */
.btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary:hover,
.btn-primary:focus {
  box-shadow: 0 8px 24px rgba(0, 121, 193, 0.4);
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.35) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
  pointer-events: none;
}

.btn:hover::after {
  left: 125%;
}

/* ================================
   Hero — animated gradient + floating shapes
   ================================ */
.hero-gradient {
  position: relative;
  overflow: hidden;
  background: linear-gradient(-45deg, var(--bs-primary), var(--sultec-accent), var(--sultec-primary-dark), var(--bs-primary));
  background-size: 300% 300%;
  animation: heroGradientShift 12s ease infinite;
  color: #fff;
  min-height: 90vh;
  display: flex;
  align-items: center;
}

@keyframes heroGradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-gradient::before,
.hero-gradient::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  filter: blur(10px);
  animation: heroFloat 9s ease-in-out infinite;
  pointer-events: none;
}

.hero-gradient::before {
  width: 320px;
  height: 320px;
  top: -80px;
  left: -80px;
  animation-delay: 0s;
}

.hero-gradient::after {
  width: 240px;
  height: 240px;
  bottom: -60px;
  right: -60px;
  animation-delay: 3s;
}

@keyframes heroFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(20px, -30px) scale(1.08); }
}

.hero-gradient .container {
  position: relative;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-gradient,
  .hero-gradient::before,
  .hero-gradient::after {
    animation: none;
  }
}

/* ================================
   Auth pages (login/cadastro) — reusa o mesmo azul animado do hero
   ================================ */
.auth-section.hero-gradient {
  min-height: calc(100vh - 78px);
}

.auth-section.hero-gradient .section-title {
  color: #fff;
}

/* ================================
   Login wall (modal) — mesmo azul animado, versão compacta para o header do modal
   ================================ */
.modal-gradient-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(-45deg, var(--bs-primary), var(--sultec-accent), var(--sultec-primary-dark), var(--bs-primary));
  background-size: 300% 300%;
  animation: heroGradientShift 12s ease infinite;
  color: #fff;
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .modal-gradient-header {
    animation: none;
  }
}

/* ================================
   Navbar — glass effect
   ================================ */
.navbar {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.navbar-brand img {
  height: 50px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05) rotate(-2deg);
}

.navbar .nav-link {
  position: relative;
  transition: color 0.25s ease;
}

.navbar .nav-link.active {
  color: var(--bs-primary) !important;
  font-weight: 600;
}

.navbar .nav-link:hover {
  color: var(--bs-primary) !important;
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--bs-primary);
  transition: width 0.25s ease;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  width: 100%;
}

/* ================================
   Section titles
   ================================ */
.section-title {
  font-weight: 700;
  color: var(--bs-dark);
}

.section-subtitle {
  color: var(--sultec-gray-medium);
}

.text-brand-alt {
  color: var(--sultec-brand-alt);
}

/* ================================
   Cards (produtos / projetos / manuais)
   ================================ */
.card {
  box-shadow: var(--sultec-box-shadow);
  border: none;
  border-radius: var(--bs-border-radius);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  will-change: transform;
}

.card:hover {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 24px 48px rgba(0, 121, 193, 0.22);
}

.card img.card-img-top {
  height: 220px;
  object-fit: cover;
  background: var(--sultec-gray-light);
  transition: transform 0.5s ease;
}

.card:hover img.card-img-top {
  transform: scale(1.08);
}

.card .card-img-top {
  overflow: hidden;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap 0.25s ease, color 0.25s ease;
}

.product-link:hover {
  gap: 0.6rem;
  color: var(--sultec-primary-dark);
}

.manual-icon svg {
  transition: transform 0.3s ease, color 0.3s ease;
}

.card:hover .manual-icon svg {
  transform: scale(1.15) rotate(-4deg);
  color: var(--sultec-primary-dark);
}

.card-text.product-desc {
  max-height: 130px;
  overflow-y: auto;
  color: var(--sultec-gray-medium);
  font-size: 0.9rem;
  white-space: pre-line;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 121, 193, 0.35) transparent;
}

.card-text.product-desc::-webkit-scrollbar {
  width: 5px;
}

.card-text.product-desc::-webkit-scrollbar-track {
  background: transparent;
}

.card-text.product-desc::-webkit-scrollbar-thumb {
  background-color: rgba(0, 121, 193, 0.35);
  border-radius: 10px;
}

.card-text.product-desc::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 121, 193, 0.6);
}

/* ================================
   Page scrollbar — brand blue, modern
   ================================ */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--bs-primary) var(--sultec-gray-light);
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--sultec-gray-light);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--sultec-accent) 0%, var(--bs-primary) 100%);
  border-radius: 10px;
  border: 3px solid var(--sultec-gray-light);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--bs-primary) 0%, var(--sultec-primary-dark) 100%);
}

.stat-card .display-6 {
  color: var(--bs-primary);
}

.manual-icon {
  color: var(--bs-primary);
}

/* ================================
   Bootstrap Carousel adjustments (galeria.html)
   ================================ */
#galleryCarousel .carousel-item img {
  width: 100%;
  height: 60vh;
  object-fit: contain;
  background: var(--sultec-dark-light);
}

#galleryCarousel {
  background: var(--sultec-dark-light);
  border-radius: var(--bs-border-radius);
}

#galleryCarousel .carousel-caption {
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 40%, rgba(0,0,0,0.7) 100%);
  border-radius: 0 0 12px 12px;
  bottom: 36px;
  left: 0;
  right: 0;
  padding-bottom: 0.5rem;
}

/* ================================
   Gallery indicators — small brand-colored dots, horizontally scrollable
   ================================ */
#galleryCarousel .carousel-indicators {
  position: static;
  margin: 0;
  padding: 0.6rem 1rem;
  gap: 0.4rem;
  overflow-x: auto;
  scrollbar-width: thin;
  justify-content: center;
  background: rgba(0, 0, 0, 0.25);
}

#galleryCarousel .carousel-indicators [data-bs-target] {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.4);
  opacity: 1;
  transition: background-color 0.25s ease, transform 0.25s ease;
}

#galleryCarousel .carousel-indicators [data-bs-target]:hover {
  background-color: rgba(255, 255, 255, 0.7);
}

#galleryCarousel .carousel-indicators [data-bs-target].active {
  background-color: var(--sultec-accent);
  transform: scale(1.3);
}

#galleryCounter {
  letter-spacing: 0.03em;
}

.gallery-section {
  background: var(--sultec-dark-light);
  color: #fff;
}

/* ================================
   Contact section
   ================================ */
.contact-section {
  background: linear-gradient(135deg, var(--sultec-dark-light) 0%, var(--bs-dark) 100%);
  color: #fff;
}

.contact-section .form-label {
  color: #fff;
}

.contact-section .form-control {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}

.contact-section .form-control::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.contact-section .form-control:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--sultec-accent);
  color: #fff;
  box-shadow: 0 0 0 0.25rem rgba(0, 168, 232, 0.25);
}

.contact-section a {
  color: var(--sultec-accent);
}

.contact-section a:hover {
  color: #fff;
}

/* ================================
   Footer
   ================================ */
.site-footer {
  background: var(--bs-dark);
  color: #fff;
}

/* ================================
   Floating WhatsApp button
   ================================ */
.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: var(--sultec-whatsapp);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 1030;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100px);
}

.whatsapp-float.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.whatsapp-float a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: max(15px, env(safe-area-inset-bottom));
    right: 15px;
    width: 55px;
    height: 55px;
  }
  .hero-gradient {
    min-height: 70vh;
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
  .hero-gradient .display-4 {
    font-size: 2.1rem;
  }
  .hero-gradient .lead {
    font-size: 1rem;
  }
  .hero-gradient .btn-lg {
    padding: 0.65rem 1.5rem;
    font-size: 1rem;
  }
  #galleryCarousel .carousel-item img {
    height: 40vh;
  }

  /* Cards (produtos/projetos/manuais) — espaçamento e toque confortáveis no mobile */
  .card img.card-img-top {
    height: 200px;
  }

  .card .card-body {
    padding: 1.1rem;
  }

  .card-title {
    font-size: 1.05rem;
  }

  /* Navbar mobile — menu colapsado mais espaçoso e fácil de tocar */
  .navbar-collapse {
    padding-top: 0.5rem;
  }

  .navbar-nav .nav-link {
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
  }

  #navAuthArea {
    margin-top: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}
