/* Components.css - Estilos para componentes reutilizáveis */

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius-md);
  font-weight: 500;
  transition: all var(--transition-normal);
  text-align: center;
  cursor: pointer;
  border: none;
  outline: none;
  text-decoration: none;
}

.btn:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: white;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background-color: rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
  color: var(--primary-color);
}

.btn-secondary:active {
  transform: translateY(0);
}

.btn-icon {
  margin-right: 0.5rem;
}

/* Cards */
.card {
  background-color: var(--background-card);
  border-radius: var(--border-radius-lg);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--border-radius-full);
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
  transition: all var(--transition-normal);
}

.card:hover .card-icon {
  background-color: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.card-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-color);
}

.card-content {
  color: var(--text-light);
  flex-grow: 1;
}

.card-footer {
  margin-top: var(--spacing-md);
}

/* Seção com título */
.section {
  padding: var(--spacing-3xl) 0;
}

.section-title-container {
  text-align: center;
  margin-bottom: var(--spacing-2xl);
  position: relative;
}

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-color);
  display: inline-block;
  position: relative;
  padding-bottom: var(--spacing-md);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
  border-radius: var(--border-radius-full);
}

.section-subtitle {
  color: var(--text-light);
  max-width: 700px;
  margin: var(--spacing-md) auto 0;
}

/* Formulários */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: 500;
  color: var(--text-color);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--border-radius-md);
  background-color: var(--background-light);
  color: var(--text-color);
  transition: all var(--transition-fast);
  font-family: var(--font-family);
  font-size: var(--font-size-md);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-light);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: var(--z-index-preloader);
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.preloader-icon {
  font-size: 3rem;
  color: var(--primary-color);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Galeria */
.gallery-item {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  height: 100%;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.gallery-image-container {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.gallery-item:hover .gallery-image {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-zoom {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-full);
  background-color: white;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transform: scale(0.8);
  opacity: 0;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.gallery-item:hover .gallery-zoom {
  transform: scale(1);
  opacity: 1;
}

.gallery-caption {
  padding: var(--spacing-md);
  background-color: var(--background-card);
  color: var(--text-color);
  text-align: center;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-index-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background-color: var(--background-card);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform var(--transition-normal);
}

.modal.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border-radius: var(--border-radius-full);
  background-color: white;
  color: var(--text-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background-color: var(--danger-color);
  color: white;
}

.modal-image {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  margin: 0 auto;
}

.modal-caption {
  padding: var(--spacing-md);
  text-align: center;
  color: var(--text-color);
  background-color: var(--background-card);
}

/* WhatsApp Flutuante */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: white;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  z-index: 9999; /* Valor mais alto para garantir que fique acima de tudo */
  transition: all var(--transition-normal);
  cursor: pointer;
  text-decoration: none; /* Garantir que não tenha sublinhado */
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-5px);
  color: white; /* Manter a cor branca mesmo ao passar o mouse */
}

.whatsapp-float:active,
.whatsapp-float:focus {
  color: white; /* Manter a cor branca ao clicar/focar */
  outline: none; /* Remover outline ao focar */
}

.whatsapp-float::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius-full);
  background-color: #25D366;
  opacity: 0.4;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.2);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

/* Ajustes responsivos para o botão de WhatsApp */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 10px;
    right: 10px;
  }
}

/* Voltar ao topo */
.back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--border-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: var(--shadow-md);
  z-index: var(--z-index-floating);
  transition: all var(--transition-normal);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

/* Ajuste para quando o WhatsApp flutuante está presente */
.whatsapp-float + .back-to-top {
  bottom: 95px;
}



/* Theme Switch Button Styles */
.theme-switch-wrapper {
  position: fixed;
  top: 90px; /* Position below header */
  right: 25px;
  display: flex;
  align-items: center;
  z-index: calc(var(--z-index-header) - 1); /* Below header but above content */
  background-color: rgba(255, 255, 255, 0.7);
  padding: 8px;
  border-radius: var(--border-radius-full);
  box-shadow: var(--shadow-md);
  transition: background-color var(--transition-normal), top var(--transition-normal);
}

.dark-mode .theme-switch-wrapper {
  background-color: rgba(15, 23, 42, 0.7);
}

.theme-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  margin-right: 8px;
}

.theme-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 26px;
}

.slider.round {
  border-radius: 26px;
}

.slider.round:before {
  border-radius: 50%;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

.theme-icon {
  font-size: 1.2rem;
  color: var(--text-color);
  transition: color var(--transition-normal);
}

/* Responsive adjustments for Theme Switch */
@media (max-width: 768px) {
  .theme-switch-wrapper {
    top: 80px; /* Adjust position for smaller screens */
    right: 15px;
  }
  .theme-switch {
    width: 44px;
    height: 22px;
  }
  .slider:before {
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
  }
  input:checked + .slider:before {
    transform: translateX(22px);
  }
  .theme-icon {
    font-size: 1rem;
  }
}

