/* ========== MELHORIAS RESPONSIVAS SIMPLES - CONSTRUTORA TAVARES ========== */
/* IMPORTANTE: Este arquivo NÃO altera cores de fundo existentes, apenas melhora a responsividade */

/* ========== CORREÇÕES BÁSICAS ========== */

/* Melhor controle de viewport */
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

/* FORÇAR FUNDO BRANCO SEMPRE */
html, body {
  background: #ffffff !important;
  background-color: #ffffff !important;
}

/* Proteção total contra dark mode */
@media (prefers-color-scheme: dark) {
  html, body, .container, .section {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #121416 !important;
  }
  
  .section--alt {
    background: #FFF3E8 !important;
    background-color: #FFF3E8 !important;
  }
}

/* ========== MELHORIAS PARA MOBILE ========== */

/* Tablets */
@media (max-width: 1024px) {
  .container {
    width: 95%;
  }
  
  .grid--4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* Mobile */
@media (max-width: 768px) {
  /* Grids responsivos */
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .grid--2-cols-about {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* Hero mobile */
  .hero {
    min-height: 60vh;
    padding: 2rem 0;
  }
  
  .hero__content {
    padding: 2rem 0;
  }
  
  .hero__actions {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }
  
  .hero__actions .btn {
    width: 100%;
    max-width: 280px;
  }
  
  /* Seções mobile */
  .section {
    padding: 3rem 0;
  }
  
  /* Cards mobile */
  .card {
    padding: 1.25rem;
  }
  
  /* Botões mobile */
  .btn {
    padding: 0.8rem 1rem;
    font-size: 0.9rem;
    min-height: 44px; /* Área de toque adequada */
  }
  
  /* WhatsApp button mobile */
  .whats {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }
  
  .whats svg {
    width: 24px;
    height: 24px;
  }
}

/* Smartphones pequenos */
@media (max-width: 480px) {
  .container {
    width: 95%;
    padding: 0 0.5rem;
  }
  
  /* Hero muito pequeno */
  .hero {
    min-height: 50vh;
  }
  
  .hero__content {
    padding: 1.5rem 0;
  }
  
  /* Seções muito pequenas */
  .section {
    padding: 2.5rem 0;
  }
  
  /* Cards muito pequenos */
  .card {
    padding: 1rem;
  }
  
  /* Botões muito pequenos */
  .btn {
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
  }
  
  /* Grid com gap menor */
  .grid {
    gap: 1rem;
  }
  
  /* WhatsApp menor */
  .whats {
    width: 45px;
    height: 45px;
    bottom: 15px;
    right: 15px;
  }
  
  .whats svg {
    width: 20px;
    height: 20px;
  }
}

/* ========== MELHORIAS ESPECÍFICAS PARA IMÓVEIS ========== */

/* Type selector responsivo */
@media (max-width: 768px) {
  .type-buttons {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .type-button {
    padding: 2rem 1.5rem;
    min-height: 160px;
  }
  
  .type-icon {
    font-size: 2.5rem;
  }
  
  .type-button h3 {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .type-button {
    padding: 1.5rem 1rem;
    min-height: 140px;
  }
  
  .type-icon {
    font-size: 2rem;
  }
  
  .type-button h3 {
    font-size: 1.2rem;
  }
  
  .type-button p {
    font-size: 0.9rem;
  }
}

/* Filtros responsivos */
@media (max-width: 768px) {
  .property-filters {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .filter-group {
    justify-content: center;
  }
  
  .properties-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .filter-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .properties-grid {
    grid-template-columns: 1fr;
  }
  
  .property-content {
    padding: 1rem;
  }
}

/* ========== MELHORIAS DE ACESSIBILIDADE ========== */

/* Focus states melhorados */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Área de toque adequada para mobile */
@media (max-width: 768px) {
  .btn,
  .filter-btn,
  .type-button,
  .nav a {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ========== CORREÇÕES ESPECÍFICAS ========== */

/* Fix para viewport height no Safari mobile */
.hero {
  min-height: 70vh;
  min-height: calc(var(--vh, 1vh) * 70);
}

/* Prevenção de zoom horizontal */
html, body {
  overflow-x: hidden;
}

/* Melhor scroll em iOS */
* {
  -webkit-overflow-scrolling: touch;
}

/* ========== PRINT STYLES ========== */

@media print {
  .header,
  .nav,
  .whats,
  .btn {
    display: none !important;
  }
  
  .hero {
    min-height: auto;
    padding: 1rem 0;
  }
  
  .section {
    padding: 1rem 0;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}