/* ===== PÁGINA DE ORÇAMENTO (V2) ===== */

.orcamento-wrapper {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: 40% 60%;
  align-items: center;
  background-image: url('../assets/images/piscina-home.webp');
  background-size: cover;
  background-position: center;
  overflow: hidden;
  z-index: 1;
}

.orcamento-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.orcamento-intro {
  position: relative;
  z-index: 2;
  padding: 80px 10% 0;
  color: white;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  flex-direction: column;
  height: 600px;
}

.orcamento-intro::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -60%;
  width: 180%;
  padding-top: 180%;
  background: #122a45;
  border-radius: 50%;
  transform: translateY(-50%);
  z-index: -1;
}

.orcamento-intro .intro-content {
  position: relative;
  padding-top: 100px;
}

.orcamento-intro h1 {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 25px;
  line-height: 1.25;
}

.orcamento-intro p {
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 450px;
  color: #c0d4ec;
  line-height: 1.6;
}

/* --- Form Area --- */
.orcamento-form-container {
  position: relative;
  z-index: 2;
  padding: 5%;
  max-width: 1100px;
  margin: 0 auto;
}

.orcamento-form {
  padding: 50px;
  background-color: #ffffff;
  border-radius: 25px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.orcamento-form h2 {
  text-align: left;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 35px;
  color: #0d2137;
}

/* --- Form Grid Layout --- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.form-group.form-group-full {
  grid-column: span 2;
}

/* --- Form Elements Styling --- */
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid #e1e6eb;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: 'Montserrat', sans-serif;
  color: #333;
  background-color: #ffffff;
  transition: border-color 0.3s, box-shadow 0.3s;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #3b5d8f;
  box-shadow: 0 0 0 4px rgba(59, 93, 143, 0.1);
}

.form-group ::-webkit-input-placeholder {
  color: #99a5b3;
}

.form-group ::-moz-placeholder {
  color: #99a5b3;
}

.form-group :-ms-input-placeholder {
  color: #99a5b3;
}

.form-group :-moz-placeholder {
  color: #99a5b3;
}

/* Custom Select Arrow */
.select-wrapper {
  position: relative;
}

.form-group select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 45px;
  cursor: pointer;
}

.select-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 18px;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2399a5b3' viewBox='0 0 16 16'%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");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
  transition: transform 0.2s ease;
}

.form-group select:focus+.select-wrapper::after {
  transform: translateY(-50%) rotate(180deg);
}

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

.form-group select:required:invalid {
  color: #99a5b3;
}

option[value=""][disabled] {
  display: none;
}

option {
  color: black;
}

/* --- Button Styling --- */
.button-container {
  text-align: center;
  margin-top: 35px;
}

.orcamento-form button {
  display: inline-block;
  padding: 16px 45px;
  background: linear-gradient(90deg, #162f4e 0%, #22436e 100%);
  color: white;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  box-shadow: 0 10px 20px rgba(30, 58, 95, 0.25);
  letter-spacing: 0.5px;
}

.orcamento-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 25px rgba(30, 58, 95, 0.35);
}

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

/* Tablets Grandes (992px - 1200px) */
@media (max-width: 1200px) {
  .orcamento-intro h1 {
    font-size: 2.8rem;
  }

  .orcamento-form {
    padding: 40px;
  }

  .form-grid {
    gap: 15px;
  }
}

/* Tablets (768px - 992px) */
@media (max-width: 992px) {
  .orcamento-wrapper {
    grid-template-columns: 1fr;
    height: auto;
  }

  .orcamento-intro {
    height: auto;
    padding: 60px 5% 40px;
    text-align: center;
    justify-content: center;
  }

  .orcamento-intro::before {
    width: 150%;
    padding-top: 150%;
    left: -25%;
    top: -20%;
  }

  .orcamento-intro .intro-content {
    padding-top: 60px;
  }

  .orcamento-intro h1 {
    font-size: 2.5rem;
  }

  .orcamento-intro p {
    margin: 0 auto;
    font-size: 1rem;
  }

  .orcamento-form-container {
    padding: 30px 20px;
  }

  .orcamento-form {
    padding: 35px;
  }

  .orcamento-form h2 {
    font-size: 1.8rem;
  }

  /* Ajusta os campos do formulário para 2 colunas em tablets */
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Campos que ocupam 3 colunas no desktop ocupam 2 no tablet */
  .form-group[style*="grid-column: span 3"] {
    grid-column: span 2 !important;
  }

  /* Campos que ocupam 2 colunas no desktop permanecem 2 no tablet */
  .form-group[style*="grid-column: span 2"] {
    grid-column: span 2 !important;
  }

  /* Campos que ocupam 6 colunas no desktop ocupam 2 no tablet */
  .form-group[style*="grid-column: span 6"] {
    grid-column: span 2 !important;
  }
}

/* Tablets Pequenos (576px - 768px) */
@media (max-width: 768px) {
  .orcamento-intro h1 {
    font-size: 2.2rem;
  }

  .orcamento-intro::before {
    width: 200%;
    padding-top: 200%;
    left: -50%;
    top: -15%;
  }

  .orcamento-form {
    padding: 30px;
  }

  .orcamento-form h2 {
    font-size: 1.6rem;
    margin-bottom: 25px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  /* Todos os campos ocupam 1 coluna em tablets pequenos */
  .form-group[style*="grid-column"] {
    grid-column: span 1 !important;
  }
}

/* Celulares (480px - 576px) */
@media (max-width: 576px) {
  .orcamento-intro {
    padding: 50px 20px 30px;
  }

  .orcamento-intro h1 {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }

  .orcamento-intro p {
    font-size: 0.95rem;
    line-height: 1.5;
  }

  .orcamento-intro::before {
    width: 250%;
    padding-top: 250%;
    left: -75%;
    top: -10%;
  }

  .orcamento-form-container {
    padding: 20px 15px;
  }

  .orcamento-form {
    padding: 25px 20px;
    border-radius: 20px;
  }

  .orcamento-form h2 {
    font-size: 1.4rem;
    text-align: center;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 14px 16px;
    font-size: 0.9rem;
  }

  .select-wrapper::after {
    right: 16px;
  }

  .orcamento-form button {
    width: 100%;
    padding: 16px 30px;
    font-size: 0.95rem;
  }
}

/* Celulares Pequenos (até 480px) */
@media (max-width: 480px) {
  .orcamento-intro h1 {
    font-size: 1.6rem;
  }

  .orcamento-intro p {
    font-size: 0.9rem;
  }

  .orcamento-form {
    padding: 20px 15px;
  }

  .orcamento-form h2 {
    font-size: 1.3rem;
  }

  .form-grid {
    gap: 12px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 12px 14px;
  }

  .button-container {
    margin-top: 25px;
  }

  .orcamento-form button {
    padding: 14px 25px;
  }
}

/* Alturas menores (landscape mobile) */
@media (max-height: 600px) and (orientation: landscape) {
  .orcamento-intro {
    height: auto;
    min-height: 300px;
    padding-top: 40px;
  }

  .orcamento-intro .intro-content {
    padding-top: 40px;
  }

  .orcamento-intro h1 {
    font-size: 2rem;
    margin-bottom: 15px;
  }

  .orcamento-form {
    padding: 25px;
  }
}