/* ============================================
   WauMiau 🐶🐱 — CSS Principal
   Paleta: Morado suave + Blanco cálido + Coral
   Tipografía: Fredoka One (logo) + Nunito (cuerpo)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;500;600;700;800&display=swap');

/* ===== VARIABLES ===== */
:root {
  --primary:       #8B5CF6;   /* morado principal */
  --primary-light: #A78BFA;   /* morado claro */
  --primary-soft:  #EDE9FE;   /* fondo morado muy suave */
  --primary-dark:  #6D28D9;   /* morado oscuro hover */
  --accent:        #F472B6;   /* rosa coral acento */
  --accent-soft:   #FDF2F8;   /* fondo rosa muy suave */
  --success:       #34D399;   /* verde aceptado */
  --success-soft:  #ECFDF5;
  --warning:       #FBBF24;   /* amarillo pendiente */
  --warning-soft:  #FFFBEB;
  --danger:        #F87171;   /* rojo rechazado */
  --danger-soft:   #FEF2F2;
  --text:          #1E1B4B;   /* texto principal morado muy oscuro */
  --text-mid:      #6B7280;   /* texto secundario */
  --text-light:    #9CA3AF;   /* texto suave */
  --bg:            #FAFAFA;   /* fondo general */
  --bg-card:       #FFFFFF;
  --border:        #E9E3FF;   /* borde morado muy suave */
  --shadow:        0 4px 24px rgba(139,92,246,0.10);
  --shadow-hover:  0 8px 32px rgba(139,92,246,0.20);
  --radius:        16px;
  --radius-sm:     10px;
  --radius-pill:   50px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }

/* ===== TOPBAR ===== */
.topbar {
  background: white;
  border-bottom: 2px solid var(--border);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(139,92,246,0.08);
}

.topbar a strong,
.topbar > a:first-child {
  font-family: 'Fredoka One', cursive;
  font-size: 1.5em;
  color: var(--primary);
  letter-spacing: 0.5px;
  text-decoration: none;
}

.topbar > a:first-child::after {
  content: ' 🐶🐱';
  font-size: 0.75em;
}

.topbar div {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar div a {
  color: var(--text-mid);
  font-weight: 600;
  font-size: 0.92em;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: all 0.2s;
}

.topbar div a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.topbar .btn-secondary {
  background: var(--primary-soft);
  color: var(--primary) !important;
  font-weight: 700 !important;
}

/* ===== PAGE CONTAINER ===== */
.page-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.page-header {
  margin-bottom: 32px;
}

.page-header h2 {
  font-size: 1.8em;
  font-weight: 800;
  color: var(--text);
  font-family: 'Fredoka One', cursive;
  letter-spacing: 0.3px;
}

.page-header p {
  color: var(--text-mid);
  margin-top: 4px;
}

h2 {
  font-size: 1.8em;
  font-weight: 800;
  color: var(--text);
  font-family: 'Fredoka One', cursive;
  margin-bottom: 8px;
}

h3 {
  font-size: 1.2em;
  font-weight: 700;
  color: var(--text);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-family: 'Nunito', sans-serif;
  font-size: 0.92em;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(139,92,246,0.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(139,92,246,0.45);
}

.btn-secondary {
  background: var(--primary-soft);
  color: var(--primary);
  border: 2px solid var(--border);
}
.btn-secondary:hover {
  background: var(--border);
  color: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 2px solid #FECACA;
}
.btn-danger:hover {
  background: var(--danger);
  color: white;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-sm { padding: 6px 14px; font-size: 0.82em; }
.btn-lg { padding: 14px 30px; font-size: 1.05em; }

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 24px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* ===== ALERTS ===== */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-success {
  background: var(--success-soft);
  color: #065F46;
  border: 1.5px solid #6EE7B7;
}
.alert-success::before { content: '✅'; }

.alert-error {
  background: var(--danger-soft);
  color: #991B1B;
  border: 1.5px solid #FCA5A5;
}
.alert-error::before { content: '❌'; }

.alert-info {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border: 1.5px solid var(--primary-light);
}
.alert-info::before { content: 'ℹ️'; }

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.88em;
  color: var(--text);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95em;
  color: var(--text);
  background: white;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.12);
}

.form-group textarea { resize: vertical; min-height: 90px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}
.form-check label {
  font-weight: 600;
  cursor: pointer;
  font-size: 0.95em;
}

/* ===== CUIDADORES GRID ===== */
.cuidadores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.cuidador-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.cuidador-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: var(--radius) var(--radius) 0 0;
}

.cuidador-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: var(--primary-light);
}

.cuidador-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 14px;
  object-fit: cover;
  border: 3px solid var(--primary-soft);
  box-shadow: 0 0 0 3px var(--border);
}

.cuidador-avatar-placeholder {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--primary-soft), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka One', cursive;
  font-size: 2em;
  color: var(--primary);
  border: 3px solid var(--border);
}

.cuidador-nombre {
  font-family: 'Fredoka One', cursive;
  font-size: 1.25em;
  color: var(--text);
  margin-bottom: 4px;
}

.cuidador-ciudad {
  color: var(--text-mid);
  font-size: 0.85em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-bottom: 10px;
}

.cuidador-precio {
  font-size: 1.1em;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.cuidador-desc {
  font-size: 0.85em;
  color: var(--text-mid);
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ===== STARS ===== */
.estrellas {
  color: #FBBF24;
  font-size: 1em;
  letter-spacing: 1px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.estrellas .count {
  color: var(--text-light);
  font-size: 0.85em;
  margin-left: 4px;
}

/* ===== SOLICITUDES ===== */
.grupo-solicitudes {
  margin-bottom: 32px;
}

.grupo-titulo {
  font-family: 'Fredoka One', cursive;
  font-size: 1.1em;
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.estado-titulo-pendiente  { background: var(--warning-soft); color: #92400E; border: 1.5px solid #FDE68A; }
.estado-titulo-aceptada   { background: var(--success-soft); color: #065F46; border: 1.5px solid #6EE7B7; }
.estado-titulo-rechazada  { background: var(--danger-soft);  color: #991B1B; border: 1.5px solid #FCA5A5; }
.estado-titulo-finalizada { background: var(--primary-soft); color: var(--primary-dark); border: 1.5px solid var(--border); }

.solicitud-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  margin-bottom: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s;
}
.solicitud-card:hover { box-shadow: var(--shadow-hover); }

.solicitud-card.estado-pendiente  { border-left: 5px solid var(--warning); }
.solicitud-card.estado-aceptada   { border-left: 5px solid var(--success); }
.solicitud-card.estado-rechazada  { border-left: 5px solid var(--danger); }
.solicitud-card.estado-finalizada { border-left: 5px solid var(--primary-light); }

.solicitud-header {
  padding: 18px 22px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}

.solicitud-header h4 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.05em;
  color: var(--text);
}

.solicitud-body {
  padding: 18px 22px;
}
.solicitud-body p {
  font-size: 0.92em;
  color: var(--text-mid);
  margin-bottom: 6px;
}
.solicitud-body p strong {
  color: var(--text);
}

.solicitud-acciones {
  padding: 14px 22px 18px;
  display: flex;
  gap: 10px;
  border-top: 1px solid var(--border);
}

.fecha-solicitud {
  font-size: 0.8em !important;
  color: var(--text-light) !important;
  margin-top: 8px !important;
}

/* ===== BADGES ===== */
.estado-badge {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75em;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.estado-pendiente  { background: var(--warning-soft);  color: #92400E; }
.estado-aceptada   { background: var(--success-soft);  color: #065F46; }
.estado-rechazada  { background: var(--danger-soft);   color: #991B1B; }
.estado-finalizada { background: var(--primary-soft);  color: var(--primary-dark); }

/* ===== WHATSAPP BUTTON ===== */
.btn-wa-small {
  background: #25D366;
  color: white !important;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8em;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-wa-small::before { content: '💬'; font-size: 0.9em; }
.btn-wa-small:hover {
  background: #128C7E;
  color: white !important;
  transform: translateY(-1px);
}

/* ===== CALENDAR BUTTON ===== */
.btn-calendario {
  background: var(--primary-soft);
  color: var(--primary);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.85em;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  margin-top: 10px;
  text-decoration: none;
  border: 1.5px solid var(--border);
}
.btn-calendario::before { content: '📅'; }
.btn-calendario:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
}

/* ===== TELEFONO ===== */
.telefono {
  color: var(--text-mid);
  font-size: 0.88em;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.telefono::before { content: '📞'; font-size: 0.85em; }

/* ===== DASHBOARD ===== */
.dashboard-welcome {
  background: linear-gradient(135deg, var(--primary) 0%, #A78BFA 50%, var(--accent) 100%);
  border-radius: var(--radius);
  padding: 32px;
  color: white;
  margin-bottom: 28px;
  position: relative;
  overflow: hidden;
}

.dashboard-welcome::after {
  content: '🐶🐱';
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 4em;
  opacity: 0.25;
}

.dashboard-welcome h2 {
  font-family: 'Nunito', sans-serif;
  font-size: 1.9em;
  font-weight: 500;
  color: white;
  margin-bottom: 4px;
}

.dashboard-welcome .info-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.dashboard-welcome .info-item {
  background: rgba(255,255,255,0.18);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.88em;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.dashboard-action-btn {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  color: var(--text);
  font-weight: 700;
  font-size: 0.92em;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.dashboard-action-btn .icon {
  font-size: 1.8em;
  line-height: 1;
}

.dashboard-action-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary-light);
  color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.dashboard-action-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(139,92,246,0.35);
}

.dashboard-action-btn.admin-btn {
  background: var(--text);
  border-color: var(--text);
  color: white;
}
.dashboard-action-btn.admin-btn:hover {
  background: #312e81;
  color: white;
}

.badge-count {
  background: var(--accent);
  color: white;
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  font-size: 0.72em;
  font-weight: 800;
}

/* ===== INFO CARD (dashboard) ===== */
.info-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.info-card .info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
}

.info-card .info-item {
  font-size: 0.92em;
  color: var(--text-mid);
}
.info-card .info-item strong {
  color: var(--text);
}

/* ===== MASCOTAS ===== */
.mascotas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.mascota-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.25s;
}
.mascota-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-light);
}

.mascota-foto {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3em;
}

.mascota-info {
  padding: 16px;
}

.mascota-nombre {
  font-family: 'Fredoka One', cursive;
  font-size: 1.15em;
  color: var(--text);
  margin-bottom: 4px;
}

.mascota-tipo {
  font-size: 0.82em;
  color: var(--text-mid);
  margin-bottom: 10px;
}

.mascota-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mascota-tag {
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75em;
  font-weight: 700;
}

/* ===== FORM CARD ===== */
.form-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.form-card h3 {
  font-family: 'Fredoka One', cursive;
  color: var(--primary);
  margin-bottom: 20px;
  font-size: 1.25em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-section-title {
  font-size: 0.8em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary-light);
  border-bottom: 2px solid var(--border);
  padding-bottom: 8px;
  margin: 20px 0 14px;
}

/* ===== SOLICITAR SERVICIO (modal en cuidadores) ===== */
.solicitar-form {
  background: var(--accent-soft);
  border: 1.5px solid #FBCFE8;
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 16px;
  display: none;
}
.solicitar-form.visible { display: block; }

/* ===== MAPA ===== */
.mapa-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.mapa-sidebar {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.mapa-sidebar h3 {
  font-family: 'Fredoka One', cursive;
  color: var(--primary);
  margin-bottom: 16px;
  font-size: 1.1em;
}

#map {
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  height: 480px;
  box-shadow: var(--shadow);
}

.cuidador-mapa-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  cursor: pointer;
  transition: background 0.2s;
  border: 1.5px solid transparent;
}
.cuidador-mapa-item:hover {
  background: var(--primary-soft);
  border-color: var(--border);
}

.cuidador-mapa-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.cuidador-mapa-info { flex: 1; }
.cuidador-mapa-nombre { font-weight: 700; font-size: 0.92em; color: var(--text); }
.cuidador-mapa-zona { font-size: 0.8em; color: var(--text-mid); }
.cuidador-mapa-precio { font-size: 0.82em; font-weight: 700; color: var(--primary); }

/* ===== RESEÑAS ===== */
.resena-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.resena-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.resena-autor {
  font-weight: 700;
  font-size: 0.95em;
  color: var(--text);
}

.resena-fecha {
  font-size: 0.8em;
  color: var(--text-light);
}

.resena-texto {
  color: var(--text-mid);
  font-size: 0.92em;
  line-height: 1.6;
}

.star-select { display: flex; gap: 6px; margin: 8px 0; }
.star-select label {
  font-size: 1.5em;
  cursor: pointer;
  color: #D1D5DB;
  transition: color 0.15s;
}
.star-select input[type="radio"] { display: none; }
.star-select input[type="radio"]:checked ~ label,
.star-select label:hover,
.star-select label:hover ~ label { color: #FBBF24; }

/* ===== PERFIL CUIDADOR ===== */
.profile-header {
  background: linear-gradient(135deg, var(--primary-soft) 0%, var(--accent-soft) 100%);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  display: flex;
  gap: 28px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.profile-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 20px rgba(139,92,246,0.2);
  flex-shrink: 0;
}

.profile-info h2 {
  font-size: 1.6em;
  margin-bottom: 6px;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

.profile-meta-item {
  background: white;
  border: 1.5px solid var(--border);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.85em;
  font-weight: 600;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 5px;
}

.profile-precio {
  font-size: 1.4em;
  font-weight: 800;
  color: var(--primary);
  font-family: 'Fredoka One', cursive;
}

/* ===== PUBLICIDAD ===== */
.banner-container {
  text-align: center;
  margin: 20px 0;
}
.banner-label {
  font-size: 0.7em;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-light);
  margin-bottom: 6px;
  font-weight: 600;
}
.banner-container img {
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ===== PILDORAS / BLOG ===== */
.pildoras-section {
  margin: 40px 0;
}
.pildoras-section h3 {
  font-family: 'Fredoka One', cursive;
  font-size: 1.3em;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pildoras-section h3::before { content: '💡'; }

.pildoras-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.pildora-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.pildora-card:hover {
  background: var(--primary-soft);
  border-color: var(--primary-light);
  transform: translateY(-2px);
  color: var(--text);
}
.pildora-emoji { font-size: 1.8em; margin-bottom: 8px; }
.pildora-titulo {
  font-weight: 700;
  font-size: 0.92em;
  margin-bottom: 4px;
  color: var(--text);
}
.pildora-desc {
  font-size: 0.8em;
  color: var(--text-mid);
  line-height: 1.5;
}
.pildora-coming {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}
.pildora-coming .pildora-titulo::after {
  content: ' — Próximamente';
  font-size: 0.8em;
  color: var(--text-light);
  font-weight: 400;
}

/* ===== SOCIAL ICONS ===== */
.social-footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 8px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-soft);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1em;
  transition: all 0.2s;
  text-decoration: none;
  font-weight: 700;
}
.social-icon:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-mid);
}
.empty-state .emoji { font-size: 3em; margin-bottom: 12px; }
.empty-state p { font-size: 1.05em; margin-bottom: 16px; }

/* ===== FOOTER ===== */
footer {
  background: white;
  border-top: 2px solid var(--border);
  padding: 28px 32px;
  margin-top: 60px;
  text-align: center;
}

footer .footer-logo {
  font-family: 'Fredoka One', cursive;
  font-size: 1.3em;
  color: var(--primary);
  margin-bottom: 12px;
}

footer p {
  color: var(--text-light);
  font-size: 0.85em;
}

/* ===== RESPONSIVE ===== */
/* ============================================
   WauMiau — RESPONSIVE MÓVIL MEJORADO
   Reemplaza la sección @media al final del CSS
   ============================================ */

/* ===== DASH INFO GRID (solicitudes + info) ===== */
.dash-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 600px) {
  .dash-info-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== TABLET (max 900px) ===== */
@media (max-width: 900px) {
  .mapa-layout { grid-template-columns: 1fr; }
  #map { height: 340px; }
}

/* ===== MÓVIL GRANDE (max 768px) ===== */
@media (max-width: 768px) {
  /* Topbar */
  .topbar { padding: 0 14px; height: 56px; }
  .topbar > a:first-child { font-size: 1.2em; }
  .topbar > a:first-child::after { display: none; }
  .topbar div { gap: 8px; }
  .topbar div a { padding: 5px 10px; font-size: 0.82em; }

  /* Container */
  .page-container { padding: 20px 14px 80px; }

  /* Títulos */
  h2 { font-size: 1.45em; }
  h3 { font-size: 1.05em; }

  /* Forms */
  .form-row { grid-template-columns: 1fr; gap: 12px; }
  .form-card { padding: 18px 16px; }
  .form-group input,
  .form-group select,
  .form-group textarea { font-size: 16px; /* evita zoom en iOS */ }

  /* Dashboard welcome */
  .dashboard-welcome { padding: 22px 18px; }
  .dashboard-welcome h2 { font-size: 1.4em; }
  .dashboard-welcome::after { display: none; }
  .dashboard-welcome .info-row { gap: 8px; }
  .dashboard-welcome .info-item { font-size: 0.78em; padding: 5px 10px; }

  /* Dashboard actions — 3 columnas en tablet */
  .dashboard-actions { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .dashboard-action-btn { padding: 16px 10px; font-size: 0.82em; }
  .dashboard-action-btn .icon { font-size: 1.5em; }

  /* Cuidadores grid */
  .cuidadores-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
  .cuidador-card { padding: 20px 16px; }
  .cuidador-avatar, .cuidador-avatar-placeholder { width: 72px; height: 72px; }

  /* Profile */
  .profile-header { flex-direction: column; align-items: center; text-align: center; padding: 22px 18px; gap: 18px; }
  .profile-avatar { width: 90px; height: 90px; }
  .profile-meta { justify-content: center; }

  /* Solicitudes */
  .solicitud-header { flex-direction: column; gap: 8px; padding: 14px 16px; }
  .solicitud-body { padding: 14px 16px; }
  .solicitud-acciones { padding: 12px 16px 16px; flex-wrap: wrap; }

  /* Mascotas */
  .mascotas-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }

  /* Reseñas */
  .resena-header { flex-direction: column; align-items: flex-start; gap: 4px; }

  /* Píldoras */
  .pildoras-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .pildora-card { padding: 16px; }

  /* Banners */
  .banner-container { margin: 14px 0; }

  /* Mapa */
  .mapa-sidebar { padding: 16px; }
  #map { height: 280px; }
}

/* ===== MÓVIL PEQUEÑO (max 480px) ===== */
@media (max-width: 480px) {
  /* Topbar compacto */
  .topbar { padding: 0 12px; height: 52px; }
  .topbar > a:first-child { font-size: 1.1em; }
  .topbar > a:first-child img { width: 26px !important; height: 26px !important; }
  .topbar div a:not(.btn-secondary):not(.btn) { display: none; } /* oculta "Mi panel" */

  /* Contenedor */
  .page-container { padding: 16px 12px 80px; }

  /* Títulos */
  h2 { font-size: 1.3em; }

  /* Dashboard actions — 2 columnas */
  .dashboard-actions { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .dashboard-action-btn { padding: 14px 8px; font-size: 0.8em; border-radius: 12px; }
  .dashboard-action-btn .icon { font-size: 1.4em; }

  /* Cuidadores — 1 columna */
  .cuidadores-grid { grid-template-columns: 1fr; }
  .cuidador-card { display: flex; flex-direction: row; text-align: left; padding: 16px; gap: 14px; align-items: flex-start; }
  .cuidador-card::before { display: none; }
  .cuidador-avatar, .cuidador-avatar-placeholder { width: 60px; height: 60px; margin: 0; flex-shrink: 0; }
  .cuidador-ciudad, .estrellas { justify-content: flex-start; }

  /* Mascotas — 2 columnas fijas */
  .mascotas-grid { grid-template-columns: 1fr 1fr; }
  .mascota-foto { height: 120px; }

  /* Píldoras — 2 columnas */
  .pildoras-grid { grid-template-columns: 1fr 1fr; }

  /* Buttons más grandes para touch */
  .btn { padding: 12px 20px; font-size: 0.9em; }
  .btn-sm { padding: 9px 14px; }

  /* Cards */
  .card { padding: 16px; border-radius: 12px; }
  .form-card { padding: 16px 14px; border-radius: 12px; }

  /* Solicitudes — full width acciones */
  .sol-acciones { flex-direction: column; }
  .sol-acciones .btn,
  .sol-acciones .btn-wa,
  .sol-acciones .btn-yappy,
  .sol-acciones .btn-pago-enviado,
  .sol-acciones .btn-confirmar { width: 100%; justify-content: center; }

  /* Profile */
  .profile-avatar { width: 80px; height: 80px; }
  .profile-header { padding: 18px 14px; }

  /* Mapa */
  #map { height: 240px; }
  .cuidador-mapa-item { padding: 10px; }

  /* Social icons más grandes */
  .social-icon { width: 44px; height: 44px; font-size: 1.2em; }

  /* Dashboard welcome info-row scroll horizontal */
  .dashboard-welcome .info-row { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .dashboard-welcome .info-item { flex-shrink: 0; }
}

/* ===== MÓVIL MUY PEQUEÑO (max 360px) ===== */
@media (max-width: 360px) {
  .dashboard-actions { grid-template-columns: repeat(2, 1fr); }
  .mascotas-grid { grid-template-columns: 1fr; }
  .pildoras-grid { grid-template-columns: 1fr; }
  .topbar > a:first-child { font-size: 1em; }
}

/* ===== MEJORAS TÁCTILES GENERALES ===== */
@media (hover: none) and (pointer: coarse) {
  /* Sin hover effects en táctil */
  .card:hover, .cuidador-card:hover, .mascota-card:hover { transform: none; }
  /* Targets táctiles mínimo 44px */
  .btn, .dashboard-action-btn, .social-icon, .btn-wa, .btn-yappy { min-height: 44px; }
  /* Sin transform en botones táctil */
  .btn:hover, .btn-primary:hover, .btn-secondary:hover { transform: none; }
}

/* ===== BOTTOM SAFE AREA (iPhone notch) ===== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .page-container { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
}

/* ===== TOPBAR FIX MÓVIL ===== */
/* Quitar emojis ::after que rompen el layout */
.topbar > a:first-child::after { display: none !important; }

/* El topbar NUNCA debe cortar contenido con overflow:hidden */
.topbar { overflow: visible !important; }

/* Botón salir: siempre visible, nunca se encoge (ambas clases posibles) */
.topbar .btn-salir,
.topbar .btn-secondary {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
}

@media (max-width: 768px) {
    .topbar {
        padding: 0 12px !important;
        height: 54px !important;
        gap: 6px !important;
        justify-content: flex-start !important;
    }
    .topbar > a:first-child,
    .topbar .logo-waumiau {
        font-size: 1.1em !important;
        flex-shrink: 0 !important;
    }
    .topbar .logo-waumiau img {
        width: 28px !important;
        height: 28px !important;
    }
    /* Nav: empujar a la derecha */
    .topbar div,
    .topbar-nav {
        margin-left: auto !important;
        gap: 4px !important;
        flex-shrink: 0 !important;
    }
    /* Ocultar links secundarios en tablet */
    .topbar div a:not(.btn-secondary):not(.btn-salir),
    .topbar-nav a:not(.btn-secondary):not(.btn-salir) {
        display: none !important;
    }
    /* Salir siempre visible */
    .topbar .btn-salir,
    .topbar .btn-secondary {
        font-size: 0.84em !important;
        padding: 7px 14px !important;
        display: inline-flex !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 480px) {
    /* En móvil pequeño: solo logo + Salir */
    .topbar div a:not(.btn-secondary):not(.btn-salir),
    .topbar-nav a:not(.btn-secondary):not(.btn-salir) {
        display: none !important;
    }
    .topbar .btn-salir,
    .topbar .btn-secondary {
        display: inline-flex !important;
        flex-shrink: 0 !important;
    }
}