/* Styles for home page */

/* Estrutura das seções */
.home-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem; /* espaço extra para separar do próximo bloco */
  position: relative;
}
/* Linha sutil e elegante entre seções */
.home-section:not(:last-child)::after {
  content: "";
  display: block;
  width: 80%;
  height: 1px;
  margin: 1.5rem auto 0;
  background: linear-gradient(to right, rgba(0,0,0,0), #e5e5e5, rgba(0,0,0,0));
}
.section-title {
  margin: 0 0 1rem 0;
  font-weight: 600;
  position: relative;
  padding-bottom: 0.4rem; /* espaço para o traço decorativo */
}
/* Traço decorativo sob o título da seção (profissional) */
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 3px;
  border-radius: 3px;
  background: #e404b4; /* cor de destaque */
}
 
 /* Wrapper central */
.home-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}

/* Card do serviço */
.service-card {
   position: relative;
   overflow: hidden;
   border-radius: 12px;
   max-width: 260px; /* limite de largura para não ocupar toda a página */
   margin: 0 auto; /* centralizar o card na coluna */
   padding-bottom: 14px; /* espaço extra no fundo do card */
   margin-bottom: 20px;
   height: 300px; /* altura fixa para todos os cards */
 }
.service-card .card-body {
   padding: 0.5rem 0.75rem 2.25rem 0.75rem; /* espaço reservado para o autor no rodapé */
 }

/* Badge/preço no canto superior direito (aplicado ao .price-badge já existente e ao .price-container solicitado) */
.price-badge,
.price-container {
  width: auto;
  padding: 10px;
  height: 30px;
  background-color: #e404b4; /* cor solicitada */
  position: absolute;
  top: 10px;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  z-index: 2;
}

/* Imagem do serviço */
.service-image {
  width: 100%;
  height: 120px; /* base menor para compactar; será sobrescrita por .card img abaixo */
  object-fit: cover;
  display: block;
}

/* Título e descrição */
.service-title {
  margin: 0.4rem 0 0.2rem 0; /* menos espaço */
  font-size: 0.95rem; /* menor */
  font-weight: 600;
}
.service-desc {
   margin: 0.2rem 12px 0.8rem 12px; /* mais respiro nas laterais e embaixo */
   color: #6c757d;
   font-size: 0.95rem;
   text-align: justify; /* texto justificado */
   text-justify: inter-word; /* distribuição melhor das palavras */
   line-height: 1.5;
   display: -webkit-box;
   -webkit-line-clamp: 4; /* mostra mais 2 linhas (total 4) */
   -webkit-box-orient: vertical;
   overflow: hidden; /* evita ultrapassar o card */
 }
 .service-author {
     position: absolute;
     right: 12px; /* mesma distância lateral da descrição */
     bottom: 10px; /* fixo no rodapé do card */
     font-size: 0.8rem; /* menor */
     color: #6c757d; /* menos destaque */
     font-weight: 500; /* peso mais leve */
     text-align: right; /* alinhado à direita */
   }
 
 /* Ajustes adicionais solicitados pelo usuário */
 .card {
   height: 300px;
   padding: 5px;
 }
 .card:hover {
   cursor: pointer;
   transform: scale(1.05); /* Leve aumento no tamanho */
   transition: transform 0.3s ease, opacity 0.3s ease; /* Transição suave */
 }
 
 /* Imagem dentro do card (sobrepõe .service-image) */
 .card img {
   width: 100%;
   height: 150px;
 }
 
 /* Título dentro do card */
 .card h5 {
   margin-top: 7px;
   color: black;
   text-align: center;
 }
 
 /* Parágrafo dentro do card */
 .card p {
   margin-top: 26px; /* ajustado para acomodar mais linhas da descrição */
   text-align: justify; /* descrição e demais parágrafos justificados */
   text-justify: inter-word;
   font-size: 8pt;
   padding: 0 12px; /* distância igual das laterais */
 }

/* Linha iniciando conteúdo à esquerda (se usado) */
.justify-content-start {
  margin-bottom: 30px;
  border-bottom: 1px solid #dbdbdb;
}

/* Grid responsivo (ajustes complementares) */
@media (max-width: 576px) {
  .service-image { height: 140px; }
}

/* Bloco de estrelas de avaliação no canto inferior esquerdo */
.rating-stars {
  position: absolute;
  left: 12px; /* mesma distância lateral da descrição */
  bottom: 10px; /* mesma linha do autor */
  display: flex;
  gap: 2px;
  z-index: 2;
}
.rating-stars .star {
  font-size: 0.9rem;
  line-height: 1;
  color: #d0d0d0; /* cor das estrelas vazias */
}
.rating-stars .star.filled {
  color: #ffd35a; /* cor das estrelas preenchidas */
}

/* ==========================
   Promo Banner (Topo da Home)
   ========================== */
.promo-banner {
  position: relative;
  max-width: 1200px; /* igual ao .home-wrapper */
  margin: 0 auto 20px; /* centralizado e com espaçamento semelhante às seções */
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fbff 0%, #f5f9ff 100%);
  border: 1px solid #e8eef8;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.promo-inner {
  display: grid;
  grid-template-columns: 3fr 2fr; /* texto 60%, ilustração 40% */
  gap: 16px;
  align-items: center;
  padding: 18px 20px; /* respiro similar às seções */
}
.promo-info { color: #1f2a44; }
.promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, #ff4fd8 0%, #ff7ee6 60%, #ffc0f3 100%);
  color: #2b0b22;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 12px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(255, 79, 216, 0.25);
}
.promo-title {
  margin: 10px 0 6px;
  font-weight: 700;
  letter-spacing: 0.1px;
  font-size: clamp(1.25rem, 2.1vw, 1.8rem);
  color: #111827;
}
.promo-subtitle {
  margin: 4px 0 10px;
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: #5b6b88;
}
.promo-actions { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; max-width: 620px; }
.promo-search {
  position: relative;
  display: flex;
  align-items: center;
  border-radius: 14px;
  border: 2px solid rgba(139, 49, 255, 0.36);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(139, 49, 255, 0.16);
  padding: 0 14px;
}
.promo-search:focus-within {
  border-color: #e404b4;
  box-shadow: 0 14px 30px rgba(228, 4, 180, 0.24);
}
.promo-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8b31ff;
  margin-right: 8px;
}
.promo-search-input {
  width: 100%;
  min-height: 52px;
  border: none;
  outline: none;
  background: transparent;
  color: #1f2a44;
  font-size: 1rem;
  font-weight: 600;
  padding-right: 182px;
}
.promo-search-input::-webkit-search-decoration,
.promo-search-input::-webkit-search-results-button,
.promo-search-input::-webkit-search-results-decoration {
  display: none;
}
.promo-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0 2px 0 10px;
  border-radius: 999px;
  cursor: pointer;
  background:
    linear-gradient(45deg, transparent 43%, #7a86a3 43%, #7a86a3 57%, transparent 57%),
    linear-gradient(-45deg, transparent 43%, #7a86a3 43%, #7a86a3 57%, transparent 57%),
    linear-gradient(180deg, #f7f9fc 0%, #e8edf7 100%);
  border: 1px solid rgba(122, 134, 163, 0.28);
  box-shadow: 0 2px 6px rgba(122, 134, 163, 0.16);
}
.promo-search-input::-webkit-search-cancel-button:hover {
  filter: brightness(0.97);
}
.promo-search-input::-webkit-search-cancel-button:active {
  transform: scale(0.96);
}
.promo-search-input::placeholder {
  color: #7a86a3;
  font-weight: 500;
}
.promo-search-hint {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  color: #8a95ad;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.18s ease, visibility 0.18s ease;
}
.promo-search:focus-within .promo-search-hint,
.promo-search-input:not(:placeholder-shown) ~ .promo-search-hint {
  opacity: 0;
  visibility: hidden;
}
.promo-wallet-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6b5d85;
  font-size: 0.85rem;
  font-weight: 600;
}
.promo-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 10px;
  background: linear-gradient(90deg, #ff4fd8 0%, #8b31ff 100%); /* mesma identidade do site */
  color: white;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(139, 49, 255, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}
.promo-cta:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 12px 24px rgba(139, 49, 255, 0.36);} 
.promo-cta:active { transform: translateY(0); filter: brightness(0.96);} 
.cta-icon { opacity: 0.96; }

/* Lista de destaques: vertical, alinhada, sem animação exagerada */
.promo-ticker {
  list-style: none;
  padding: 0;
  margin: 10px 0 0 0;
  display: grid;
  grid-auto-flow: row;
  gap: 6px;
}
.promo-ticker li {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 6px 10px;
  border-radius: 10px;
  color: #1f2a44;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

/* Ilustração com formas flutuantes sutis */
.promo-illustration { position: relative; }
.promo-art { width: 100%; height: auto; max-height: 220px; }
.float-slow { animation: float 8s ease-in-out infinite; }
.float-medium { animation: float 6s ease-in-out infinite; }
.float-fast { animation: float 4.5s ease-in-out infinite; }
@keyframes float { 0% { transform: translateY(0); } 50% { transform: translateY(-6px);} 100% { transform: translateY(0);} }
.twinkle { animation: twinkle 2.2s ease-in-out infinite; }
.twinkle2 { animation: twinkle 2.8s ease-in-out infinite; }
@keyframes twinkle { 0% { opacity: 0.6; transform: scale(0.95);} 50% { opacity: 1; transform: scale(1);} 100% { opacity: 0.6; transform: scale(0.95);} }

/* Responsivo */
@media (max-width: 992px) {
  .promo-inner { grid-template-columns: 1fr; padding: 16px 16px; }
  .promo-art { max-height: 180px; }
}
@media (max-width: 576px) {
  .promo-banner { border-radius: 10px; }
  .promo-title { font-size: 1.25rem; }
  .promo-subtitle { font-size: 0.95rem; }
  .promo-cta { padding: 10px 14px; border-radius: 9px; }
  .promo-search-input { min-height: 48px; padding-right: 44px; }
  .promo-search-hint { display: none; }
}

.home-freela-cta {
  margin: 18px auto 6px;
  max-width: 860px;
  border-radius: 16px;
  padding: 18px 20px;
  background: linear-gradient(115deg, #ffffff 0%, #fff3fc 52%, #f7edff 100%);
  border: 1px solid rgba(228, 4, 180, 0.22);
  box-shadow: 0 14px 32px rgba(139, 49, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.home-freela-cta-text {
  margin: 0;
  color: #2e2b3f;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.35;
}

.home-freela-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 11px 20px;
  min-height: 44px;
  background: linear-gradient(90deg, #e404b4 0%, #8b31ff 100%);
  color: #fff !important;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(139, 49, 255, 0.28);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.home-freela-cta-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(139, 49, 255, 0.34);
  filter: brightness(1.03);
}

.home-freela-cta-button:active {
  transform: translateY(0);
  filter: brightness(0.97);
}

@media (max-width: 768px) {
  .home-freela-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 16px;
  }

  .home-freela-cta-button {
    width: 100%;
  }
}
