/* ===================== RESET E BASE ===================== */
body {
  font-family: Arial, sans-serif;
  background-image: url('img-carrossel/back.png');
  background-size: cover;       /* Faz a imagem cobrir toda a tela */
  background-repeat: no-repeat; /* Evita que a imagem se repita */
  background-position: center;  /* Centraliza a imagem */
  padding: 20px;
}
/* h1 e h2 */
.titulo-carrossel {
  text-align: center;
  margin: 80px auto;
  max-width: 900px;
  padding: 0 20px;
}

.titulo-carrossel h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 20px;
    top: -5rem;
    line-height: 1.3;
    background: linear-gradient(90deg, #ffcc00, #ff6a00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
}

.titulo-carrossel h1::after {
  content: "";
  display: block;
  width: 100px;
  height: 4px;
  background: linear-gradient(90deg, #ff6a00, #ffcc00);
  margin: 15px auto 0;
  border-radius: 2px;
}

section {
  margin-bottom: 90px;
}

.carrossel {
  position: relative;
  width: 80%;
  margin: 0 auto;
  overflow: hidden;
  padding: 6rem 0;
}

/* ===================== BOTÕES GERAIS ===================== */
.btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  padding: 0.5rem 1rem;
  border-radius: 50%;
}
.prev { left: 10px; }
.next { right: 10px; }

.play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  background: linear-gradient(145deg, #000000, #00038c);
  color: #ffd436;
  border: none;
  border-radius: 50%;
  font-size: 2rem;
  padding: 6px 7px 6px 13px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.2s ease;
  box-shadow: 
    0 5px 10px rgba(0,0,0,0.3),
    inset 0 3px 6px rgba(255,255,255,0.3),
    inset 0 -3px 6px rgba(0,0,0,0.4);
}

@keyframes pulse {
  0%,100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-50%, -50%) scale(1.15); }
}

.carrossel.modelo1 {
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.carrossel.modelo1 .carrossel-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  transition: transform 0.5s ease;
}


.botoes-carrosseis {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 20px 0 40px;
}

.botoes-carrosseis button {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  transition: 0.3s;
}

.botoes-carrosseis button.ativo,
.botoes-carrosseis button:hover {
  background: linear-gradient(90deg, #7b47ff, #00bfff);
  box-shadow: 0 0 15px rgba(123, 71, 255, 0.6);
}

.carrossel-box {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.5s ease;
}

.carrossel-box.ativo {
  display: block;
  opacity: 1;
  transform: translateY(0);
}


/* ===================== MODELO 1 ===================== */
.card1 {
  flex: 0 0 auto;
  width: 260px;
  height: 380px;
  border-radius: 16px;
  overflow: hidden;
  background: #f0f0f0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  transition: transform 0.6s ease, box-shadow 0.6s ease, opacity 0.6s ease;
  opacity: 0.4; /* base mais transparente */
}

.card1 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ativo no centro */
.card1.active {
  transform: scale(1.15);
  opacity: 1;
  box-shadow: 0 12px 25px rgba(0,0,0,0.4);
}

/* Vizinho imediato */
.card1.left,
.card1.right {
  transform: scale(0.9);
  opacity: 0.6;
}

/* Vizinho distante */
.card1.far-left,
.card1.far-right {
  transform: scale(0.7);
  opacity: 0.3;
}


.carrossel-botoes {
  margin-top: 60px;
  display: flex;
  gap: 30px;
}

.carrossel-botoes button {
  background: rgba(255,255,255,0.1);
  color: #fff;
  font-size: 28px;
  border: none;
  cursor: pointer;
  padding: 8px 18px;
  border-radius: 50%;
  transition: background 0.3s;
}

.carrossel-botoes button:hover {
  background: rgba(255,255,255,0.3);
}


/* ===================== MODELO 2 ===================== */
.carrossel.modelo2 .carrossel-container { 
  display: flex;
  justify-content: center;
  gap: 60px;
  transition: transform 0.5s ease;
  align-items: center;
}

.card2 {
  flex: 0 0 auto;
  width: 300px;
  height: 350px;
  background-color: #f0f0f0;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  font-size: 1.5rem;
  position: relative;
  box-shadow: 
    0 5px 10px rgba(0,0,0,0.15),
    0 10px 20px rgba(0,0,0,0.2),
    0 20px 40px rgba(0,0,0,0.25);
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.card2 img, .card2 video { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.card2.active { transform: scale(1.2); background: #e67e22; }
.card2.active .play-btn { opacity: 1; animation: pulse 1.5s infinite; }



/* ===================== MODELO 3 ===================== */
.carrossel.modelo3 .carrossel-container { 
  position: relative;
  width: 100%;
  height: 20rem;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.carrossel.modelo3 .card3 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 35rem;
  height: 20rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease, transform 0.45s ease;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.carrossel.modelo3 .card3.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 5;
}

.carrossel.modelo3 .card3 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}



/* ===================== MODELO 4 ===================== */
.carrossel.modelo5 .carrossel-container {
  display: flex;
  gap: 30px;
  animation: scroll 10s linear infinite;
}

.card5 {
  flex: 0 0 auto;
  width: 300px;
  height: 350px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  background-color: #f0f0f0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
/* ===================== RESPONSIVIDADE ===================== */

/* --- TELA MÉDIA (ex: Tablets em modo paisagem, Telas maiores que o mobile) --- */
@media (max-width: 1024px) {
  .carrossel { 
    width: 90%; /* Aumenta a largura para 90% em telas menores */
  }
  
  .card1, .card2, .card4, .card5 { 
    width: 160px; 
    height: 200px; 
  }
  
  .btn { 
    font-size: 1.8rem; 
    padding: 0.4rem 0.8rem; 
  }
  
  .play-btn { 
    font-size: 1.8rem; 
    padding: 10px 14px; 
  }
}

/* --- TELA PEQUENA (ex: Smartphones grandes) --- */
@media (max-width: 600px) {
    /* O body tem padding de 10px, mas não o alteramos */
    
    .carrossel { 
        width: 100%; /* OK, mas pode estar dentro do padding do body */
        padding: 1rem 0; 
    }
    
    /* *CORREÇÃO ESTRATÉGICA:* Forçamos o modelo 1 a ser a largura total da tela (viewport) */
    .carrossel.modelo1 {
        width: 100vw; /* Ocupa 100% da LARGURA DA VIEWPORT (tela) */
        margin-left: calc(50% - 50vw); /* Truque para centralizar a 100vw */
        /* Isso garante que carrossel1.offsetWidth seja a largura total da tela */
    }

    .carrossel.modelo1 .carrossel-container {
        gap: 15px; 
        padding-left: 0; 
        padding-right: 0; 
    }
    
    .card1, .card2, .card4, .card5 { 
        width: 200px; 
        height: 210px; 
        font-size: 1rem; 
    }

    /* ... outras regras ... */
}
  
  .btn { 
    font-size: 1.5rem; 
    padding: 0.3rem 0.6rem; 
  }
  
  .play-btn { 
    font-size: 1.5rem; 
    padding: 8px 12px; 
  }

  .botoes-carrosseis button {
    padding: 2px 0px;
}
/* carrossel modelo 3 */
.carrossel.modelo3 .card3 img {
    width: 246px;
    height: 250px;
    transform: scaleX(1.2);
    border-radius: 20px;
}

/* --- TELA MUITO PEQUENA (ex: Smartphones pequenos) --- */
@media (max-width: 480px) {
  body {
    /* Mantém as regras de fundo mais agressivas para telas pequenas */
    background-image: url('img-carrossel/back.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    padding: 20px 0; /* Remove padding lateral para telas muito pequenas */
  }

  /* Faz os cards ocuparem um espaço ainda menor */
  .card1, .card2, .card4, .card5 {
    width: 200px;
    height: 200px;
  }
  .botoes-carrosseis {
    display: flex
;
    justify-content: center;
    gap: 15px;
    margin: -100px 0 60px;
}
}