/* THEME.CSS - Silvia Barbosa Imóveis - Refatorado (Header Centralizado) */

/* ======================================================= */
/* === BASE STYLES (Corpo, Container, Formulários) === */
/* ======================================================= */

/* Reset */
body {
  margin: 0;
  padding: 0;
  font-family: 'Times New Roman', serif;
  background-color: #E5E5E5;
  color: #090132;
  line-height: 1.6;
}

/* Container principal */
.container {
  background: #FFFFFF;
  margin: 30px auto;
  padding: 20px;
  max-width: 900px;
  border-radius: 6px;
  box-shadow: 0px 2px 6px rgba(0,0,0,0.15);
}

/* Labels e inputs */
label {
  font-weight: bold;
  color: #090132;
  margin-top: 12px;
  display: block;
}
/* Estilo geral para Inputs, Selects e Textareas */
input:not([type="submit"]):not([type="file"]):not([type="checkbox"]):not([type="radio"]), 
select, 
textarea {
  width: 100%; /* Ajustado para 100% */
  padding: 10px;
  border: 1px solid #CCC;
  border-radius: 4px;
  margin-top: 5px;
  font-size: 14px;
  box-sizing: border-box; /* Garante que padding não estoure a largura */
}
/* Estilo para campos somente leitura (ex: Código do Imóvel) */
input[type="text"]:read-only, input[readonly] {
    background-color: #eee;
    color: #666;
}

/* Botões (Estilo principal da marca) */
button, input[type="submit"], .download-btn {
  background-color: #090132;
  color: #CFB233;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 15px;
  display: inline-block;
  text-decoration: none;
  text-align: center;
  transition: background-color 0.3s, color 0.3s;
}

button:hover, input[type="submit"]:hover, .download-btn:hover {
  background-color: #CFB233;
  color: #090132;
}

/* Estilos de preview de foto */
.foto-preview img {
  max-width: 100%;
  height: auto;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-top: 10px;
  cursor: zoom-in;
}

/* Tabela de Consulta */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
th, td {
  padding: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
}
th {
  background-color: #f0f0f0;
  font-weight: bold;
}
.editing { border: 2px dashed red; }


/* ======================================================= */
/* === Estilos do HEADER (Novo e Responsivo) === */
/* ======================================================= */

header {
  background: #090132; /* Cor principal da marca */
  border-bottom: 1px solid #CFB233;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  height: 100px; /* Altura padrão para desktop */
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Container da Imagem (Desktop) */
.header-container {
    position: relative;
    height: 100%;
}
.header-image {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    /* Efeito de fade */
    -webkit-mask-image: linear-gradient(to right, black 80%, transparent 100%);
    mask-image: linear-gradient(to right, black 80%, transparent 100%);
}

/* Container de Conteúdo (Desktop) */
.header-content {
    display: flex;
    justify-content: flex-end; 
    align-items: center;
    width: 100%;
    height: 100%; 
    position: relative;
    z-index: 2;
    padding: 0 30px;
    box-sizing: border-box;
    flex-wrap: nowrap;
}

/* Título da página (Desktop - Centralizado) */
.header-title {
  color: #CFB233; /* Cor secundária (Dourado) */
  font-size: 24px;
  font-weight: bold;
  position: absolute;
  left: 50%;
  top: 50%; 
  transform: translate(-50%, -50%);
  white-space: nowrap;
  text-align: center;
}

/* --- ESTILOS DO MENU HAMBURGUER (APENAS ÍCONE) --- */
header nav { display: none; } 

.hamburguer-icon {
    display: block; 
    cursor: pointer;
    padding: 5px;
    position: relative; 
    z-index: 1001; 
    color: #CFB233; /* Cor secundária */
    font-size: 30px; 
    line-height: 20px;
}

.dropdown-menu {
    display: none; 
    position: absolute;
    top: 100px; /* Padrão Desktop (altura do header) */
    right: 0;
    width: 250px; 
    background-color: #090132; /* Cor principal */
    border: 1px solid #CFB233;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 999;
    flex-direction: column;
    padding: 10px 0;
}

.dropdown-menu a {
    padding: 10px 20px;
    text-decoration: none;
    color: #CFB233; /* Cor secundária */
    font-weight: bold;
    display: block;
    border-bottom: 1px solid rgba(207, 178, 51, 0.2); 
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background-color: #1a1a4f; 
    color: #fff; 
}


/* --- MEDIA QUERY PARA SMARTPHONES (Mobile) --- */
@media (max-width: 600px) {
    header {
        height: 60px; /* Altura fixa e menor para mobile */
    }
    .header-container {
        display: none; /* Oculta a imagem/logo complexa no mobile */
    }
    .header-content {
        justify-content: space-between; 
        align-items: center;
        height: 100%;
        padding: 0 15px; 
        flex-wrap: nowrap; 
    }

    .header-title {
        position: static;
        transform: none;
        order: 1; 
        width: auto;
        margin: 0;
        font-size: 18px; /* Título menor para caber */
        text-align: left;
        padding-left: 5px; 
    }
    
    .hamburguer-icon {
        order: 2; 
        margin-left: 0; 
    }

    .dropdown-menu {
        top: 60px; /* Altura do header em mobile */
    }
}