@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;700&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "DM Sans", sans-serif;
    background: #fff;
    overflow-x: hidden;
}

.top-bar {
  display: flex;
  align-items: center !important;
  justify-content: center !important;
  background-color: #54B9CA;
  padding: 0;
  width: 100%;
  height: 260px;
  box-sizing: border-box;
}

.logo {
    width: 173px;
    height: 173px !important;
    margin-right: 40px;
}

.header-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 173px;
}

.header-text h1 {
    font-weight: 700;
    font-size: 80px;
    line-height: 90%;
    margin: 0;
    color: #fff;
    text-align: left;
}

.header-text p {
    font-weight: 300;
    font-size: 20px;
    line-height: 110%;
    margin: 0;
    color: #fff;
}

.hero {
    position: relative;
    width: 100%;
    height: 650px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 650px;
    object-fit: cover;
    display: block;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 650px;
    background-color: #1d1c85;
    opacity: 0.4;
    z-index: 1;
}

.hero-content {
    max-width: 1500px;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 650px;
    padding: 0 40px;
    box-sizing: border-box;
}

.hero-main-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    width: 100%;
    height: 100%;
}

.text-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 60px;
    padding-left: 60px;
    max-width: 800px;
    color: white;
}

.text-content h2 {
    font-weight: 400;
    font-size: 70px;
    line-height: 100%;
    margin: 0 0 60px 60px;
    text-shadow: 2px 2px 4px #000;
}

.hero-right {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    height: 100%;
    padding-bottom: 90px;
    margin-left: 40px;
}

.tags {
    margin-bottom: 30px;
}

.tag {
    background-color: #54b9ca;
    font-size: 30px;
    font-weight: 400;
    padding: 3px 20px;
    margin-right: 10px;
    border-radius: 30px;
    display: inline-block;
}

.ler-agora {
    background-color: #ebbe07;
    font-size: 45px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    width: 262px;
    height: 73px;
    cursor: pointer;
    color: #5756a5;
    margin-top: 10px;
}

.nav-button {
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    z-index: 3;
}

.nav-button img {
    width: 25px;
    height: 41px;
}

.ultimas-postagens {
    padding: 40px;
    text-align: center;
    background-color: #54B9CA;
}

.search-container {
    position: relative;
    display: inline-block;
}

.search {
    width: 693px;
    height: 55px;
    border-radius: 30px;
    border: none;
    padding: 0 20px;
    padding-left: 60px;
    font-size: 18px;
    outline: none;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    pointer-events: none;
}

.titulo {
    font-weight: 700;
    font-size: 50px;
    line-height: 90%;
    letter-spacing: 0%;
    color: white;
    margin-top: 40px;
    margin-bottom: 30px;
    margin-left: 120px;
    text-align: left;
}

.cards-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-direction: row;
}

/* --- MUDANÇA NO CSS DO CARD (PARA BATER COM A IMAGEM) --- */
.card {
  height: 100%; /* Altura total para alinhar nos sliders */
  border-radius: 15px; /* Cantos arredondados (como na imagem) */
  background-color: white;
  padding: 0; /* Remove o padding do card principal */
  box-sizing: border-box;
  display: flex;
  flex-direction: column; /* Organiza o conteúdo em coluna */
  align-items: flex-start;
  position: relative;
  flex-shrink: 0; 
  box-shadow: 0 4px 10px rgba(0,0,0,0.1); /* Sombra suave (como na imagem) */
}

.card-img {
  width: 100%;
  height: 200px; /* Reduzido para parecer mais com a imagem */
  border-radius: 15px 15px 0 0; /* Apenas cantos superiores arredondados */
  object-fit: cover;
  margin-bottom: 0; /* Remove a margem */
  display: block;
}

.card-title {
    font-family: "DM Sans", sans-serif;
    font-weight: 700; /* Mais forte, como na imagem */
    font-size: 20px; /* Reduzido */
    line-height: 1.3;
    color: #333; /* Mais escuro */
    margin: 0; /* Resetado */
    text-align: left;
    width: 100%;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    padding: 20px 20px 0 20px; /* Adiciona padding interno */
}

.card-desc {
    font-family: "DM Sans", sans-serif;
    font-weight: 400;
    font-size: 16px; /* Reduzido */
    line-height: 1.4;
    color: #555; /* Cor mais suave */
    text-align: left;
    width: 100%;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    flex-grow: 1; /* Isso empurra o botão para o final */
    margin: 0; /* Resetado */
    padding: 10px 20px 20px 20px; /* Adiciona padding interno */
}

.card-btn {
    width: auto; /* Largura automática */
    height: auto; /* Altura automática */
    border-radius: 50px;
    background-color: #db4f66;
    border: none;
    color: white;
    font-family: "DM Sans", sans-serif;
    font-weight: 700; /* Mais forte */
    font-size: 16px; /* Reduzido */
    line-height: 1;
    cursor: pointer;
    position: relative; /* Posição normal */
    transform: none;
    align-self: flex-end; /* --- MUDANÇA AQUI: Alinhado à direita --- */
    margin: 0 20px 20px 20px; /* Margem interna */
    padding: 12px 30px; /* Padding interno para tamanho */
}
/* --- FIM DA MUDANÇA NO CSS --- */

.card-btn:active,
.card-btn:focus {
    outline: none;
}

.ultimas-postagens-container, .results-container {
    max-width: 1500px;
    margin: 0 auto;
}

.slider-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.cards-slider {
    display: flex;
    overflow: hidden;
    width: 100%;
    max-width: 1500px;
    scroll-behavior: smooth;
    padding-bottom: 40px; 
    gap: 30px;
    margin: 0 auto;
}

.card {
    /* Esta regra estava duplicada e em conflito. */
    width: calc((100% - 40px) / 2.5);
    min-width: calc((100% - 40px) / 2.5);
    
    /* Largura fixa pode ser melhor para o slider */
    /* width: 512px; */ 
    /* min-width: 512px; */

    margin-right: 0;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.slider-btn {
    background: transparent;
    border: none;
    border-radius: 0;
    width: auto;
    height: auto;
    padding: 0;
    margin: 0 10px;
    box-shadow: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.slider-btn img {
    width: 25px;
    height: 41px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}
.dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.5;
    transition: opacity 0.2s;
}
.dot.active {
    opacity: 1;
    background: #d9d9d9;
}

/* Media Queries para Responsividade */
@media screen and (max-width: 768px) {
  .top-bar {
    height: auto;
    flex-direction: column;
    text-align: center;
  }

  .logo {
    width: 120px;
    height: 120px;
    margin-right: 0;
    margin-bottom: 20px;
  }

  .header-text {
    height: auto;
    align-items: center;
  }

  .header-text h1 {
    font-size: 40px;
    text-align: center;
  }

  .header-text p {
    font-size: 16px;
    text-align: center;
  }

  .hero {
    height: auto;
  }

  .hero-image {
    height: 400px;
  }

  .overlay {
    height: 400px;
  }

  .hero-content {
    height: 400px;
    padding: 0 20px;
  }

  .hero-main-content {
    flex-direction: column;
    align-items: center;
  }

  .text-content {
    padding: 20px;
    align-items: center;
    text-align: center;
  }

  .text-content h2 {
    font-size: 36px;
    margin: 0 0 30px 0;
  }

  .hero-right {
    padding-bottom: 60px;
    margin-left: 0;
  }

  .tag {
    font-size: 20px;
    padding: 2px 15px;
  }

  .ler-agora {
    font-size: 30px;
    width: 200px;
    height: 60px;
  }

  .ultimas-postagens {
    padding: 0;
  }

  .search {
    width: 100%;
    max-width: 693px;
  }

  .titulo {
    font-size: 36px;
    margin-left: 20px;
  }

  .cards-container {
    flex-direction: column;
    align-items: center;
  }

  .card {
    width: 100vw !important;
    max-width: 77vw !important;
    min-width: 77vw !important;
    box-sizing: border-box;
    margin-left: 0 !important;
    margin-right: 0 !important;
    height: 100%; /* Garante altura total */
    padding: 0; /* Resetado para mobile */
  }

  .card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
  }

  .card-title {
    font-size: 22px; /* Ajustado */
    margin: 0; /* Resetado */
    padding: 15px 15px 0 15px; /* Padding mobile */
  }

  .card-desc {
    font-size: 16px; /* Ajustado */
    text-align: left;
    padding: 10px 15px 15px 15px; /* Padding mobile */
  }

  .card-btn {
    width: auto; /* Ajustado */
    height: auto; /* Ajustado */
    font-size: 16px; /* Ajustado */
    transform: none;
    margin: 0 15px 15px 15px; /* Padding mobile */
    padding: 10px 25px; /* Padding mobile */
    align-self: flex-end; /* Mantém alinhamento à direita */
  }

  .cards-slider {
    display: flex;
    flex-wrap: nowrap;
    width: 100vw;
    max-width: 100vw;
    overflow-x: auto;
    gap: 16px;
    justify-content: flex-start;
    scroll-snap-type: x mandatory;
    padding: 0 20px 20px 20px; /* Ajustado para padding */
    box-sizing: border-box; /* Garante que o padding não estoure */
  }

  /* A segunda regra .card estava sobrescrevendo a primeira */
  .cards-slider .card { /* Seja mais específico */
    flex: 0 0 85vw;
    width: 85vw !important;
    max-width: 85vw !important;
    min-width: 85vw !important;
    box-sizing: border-box;
    margin: 0 !important; /* Resetado */
    scroll-snap-align: center;
    height: 100%; /* Altura total */
  }

  .ultimas-postagens-container {
    padding: 0;
    margin: 0;
    max-width: 100vw;
  }
}

@media screen and (max-width: 480px) {
    .header-text h1 {
        font-size: 32px;
    }

    .text-content h2 {
        font-size: 28px;
    }

    .tag {
        font-size: 16px;
    }

    .ler-agora {
        font-size: 24px;
        width: 180px;
        height: 50px;
    }

    .titulo {
        font-size: 28px;
    }

    .card {
        padding: 0; /* Resetado */
    }

    .card-img {
        height: 150px;
    }

    .card-title {
        font-size: 18px; /* Ajustado */
        margin: 0;
        padding: 10px 10px 0 10px;
    }

    .card-desc {
        font-size: 15px; /* Ajustado */
        text-align: left;
        padding: 10px 10px 15px 10px;
    }

    .card-btn {
        width: auto;
        height: auto;
        font-size: 15px;
        margin: 0 10px 10px 10px;
        padding: 10px 20px;
        align-self: flex-end; /* Mantém alinhamento à direita */
    }
}