/* Custom styles on top of Tailwind */
:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --accent: #f97316;
  --success: #10b981;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.hero-gradient {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
}

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.category-card {
  transition: all 0.25s ease;
}

.category-card:hover {
  transform: scale(1.05);
  border-color: var(--primary);
}

.btn-primary {
  background-color: var(--primary);
  transition: background-color 0.2s;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.btn-accent {
  background-color: var(--accent);
}

.btn-accent:hover {
  background-color: #ea580c;
}

.profile-avatar {
  background: linear-gradient(135deg, #0ea5e9, #f97316);
}

.rating-stars {
  color: #fbbf24;
}

.service-badge {
  background-color: #e0f2fe;
  color: #0369a1;
}

.footer-link:hover {
  color: var(--primary);
}

/* Mobile menu */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-menu.open {
  max-height: 400px;
}

/* Form focus */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Provider card image placeholder */
.provider-img {
  background: linear-gradient(45deg, #e0f2fe, #fef3c7);
}
/* ===== Vista móvil ===== */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

img, video, iframe {
  max-width: 100%;
}

/* Targets táctiles más grandes */
button, a.inline-flex, select, input, textarea {
  min-height: 44px;
}

/* Evitar zoom iOS al enfocar inputs */
@media screen and (max-width: 767px) {
  input, select, textarea {
    font-size: 16px !important;
  }

  nav .text-xl {
    font-size: 1rem;
  }

  .hero-gradient h1 {
    font-size: 1.85rem !important;
    line-height: 1.2 !important;
  }

  .hero-gradient {
    padding-bottom: 2.5rem;
  }

  /* Sin hover “saltando” en touch */
  .card-hover:hover,
  .category-card:hover {
    transform: none;
  }

  /* Mapa más bajo en celular */
  #map {
    height: 58vh !important;
    min-height: 280px;
    border-radius: 0.75rem;
  }

  /* Toast no tapa botones */
  .toast {
    left: 12px;
    right: 12px;
    bottom: 16px;
  }

  /* Modales a pantalla casi completa */
  #detail-modal > div,
  #chat-modal > div {
    max-width: 100% !important;
    width: 100% !important;
    max-height: 96vh !important;
    margin: 0;
    border-radius: 1rem 1rem 0 0 !important;
  }

  #chat-modal > div {
    height: 92vh !important;
  }

  #detail-modal,
  #chat-modal {
    align-items: flex-end !important;
    padding: 0 !important;
  }

  .chat-msg-img,
  .chat-msg-audio {
    max-width: 72vw;
  }

  /* Filtros: selects a todo el ancho */
  #filter-cat, #filter-city, #filter-home,
  #filter-radius, #filter-sort {
    width: 100%;
  }

  /* Safe area iPhone */
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* Account dropdown */
#account-dropdown {
  max-height: 80vh;
  overflow-y: auto;
}

@media screen and (max-width: 767px) {
  /* Navbar más compacta */
  nav .truncate { max-width: 9.5rem; }

  /* Botones full width en hero */
  .hero-gradient a.inline-flex {
    width: 100%;
  }

  /* Cards de categoría más compactas */
  .category-card {
    padding: 0.85rem !important;
  }

  /* Listado profesionales 1 columna limpia */
  #providers-list {
    gap: 0.85rem !important;
  }

  /* Filtros con menos padding */
  .bg-white.rounded-2xl.shadow-sm.p-4 {
    padding: 0.75rem !important;
  }

  /* Menú móvil: áreas táctiles grandes */
  #mobile-menu a, #mobile-menu button {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  #mobile-menu.open {
    max-height: 80vh;
    overflow-y: auto;
  }
}
