/*
Theme Name: ImobWPX
Theme URI: https://academiawpx.com/
Author: Mesaque M - Academia WPX
Author URI: https://mesaquemota.com.br/
Description: O tema oficial do ecossistema ImobWPX. Leve, rápido e focado em alta conversão imobiliária.
Version: 1.0.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: imobwpx-theme
*/

/* ── 1. VARIÁVEIS DO TEMA ────────────────────────────────────────────────── */
:root {
  --theme-font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --theme-primary:       #2563eb;
  --theme-primary-dark:  #1d4ed8;
  --theme-primary-light: #eff6ff;
  --theme-dark:          #0f172a;
  --theme-dark-light:    #1e293b;
  --theme-text:          #334155;
  --theme-text-dark:     #0f172a;
  --theme-text-muted:    #64748b;
  --theme-border:        #e2e8f0;
  --theme-bg-light:      #f8fafc;
  
  --theme-radius:        12px;
  --theme-radius-sm:     8px;
  --theme-shadow:        0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --theme-shadow-md:     0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --theme-shadow-lg:     0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 8px -5px rgba(0,0,0,0.02);
}

/* ── 2. RESET E TIPOGRAFIA BASE ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: var(--theme-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--theme-text);
  background-color: #ffffff;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--theme-text-dark);
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 16px 0;
}

a {
  color: var(--theme-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--theme-primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Containers */
.theme-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

.theme-site-main {
  min-height: calc(100vh - 180px);
  padding: 40px 0;
  background-color: var(--theme-bg-light);
}

/* ── 3. CABEÇALHO (Navbar) ───────────────────────────────────────────────── */
.theme-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--theme-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 80px;
  display: flex;
  align-items: center;
  box-shadow: var(--theme-shadow);
}

.theme-header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.theme-logo a {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--theme-text-dark);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-logo span {
  color: var(--theme-primary);
}

.theme-menu {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.theme-menu a {
  color: var(--theme-text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 4px;
}

.theme-menu a:hover,
.theme-menu .current-menu-item a {
  color: var(--theme-primary);
}

.theme-header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Botões do Tema */
.theme-btn-icon {
  margin-right: 8px;
  display: inline-block;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--theme-radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1.5px solid transparent;
}

.theme-btn--primary {
  background-color: var(--theme-primary);
  color: #ffffff !important;
}

.theme-btn--primary:hover {
  background-color: var(--theme-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--theme-shadow-md);
}

.theme-btn--outline {
  border-color: var(--theme-border);
  color: var(--theme-text-dark) !important;
  background-color: transparent;
}

.theme-btn--outline:hover {
  border-color: var(--theme-text-dark);
  background-color: var(--theme-bg-light);
}

/* Hamburguer Mobile */
.theme-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--theme-text-dark);
}

@media (max-width: 768px) {
  .theme-header {
    height: 70px !important;
  }

  .theme-logo a {
    font-size: 1.15rem !important;
  }

  /* Exibir o texto encolhido e sem quebra de linha no mobile */
  .theme-header-actions .theme-btn--primary .theme-btn-text {
    display: inline !important;
    font-size: 0.75rem !important;
  }

  .theme-header-actions .theme-btn--primary .theme-btn-icon {
    margin-right: 4px !important;
    font-size: 0.85rem !important;
  }

  .theme-header-actions .theme-btn--primary {
    padding: 6px 10px !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: var(--theme-radius-sm) !important;
    white-space: nowrap !important;
  }

  .theme-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: #ffffff;
    border: none;
    border-top: 1px solid var(--theme-border);
    border-bottom: 1px solid var(--theme-border);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -2px rgba(0,0,0,0.02);
    padding: 16px 24px;
    flex-direction: column;
    gap: 8px;
    z-index: 1001;
    list-style: none;
    margin: 0;
  }

  .theme-menu.active {
    display: flex;
  }

  .theme-menu li {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .theme-menu a {
    display: block;
    padding: 10px 16px;
    width: 100%;
    border-radius: var(--theme-radius-sm);
    color: var(--theme-text) !important;
    font-size: 0.95rem;
    box-sizing: border-box;
  }

  .theme-menu a:hover {
    background: var(--theme-primary-light);
    color: var(--theme-primary) !important;
  }

  .theme-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-bg-light) !important;
    border: 1px solid var(--theme-border) !important;
    border-radius: var(--theme-radius-sm) !important;
    color: var(--theme-text-dark) !important;
    cursor: pointer;
    padding: 6px !important;
    margin-left: 8px;
    transition: all 0.2s;
  }

  .theme-menu-toggle:hover {
    background: var(--theme-border) !important;
  }
}

/* ── 4. RODAPÉ (Footer) ──────────────────────────────────────────────────── */
.theme-footer {
  background-color: var(--theme-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 30px;
  border-top: 1px solid var(--theme-dark-light);
}

.theme-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .theme-footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

.theme-footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.theme-footer-col p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.theme-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.theme-footer-col ul li {
  margin-bottom: 12px;
}

.theme-footer-col ul a {
  color: rgba(255, 255, 255, 0.7);
}

.theme-footer-col ul a:hover {
  color: #ffffff;
}

.theme-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

@media (max-width: 500px) {
  .theme-footer-bottom {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ── 5. LAYOUT DE PÁGINAS E POSTS PADRÃO ──────────────────────────────────── */
.theme-page-header {
  background: #ffffff;
  padding: 48px 0;
  border-bottom: 1px solid var(--theme-border);
  text-align: center;
}

/* Tornar o Cabeçalho de Página Boxed em todas as páginas (exceto na Home) */
body:not(.home) .theme-page-header {
  margin: 0 auto 40px auto !important;
  background: #ffffff !important;
  border: 1px solid var(--theme-border) !important;
  border-radius: var(--theme-radius) !important;
  padding: 40px 24px !important;
  box-shadow: var(--theme-shadow) !important;
  text-align: center !important;
  width: calc(100% - 48px) !important;
  box-sizing: border-box !important;
}

/* Largura para páginas padrão (como Contato e Sobre) que possuem conteúdo de 800px */
body:not(.home):not(:has(.theme-page-content--wide)) .theme-page-header {
  max-width: 800px !important;
}

/* Largura para páginas amplas (como Dashboard) que possuem conteúdo de 1200px */
body:not(.home):has(.theme-page-content--wide) .theme-page-header {
  max-width: 1200px !important;
}

@media (max-width: 1248px) {
  body:not(.home) .theme-page-header {
    width: calc(100% - 48px) !important;
  }
}

.theme-page-title {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 0 !important;
  letter-spacing: -0.02em;
}

.theme-page-content {
  background-color: #ffffff;
  border-radius: var(--theme-radius);
  padding: 40px;
  border: 1px solid var(--theme-border);
  box-shadow: var(--theme-shadow);
  max-width: 800px;
  margin: 0 auto;
}

.theme-page-content--wide {
  max-width: 1200px;
}

.theme-post-meta {
  font-size: 0.9rem;
  color: var(--theme-text-muted);
  margin-bottom: 24px;
}

/* Estilos de loop simples */
.theme-loop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.theme-post-card {
  background: #ffffff;
  border-radius: var(--theme-radius);
  border: 1px solid var(--theme-border);
  overflow: hidden;
  box-shadow: var(--theme-shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.theme-post-card:hover {
  transform: translateY(-4px);
}

.theme-post-card-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.theme-post-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.theme-post-card p {
  color: var(--theme-text-muted);
  font-size: 0.95rem;
  margin-bottom: 16px;
  flex: 1;
}
