:root {
  --ccm-red: #d50000;
  --ccm-green: #007a33;
}

body {
  font-family: "Poppins", sans-serif;
  background-color: #f8f9fa;
  color: #212529;
}

.btn-danger {
  background-color: var(--ccm-red);
  border-color: var(--ccm-red);
}
.btn-danger:hover {
  background-color: #b00000;
  border-color: #b00000;
}

footer a {
  color: #fff;
  text-decoration: underline;
}

/* --- Galeria --- */
.gallery-thumb {
  aspect-ratio: 4/3;
  object-fit: cover;
  width: 100%;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.6rem;
}
.gallery-item:hover img {
  transform: scale(1.03);
  transition: transform 0.25s ease;
}

/* =========================================================
   HERO SLIDER — Fundo estático + Overlay + Animações L/R
   ========================================================= */

/* ===== HERO FULL WIDTH / HEIGHT ===== */
.hero-slider {
  position: relative;
  width: 100vw;
  height: 100vh; /* ocupa toda a altura da tela */
  overflow: hidden;
  margin: 0;
  padding: 0;
  background: #000; /* evita "piscar" no carregamento */
  color: #fff;
  z-index: 2;
}

/* ===== SLIDES ===== */
.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.02);
  transition: opacity 1s ease, transform 1.5s ease, visibility 0s linear 1s;
}
.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  z-index: 3;
  transition: opacity 1s ease, transform 1.5s ease;
}

/* ===== OVERLAY (transparente) ===== */
.hero-overlay {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important; /* sem escurecimento */
}

/* ===== CONTAINER / GRID ===== */
.hero-container {
  width: 100%;
  max-width: 1400px;
  padding: 0 4vw;
  margin: 0 auto;
}

.hero-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
}
.hero-row.reverse {
  flex-direction: row-reverse;
}

.hero-col {
  flex: 1 1 45%;
  min-width: 280px;
}

/* ===== FIGURE ===== */
.hero-figure img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  object-fit: cover;
  backface-visibility: hidden;
}

/* ===== TEXTOS ===== */
.hero-content {
  max-width: 600px;
}

.hero-kicker {
  display: inline-block;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  color: #fff;
  font-size: clamp(0.72rem, 0.6vw + 0.55rem, 0.85rem);
  line-height: 1;
  vertical-align: middle;
  white-space: nowrap;
}

.hero-title {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

.hero-lead {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ===== ANIMAÇÕES ENTRADA (JS) ===== */
.anim {
  opacity: 0;
  transform: translateX(var(--tx, 0));
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}
.anim.in {
  opacity: 1;
  transform: translateX(0);
}
.from-left {
  --tx: -42px;
}
.from-right {
  --tx: 42px;
}

/* ===== CONTROLES E INDICADORES ===== */
.hero-controls {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.5rem;
  pointer-events: none;
}
.hero-controls .hero-btn {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.2);
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: background 0.3s ease;
}
.hero-controls .hero-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}
.hero-controls .hero-btn:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  display: flex;
  gap: 0.4rem;
  justify-content: center;
}
.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: 0;
  transition: background 0.25s ease;
}
.hero-dot.is-active {
  background: #fff;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 992px) {
  .hero-slider {
    height: auto;
    min-height: 100svh;
  }
  .hero-row {
    flex-direction: column;
    text-align: center;
  }
  .hero-col {
    flex: 1 1 100%;
  }
  .hero-content {
    margin-top: 1rem;
  }
  .hero-slide {
    background-attachment: scroll; /* remove parallax mobile */
  }
}

/* ===== ORIENTAÇÃO PAISAGEM ===== */
@media (orientation: landscape) {
  .hero-overlay {
    display: flex;
    align-items: center;
  }
  .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
  }
}

/* ===== ORIENTAÇÃO RETRATO ===== */
@media (orientation: portrait) {
  .hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1rem 1.5rem;
    z-index: 2;
    text-align: left;
  }

  /* Gradiente suave atrás do texto */
  .hero-content::before {
    content: "";
    position: absolute;
    inset: 0;
    top: auto;
    height: 50%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.65), transparent);
    z-index: -1;
  }

  .hero-title,
  .hero-lead,
  .hero-kicker {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45), 0 1px 2px rgba(0, 0, 0, 0.35);
  }
}

/* ===== ACESSIBILIDADE ===== */
@media (prefers-reduced-motion: reduce) {
  .anim,
  .hero-slide {
    transition: none !important;
  }
}

#btn-topo {
  position: fixed;
  bottom: 1.75rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background-color: var(--ccm-green);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
  z-index: 999;
}
#btn-topo:hover {
  background-color: #009f47;
  transform: translateY(-2px);
}
#btn-topo.show {
  opacity: 1;
  visibility: visible;
}
#btn-topo i {
  font-size: 1.2rem;
  line-height: 1;
}

/* ============================================================
   SOCIAL BAR — lateral com expansão no hover + aparição pós-HERO
   ============================================================ */
/* ===== Social Bar (tooltips no hover/foco) ===== */
nav.social-bar {
  position: fixed;
  top: 28vh;
  right: 10px;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
nav.social-bar.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

nav.social-bar .social-list {
  display: grid;
  gap: 0.5rem;
}

nav.social-bar .social-link {
  --_size: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--_size);
  height: var(--_size);
  background: var(--sb-color, #6c757d);
  color: #fff;
  text-decoration: none;
  border-radius: 0.6rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, filter 0.2s ease;
  pointer-events: auto;
}
nav.social-bar .social-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}
nav.social-bar .social-link i {
  font-size: 1.15rem;
  line-height: 1;
}

@media (max-width: 575.98px) {
  nav.social-bar .social-link {
    --_size: 44px;
  }
}

/* ===== Parallax CTA (fundo fixo no desktop, fallback no mobile) ===== */
.parallax-cta {
  position: relative;
  isolation: isolate;
  padding: clamp(3rem, 7vw, 6rem) 0;
  background-color: #0a0a0a; /* fallback */
  overflow: hidden;
}

/* Fundo e overlay via pseudo-elementos para evitar markup extra */
.parallax-cta::before,
.parallax-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
}

/* Fundo */
.parallax-cta::before {
  background-image: var(--pc-bg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed; /* parallax desktop */
}
@media (max-width: 991.98px) {
  .parallax-cta::before {
    background-attachment: scroll;
  } /* fallback mobile */
}

/* Overlay escuro ajustável */
.parallax-cta::after {
  z-index: -1;
  transition: background 0.25s ease;
}

/* Tipografia */
.parallax-cta h2 {
  line-height: 1.15;
}
.parallax-cta p {
  line-height: 1.45;
  color: #f8f9fa !important;
}

/* Micro-interação no CTA */
.parallax-cta .btn {
  transform: translateZ(0);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.parallax-cta .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

/* === NOSSA HISTÓRIA === */
#historia {
  background-color: #fff;
}

#historia .lead {
  font-size: 1.05rem;
  line-height: 1.6;
}

#historia img {
  transition: transform 0.4s ease;
}

#historia img:hover {
  transform: scale(1.03);
}

/* Em telas menores, centraliza o texto e espaça melhor */
@media (max-width: 768px) {
  #historia .col-lg-7 {
    text-align: center;
  }
  #historia .btn {
    margin-top: 0.75rem;
  }
}
