@import "../../global/global.css";

/* ==========================================================================
   ESTILOS GLOBAIS DA PÁGINA
   ========================================================================== */
body {
  overflow-x: hidden;
  padding: 0;
}

/* Cor de seleção de texto personalizada */
::selection {
  background-color: var(--cor-rosa-escuro);
  color: var(--cor-branca);
}

/* ==========================================================================
   HEADER RESPONSIVO (IMPLEMENTAÇÃO COMPLETA DO SOBRE-NOS.PHP)
   ========================================================================== */

/* Container principal alinhado */
.navbar > .container {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
}

.navbar {
  background: #fafafa;
  padding: 0.5rem 1rem;
  margin-bottom: 0 !important;
  position: relative;
  z-index: 1030;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.navbar-logo {
  width: clamp(60px, 10vw, 80px);
  height: clamp(60px, 10vw, 80px);
  object-fit: contain;
  user-select: none;
}

.navbar-nav {
  gap: 1.5rem;
  align-items: center;
  flex-direction: row !important;
  margin: 0 !important;
}

.nav-link {
  font-weight: bold !important;
  cursor: pointer;
  position: relative;
  padding: 10px 15px;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  font-size: 1.5rem !important;
  white-space: nowrap;
  border-radius: 4px;
}

.navlink {
  color: var(--cor-cinza-texto);
}

.navlink::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 15px;
  width: calc(100% - 30px);
  height: 2px;
  background: var(--cor-rosa-escuro);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.navlink:hover,
.navlink:focus {
  color: var(--cor-rosa-escuro) !important;
}

.navlink:hover::after,
.navlink:focus::after,
.navlink.active::after {
  transform: scaleX(1);
}

.navlink.active {
  color: var(--cor-rosa-escuro) !important;
}

.loginlink {
  color: var(--cor-vermelho) !important;
  position: relative;
  margin-left: 0 !important;
}

.loginlink::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 15px;
  width: calc(100% - 30px);
  height: 2px;
  background: var(--cor-vermelho);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.loginlink:hover,
.loginlink:focus {
  color: var(--cor-vermelho);
}

.loginlink:hover::after,
.loginlink:focus::after {
  transform: scaleX(1);
}

/* Remove a barra vertical antiga do loginlink */
.loginlink::before {
  display: none;
}

/* Para usuário NÃO LOGADO - Barra entre Ajuda e Entrar */
.navbar-nav .nav-item:has(.loginlink) {
  position: relative;
}

.navbar-nav .nav-item:has(.loginlink)::before {
  content: "|";
  position: absolute;
  left: -12px;
  top: 45%;
  transform: translateY(-50%);
  color: var(--cor-cinza);
  font-weight: 300;
  font-size: 1.8rem;
}

/* Alternativa mais compatível se o :has() não funcionar */
.navbar-nav .nav-item + .nav-item:has(.loginlink)::before {
  content: "|";
  position: absolute;
  left: -12px;
  top: 45%;
  transform: translateY(-50%);
  color: var(--cor-vermelho);
  font-weight: 500;
  font-size: 1.8rem;
}

/* Fallback para navegadores que não suportam :has() */
.navbar-nav .nav-item:nth-child(2) + .nav-item::before {
  content: "|";
  position: absolute;
  left: -12px;
  top: 45%;
  transform: translateY(-50%);
  color: var(--cor-vermelho);
  font-weight: 500;
  font-size: 1.8rem;
}

.navbar-nav .nav-item.position-relative {
  padding-left: 8px;
}

/* Ícone de perfil quando LOGADO */
.profile-icon.logged-in,
.sidebar-profile-icon.logged-in {
  color: var(--cor-vermelho) !important;
  font-size: 3rem;
}

/* Ícone de perfil quando NÃO LOGADO (Visitante) */
.sidebar-profile-icon.logged-out {
  color: var(--cor-cinza) !important;
  opacity: 0.7;
  font-size: 4rem;
}

/* Container do perfil logado */
.profile-info-link .d-flex {
  flex-direction: row-reverse;
}

.profile-name {
  font-size: 1.1rem;
  font-weight: bold;
}

.profile-info-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-icon {
  font-size: 2rem;
  color: #555;
}

/* ==========================================================================
   OFFCANVAS - ESTILOS COMPLETOS
   ========================================================================== */
.offcanvas {
  position: fixed;
  z-index: 1045;
  transition: transform 0.3s ease-in-out;
  visibility: visible !important;
}

.offcanvas-end {
  transform: translateX(100%);
}

.offcanvas.show {
  transform: translateX(0);
}

.offcanvas-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  width: 100vw;
  height: 100vh;
  background-color: #000;
}

.offcanvas-backdrop.show {
  opacity: 0.5;
}

.offcanvas-header {
  border-bottom: 1px solid #eee;
}

.offcanvas-title {
  font-weight: bold;
  color: #e87a7a;
}

.profile-sidebar {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.profile-nav .nav-link {
  color: var(--cor-cinza-texto);
  font-weight: 500;
  font-size: 1rem;
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
  margin-bottom: 0.25rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.profile-nav .nav-link:hover {
  background-color: var(--cor-laranja-claro);
  color: var(--cor-rosa-escuro);
}

.profile-nav .nav-link.active {
  background-color: var(--cor-vermelho);
  color: var(--cor-branca);
}

.logout-link-sidebar {
  color: var(--cor-vermelho) !important;
}

.logout-link-sidebar:hover {
  background-color: #fcebeb !important;
}

.loginlink-sidebar {
  color: var(--cor-vermelho) !important;
  font-weight: 600;
}

.loginlink-sidebar:hover {
  background-color: #fcebeb !important;
  color: var(--cor-vermelho) !important;
}

/* ==========================================================================
   RESPONSIVIDADE COMPLETA
   ========================================================================== */

/* Para usuário NÃO LOGADO - em telas menores que 1000px, esconde os links da navbar */
@media (max-width: 1199.98px) {
  .d-none.d-xl-block .navbar-nav {
    display: none !important;
  }
  
  .navbar button[data-bs-toggle="offcanvas"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
}

/* Ajustes para telas muito pequenas */
@media (max-width: 575.98px) {
  .profile-name {
    display: none !important;
  }
  
  .profile-icon.logged-in {
    font-size: 2.2rem;
  }
}

/* Ajustes para tablets */
@media (max-width: 991.98px) {
  .navbar {
    background-color: var(--cor-branca);
    box-shadow: rgba(0, 0, 0, 0.1) 0px 4px 12px;
  }
  
  .navbar-nav {
    gap: 0.5rem;
  }
}

/* Ajustes para mobile */
@media (max-width: 767.98px) {
  .offcanvas {
    width: 85% !important;
  }
}

/* Corrige possíveis problemas de offcanvas */
body.offcanvas-open {
  overflow: hidden;
}

html.offcanvas-open,
body.offcanvas-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
}

/* Garante que o conteúdo principal não seja afetado pelo offcanvas */
main, section, footer {
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .offcanvas {
    width: 400px !important;
  }
}

/* --- PREFERÊNCIA POR REDUÇÃO DE MOVIMENTO --- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .navbar,
  .navlink::after {
    transition: none;
  }
}

.hero-ajuda h1{
    font-family: "Poppins", sans-serif;
    font-weight: bold;
    font-style: normal;
    color: var(--cor-cinza-texto);
    font-size: 3rem;
    margin-top: 3rem;
}

/* ==========================================================================
   ESTILOS DO ACCORDION DE PERGUNTAS FREQUENTES
   ========================================================================== */

.perguntas-acordion {
  background-color: var(--cor-branca);
  min-height: 60vh;
}

.perguntas-acordion h2 {
  color: var(--cor-cinza-texto);
  font-weight: bold;
  font-size: 2.5rem;
}

.accordion-item {
  border: 2px solid var(--cor-laranja-claro);
  border-radius: 12px !important;
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-item:hover {
  border-color: var(--cor-rosa-escuro);
  box-shadow: 0 4px 12px rgba(232, 122, 122, 0.15);
}

.accordion-button {
  background-color: var(--cor-branca);
  color: var(--cor-cinza-texto);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 1.25rem 1.5rem;
  transition: all 0.3s ease;
  box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
  background-color: var(--cor-laranja-claro);
  color: var(--cor-rosa-escuro);
}

.accordion-button:focus {
  border-color: var(--cor-rosa-escuro);
  box-shadow: 0 0 0 0.25rem rgba(232, 122, 122, 0.25);
}

.accordion-button:not(.collapsed) {
    color: var(--cor-vermelho) !important;
    background-color: rgb(255, 194, 194, 0.3) !important;
}

.accordion-button::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e87a7a'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transform: rotate(-90deg);
  transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed)::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23e87a7a'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
  transform: rotate(0deg);
}

.faq-question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background-color: var(--cor-rosa-escuro);
  color: var(--cor-branca);
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: bold;
}

.accordion-button:not(.collapsed) .faq-question-number {
  background-color: var(--cor-vermelho);
}

.accordion-body {
  padding: 1.5rem;
  background-color: var(--cor-branca);
  color: var(--cor-cinza-texto);
  line-height: 1.6;
}

.accordion-body p {
  margin-bottom: 1rem;
}

.accordion-body ul,
.accordion-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.accordion-body li {
  margin-bottom: 0.5rem;
}

.accordion-body strong {
  color: var(--cor-rosa-escuro);
}

.perguntas-acordion .btn-primary {
  background-color: var(--cor-vermelho);
  border-color: var(--cor-vermelho);
  padding: 0.75rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.perguntas-acordion .btn-primary:hover {
  background-color: var(--cor-rosa-escuro);
  border-color: var(--cor-rosa-escuro);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(232, 122, 122, 0.3);
}

/* Responsividade para o accordion */
@media (max-width: 768px) {
  .perguntas-acordion h2 {
    font-size: 2rem;
  }
  
  .accordion-button {
    font-size: 1rem;
    padding: 1rem 1.25rem;
  }
  
  .faq-question-number {
    width: 25px;
    height: 25px;
    font-size: 0.8rem;
  }
}

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

.adopt-btn {
  position: relative; /* Essencial para o posicionamento dos filhos */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 3rem; /* Padding para dar tamanho, mais flexível que width/height */
  background-color: #b92b2b; /* Um vermelho mais próximo da imagem */
  color: #f0e9e9;
  border-radius: 16px;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 2vw, 2rem); /* Fonte grande e responsiva */
  text-transform: none; /* Remove o uppercase */
  cursor: pointer;
  overflow: hidden; /* Garante que nada vaze das bordas arredondadas */
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
  /* Sombra principal do botão para dar o efeito de flutuação */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.19);
  border: none;
}

/* O texto do botão com efeito 3D */
.adopt-btn span {
  position: relative;
  z-index: 2; /* O texto fica ACIMA do coração */
  /* Sombra do texto para dar profundidade e destacá-lo */
  text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.3);
}

/* O coração com efeito de baixo-relevo (inset) */
.heart-background {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1; /* Fica entre o fundo do botão e o texto */
  font-size: 1rem; /* Menor */
  line-height: 1;
  color: #a82626; /* Cor base do coração, um pouco mais escura que o botão */
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3),
    -1px -1px 2px rgba(255, 255, 255, 0.05);
}

/* Efeitos de Interação */
.adopt-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25), 0 10px 25px rgba(0, 0, 0, 0.22);
}

.adopt-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.adopt-btn:focus-visible {
  outline: 3px solid var(--cor-rosa-pastel), #ffc2c2;
  outline-offset: 3px;
}


.heart-background {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  margin-top: 5px;
  font-size: 3rem;
  line-height: 1;
  color: #a82626;
  text-shadow: 1px 2px 2px rgba(255, 255, 255, 0.986),
    -2px -2px 3px rgba(0, 0, 0, 0.363);
}

.adopt-btn span {
  position: relative;
  z-index: 1;
  white-space: nowrap;
  overflow: hidden;
}


@media (min-width: 1500px) {
  .btn-container {
    margin-top: 6rem;
  }
}

@media (max-width: 992px) {
  .heart-background {
    margin-top: 3px;
    font-size: 2.5rem;
  }
}
@media (max-width: 775px) {
  .heart-background {
    margin-top: 3px;
    font-size: 2rem;
  }
}
@media (max-width: 575px) {
  .heart-background {
    margin-top: 3px;
  }
}

/* ==========================================================================
   ESTILOS DO FORMULÁRIO DE CONTATO COM TINYMCE
   ========================================================================== */

.contact-form {
  background: linear-gradient(135deg, var(--cor-laranja-claro) 0%, #f8f9fa 100%);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.contact-form .form-label {
  color: var(--cor-cinza-texto);
  font-weight: 600;
  font-size: 1.1rem;
}

.contact-form .form-control {
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.contact-form .form-control:focus {
  border-color: var(--cor-rosa-escuro);
  box-shadow: 0 0 0 0.2rem rgba(232, 122, 122, 0.25);
}

.contact-form .form-control:read-only {
  background-color: #f8f9fa;
  opacity: 0.8;
}

/* Estilos para o container do TinyMCE */
.tox-tinymce {
  border-radius: 8px !important;
  border: 2px solid #dee2e6 !important;
  transition: all 0.3s ease !important;
}

.tox-tinymce:focus-within {
  border-color: var(--cor-rosa-escuro) !important;
  box-shadow: 0 0 0 0.2rem rgba(232, 122, 122, 0.25) !important;
}

/* Ajustes para a toolbar do TinyMCE */
.tox-toolbar {
  background: #f8f9fa !important;
}

/* Responsividade do formulário */
@media (max-width: 768px) {
  .contact-form {
    padding: 1.5rem !important;
    margin: 1rem 0 !important;
  }
  
  .contact-form h4 {
    font-size: 1.5rem;
  }
}

/* Estados do formulário */
#formContato .is-invalid {
  border-color: #dc3545 !important;
}

#formContato .is-valid {
  border-color: #198754 !important;
}

.feedback-message {
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.text-success {
  color: #198754 !important;
}

.text-danger {
  color: #dc3545 !important;
}

/* ==========================================================================
   ESTILOS DOS CARDS DE REDIRECIONAMENTO
   ========================================================================== */

.cards-route {
  background-color: var(--cor-branca);
  box-shadow: rgba(17, 17, 26, 0.1) 0px 4px 16px, rgba(17, 17, 26, 0.1) 0px 8px 24px, rgba(17, 17, 26, 0.1) 0px 16px 56px;
}

.card-route {
  background: var(--cor-branca);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.card-route::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--cor-vermelho), var(--cor-rosa-escuro));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.card-route:hover {
  transform: translateY(-2px);
  box-shadow: rgba(17, 17, 26, 0.1) 0px 4px 16px, rgba(17, 17, 26, 0.05) 0px 8px 32px;
  border-color: var(--cor-laranja-claro);
}

.card-route:hover::before {
  transform: scaleX(1);
}

.card-route-link:hover {
  text-decoration: none;
}

.card-route-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--cor-rosa-pastel);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.card-route:hover .card-route-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, var(--cor-rosa-escuro), var(--cor-vermelho));
}

.card-route-icon i {
  font-size: 2.5rem;
  color: var(--cor-branca);
  transition: all 0.3s ease;
}

.card-route:hover .card-route-icon i {
  color: var(--cor-branca);
}

.card-route-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-route-title {
  color: var(--cor-cinza-texto);
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
}

.card-route:hover .card-route-title {
  color: var(--cor-rosa-escuro);
}

.card-route-desc {
  color: var(--cor-cinza-texto);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 0;
}

/* Responsividade para os cards */
@media (max-width: 992px) {
  .card-route {
    padding: 1.5rem 1rem;
  }
  
  .card-route-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1.25rem;
  }
  
  .card-route-icon i {
    font-size: 2rem;
  }
  
  .card-route-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 576px) {
  .card-route {
    padding: 1.25rem 0.75rem;
  }
  
  .card-route-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
  }
  
  .card-route-icon i {
    font-size: 1.75rem;
  }
  
  .card-route-title {
    font-size: 1.2rem;
  }
  
  .card-route-desc {
    font-size: 0.85rem;
  }
}