/*
Theme Name: Família Mega
Theme URI: https://familiamega.com.br/
Author: Família Mega
Description: Tema personalizado para o Arquivo Histórico da Família Mega
Version: 1.1
Text Domain: familia-mega
*/

:root {
  --bg: #f3f4f6;
  --bg-soft: #f3dede;
  --primary: #0f766e;
  --primary-soft: #ccfbf1;
  --accent: #14b8a6;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius-lg: 20px;
  --radius-full: 999px;
  --shadow-soft: 0 16px 35px rgba(15, 23, 42, 0.08);
  --transition: all 0.2s ease;

  /* ✅ CONTROLE DO "ZOOM" (MEXA AQUI) */
  --zoom-scale: 1.5; /* ajustado para melhor usabilidade */
}

/* ===== RESET E BASE ===== */
* { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html, body {
  font-family: "Nunito", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #e5f4f2, #f9fafb);
  color: var(--text-main);
  min-height: 96vh;
  overflow-x: hidden;
}

a { 
  text-decoration: none; 
  color: inherit; 
}

/* ===== NAVEGAÇÃO PRINCIPAL ===== */
.nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(209, 213, 219, 0.7);
  padding: 0 1rem;
}

.nav {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0.8rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  flex-shrink: 0;
  min-width: max-content;
}

/* ✅ BRASÃO FIXO (tamanho correto) */
.nav-logo-badge.nav-logo-badge--brasao {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ecfeff, #14b8a6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #022c22;
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.6);
  font-size: 1rem;
  flex-shrink: 0;
  padding: 4px;
}

.nav-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.nav-logo-img:hover {
  transform: scale(1.06);
}

.nav-logo span:last-child {
  font-size: 0.98rem;
  color: #0f172a;
  white-space: nowrap;
}

/* ✅ MENU RESPONSIVO (sem quebra) */
.nav-menu-container {
  display: flex;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
  overflow: visible;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.9rem;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
  min-width: 0;
  scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-link {
  position: relative;
  color: #4b5563;
  padding: 0.15rem 0;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15rem;
  width: 0;
  height: 2px;
  border-radius: var(--radius-full);
  background: linear-gradient(to right, #14b8a6, #0ea5e9);
  transition: width 0.2s ease-out;
}

.nav-link:hover { 
  color: #0f172a; 
}

.nav-link:hover::after { 
  width: 100%; 
}

/* ✅ ITEM ATIVO DO MENU */
.nav-link.active {
  background-color: #0ea5e9;
  color: #ffffff !important;
  font-weight: 700;
  padding: 6px 12px !important;
  border-radius: 6px;
  transition: 0.2s ease-in-out;
}

.nav-link.active::after {
  display: none;
}

/* ✅ BOTÃO ACESSO RESTRITO */
.nav-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid #d1d5db;
  background: #ecfeff;
  color: #0f766e;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-btn:hover {
  border-color: #0f766e;
  box-shadow: 0 7px 20px rgba(15, 118, 110, 0.25);
  transform: translateY(-1px);
}

.nav-btn i { 
  font-size: 0.85rem; 
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.3rem;
  cursor: pointer;
  color: #111827;
  flex-shrink: 0;
}

/* ===== LAYOUT PRINCIPAL ===== */
main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem .5rem;
  min-height: 82vh;
}

section { 
  margin-bottom: 3rem; 
}

.section-header { 
  margin-bottom: 1.6rem; 
}

.section-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0f766e;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.section-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.35rem;
}

.section-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 640px;
  line-height: 1.6;
}

.footer_site {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: 6vh;
}

.readmore-card:not(:last-child) {
    margin-bottom: 20px;
}

/* ===== GRIDS ===== */
.grid { 
  display: grid; 
  gap: 1.25rem; 
}

.grid-2 { 
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); 
}

.grid-3 { 
  grid-template-columns: repeat(3, minmax(0, 1fr)); 
}

/* ===== HERO/HOME ===== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 2rem;
  margin-bottom: 3.2rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  background: #ecfeff;
  color: #0f766e;
  font-size: 0.78rem;
  border: 1px solid #a7f3d0;
  margin-bottom: 0.8rem;
}

.hero h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.4rem);
  line-height: 1.25;
  margin-bottom: 0.75rem;
  color: #111827;
}

.hero-highlight { 
  color: #0f766e; 
}

.hero p {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 540px;
  margin-bottom: 1.4rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* ===== BOTÕES ===== */
.btn-primary,
.btn-ghost {
  padding: 0.65rem 1.3rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(to right, #14b8a6, #0ea5e9);
  color: white;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(56, 189, 248, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 40px rgba(56, 189, 248, 0.45);
}

.btn-ghost {
  border-color: #d1d5db;
  background: white;
  color: #111827;
}

.btn-ghost:hover {
  border-color: #0f766e;
  box-shadow: 0 7px 20px rgba(15, 23, 42, 0.12);
}

.hero-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.hero-meta i { 
  color: #0f766e; 
}

.hero-card {
  background: #ffffff;
  border-radius: 22px;
  padding: 1.4rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.hero-pill {
  font-size: 0.78rem;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-full);
  background: #ecfeff;
  color: #0f766e;
  border: 1px solid #a7f3d0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-badge-right {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.hero-badge-right i { 
  color: #f97316; 
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.stat {
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 0.65rem 0.75rem;
  background: #f9fafb;
  font-size: 0.8rem;
}

.stat-label { 
  color: var(--text-muted); 
  font-size: 0.75rem; 
}

.stat-value {
  font-weight: 700;
  margin-top: 0.12rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #111827;
}

.hero-taglist {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: #ecfeff;
  color: #0f766e;
  border: 1px solid #a7f3d0;
}

.hero-footer-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.hero-footer-note i { 
  color: #0ea5e9; 
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.1rem 1.15rem 1rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
  transition: var(--transition);
  height: 100%;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
  border-color: #cbd5f5;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.5rem;
}

.card-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  background: #ecfeff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f766e;
  border: 1px solid #a7f3d0;
  flex-shrink: 0;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
}

.card-body {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.card-link {
  display: block;
  cursor: pointer;
}

.card-tags {
  margin-top: 0.65rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.7rem;
}

.card-tag {
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-full);
  background: #f3f4f6;
  color: #4b5563;
}

/* ===== CONTATO ===== */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.1rem;
}

.contact-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-soft);
  font-size: 0.86rem;
}

.contact-card p { 
  color: var(--text-muted); 
  margin-bottom: 0.7rem; 
  line-height: 1.6;
}

.contact-field { 
  margin-bottom: 0.6rem; 
}

.contact-label { 
  font-size: 0.82rem; 
  margin-bottom: 0.2rem; 
  display: block;
}

.contact-input,
.contact-textarea {
  width: 100%;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  padding: 0.55rem 0.7rem;
  font-family: inherit;
  font-size: 0.86rem;
  color: #111827;
  outline: none;
  transition: var(--transition);
  background: #f9fafb;
}

.contact-input:focus,
.contact-textarea:focus {
  border-color: #0f766e;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.25);
  background: white;
}

.contact-textarea { 
  min-height: 90px; 
  resize: vertical; 
  line-height: 1.5;
}

.contact-info-list {
  list-style: none;
  display: grid;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.contact-info-list li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.contact-info-list i { 
  color: #0f766e; 
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid #e5e7eb;
  padding: 1rem 1.25rem 1.3rem;
  text-align: center;
  font-size: 0.78rem;
  color: #6b7280;
  background: #f9fafb;
}

/* ===== FOTOS/MOLDURAS ===== */
.foto-wrapper {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.foto-moldura {
  width: 100%;
  max-width: 260px;
  height: auto;
  border-radius: 12px;
  border: 4px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  object-fit: cover;
  background: #ffffff;
  padding: 4px;
}

.card-body .foto-moldura {
  border-radius: 12px;
  border: 4px solid #e5e7eb;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== SISTEMA DE ZOOM ===== */
.zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 3vh 3vw;
  cursor: zoom-out;
}

.zoom-overlay.is-open { 
  display: flex; 
}

.zoom-overlay #zoomImage {
  width: auto;
  height: auto;
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  transform: scale(var(--zoom-scale, 1));
  transition: transform 0.25s ease;
  cursor: zoom-out;
  animation: zoomIn 0.2s ease;
}

@keyframes zoomIn {
  from { 
    transform: scale(0.92); 
    opacity: 0; 
  }
  to { 
    transform: scale(var(--zoom-scale, 1)); 
    opacity: 1; 
  }
}

/* ===== AJUSTES DE ZOOM POR TELA ===== */
@media (min-width: 1400px) {
  :root { 
    --zoom-scale: 1.55; 
  }
}

@media (min-width: 1800px) {
  :root { 
    --zoom-scale: 1.85; 
  }
}

@media (max-width: 768px) {
  :root { 
    --zoom-scale: 1.05; 
  }
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 1100px) {
  .nav-logo span:last-child {
    font-size: 0.9rem;
  }
  
  .nav-menu {
    gap: 0.8rem;
  }
}

@media (max-width: 1000px) {
  .nav-logo span:last-child {
    display: none;
  }
  
  .nav-logo::after {
    content: "Família Mega";
    font-size: 0.9rem;
    color: #0f172a;
  }
}

@media (max-width: 960px) {
  .hero { 
    grid-template-columns: minmax(0, 1fr); 
  }
  
  .hero-card { 
    order: -1; 
  }
  
  .grid-2, 
  .grid-3 { 
    grid-template-columns: minmax(0, 1fr); 
  }
  
  .contact-grid { 
    grid-template-columns: minmax(0, 1fr); 
  }
}

/* MOBILE (768px para baixo) */
@media (max-width: 768px) {
  main { 
    padding-top: 2rem; 
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .nav-menu {
    display: none !important;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    z-index: 50;
  }
  
  .nav-menu.open { 
    display: flex !important; 
  }
  
  .nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    width: 100%;
  }
  
  .nav-link:hover {
    background: #f3f4f6;
  }
  
  .nav-link.active {
    width: 100%;
    text-align: center;
  }
  
  .nav-btn {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
  }
  
  .nav-toggle { 
    display: inline-flex; 
  }
  
  .hero h1 {
    font-size: 1.7rem;
  }
  
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-primary,
  .btn-ghost {
    width: 100%;
    justify-content: center;
  }
  
  .nav-logo-badge.nav-logo-badge--brasao {
    width: 40px;
    height: 40px;
  }
}

/* TELAS MUITO PEQUENAS */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 1.25rem;
  }
  
  .hero-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .foto-moldura {
    max-width: 200px;
  }
}

/* IMPRESSÃO */
@media print {
  .nav-wrapper,
  .hero-actions,
  .nav-btn,
  .tree-scroll {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .card {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}