:root {
  --primary: #FF6B35;
  --primary-dark: #e55a25;
  --primary-light: #fff0ea;
  --found: #22c55e;
  --found-bg: #f0fdf4;
  --red: #ef4444;
  --orange: #f97316;
  --yellow: #eab308;
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --purple-border: #c4b5fd;
  --bg: #fff9f5;
  --white: #ffffff;
  --text: #1f2937;
  --text-light: #6b7280;
  --text-lighter: #9ca3af;
  --border: #e5e7eb;
  --shadow: 0 4px 24px rgba(0,0,0,0.07);
  --shadow-orange: 0 8px 30px rgba(255,107,53,0.18);
  --shadow-purple: 0 8px 30px rgba(124,58,237,0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 68px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── HEADER ── */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 12px;
}

/* ── NAV ── */
.main-nav { display: flex; gap: 2px; flex-shrink: 0; }
.nav-link {
  padding: 8px 11px; border-radius: var(--radius-sm);
  text-decoration: none; font-size: 13px; font-weight: 700;
  color: var(--text-light); transition: all .18s; white-space: nowrap;
}
.nav-link:hover { color: var(--text); background: var(--bg); }
.nav-link.active { color: var(--primary); background: var(--primary-light); }
.nav-link.nav-encontre { color: var(--purple); }
.nav-link.nav-encontre:hover { background: var(--purple-light); color: var(--purple); }
.nav-link.nav-encontre.active { background: var(--purple-light); }

/* Hamburger */
.hamburger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 8px; flex-direction: column; gap: 5px; margin-left: auto;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: all .2s; }
.mobile-menu-overlay {
  display: none; position: fixed; inset: var(--header-h) 0 0 0;
  background: rgba(0,0,0,.45); z-index: 98; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.mobile-menu-overlay.open { display: block; }
.mobile-menu-panel {
  background: var(--white); padding: 12px 16px 20px;
  display: flex; flex-direction: column; gap: 4px;
  border-bottom: 2px solid var(--border);
}
.mobile-menu-panel .nav-link { padding: 14px 16px; font-size: 15px; border-radius: var(--radius-sm); }

.logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; flex-shrink: 0;
}
.logo-icon { font-size: 28px; }
.logo-text { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 20px; line-height: 1; }
.logo-text span { color: var(--primary); }
.logo-text small { display: block; font-size: 10px; font-weight: 600; color: var(--text-lighter); letter-spacing: .5px; text-transform: uppercase; }

.header-search {
  flex: 1; max-width: 340px;
  position: relative;
}
.header-search input {
  width: 100%; padding: 10px 16px 10px 40px;
  border: 1.5px solid var(--border); border-radius: 50px;
  font-family: inherit; font-size: 14px;
  background: var(--bg); color: var(--text);
  outline: none; transition: border-color .2s;
}
.header-search input:focus { border-color: var(--primary); }
.header-search .search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-lighter); font-size: 15px; pointer-events: none;
}

.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border-radius: 50px;
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  border: none; transition: all .2s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-orange); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-found { background: var(--found); color: #fff; }
.btn-found:hover { background: #16a34a; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-ghost { background: transparent; color: var(--text-light); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1ebe5d; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1f3d 60%, #3d1f1f 100%);
  padding: 48px 24px 40px;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; }
.hero h1 {
  font-family: 'Montserrat', sans-serif; font-weight: 900;
  font-size: clamp(28px, 5vw, 52px); color: #fff; line-height: 1.1;
  margin-bottom: 12px;
}
.hero h1 em { color: var(--primary); font-style: normal; }
.hero p { color: rgba(255,255,255,.7); font-size: 16px; margin-bottom: 28px; }

.stats {
  display: inline-flex; gap: 32px;
  background: rgba(255,255,255,.08); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); padding: 16px 32px;
  margin-bottom: 28px;
}
.stat { text-align: center; }
.stat-num { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 28px; color: #fff; line-height: 1; }
.stat-num.orange { color: var(--primary); }
.stat-num.green { color: var(--found); }
.stat-label { font-size: 12px; color: rgba(255,255,255,.6); margin-top: 2px; }

/* ── FILTROS BAR ── */
.filters-bar {
  background: var(--white); border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.filter-label { font-size: 13px; font-weight: 700; color: var(--text-light); }
.filter-select {
  padding: 8px 14px; border: 1.5px solid var(--border);
  border-radius: 50px; font-family: inherit; font-size: 13px; font-weight: 600;
  background: var(--bg); color: var(--text); cursor: pointer; outline: none;
  transition: border-color .2s;
}
.filter-select:focus { border-color: var(--primary); }
.filter-chip {
  padding: 7px 14px; border-radius: 50px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  border: 2px solid var(--border); background: transparent; color: var(--text-light);
  transition: all .2s;
}
.filter-chip.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.filter-count { margin-left: auto; font-size: 13px; color: var(--text-lighter); font-weight: 600; }

/* ── LAYOUT PRINCIPAL ── */
.main-layout {
  display: grid; grid-template-columns: 1fr 440px;
  height: calc(100vh - var(--header-h) - 61px - 57px);
  min-height: 600px;
}

.cards-panel {
  overflow-y: auto; padding: 20px;
  display: flex; flex-direction: column; gap: 0;
}
.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.map-panel { position: relative; }
#map { width: 100%; height: 100%; }

/* ── DOG CARD ── */
.dog-card {
  background: var(--white); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer; text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  border: 1.5px solid var(--border);
}
.dog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-orange); border-color: var(--primary); }
.dog-card.found { border-color: var(--found); opacity: .85; }
.dog-card.found:hover { box-shadow: 0 8px 30px rgba(34,197,94,.2); }

.card-photo {
  position: relative; width: 100%; padding-top: 75%; overflow: hidden;
  background: #f3f4f6;
}
.card-photo img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.dog-card:hover .card-photo img { transform: scale(1.04); }
.card-photo .no-photo {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; color: var(--text-lighter);
  font-size: 40px;
}
.card-photo .no-photo span { font-size: 13px; margin-top: 4px; }

.days-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 4px 10px; border-radius: 50px;
  font-size: 12px; font-weight: 800; text-transform: uppercase;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.3);
}
.days-badge.fresh { background: rgba(34,197,94,.85); color: #fff; }
.days-badge.urgent { background: rgba(249,115,22,.9); color: #fff; }
.days-badge.critical { background: rgba(239,68,68,.9); color: #fff; animation: pulse-badge .8s infinite alternate; }
.days-badge.found-badge { background: rgba(34,197,94,.9); color: #fff; }

@keyframes pulse-badge { from { opacity: 1; } to { opacity: .6; } }

.found-ribbon {
  position: absolute; top: 14px; left: -28px;
  width: 120px; text-align: center; padding: 6px 0;
  background: var(--found); color: #fff; font-size: 11px; font-weight: 800;
  letter-spacing: .5px; text-transform: uppercase;
  transform: rotate(-45deg);
}

.card-body { padding: 14px 16px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.card-name { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 17px; }
.card-breed { font-size: 13px; color: var(--text-light); }
.card-location { font-size: 13px; color: var(--text-light); display: flex; align-items: center; gap: 5px; }
.card-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px;
}

/* ── PULSING MAP MARKERS ── */
.pulse-marker {
  width: 16px; height: 16px; border-radius: 50%;
  position: relative; cursor: pointer;
}
.pulse-marker::after {
  content: '';
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100%; height: 100%; border-radius: 50%;
  animation: pulse-ring 1.5s infinite;
}
.pulse-fresh { background: var(--found); }
.pulse-fresh::after { border: 3px solid var(--found); }
.pulse-urgent { background: var(--orange); }
.pulse-urgent::after { border: 3px solid var(--orange); animation-duration: 1.1s; }
.pulse-critical { background: var(--red); width: 20px; height: 20px; }
.pulse-critical::after { border: 3px solid var(--red); animation-duration: .7s; }
.pulse-found { background: var(--found); opacity: .5; }

@keyframes pulse-ring {
  0% { width: 100%; height: 100%; opacity: .8; }
  100% { width: 300%; height: 300%; opacity: 0; }
}

/* Leaflet popup custom */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow) !important;
  padding: 0 !important; overflow: hidden;
}
.leaflet-popup-content { margin: 0 !important; width: 220px !important; }
.map-popup { padding: 14px; }
.map-popup img { width: 100%; height: 130px; object-fit: cover; border-radius: 8px; margin-bottom: 10px; }
.map-popup h4 { font-weight: 800; font-size: 15px; margin-bottom: 2px; }
.map-popup p { font-size: 12px; color: var(--text-light); margin-bottom: 8px; }
.map-popup .btn { width: 100%; justify-content: center; font-size: 13px; padding: 8px; }

/* ── SECCIÓN REUNIDOS ── */
.section { padding: 48px 24px; }
.section-header { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.section-header h2 { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 24px; }
.section-title-found { color: var(--found); }
.section-line { flex: 1; height: 2px; background: var(--border); }

.reunidos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.reunido-card {
  background: var(--found-bg); border: 2px solid var(--found);
  border-radius: var(--radius); overflow: hidden;
  text-align: center; padding-bottom: 14px;
}
.reunido-card img { width: 100%; height: 150px; object-fit: cover; }
.reunido-card h4 { font-weight: 800; font-size: 15px; margin: 10px 0 2px; padding: 0 12px; }
.reunido-card p { font-size: 12px; color: var(--found); font-weight: 700; }
.reunido-emoji { font-size: 28px; display: block; margin: 6px 0; }

/* ── PUBLICAR PAGE ── */
.publish-container {
  max-width: 680px; margin: 0 auto; padding: 32px 24px;
}
.publish-container h1 {
  font-family: 'Montserrat', sans-serif; font-weight: 900;
  font-size: 28px; margin-bottom: 4px;
}
.publish-container .subtitle { color: var(--text-light); margin-bottom: 32px; }

.step-indicator {
  display: flex; gap: 0; margin-bottom: 32px;
}
.step {
  flex: 1; text-align: center; padding: 12px 8px;
  border-bottom: 3px solid var(--border);
  font-size: 13px; font-weight: 700; color: var(--text-lighter);
  transition: all .2s;
}
.step.active { border-color: var(--primary); color: var(--primary); }
.step.done { border-color: var(--found); color: var(--found); }

.form-section { margin-bottom: 28px; }
.form-section h3 { font-weight: 800; font-size: 16px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.form-section h3 .step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.photo-drop-zone {
  border: 2.5px dashed var(--border); border-radius: var(--radius);
  padding: 40px 20px; text-align: center; cursor: pointer;
  transition: all .2s; background: var(--bg); position: relative;
}
.photo-drop-zone:hover, .photo-drop-zone.drag-over {
  border-color: var(--primary); background: var(--primary-light);
}
.photo-drop-zone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-drop-zone .drop-icon { font-size: 44px; margin-bottom: 10px; }
.photo-drop-zone h4 { font-weight: 800; margin-bottom: 4px; }
.photo-drop-zone p { font-size: 13px; color: var(--text-light); }

.photo-preview-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px;
}
.photo-thumb {
  position: relative; padding-top: 100%; border-radius: 10px; overflow: hidden;
  background: var(--border);
}
.photo-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-thumb-remove {
  position: absolute; top: 5px; right: 5px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff;
  font-size: 12px; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.especie-toggle { display: flex; gap: 10px; margin-top: 4px; }
.especie-btn {
  flex: 1; padding: 14px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); background: #fff;
  font-size: 16px; font-weight: 700; cursor: pointer;
  transition: all .2s; font-family: var(--font-body); color: var(--text);
}
.especie-btn.active {
  border-color: var(--primary); background: var(--primary-light); color: var(--primary);
}
.especie-btn:hover:not(.active) { border-color: #bbb; }
label { font-size: 13px; font-weight: 700; color: var(--text); }
label .required { color: var(--red); margin-left: 2px; }
input[type="text"], input[type="tel"], input[type="email"], input[type="date"],
select, textarea {
  padding: 11px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: inherit; font-size: 14px;
  color: var(--text); background: var(--white); outline: none;
  transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--primary); }
textarea { resize: vertical; min-height: 90px; }

.location-methods { display: flex; gap: 10px; margin-bottom: 12px; }
.loc-btn {
  padding: 9px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 700; cursor: pointer;
  border: 2px solid var(--border); background: var(--bg); color: var(--text);
  transition: all .2s; display: flex; align-items: center; gap: 6px;
}
.loc-btn.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
#map-picker { width: 100%; height: 280px; border-radius: var(--radius-sm); margin-top: 10px; display: none; }
#map-picker.visible { display: block; }

.contact-highlight {
  background: var(--primary-light); border: 2px solid var(--primary);
  border-radius: var(--radius); padding: 16px;
}
.contact-highlight h4 { font-weight: 800; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.wa-input-wrapper { position: relative; }
.wa-input-wrapper input { padding-left: 100px; }
.wa-prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  font-size: 14px; font-weight: 700; color: var(--text-light);
}

.submit-area { text-align: center; padding-top: 16px; }
.submit-area .btn { padding: 16px 48px; font-size: 16px; }
.submit-note { font-size: 12px; color: var(--text-lighter); margin-top: 10px; }

/* ── PERFIL PERRO ── */
.perro-layout {
  max-width: 960px; margin: 0 auto; padding: 32px 24px;
  display: grid; grid-template-columns: 420px 1fr; gap: 32px;
}
.perro-fotos { position: sticky; top: calc(var(--header-h) + 16px); align-self: start; }
.perro-foto-main {
  width: 100%; padding-top: 80%; border-radius: var(--radius);
  overflow: hidden; background: #f3f4f6; position: relative; margin-bottom: 10px;
}
.perro-foto-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.perro-info h1 { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 32px; margin-bottom: 6px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 50px; font-weight: 700; font-size: 14px;
  margin-bottom: 20px;
}
.status-pill.lost { background: #fef2f2; color: var(--red); border: 2px solid #fca5a5; }
.status-pill.found { background: var(--found-bg); color: var(--found); border: 2px solid #86efac; }
.status-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  animation: pulse-dot 1s infinite alternate;
}
.status-pill.lost .dot { background: var(--red); }
.status-pill.found .dot { background: var(--found); animation: none; }
@keyframes pulse-dot { from { opacity: 1; } to { opacity: .3; } }

.info-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 24px;
}
.info-item label { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-lighter); font-weight: 700; }
.info-item p { font-weight: 700; font-size: 15px; margin-top: 2px; }

.urgency-box {
  background: #fef2f2; border: 2px solid #fca5a5;
  border-radius: var(--radius-sm); padding: 16px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 14px;
}
.urgency-box .days-big { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 36px; color: var(--red); line-height: 1; }
.urgency-box p { font-size: 14px; color: var(--red); font-weight: 700; }
.urgency-box p small { display: block; font-weight: 400; color: var(--text-light); font-size: 12px; }

.contact-card {
  background: var(--white); border: 2px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.contact-card h3 { font-weight: 800; margin-bottom: 14px; }
.contact-actions { display: flex; flex-direction: column; gap: 10px; }
.contact-actions .btn { justify-content: center; font-size: 15px; padding: 14px; }

.flyer-box {
  background: var(--primary-light); border: 2px dashed var(--primary);
  border-radius: var(--radius); padding: 20px; text-align: center; margin-bottom: 16px;
}
.flyer-box h3 { font-weight: 800; margin-bottom: 6px; }
.flyer-box p { font-size: 13px; color: var(--text-light); margin-bottom: 14px; }

/* ── MAP LOCATION PERRO ── */
#perro-map { width: 100%; height: 240px; border-radius: var(--radius-sm); margin-top: 16px; }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center; padding: 48px 20px; color: var(--text-light);
  grid-column: 1 / -1;
}
.empty-state .empty-icon { font-size: 56px; margin-bottom: 14px; }
.empty-state h3 { font-weight: 800; font-size: 18px; margin-bottom: 6px; }

/* ── TOAST ── */
.toast-container {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 999; display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  padding: 14px 22px; border-radius: 50px; font-weight: 700; font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  animation: toast-in .3s ease; pointer-events: all;
}
.toast-success { background: var(--found); color: #fff; }
.toast-error { background: var(--red); color: #fff; }
.toast-info { background: var(--text); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* ── LOADING ── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite; border-radius: var(--radius-sm);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton-card { height: 280px; border-radius: var(--radius); }

/* ── MOBILE ── */
.mobile-tabs {
  display: none; background: var(--white);
  border-bottom: 2px solid var(--border);
}
.mobile-tab {
  flex: 1; padding: 14px; text-align: center;
  font-weight: 700; font-size: 14px; cursor: pointer;
  border-bottom: 3px solid transparent; color: var(--text-light);
  border: none; background: none; font-family: inherit;
}
.mobile-tab.active { border-bottom-color: var(--primary); color: var(--primary); }

@media (max-width: 768px) {
  .header { padding: 0 16px; }
  .header-search { display: none; }
  .logo-text small { display: none; }

  .mobile-tabs { display: flex; }

  .main-layout {
    display: block; height: auto;
  }
  .cards-panel { overflow: visible; padding: 16px; }
  .map-panel { height: 50vh; }
  .map-panel.hidden, .cards-panel.hidden { display: none; }

  .filters-bar { padding: 10px 16px; overflow-x: auto; flex-wrap: nowrap; }
  .filter-count { display: none; }

  .perro-layout { grid-template-columns: 1fr; }
  .perro-fotos { position: static; }

  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: 1; }

  .stats { gap: 20px; padding: 14px 20px; }
  .stat-num { font-size: 22px; }
}

/* ── CONFETTI ── */
.confetti-container {
  position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  overflow: hidden;
}
.confetti-piece {
  position: absolute; width: 10px; height: 10px;
  top: -10px; animation: fall linear forwards;
}
@keyframes fall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

/* ── FOOTER ── */
.footer {
  background: var(--text); color: rgba(255,255,255,.6);
  text-align: center; padding: 20px; font-size: 13px;
}
.footer a { color: var(--primary); text-decoration: none; }

/* ── ENCONTRÉ UN PERRO — cards y badges ── */
.dog-card.encontre-card { border-color: var(--purple-border); }
.dog-card.encontre-card:hover { box-shadow: var(--shadow-purple); border-color: var(--purple); }
.days-badge.encontre-badge { background: rgba(124,58,237,.88); color: #fff; }
.pulse-encontre { background: var(--purple); }
.pulse-encontre::after { border: 3px solid var(--purple); animation-duration: 1.3s; }
.btn-purple { background: var(--purple); color: #fff; }
.btn-purple:hover { background: #6d28d9; }
.encontre-header-box {
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
  padding: 40px 24px; text-align: center; position: relative; overflow: hidden;
}
.encontre-header-box h1 { font-family: 'Montserrat',sans-serif; font-weight: 900; font-size: clamp(24px,4vw,42px); color: #fff; margin-bottom: 10px; }
.encontre-header-box p { color: rgba(255,255,255,.75); font-size: 16px; }

/* ── VISTAS ── */
.vistas-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: 50px; padding: 4px 12px;
  font-size: 12px; font-weight: 700; color: var(--text-lighter);
}

/* ── CONSEJOS PAGE ── */
.consejos-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d1f3d 100%);
  padding: 52px 24px; text-align: center;
}
.consejos-hero h1 { font-family: 'Montserrat',sans-serif; font-weight: 900; font-size: clamp(26px,5vw,48px); color: #fff; margin-bottom: 12px; }
.consejos-hero p { color: rgba(255,255,255,.7); font-size: 16px; max-width: 560px; margin: 0 auto; }

.consejos-container { max-width: 860px; margin: 0 auto; padding: 40px 24px; }

.timeline { display: flex; flex-direction: column; gap: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 27px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.timeline-item { display: flex; gap: 20px; padding-bottom: 32px; position: relative; }
.timeline-dot {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; position: relative; z-index: 1;
  box-shadow: 0 0 0 4px var(--bg);
}
.dot-red { background: #fef2f2; }
.dot-orange { background: #fff7ed; }
.dot-blue { background: #eff6ff; }
.timeline-content { padding-top: 8px; flex: 1; }
.timeline-content h3 { font-weight: 800; font-size: 17px; margin-bottom: 4px; }
.timeline-content .tag {
  display: inline-block; padding: 2px 10px; border-radius: 50px;
  font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .4px;
  margin-bottom: 10px;
}
.tag-red { background: #fef2f2; color: var(--red); }
.tag-orange { background: #fff7ed; color: var(--orange); }
.tag-blue { background: #eff6ff; color: #2563eb; }
.timeline-content ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.timeline-content li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.6; }
.timeline-content li::before { content: '→'; color: var(--primary); font-weight: 900; flex-shrink: 0; margin-top: 1px; }

.tip-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 16px; margin-top: 32px; }
.tip-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}
.tip-card .tip-icon { font-size: 32px; margin-bottom: 10px; }
.tip-card h4 { font-weight: 800; font-size: 15px; margin-bottom: 6px; }
.tip-card p { font-size: 13px; color: var(--text-light); line-height: 1.6; }

.contactos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 14px; margin-top: 20px; }
.contacto-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); padding: 16px;
  display: flex; align-items: center; gap: 14px;
}
.contacto-icon { font-size: 28px; flex-shrink: 0; }
.contacto-card h4 { font-weight: 800; font-size: 14px; margin-bottom: 2px; }
.contacto-card p { font-size: 13px; color: var(--text-light); }
.contacto-card a { color: var(--primary); text-decoration: none; font-weight: 700; }

.cta-section {
  background: var(--primary); border-radius: var(--radius);
  padding: 36px; text-align: center; margin-top: 40px;
}
.cta-section h2 { font-family: 'Montserrat',sans-serif; font-weight: 900; font-size: 24px; color: #fff; margin-bottom: 8px; }
.cta-section p { color: rgba(255,255,255,.8); margin-bottom: 20px; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: var(--primary-light); }

/* ── NEWSLETTER BAND ── */
.newsletter-band {
  background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
  padding: 40px 24px;
}
.newsletter-band-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.newsletter-band-text { flex: 1; min-width: 220px; color: #fff; }
.newsletter-band-text h3 { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 20px; margin-bottom: 6px; }
.newsletter-band-text p  { font-size: 14px; opacity: .75; }
.newsletter-form-mini {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.newsletter-form-mini input[type=email] {
  padding: 12px 16px;
  border-radius: 50px;
  border: none;
  font-family: inherit;
  font-size: 14px;
  width: 220px;
  outline: none;
}
.newsletter-form-mini .btn-white {
  white-space: nowrap;
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 800;
  border: none;
  cursor: pointer;
}
.nl-success { color: #fff; font-weight: 700; font-size: 15px; padding: 12px 0; }
.nl-sub-link { width: 100%; text-align: center; font-size: 12px; color: rgba(255,255,255,.5); margin-top: 6px; }
.nl-sub-link a { color: rgba(255,255,255,.7); }
@media (max-width: 768px) {
  .newsletter-band-inner { justify-content: center; text-align: center; }
  .newsletter-form-mini { flex-direction: column; width: 100%; max-width: 340px; }
  .newsletter-form-mini input[type=email] { width: 100%; }
  .newsletter-form-mini .btn-white { width: 100%; }
}

/* ── MOBILE UPDATES ── */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .header-search { display: none; }
  #nav-auth { display: none; }
}
@media (max-width: 768px) {
  .tip-cards { grid-template-columns: 1fr; }
  .timeline::before { left: 23px; }
  .timeline-dot { width: 48px; height: 48px; font-size: 20px; }
}

/* ── ZU-LAB SECTION ── */
.zulab-section {
  background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 60%, #16213e 100%);
  padding: 56px 24px;
}
.zulab-inner { max-width: 900px; margin: 0 auto; }
.zulab-header { text-align: center; margin-bottom: 36px; }
.zulab-label {
  display: inline-block; background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.5); font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  padding: 4px 14px; border-radius: 50px; margin-bottom: 12px;
}
.zulab-title { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 26px; color: #fff; margin-bottom: 8px; }
.zulab-subtitle { color: rgba(255,255,255,.5); font-size: 14px; }
.zulab-apps { display: flex; flex-direction: column; gap: 12px; }
.zulab-app-card {
  display: flex; align-items: center; gap: 16px;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 18px 20px;
  text-decoration: none; color: #fff;
  transition: background .2s, border-color .2s;
}
.zulab-app-card:hover { background: rgba(255,255,255,.10); border-color: rgba(255,107,53,.5); }
.zulab-app-icon { font-size: 32px; flex-shrink: 0; }
.zulab-app-info { flex: 1; }
.zulab-app-info strong { display: block; font-size: 16px; font-weight: 800; margin-bottom: 2px; }
.zulab-app-info span { font-size: 13px; color: rgba(255,255,255,.55); }
.zulab-app-badge {
  font-size: 11px; font-weight: 700; padding: 4px 10px;
  border-radius: 50px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.5);
  white-space: nowrap; flex-shrink: 0;
}
.zulab-app-badge.app-store { background: rgba(255,107,53,.2); color: #FF6B35; }

/* ── TOOLS BAND ── */
.tools-band { background: #f4f4f6; padding: 32px 24px; }
.tools-band-inner { max-width: 900px; margin: 0 auto; }
.tools-label {
  display: block; text-align: center; font-size: 11px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; color: var(--text-light);
  margin-bottom: 20px;
}
.tools-grid { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.tool-chip {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--border);
  border-radius: 14px; padding: 12px 18px;
  text-decoration: none; color: var(--text);
  transition: border-color .2s, box-shadow .2s;
  flex: 1; min-width: 200px; max-width: 280px;
}
.tool-chip:hover { border-color: var(--primary); box-shadow: 0 2px 12px rgba(255,107,53,.15); }
.tool-chip > span { font-size: 24px; flex-shrink: 0; }
.tool-chip strong { display: block; font-size: 14px; font-weight: 800; }
.tool-chip small { display: block; font-size: 12px; color: var(--text-light); }

@media (max-width: 600px) {
  .zulab-title { font-size: 20px; }
  .tool-chip { min-width: 100%; }
}

/* ── SEO REGIONS ── */
.seo-regions {
  background: #f9f9fb;
  padding: 44px 24px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.seo-regions-inner { max-width: 860px; margin: 0 auto; text-align: center; }
.seo-regions h2 {
  font-family: 'Montserrat', sans-serif; font-weight: 900;
  font-size: 18px; color: var(--text); margin-bottom: 6px;
}
.seo-regions > .seo-regions-inner > p {
  font-size: 14px; color: var(--text-light); margin-bottom: 20px; line-height: 1.5;
}
.seo-regions-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-bottom: 16px;
}
.seo-region-chip {
  background: #fff;
  border: 1.5px solid #e2e2e8;
  color: var(--text);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  font-family: inherit;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}
.seo-region-chip:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.seo-regions-note {
  font-size: 11px; color: #aaa; letter-spacing: .3px;
}

/* ── DONATE SECTION ── */
.donate-section {
  background: linear-gradient(135deg, #fff8f5 0%, #fff0e8 100%);
  padding: 56px 24px;
  text-align: center;
  border-top: 2px solid #ffe0cc;
}
.donate-inner { max-width: 560px; margin: 0 auto; }
.donate-icon { font-size: 48px; margin-bottom: 12px; }
.donate-title { font-family: 'Montserrat', sans-serif; font-weight: 900; font-size: 24px; color: var(--text); margin-bottom: 10px; }
.donate-sub { font-size: 15px; color: var(--text-light); margin-bottom: 28px; line-height: 1.6; }
.donate-uses {
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 28px;
}
.donate-use {
  display: flex; align-items: center; gap: 6px;
  background: #fff; border: 1.5px solid #ffd4b8;
  border-radius: 50px; padding: 6px 14px;
  font-size: 13px; font-weight: 600; color: var(--text);
}
.donate-use span { font-size: 16px; }
.btn-donate {
  display: inline-flex; align-items: center; gap: 8px;
  background: #FF5E5B; color: #fff;
  padding: 16px 40px; border-radius: 50px;
  text-decoration: none; font-size: 17px; font-weight: 800;
  font-family: 'Montserrat', sans-serif;
  box-shadow: 0 4px 20px rgba(255,94,91,.35);
  transition: transform .15s, box-shadow .15s;
}
.btn-donate:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,94,91,.4); }
.donate-note { font-size: 12px; color: var(--text-light); margin-top: 12px; }

/* ── CHAT WIDGET ── */
.chat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 1000;
  display: flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff;
  border-radius: 50px; padding: 12px 20px;
  cursor: pointer; box-shadow: 0 4px 20px rgba(255,107,53,.4);
  transition: transform .2s, box-shadow .2s;
  -webkit-user-select: none;
  user-select: none;
}
.chat-fab:hover, .chat-fab.active { transform: scale(1.05); box-shadow: 0 6px 28px rgba(255,107,53,.5); }
.chat-fab-icon { font-size: 20px; }
.chat-fab-label { font-size: 14px; font-weight: 800; }

.chat-panel {
  position: fixed; bottom: 88px; right: 24px; z-index: 999;
  width: 340px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  transform: translateY(20px) scale(.95);
  opacity: 0; pointer-events: none;
  transition: all .25s cubic-bezier(.34,1.56,.64,1);
  overflow: hidden;
}
.chat-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: all; }

.chat-header {
  background: var(--primary); color: #fff;
  padding: 14px 16px; display: flex; align-items: center; justify-content: space-between;
}
.chat-header-info { display: flex; align-items: center; gap: 10px; }
.chat-avatar { font-size: 28px; }
.chat-header-info strong { display: block; font-size: 14px; font-weight: 800; }
.chat-header-info span { font-size: 11px; opacity: .8; }
.chat-close {
  background: rgba(255,255,255,.2); border: none; color: #fff;
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
}

.chat-body { padding: 16px; overflow-y: auto; max-height: 380px; }
.chat-welcome p { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.chat-welcome-sub { font-size: 12px; color: var(--text-light); margin-bottom: 14px; }

.chat-suggestions { display: flex; flex-direction: column; gap: 8px; }
.chat-chip {
  text-align: left; background: #f8f8f8; border: 1.5px solid var(--border);
  border-radius: 12px; padding: 10px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text);
  transition: border-color .15s, background .15s; font-family: inherit;
}
.chat-chip:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

.chat-answer-view { padding: 14px; overflow-y: auto; max-height: 420px; display: flex; flex-direction: column; gap: 12px; }
.chat-answer-header { margin-bottom: 4px; }
.chat-back {
  background: none; border: none; color: var(--primary);
  font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: inherit; padding: 0;
}
.chat-q-label { font-size: 13px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.chat-a-text { font-size: 13px; line-height: 1.7; color: var(--text); }
.chat-a-text a { color: var(--primary); }

@media (max-width: 420px) {
  .chat-fab-label { display: none; }
  .chat-fab { padding: 14px; border-radius: 50%; }
}

/* ── STARTUP BADGE ── */
.startup-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #fff0ea 0%, #f5f3ff 100%);
  border: 1.5px solid #fec49a;
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 12px; font-weight: 800;
  color: var(--primary-dark);
  letter-spacing: 0.02em;
  margin-bottom: 18px;
  box-shadow: 0 2px 12px rgba(255,107,53,0.12);
}
.startup-dot {
  width: 7px; height: 7px;
  background: var(--found);
  border-radius: 50%;
  animation: pulse-dot 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

/* ── SECCIÓN: QUÉ HACER SI SE PIERDE TU MASCOTA ── */
.tips-section {
  background: var(--white);
  padding: 64px 24px;
}
.tips-inner {
  max-width: 900px;
  margin: 0 auto;
}
.tips-header {
  text-align: center;
  margin-bottom: 40px;
}
.tips-header h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 10px;
}
.tips-header p {
  font-size: 15px;
  color: var(--text-light);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}
.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.tip-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  transition: box-shadow .18s, border-color .18s;
}
.tip-card:hover {
  box-shadow: var(--shadow);
  border-color: #fec49a;
}
.tip-num {
  width: 36px; height: 36px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 15px; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.tip-body strong {
  display: block;
  font-size: 14px; font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.tip-body p {
  font-size: 13px;
  color: var(--text-light);
  line-height: 1.55;
}
.tips-cta {
  text-align: center;
  margin-top: 32px;
}
.tips-cta a {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 13px 30px;
  border-radius: 50px;
  font-size: 15px; font-weight: 800;
  text-decoration: none;
  box-shadow: var(--shadow-orange);
  transition: background .18s, transform .15s;
}
.tips-cta a:hover { background: var(--primary-dark); transform: translateY(-2px); }

@media (max-width: 600px) {
  .tips-grid { grid-template-columns: 1fr; }
  .tips-section { padding: 44px 16px; }
}
