/* =============================================
   ENCONTRO DE PETS — Estilos Globais
   Importar em todas as páginas:
   <link rel="stylesheet" href="style.css">
============================================= */


:root {
  --laranja:       #FF7043;
  --laranja-claro: #FF8A65;
  --creme:         #FFF8F0;
  --creme-escuro:  #FFE0CC;
  --marrom:        #4E342E;
  --marrom-medio:  #795548;
  --erro:          #E53935;
  --sucesso:       #43A047;
  --sombra:        0 4px 20px rgba(78,52,46,.12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  overflow-x: hidden;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--creme);
  color: var(--marrom);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
}

#header { position: sticky; top: 0; z-index: 100; }

/* Empurra footer para baixo */
body > footer { margin-top: auto; }

/* ── BANNER DE PÁGINA ── */
.page-banner {
  background: linear-gradient(135deg, #FF7043 0%, #FFAB91 100%);
  padding: 48px 24px 42px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: '🐾';
  position: absolute;
  font-size: 200px;
  opacity: .05;
  top: -30px; left: -20px;
  line-height: 1;
  pointer-events: none;
}
.page-banner h1 {
  font-family: 'Righteous', cursive;
  font-size: clamp(26px, 4vw, 40px);
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.15);
  margin-bottom: 8px;
}
.page-banner p {
  color: rgba(255,255,255,.9);
  font-size: 15px;
  max-width: 480px;
  margin: 0 auto;
}

/* ── CONTAINER PRINCIPAL ── */
.page-container {
  max-width: 700px;
  margin: 40px auto 60px;
  padding: 0 24px;
}
.page-container.wide {
  max-width: 1000px;
}

/* ── CARD BRANCO ── */
.card-box {
  background: #fff;
  border-radius: 20px;
  box-shadow: var(--sombra);
  padding: 36px 40px;
}

/* ── RESPONSIVO MOBILE ── */
@media (max-width: 600px) {
  .card-box { padding: 24px 16px; }

  .page-container {
    padding: 0 14px;
    margin: 24px auto 48px;
  }

  .page-banner {
    padding: 32px 16px 28px;
  }
}

/* ── INPUTS E LABELS ── */
.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: var(--marrom-medio);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 16px;
  border: 2px solid var(--creme-escuro);
  border-radius: 12px;
  background: var(--creme);
  color: var(--marrom);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--laranja);
  box-shadow: 0 0 0 3px rgba(255,112,67,.12);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 110px; }

/* Grade de dois campos lado a lado */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 500px) {
  .field-row { grid-template-columns: 1fr; }
}

/* Checkbox estilizado */
.field-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: var(--marrom-medio);
}
.field-check input[type="checkbox"] {
  width: 18px; height: 18px;
  accent-color: var(--laranja);
  cursor: pointer;
}

/* ── BOTÕES ── */
.btn {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, opacity .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.15); }
.btn:active { transform: translateY(0); }

.btn-primary  { background: var(--laranja); color: #fff; }
.btn-outline  { background: transparent; color: var(--laranja); border: 2px solid var(--laranja); }
.btn-ghost    { background: transparent; color: var(--marrom-medio); border: 2px solid var(--creme-escuro); }
.btn-danger   { background: #FFEBEE; color: var(--erro); border: 2px solid #FFCDD2; }

.btn-full { width: 100%; }

.btn-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ── STATUS / FEEDBACK ── */
#status, .status-msg {
  margin-top: 14px;
  font-size: 13.5px;
  font-weight: 700;
  min-height: 20px;
  color: var(--marrom-medio);
}

/* ── DIVISOR ── */
.divisor {
  border: none;
  border-top: 2px solid var(--creme-escuro);
  margin: 28px 0;
}

/* ── SEÇÃO TÍTULO ── */
.section-title {
  font-family: 'Righteous', cursive;
  font-size: 22px;
  color: var(--marrom);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 22px;
  background: var(--marrom);
  color: rgba(255,255,255,.45);
  font-size: 13px;
}

/* ── BANNER DE ANÚNCIO ── */
.ad-banner {
  width: 100%;
  background: linear-gradient(135deg, #FFF8E1, #FFF3CD);
  border: 1.5px solid #FFD54F;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0;
  font-size: 13px;
  color: var(--marrom);
}

.ad-banner-label {
  font-size: 9px;
  font-weight: 800;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 3px;
}

.ad-banner-cta {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 12px;
  padding: 6px 14px;
  background: linear-gradient(135deg, #FFD700, #FFA000);
  color: #4E342E;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .2s;
  flex-shrink: 0;
}
.ad-banner-cta:hover { transform: translateY(-1px); }

/* ══════════════════════════════════════
   MOBILE FIXES (Q1)
   ══════════════════════════════════════ */
@media (max-width: 768px) {
  /* Modais */
  .modal-box { padding: 24px 16px !important; max-width: 95vw !important; }

  /* Eventos */
  .evento-card-footer { flex-direction: column; gap: 10px; align-items: stretch; }
  .evento-card-footer > div { justify-content: center; }
  .evento-card-header h3 { font-size: 16px; }
  .evento-meta { flex-direction: column; gap: 4px; }

  /* Pet cards - lista */
  #lista-pets li { flex-direction: column !important; gap: 12px !important; }
  .pet-actions { flex-wrap: wrap; justify-content: center; gap: 6px !important; }
  .pet-actions button { font-size: 12px !important; padding: 6px 10px !important; }

  /* Filtros */
  .filtros { flex-direction: column; }
  .filtros select, .filtros input { width: 100%; }

  /* Status assinatura */
  .status-box { flex-direction: column; text-align: center; }

  /* Planos */
  .planos { grid-template-columns: 1fr !important; }
  .plano-card.destaque { transform: none; }

  /* Parceiros carousel */
  .parceiro-card { min-width: calc(50% - 10px) !important; max-width: calc(50% - 10px) !important; padding: 20px 14px !important; }

  /* Dropdown/panels */
  #user-dropdown { min-width: 200px; right: -10px; }
  #notif-panel, #historico-panel { right: 8px !important; width: calc(100vw - 16px) !important; max-width: 360px !important; }

  /* Chat widget */
  #chat-widget { width: 100% !important; right: 0 !important; }
  #cw-fab-minimizado { bottom: 16px !important; right: 16px !important; }

  /* Buttons inline */
  .btn-group { flex-direction: column; }
  .btn-group .btn { width: 100%; }

  /* Marketplace grid */
  .mk-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important; gap: 12px !important; }
  .mk-card-img, .mk-card-img-placeholder { height: 140px !important; }
  .mk-controles { flex-direction: column; }
  .mk-controles select, .mk-controles input { width: 100%; }

  /* Grupos grid */
  .grupos-grid { grid-template-columns: 1fr !important; }
  .controles-topo { flex-direction: column; }
  .controles-topo input, .controles-topo select { width: 100%; }

  /* Diário */
  .form-row { grid-template-columns: 1fr !important; }
  .diario-pet-select { flex-direction: column; }
  .diario-pet-select select { width: 100%; }

  /* Tabs */
  .tabs { flex-direction: column; gap: 6px; }
  .tabs button { font-size: 13px; padding: 10px; }

  /* Feed */
  .novo-post-btns { flex-direction: column; }
  .feed-post-img { max-height: 300px !important; }

  /* Mapa */
  .mapa-controles { flex-direction: column; }
  .mapa-controles select, .mapa-controles input { width: 100%; }

  /* Alertas */
  .alerta-card-inner { flex-direction: column; }
  .alerta-foto, .alerta-foto-placeholder { width: 100% !important; height: 180px !important; }

  /* Wide containers */
  .page-container.wide { padding: 0 12px; }
}

@media (max-width: 480px) {
  .parceiro-card { min-width: 100% !important; max-width: 100% !important; }
  .parceiros-arrow { width: 32px; height: 32px; font-size: 14px; }
  .pet-stat .valor { font-size: 14px; }
  .pet-stats { grid-template-columns: repeat(2, 1fr); }
  .mk-detail { flex-direction: column !important; }
  .mk-detail-img { width: 100% !important; height: 200px !important; }
}

@media (max-width: 380px) {
  .page-banner h1 { font-size: 22px; }
  .page-banner p { font-size: 13px; }
  .evento-card-header h3 { font-size: 14px; }
  .section-title { font-size: 16px !important; }
}

/* ── LIGHTBOX GALERIA ── */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
}
.lightbox-overlay.open { display: flex; }

.lightbox-img-wrap {
  position: relative;
  max-width: min(90vw, 700px);
  max-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 72vh;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

.lightbox-btn-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  backdrop-filter: blur(4px);
  flex-shrink: 0;
}
.lightbox-btn-nav:hover { background: rgba(255,255,255,.3); }
.lightbox-btn-prev { left: -56px; }
.lightbox-btn-next { right: -56px; }

.lightbox-counter {
  color: rgba(255,255,255,.75);
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.lightbox-close {
  position: fixed;
  top: 16px; right: 20px;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 22px;
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox-close:hover { background: rgba(255,255,255,.3); }

@media (max-width: 600px) {
  .lightbox-btn-prev { left: -48px; width: 36px; height: 36px; font-size: 16px; }
  .lightbox-btn-next { right: -48px; width: 36px; height: 36px; font-size: 16px; }
}
