/*
 * Jumb Landing Page - Theme Overrides
 * Maps the Jumb brand palette (Ocean Blue) onto the Sneat/Bootstrap design
 * tokens loaded from assets/vendor/css/core.css, front-page.css and
 * front-page-landing.css. Keep this file small and specific: layout and
 * component structure come from Sneat, this file only adjusts colors and
 * the few sections where Jumb content differs from the Sneat demo
 * (mainly the hero, which keeps the real background video).
 */

/* ═══════════════════════════════════════════════════════════
   BRAND TOKENS
   ═══════════════════════════════════════════════════════════ */

:root {
  --jumb-ocean: #0066CC;
  --jumb-ocean-dark: #004C99;
  --jumb-mint: #00C8A0;
  --jumb-orange: #FF6B35;
}

/* Bootstrap/Sneat primary color -> Jumb Ocean Blue.
   Buttons, badges, links, etc. read these custom properties via
   color-mix()/rgba(), so overriding them recolors the whole template. */
[data-bs-theme=light] {
  --bs-primary: var(--jumb-ocean);
  --bs-primary-rgb: 0, 102, 204;
  --bs-primary-text-emphasis: var(--jumb-ocean-dark);
  --bs-primary-bg-subtle: #e1eefb;
  --bs-primary-border-subtle: #99c6ec;
}

html {
  /* Anchors (nav links, footer links) land below the fixed navbar. */
  scroll-padding-top: 6rem;
}

/* ═══════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════ */

.app-brand-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════
   HERO - real background video
   Ported from the previous css/main.css hero implementation so the
   video behavior (loading, autoplay-with-sound-once, mute toggle,
   pause on tab hidden) keeps working with website/js/main.js untouched.
   ═══════════════════════════════════════════════════════════ */

.landing-hero.jumb-hero {
  padding-block-start: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #0066cc 0%, #126478 50%, #0d4f5f 100%);
  overflow: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.landing-hero.jumb-hero::after {
  content: none;
}

.jumb-hero .hero__video-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 65%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

@media (max-width: 1023.98px) {
  .jumb-hero .hero__video-bg {
    width: 100%;
    opacity: 0.3;
  }
}

.jumb-hero .hero__video {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.jumb-hero .hero__video-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: linear-gradient(180deg, #0066cc 0%, #126478 50%, #0d4f5f 100%);
  z-index: 5;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.jumb-hero .hero__video-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.jumb-hero .hero__video-loader-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--jumb-mint);
  border-radius: 50%;
  animation: jumb-spin 1s linear infinite;
}

@keyframes jumb-spin {
  to { transform: rotate(360deg); }
}

.jumb-hero .hero__video-loader-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  font-weight: 500;
}

.jumb-hero .hero__video-loader-progress {
  width: 200px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 9999px;
  overflow: hidden;
}

.jumb-hero .hero__video-loader-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, var(--jumb-orange) 0%, #ff8a65 100%);
  border-radius: 9999px;
  transition: width 0.3s ease;
}

.jumb-hero .hero__gradient-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    hsl(207, 100%, 20%) 0%,
    hsl(207, 100%, 20%) 35%,
    hsla(207, 100%, 20%, 0.95) 42%,
    hsla(207, 100%, 20%, 0.85) 48%,
    hsla(207, 100%, 20%, 0.6) 55%,
    hsla(207, 100%, 20%, 0.35) 65%,
    hsla(207, 100%, 20%, 0.15) 75%,
    hsla(207, 100%, 20%, 0.05) 85%,
    transparent 95%
  );
  pointer-events: none;
}

@media (max-width: 1023.98px) {
  .jumb-hero .hero__gradient-overlay {
    background: linear-gradient(
      180deg,
      hsla(207, 100%, 20%, 0.95) 0%,
      hsla(207, 100%, 20%, 0.8) 40%,
      hsla(207, 100%, 20%, 0.6) 70%,
      hsla(207, 100%, 20%, 0.4) 100%
    );
  }
}

.jumb-hero .hero__video-mute {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.jumb-hero .hero__video-mute:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.jumb-hero .hero__video-mute-icon {
  width: 24px;
  height: 24px;
  fill: white;
}

.jumb-hero .hero__video-mute-icon--off {
  display: none;
}

.jumb-hero .hero__video-mute.muted .hero__video-mute-icon--on {
  display: none;
}

.jumb-hero .hero__video-mute.muted .hero__video-mute-icon--off {
  display: block;
}

@media (max-width: 1023.98px) {
  .jumb-hero .hero__video-mute {
    bottom: 100px;
    right: 1rem;
  }
}

/* Hero text content */
.jumb-hero .hero-content {
  position: relative;
  z-index: 2;
}

.jumb-hero .hero-tagline {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--jumb-mint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.jumb-hero .jumb-hero-title {
  color: #fff;
  font-weight: 800;
  line-height: 1.15;
}

.jumb-hero .jumb-hero-title-highlight {
  background: linear-gradient(135deg, var(--jumb-mint), var(--jumb-orange));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.jumb-hero .hero-description {
  color: rgba(255, 255, 255, 0.85);
  max-width: 32rem;
}

.jumb-hero .btn-app-store {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #1c1c1c;
  color: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: 0.75rem;
  transition: transform 0.2s ease, background-color 0.2s ease;
  text-decoration: none;
}

.jumb-hero .btn-app-store:hover {
  background: #000;
  color: #fff;
  transform: translateY(-2px);
}

.jumb-hero .btn-app-store .btn-app-store-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

.jumb-hero .btn-app-store-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.jumb-hero .btn-app-store-label {
  font-size: 0.7rem;
  opacity: 0.8;
}

.jumb-hero .btn-app-store-name {
  font-size: 1rem;
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════
   CATEGORIES
   ═══════════════════════════════════════════════════════════ */

.jumb-category-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: 9999px;
}

/* ═══════════════════════════════════════════════════════════
   CTA - Seja Guia
   Sneat's .landing-cta expects a background image we did not copy
   (Part B keeps only the assets actually used); use a brand gradient
   instead so the section still stands out.
   ═══════════════════════════════════════════════════════════ */

.landing-cta.jumb-cta {
  background: linear-gradient(135deg, var(--jumb-ocean) 0%, var(--jumb-mint) 100%);
  border-radius: 1.5rem;
  color: #fff;
}

.jumb-cta .jumb-cta-title,
.jumb-cta .jumb-cta-text {
  color: #fff;
}

.jumb-cta .btn-light {
  --bs-btn-color: var(--jumb-ocean-dark);
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   Sneat colors the footer-top background via a background image
   (not copied, see Part B) — paint it with the dark token instead.
   ═══════════════════════════════════════════════════════════ */

.landing-footer .footer-top {
  background-color: var(--bs-footer-top-bg, #241d31);
}

.landing-footer .footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: background-color 0.2s ease;
}

.landing-footer .footer-social-link:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   TERMOS / POLICY DOCUMENTS PAGES
   ═══════════════════════════════════════════════════════════ */

.policy-document-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.policy-document-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--bs-box-shadow);
}

/* policy_documents.content is plain text (see migrations/061_policy_documents.sql),
   rendered via textContent + this pre-wrap rule — never innerHTML. */
.policy-document-text {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════
   MENU/RODAPÉ COMPARTILHADOS (elements/menu_header.html e
   elements/footer.html, injetados via assets/js/include.js)
   ═══════════════════════════════════════════════════════════ */

/* Reserva espaço aproximado enquanto o fetch não resolve, pra reduzir
   o "pulo" da página quando o menu/rodapé aparecem. A classe
   "include-pending" é removida por assets/js/include.js assim que o
   conteúdo real é injetado — sem isso, o min-height ficaria "preso"
   mesmo depois do rodapé/menu reais carregarem, deixando uma faixa em
   branco caso o conteúdo real seja mais baixo que a reserva. */
#site-header.include-pending {
  min-height: 84px;
}

#site-footer.include-pending {
  min-height: 420px;
}
