/* ============================
   VARIÁVEIS DE COR (ROOT)
============================ */
:root {
  --bege: #EFE6DC;
  --verde-claro: #a2b59a;
  --verde-escuro: #196135;
  --preto: #000000;
  --fonte-titulo: 'Lora', serif;
  --fonte-texto: 'Nunito', sans-serif;
}

/* ============================
   ESTILOS GERAIS
============================ */
body {
  margin: 0;
  font-family: var(--fonte-texto);
  background-color: var(--bege);
  color: var(--preto);
  scroll-behavior: smooth;

  /* Estilo adicional para formulário */
  margin: 0 auto;
  padding: 20px;
  min-height: 100vh;
  box-sizing: border-box;
}

/* ============================
   CABEÇALHO E NAVEGAÇÃO
============================ */
header {
  background-color: var(--verde-claro);
  font-family: var(--fonte-titulo);
  padding: 0.5rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  height: 80px;
  margin-right: 20px;
}

.logo-link {
  display: inline-block;
  text-decoration: none;
}

nav  {
  display: flex;
  justify-content: space-around;
}

nav a {
  text-decoration: none;
  color: var(--preto);
  font-weight: bold;
  padding: 10px;
  transition: color 0.3s ease;
}

nav a.active {
  color: var(--bege);
}

/* ============================
   SEÇÕES E TÍTULOS
============================ */
section {
  padding: 4rem 2rem;
  max-width: 1000px;
  scroll-margin-top: 100px;
  margin: auto;
}
section#home {
  padding: 0;
  max-width: none;
  margin: 0;
}

h2 {
  font-family: var(--fonte-titulo);
  color: var(--verde-escuro);
  border-bottom: 2px solid var(--verde-claro);
  padding-bottom: 0.5rem;

}

h3 {
  font-family: var(--fonte-titulo);
  color: var(--verde-escuro);
  border-bottom: 2px solid var(--verde-claro);
  padding-bottom: 0.5rem;
  margin-top: 2rem;
}

/* ============================
   HOME / MOODBOARD
============================ */
#home {
  position: relative;
  width: 100%;
  height: 610px;
  background-image: url('/static/imagens/moodboard.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  padding: 0;
  margin: 0;
}

/* Camada escura */
#home .overlay {
  position: absolute;
  inset: 0; 
  background-color: rgba(18, 18, 18, 0.4);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

/* Texto */
#home h1 {
  z-index: 2;
  font-family: var(--fonte-titulo);
  font-size: 3rem;
  color: var(--bege);
  text-align: center;
}

/* ============================
   PORTFÓLIO
============================ */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.portfolio-item {
  background-color: white;
  font-family: var(--fonte-texto);
  border: 1px solid var(--verde-claro);
  padding: 1rem;
  box-sizing: border-box;
  overflow: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.portfolio-img {
  width: 100%;
  height: auto;
  max-width: 500px;
  display: block;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  object-fit: contain;
}

/* ============================
   FORMULÁRIO DE CONTACTO
============================ */
form {
  background: #f9f3f4;
  font-family: var(--fonte-titulo);
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
  padding: 0;
  box-sizing: border-box;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #474e45;
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 10px;
  border: 2px solid #f7c6ce;
  border-radius: 6px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  outline: none;
  border-color: #a2b59a;
  box-shadow: 0 0 5px rgba(138, 107, 193, 0.2);
}

textarea {
  height: 100px;
  resize: vertical;
}

button[type="submit"] {
  background-color:#a2b59a ;
  font-family: var(--fonte-titulo);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  width: 100%;
  margin-top: 10px;
}

button[type="submit"]:hover {
  background: linear-gradient(135deg, #f4aeb8 0%, #a2b59a 100%);
  transform: translateY(-2px);
  box-shadow: 0 2px 6px #f4aeb8;
}

/* ============================
   FOOTER
============================ */
footer {
  text-align: center;
  background-color: var(--verde-claro);
  color: var(--preto);
  font-family: var(--fonte-titulo);
  padding: 1rem;
  margin-top: 4rem;
}

/* ============================
   CHATBOT - Estilos principais
============================ */
#toggle-chat {
  display: none;
}

/* Ícone flutuante do chatbot */
.chatbot-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  background-color: #a2b59a;
  background-image: url('/static/imagens/robot.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 60%;
  z-index: 1001;
}

/* Balão de conversa (inicialmente escondido) */
.chatbot-bubble {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 320px;
  max-width: 90vw;
  padding: 15px;
  background: #cde0c5;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.chatbot-close {
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  font-weight: bold;
  z-index: 10;
}

.chatbot-close:hover {
  color: #000;
}
/* Quando ativado (checkbox checked) */
#toggle-chat:checked ~ .chatbot-bubble {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* Texto no balão */
.chatbot-bubble p {
  margin: 0 0 10px;
  font-family: var(--fonte-titulo);
}

/* Área de entrada de mensagem */
.chatbot-bubble form {
  display: flex;
  flex-direction: row;
  gap: 0;
  margin: 0;
  padding: 0;
}

.chat-input-area {
  display: flex;
  margin-top: auto;
  width: 100%;
}

/* Campo de texto para digitar */
.chat-input-area input[type="text"] {
  flex-grow: 1;
  font-family: var(--fonte-texto);
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #f4aeb8;
  border-radius: 10px 0 0 10px;
  outline: none;
  min-width: 0;
}

/* Botão de envio */
.chat-input-area button {
  background: #a2b59a;
  border: none;
  color: white;
  padding: 10px 15px;
  font-size: 14px;
  border-radius: 0 10px 10px 0;
  cursor: pointer;
}

/* ============================
   RESPONSIVO
============================ */
@media (max-width: 600px) {
  nav {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
}

/* Para ecrãs pequenos (telemóveis, etc.) */
@media (max-width: 768px) {
  #home {
    background-position: top; /* foca a parte superior */
    height: 300px; /* ajusta altura */
  }
}