/* ==========================================
   VARIÁVEIS E CONFIGURAÇÕES GLOBAIS
   ========================================== */
:root {
  --primary-gold: #d4af37;
  --dark-gold: #b8941f;
  --light-gold: #f4e4b6;
  --primary-black: #0a0a0a;
  --secondary-black: #1a1a1a;
  --light-black: #2a2a2a;
  --white: #ffffff;
  --light-gray: #f5f5f5;
  --text-gray: #666666;
  --text-dark: #222222;

  --cor-dourado: #d4af37;
  --cor-dark-mode: #121212;
  --cor-black-apple: #1c1c1c;
  --cor-preto-carvao: #222222;

  --font-heading: 'Inter', sans-serif;
  --font-body: 'Montserrat', sans-serif;
  --font-weight-normal: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  --transition: all 0.3s ease;

  /* Variáveis que não existiam no projeto (herdadas do programa original) */
  --color-van: #1a1bad;
  --color-light: #ffffff;
  --color-secondary: #2a2a2a;
  --bg-light: #ffffff;
  --bg-secondary: #f5f5f5;
  --text-light: #ffffff;
  --primary-color: #1a1bad;
  --tamanho-borda-radius: 16px;
  --cor-destaque-laranja: #d4af37;

  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 40px;
  --spacing-xl: 60px;
  --spacing-it: 20px;
}

/* ==========================================
   HEADER / HERO DA PÁGINA DE CONTATO
   ========================================== */
.primeHeader {
  display: grid;
  height: auto !important;
  min-height: 100vh;
  padding-bottom: 30px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  background-color: var(--cor-dark-mode);
}

/* ==========================================
   TÍTULOS E CABEÇALHOS DA SEÇÃO
   ========================================== */
.section-header {
  text-align: center;
  margin-bottom: 10px;
}

.section-title-contato {
  font-family: var(--font-heading);
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--bg-light);
}

.title-underline {
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-gold), var(--dark-gold));
  margin: 0 auto 1.5rem;
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  color: var(--bg-light);
}

.topHeader img {
  max-width: 7rem;
  width: 100%;
  height: auto;
  display: block;
  padding: 1rem;
}

h1, .h1 { 
    text-align: center; 
    color: var(--bg-light);
    padding: 0 1rem;
    margin: 0;
}

/* ==========================================
   LAYOUT FLEX DO CONTATO (COLUNAS)
   ========================================== */
.flex-contato-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 50px;
  max-width: 1266px;
  margin: 40px auto 0;
  padding: 0 20px;
}

.contact-info-section {
  flex: 1 1 350px;
  max-width: 420px;
}

.contact-form-section {
  /*flex: 1 1 450px;*/
  /*max-width: 650px;*/
  /*margin: 0 auto;*/
  
  flex: 0 1 650px;  /* O '0' impede que o flexbox encolha o elemento automaticamente */
  max-width: 650px;
  margin: 0 auto;
  box-sizing: border-box;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
}

/* ==========================================
   BLOCO DE INFORMAÇÕES DE CONTATO
   ========================================== */
.contact-info h3 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: var(--text-dark);
}

.contact-info > p {
  margin-bottom: 1rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  max-width: 650px;
  margin: 0 auto;
}

.contact-item {
  display: grid;
  gap: 20px;
  width: fit-content;
  margin: 0 auto;
  text-align: center;
}

.contact-item-change {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}

.contact-item-prime { color: var(--bg-light);}

.contact-icon {
  font-size: 1.8rem;
  color: var(--primary-gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4em;
}

.contact-item h4 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
  color: #3b82f6;
}

.contact-item p {
  margin: 5px 0 0;
  font-size: 0.85rem;
}

/* ==========================================
   FORMULÁRIO DE CONTATO
   ========================================== */
.contact-form-wrapper {
  background: var(--white);
  padding: 45px;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
    /* max-width: 514px; */

  width: 100%;       /* Alterado de max-width para width fixo/total */
  max-width: 514px;
  box-sizing: border-box;
}

.form-group {
  position: relative;
  margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 1rem;
  font-family: var(--font-body);
  transition: var(--transition);
  background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #1a1bad;
  box-shadow: 0 0 0 3px rgba(26, 27, 173, 0.1);
}

.form-group label {
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: var(--text-gray);
  transition: var(--transition);
  pointer-events: none;
  background: var(--white);
  padding: 0 0.5rem;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
  top: -0.7rem;
  left: 0.8rem;
  font-size: 0.85rem;
  color: #1a1bad;
}

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

/* ==========================================
   BOTÕES
   ========================================== */
.btn-primary2 {
  background: #1a1bad !important;
  color: #ddd !important;
  font-weight: 700;
  width: 100%;
  padding: 18px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 1rem;
  transition: var(--transition);
}

.btn-primary2:hover {
  background: #5959f9 !important;
  transform: translateY(-2px);
  color: #ffffff !important;
  box-shadow: 0 10px 25px rgba(26, 27, 173, 0.3);
}

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

.btn-submit {
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}

.btn-loading {
  display: none;
}

.contact-form.loading .btn-text {
  display: none;
}

.contact-form.loading .btn-loading {
  display: inline;
}

.contact-form.loading .btn-submit {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ==========================================
   MENSAGENS DE FEEDBACK
   ========================================== */
.form-message {
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  font-weight: 500;
  display: none;
  
  width: 100%; /* <--- Adicionado */
  box-sizing: border-box; /* <--- Adicionado */

  flex-shrink: 0; 
}

.form-message.success {
  display: block;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  display: block;
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* ==========================================
   MODAIS
   ========================================== */
#modal-conteudo {
  line-height: 1.6;
  color: #333;
  font-size: 16px;
  text-align: justify;
}

.modal-background {
  position: absolute;
  left: 0;
  width: 100%;
}

.modal-content-box {
  position: relative;
  background: var(--bg-secondary);
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  padding: 40px;
  border-radius: 10px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin: 0 auto;
}

.modal-content-box p {
  color: var(--color-van);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  color: #333;
  z-index: 1000;
  line-height: 1;
}

.modal-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.modal-svg rect {
  stroke-width: 4px;
  fill: none;
  width: 100%;
  height: 100%;
}

.modal-container-wrapper.active .modal-svg rect {
  stroke-dashoffset: 0;
}

/* ==========================================
   MENU MOBILE / HEADER
   ========================================== */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 80%;
  margin: 0 auto;
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
  padding: 5px;
  width: 40px;
  height: 40px;
}

.mobile-menu-btn .bar {
  width: 26px;
  height: 3px;
  border-radius: 2px;
  background-color: white;
  transition: var(--transition);
}

.mobile-menu-btn.active .bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active .bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active .bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-link {
    color: var(--color-van);
    color: var(--bg-light);
    font-size: 1.2rem;
    text-decoration: none;
}

.nav-link:hover {color: #3b82f6;}

/* ==========================================
   RODAPÉ
   ========================================== */
footer {
  max-width: 1300px;
  margin: 0 auto;
  padding: 20px 0 !important;
  box-sizing: border-box;
  color: #666;
  text-align: center;
  margin-top: auto;
  width: 100%;
  border-radius: 27px;
}

.copyright {
  text-align: center;
  padding-top: 15px;
  font-size: 0.8em;
}

/* ==========================================
   ÍCONES SOCIAIS (LINKEDIN / INSTAGRAM)
   ========================================== */
.social-icons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.social-icons svg {
  width: 24px;
  height: 24px;
  fill: #ffffff; /* modo escuro: ícone branco */
  transition: var(--transition);
}

/* Modo claro: ícone preto (ative adicionando a classe "light-mode" no body ou footer) */
.light-mode .social-icons svg {
  fill: #000000;
}

.social-icons a:hover svg {
  fill: var(--primary-gold);
}

/* ==========================================
   BACK-TO-TOP
   ========================================== */
.back-to-top {
  position: fixed;
  visibility: hidden;
  background-color: #5f6162ff;
  color: #fff;
  width: 42px;
  height: 42px;
  text-align: center;
  line-height: 38px;
  bottom: 400px;
  right: 20px;
  z-index: 90;
  cursor: pointer;
  opacity: 0;
  border-radius: 50%;
  transform: translateZ(0);
  transition: all 0.4s;
}

.back-to-top .fa {
  font-size: 22px;
  vertical-align: middle;
}

.back-to-top:hover {
  background-color: #ad0505;
  color: #fff;
  opacity: 1;
}

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

.back-to-top::before {
  content: 'Voltar ao topo';
  position: absolute;
  bottom: 55px;
  right: 0;
  background-color: #5f6162ff;
  color: #fff;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.back-to-top::after {
  content: '';
  position: absolute;
  bottom: 48px;
  right: 15px;
  border-width: 7px 7px 0 7px;
  border-style: solid;
  border-color: #2c3e50 transparent transparent transparent;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.back-to-top:hover::before,
.back-to-top:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ==========================================
   RESPONSIVIDADE
   ========================================== */
@media (max-width: 992px) {
  .primeHeader {
    height: auto !important;
    min-height: 100vh;
    /* display: flex; */
    /* flex-direction: column; */
    max-height: none !important;
    padding-bottom: 20px !important;
  }

  .page-title {
    padding-top: 0;
  }

  .flex-contato-container {
    /* flex-direction: column; */
    align-items: center;
    padding: 0 10px;
    margin: 20px auto;
  }

  .contact-info-section,
  .contact-form-section {
    flex: 1 1 100%;
    width: 100%;
    max-width: 30rem;
    box-sizing: border-box;
  }

  .contact-info {
    text-align: center;
  }

  .mobile-menu-btn {
    display: flex !important;
  }

  .main-nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 120px;
    right: -100%;
    background-color: #fff;
    z-index: 1050;
    transition: right 0.4s ease;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-right: 0;
    border-radius: 20px 0 0 20px;
    padding-top: 10px;
    padding: 20px 30px;
}

  .main-nav.active {
    right: 0 !important;
  }

  .main-nav .nav-link {
    color: var(--text-dark);
  }

  .nav-link {
    font-size: 0.75rem;
    display: block;
  }

  .form-group textarea,
  .form-group input {width: 92%;}
}

@media (max-width: 768px) {
  .contact-form-wrapper {
    padding: 2rem;
  }
}

@media (max-width: 480px) {
  .header-bar {
    display: flex;
  }

  .page-title {
    font-size: 1.6em;
    padding-top: 0;
    margin-bottom: 0;
  }

  .section-title-contato {
    font-size: 1.8rem;
  }

  .flex-contato-container {
    margin: 0 auto;
  }

  .topHeader img {
    max-width: 5rem;
  }

  .contact-info h3 {
    font-size: 1.8rem;
  }

  .contact-info p {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }

  .section-subtitle {
    margin-bottom: 1.2rem;
  }

  /* .contact-details {
    gap: 0.6rem;
  } */

  /* .form-group input:focus + label, .form-group input:not(:placeholder-shown) + label, .form-group textarea:focus + label, .form-group textarea:not(:placeholder-shown) + label { 
    font-size: 0.76rem;
  } */

  .contact-item {
    /* width: 90%; */
    margin: 0 auto;
    display: grid;
    gap: 8px;
  }

  .contact-info-section,
  .contact-form-section {
    max-width: 21rem;
  }

  .contact-item-change {
    height: auto;
  }

  .contact-item h4 {
    font-size: 1rem;
  }

  .contact-item p {
    font-size: 0.8rem;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .contact-form-wrapper {
    padding: 45px 25px;
  }

  .form-group textarea,
  .form-group input {width: 86%; font-size: 15px;}

  .btn-primary2 {
    padding: 10px 0;
    font-size: 0.8rem;
  }

   .topHeader img {
    max-width: 5rem;
  }

  .back-to-top {
    display: none;
  }
}

@media (max-width: 376px) {
  /* .contact-info-section,
  .contact-form-section {
    max-width: 14.5rem;
  } */

  .page-title {
      font-size: 1.3em;
  }

  .section-subtitle {
      font-size: .85rem;
  }

  .contact-item h4 {
    font-size: 1rem;
  }

  .contact-item-change {
    gap: 13px;
  }

  .topHeader img {
    max-width: 3.7rem;
  }

  .contact-icon {
    font-size: 1.5rem;
  }
}
