/* =====================================================================
   VetUberaba — Responsividade
   Carregado por último em todas as páginas (depois de style.css).
   - Mobile (até 767px): mesmo visual do app, com ajustes para telas
     pequenas (iPhone SE, Galaxy, Xiaomi, dobráveis) e áreas seguras
     (notch / barra de gestos do iPhone).
   - Tablet (768px+): conteúdo ocupa a largura da tela.
   - Notebook / PC (1024px+): mais colunas, menu inferior como no celular.
   ===================================================================== */

/* ---------- Base (todas as telas) ---------- */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

img {
  max-width: 100%;
}

/* Altura real da tela no celular (ignora a barra do navegador) */
@supports (min-height: 100dvh) {
  body,
  .app-container,
  .login-page-wrapper {
    min-height: 100dvh;
  }
}

/* Marca da barra de navegação: só aparece no PC */
.nav-brand {
  display: none;
}

/* Barra inferior: sempre centralizada e com os itens distribuídos,
   sem rolagem lateral em telas estreitas */
.bottom-nav {
  left: 0;
  right: 0;
  margin-left: auto;
  margin-right: auto;
  justify-content: space-around !important;
  gap: 4px !important;
  overflow: visible !important;
  padding-left: max(10px, env(safe-area-inset-left)) !important;
  padding-right: max(10px, env(safe-area-inset-right)) !important;
}

.bottom-nav .nav-item {
  flex: 1 1 0;
  min-width: 0;
  max-width: 72px;
  width: auto;
}

.bottom-nav .nav-item span {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Conteúdo da home nunca fica escondido atrás da barra inferior
   (inclui a barra de gestos dos iPhones) */
.main-content {
  padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px));
}

/* Títulos de seção com link "Ver todos" não se espremem */
.home-section-head {
  gap: 12px;
}

.home-section-head h3 {
  min-width: 0;
}

.home-section-head a {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Ícones de serviços nunca ultrapassam a coluna */
.home-service {
  min-width: 0;
}

.home-service-img {
  width: 100%;
}

.home-service-img img {
  max-width: min(90px, 100%) !important;
}

/* Modal de instalação no iPhone respeita a barra de gestos */
#iosInstallModal {
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
}

/* Campos e botões não estouram a largura */
input,
select,
textarea,
button {
  max-width: 100%;
}

/* ---------- Celulares pequenos (iPhone SE, mini, Galaxy compactos) ---------- */
@media (max-width: 374px) {
  .header-home {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header-title {
    font-size: 25px;
  }

  .header-home .header-pets-img {
    width: 132px;
    max-width: 42%;
  }

  .search-bar {
    left: 16px;
    right: 16px;
    padding: 14px 18px;
  }

  .main-content {
    padding-left: 18px;
    padding-right: 18px;
  }

  .home-section-head h3 {
    font-size: 16px !important;
  }

  .home-banner {
    height: auto !important;
    min-height: 96px;
  }

  .home-banner .banner-content {
    max-width: 58%;
    margin-top: 0 !important;
  }

  .home-banner-art img {
    width: 140px !important;
  }

  .home-services {
    gap: 12px !important;
  }

  .header-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .professionals-container {
    padding-left: 18px;
    padding-right: 18px;
  }

  .bottom-nav .nav-item span {
    font-size: 9px;
  }
}

/* Filtros avançados (clínicas/farmácias) quebram linha se faltar espaço */
@media (max-width: 359px) {
  #advancedFilters div[style*="space-between"] {
    flex-wrap: wrap;
  }
}

/* ---------- Telas muito estreitas (dobráveis fechados, 280–319px) ---------- */
@media (max-width: 319px) {
  .header-title {
    font-size: 22px;
  }

  .home-banner {
    padding: 16px 18px !important;
  }

  .home-banner .banner-content {
    max-width: 62%;
  }

  .home-banner h3 {
    font-size: 16px;
  }

  .home-banner-art img {
    width: 100px !important;
  }

  .home-services {
    gap: 8px !important;
  }

  .home-service span {
    font-size: 12px !important;
  }

  .bottom-nav {
    padding-left: 4px !important;
    padding-right: 4px !important;
    gap: 2px !important;
  }

  .bottom-nav .nav-item {
    font-size: 22px;
  }

  .nav-24h {
    width: 44px;
    height: 44px;
    font-size: 13px;
  }

  #proList,
  html body #proList {
    gap: 10px;
  }
}

/* ---------- Celular deitado (paisagem): respeita o notch ---------- */
@media (max-width: 767px) and (orientation: landscape) {
  .app-container {
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
  }
}

/* =====================================================================
   TABLET (768px+) — largura total
   ===================================================================== */
@media (min-width: 768px) {
  :root {
    --page-pad: max(32px, env(safe-area-inset-left, 0px), calc((100% - 1200px) / 2));
  }

  .app-container {
    max-width: none;
    box-shadow: none;
  }

  /* --- Cabeçalho da home --- */
  .header-home {
    padding: 48px var(--page-pad) 84px;
  }

  .header-title {
    font-size: 36px;
    max-width: 60%;
  }

  .location {
    font-size: 15px;
  }

  .header-home .header-pets-img {
    width: 250px;
    max-width: 38%;
    right: var(--page-pad);
  }

  .search-bar {
    left: var(--page-pad);
    right: auto;
    width: min(640px, calc(100% - 64px));
    bottom: -28px;
    padding: 18px 26px;
  }

  .search-bar input {
    font-size: 15px;
  }

  /* --- Conteúdo da home --- */
  .main-content {
    padding: 64px var(--page-pad) calc(130px + env(safe-area-inset-bottom, 0px));
  }

  /* Clínicas e Farmácias lado a lado */
  .collapsible-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    grid-auto-flow: column;
    column-gap: 32px;
  }

  .home-banner {
    height: 124px !important;
    align-items: center !important;
  }

  .home-banner .banner-content {
    margin-top: 0 !important;
  }

  .home-banner h3 {
    font-size: 20px;
  }

  .home-banner p {
    font-size: 13px;
  }

  .home-banner-art {
    right: 8px !important;
    bottom: -18px !important;
  }

  .home-banner-art img {
    width: 190px !important;
  }

  /* A arte da farmácia tem margem transparente embaixo: desce para alinhar com a de clínicas */
  a[href="farmacias.html"] .home-banner-art {
    bottom: -35px !important;
  }

  /* Serviços em uma linha */
  .home-services {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 24px !important;
  }

  .home-service-img {
    height: 110px !important;
  }

  .home-service-img img {
    max-width: min(110px, 100%) !important;
  }

  .home-service span {
    font-size: 14px !important;
  }

  /* Barra inferior flutuante e centralizada no tablet */
  .bottom-nav {
    max-width: 560px;
  }

  /* --- Páginas internas --- */
  .header-inner {
    padding-left: var(--page-pad);
    padding-right: var(--page-pad);
  }

  .header-inner h1 {
    font-size: 24px;
  }

  .header-inner .header-pets-img {
    margin-left: auto;
    right: 0 !important;
  }

  .professionals-container {
    padding-left: var(--page-pad);
    padding-right: var(--page-pad);
    padding-bottom: 64px;
  }

  /* Listas de cards em grade */
  #clinicsList,
  #pharmaciesList,
  #taxiList,
  #hotelList,
  #petsitterList,
  #banhoList,
  #funerariaList {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
    align-content: start;
  }

  #clinicsList > .pro-card,
  #pharmaciesList > .pro-card,
  #taxiList > .pro-card,
  #hotelList > .pro-card,
  #petsitterList > .pro-card,
  #banhoList > .pro-card,
  #funerariaList > .pro-card {
    margin-bottom: 0;
  }

  /* Mensagens de "nenhum resultado" ocupam a linha inteira */
  #clinicsList > :not(.pro-card),
  #pharmaciesList > :not(.pro-card),
  #taxiList > :not(.pro-card),
  #hotelList > :not(.pro-card),
  #petsitterList > :not(.pro-card),
  #banhoList > :not(.pro-card),
  #funerariaList > :not(.pro-card) {
    grid-column: 1 / -1;
  }

  html body #proList {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }

  html body #proList > :not(.pro-card) {
    grid-column: 1 / -1;
  }

  /* Especialidades em colunas */
  #specsContainer > div {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Calculadoras */
  .calc-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }

  .calc-btn {
    height: 84px;
  }

  #calcView {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Formulários e textos em largura confortável de leitura */
  .professionals-container:has(.auth-form) > * {
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
  }

  .professionals-container .pro-card[style*="padding: 24px"] {
    max-width: 860px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Tela de acesso à calculadora */
  .login-content {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
  }

  /* Modais ocupam a tela toda, com a caixa centralizada */
  #welcomeModalOverlay {
    max-width: none !important;
  }

  #welcomeModal {
    max-width: 440px;
  }

  #iosInstallModal {
    left: 50% !important;
    max-width: 520px;
    margin-left: -260px;
  }
}

/* Tablet em pé: banners mais estreitos, arte menor para não cobrir o texto */
@media (min-width: 768px) and (max-width: 1023px) {
  .home-banner .banner-content {
    max-width: 56%;
  }

  .home-banner-art img {
    width: 150px !important;
  }
}

/* Celular deitado / telas baixas: cabeçalho mais compacto */
@media (min-width: 768px) and (max-height: 520px) {
  .header-home {
    padding-top: 28px;
    padding-bottom: 64px;
  }

  .header-title {
    font-size: 30px;
  }

  .header-home .header-pets-img {
    width: 180px;
  }

  .header-inner {
    padding-top: 28px;
  }
}

/* =====================================================================
   NOTEBOOK / PC (1024px+) — layout largo, menu inferior como no celular
   ===================================================================== */
@media (min-width: 1024px) {
  :root {
    --page-pad: max(48px, calc((100% - 1200px) / 2));
  }

  /* --- Barra de navegação inferior (mesmo estilo do celular) --- */
  .app-container > .bottom-nav {
    max-width: 600px;
  }

  .bottom-nav .nav-item {
    max-width: 88px;
  }

  /* --- Cabeçalho da home --- */
  .header-home {
    padding: 22px var(--page-pad) 58px;
  }

  .header-title {
    font-size: 46px;
    margin-bottom: 12px !important;
  }

  .location {
    font-size: 16px;
  }

  .location > span {
    font-size: 14px !important;
  }

  .header-home .header-pets-img {
    width: 330px;
    max-width: 34%;
    /* a imagem tem ~8% de margem transparente embaixo: assim os pets ficam rentes à divisória */
    bottom: calc(min(330px, 34vw) * -0.078 - 28px);
  }

  /* O conteúdo passa por cima da base da imagem: os pets ficam por trás da divisória
     (a barra de pesquisa continua na frente) */
  .header-home ~ .main-content {
    position: relative;
    z-index: 3;
    background-color: var(--bg-color);
  }

  .search-bar {
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: min(680px, 60%);
    bottom: -30px;
    padding: 20px 28px;
  }

  /* --- Conteúdo da home --- */
  .main-content {
    padding: 80px var(--page-pad) 140px;
  }

  .home-section-head h3 {
    font-size: 22px !important;
  }

  .home-section-head a {
    font-size: 15px !important;
  }

  .collapsible-inner {
    column-gap: 40px;
  }

  .home-banner-link {
    margin-bottom: 48px !important;
  }

  .home-banner {
    height: 156px !important;
    padding: 24px 32px !important;
  }

  .home-banner h3 {
    font-size: 24px;
  }

  .home-banner p {
    font-size: 15px;
  }

  .home-banner-art {
    right: 16px !important;
    bottom: -20px !important;
  }

  .home-banner-art img {
    width: 230px !important;
  }

  a[href="farmacias.html"] .home-banner-art {
    bottom: -41px !important;
  }

  /* Conteúdo das páginas internas passa por cima da base do cabeçalho:
     a imagem do cabeçalho fica rente à divisória */
  .header-inner ~ .professionals-container {
    position: relative;
    z-index: 2;
  }

  .header-inner .header-pets-img {
    transform: translateY(6px);
  }

  /* Detalhe verde reto (no lugar da onda) nos cabeçalhos */
  .header-home::before,
  .header-inner::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath fill='%235c9247' d='M82,0 L70,100 L100,100 L100,0 Z' /%3E%3C/svg%3E") !important;
  }

  .home-services {
    gap: 32px !important;
  }

  .home-service-img {
    height: 140px !important;
  }

  .home-service-img img {
    max-width: min(140px, 100%) !important;
  }

  .home-service span {
    font-size: 15px !important;
  }

  /* --- Páginas internas --- */
  .header-inner {
    padding-top: 34px;
    padding-bottom: 62px;
  }

  .header-inner h1 {
    font-size: 30px;
  }

  .header-inner .back-btn {
    font-size: 28px;
  }

  .header-inner .header-pets-img {
    width: 150px !important;
  }

  .professionals-container {
    padding-top: 40px;
    padding-bottom: 80px;
  }

  #clinicsList,
  #pharmaciesList,
  #taxiList,
  #hotelList,
  #petsitterList,
  #banhoList,
  #funerariaList {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
  }

  html body #proList {
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 24px;
  }

  #specsContainer > div {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .calc-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }

  .calc-btn {
    height: 92px;
    font-size: 14px;
  }
}

/* ---------- Efeitos de passar o mouse (só em mouse/trackpad) ---------- */
@media (hover: hover) and (pointer: fine) {
  .home-service:hover {
    transform: translateY(-4px);
  }

  .home-banner-link .home-banner {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  .home-banner-link:hover .home-banner {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(27, 59, 100, 0.18);
  }

  .pro-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  .pro-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1);
  }

  .calc-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
  }

  .bottom-nav .nav-item:not(.active):hover {
    color: var(--primary-blue);
  }
}


/* ---------- Menos movimento para quem prefere ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .home-service:hover,
  .home-banner-link:hover .home-banner,
  .pro-card:hover,
  .calc-btn:hover {
    transform: none;
  }
}

/* =====================================================================
   DESEMPENHO — aparelhos mais fracos
   A classe "lite" é aplicada automaticamente em celulares/PCs com pouca
   memória ou poucos núcleos. Só remove o desfoque de fundo dos modais
   (efeito caro para a placa de vídeo); o visual continua o mesmo.
   ===================================================================== */
html.lite *,
html.lite *::before,
html.lite *::after {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Rolagem suave por toque e sem atraso de 300ms no clique */
a,
button,
input,
label,
select,
.calc-btn,
.bul-item {
  touch-action: manipulation;
}

/* Páginas sem cadastros (Outros serviços) */
.empty-services {
  background: var(--white);
  border: 1px solid #edf0f3;
  border-radius: 20px;
  padding: 36px 24px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.empty-services h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-blue);
  margin-bottom: 8px;
}

.empty-services p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-light);
  max-width: 420px;
  margin: 0 auto 18px;
}

.empty-services a {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 12px;
  border: 1px solid var(--primary-blue);
  color: var(--primary-blue);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

/* =====================================================================
   Cards de estabelecimentos (Clínicas e Farmácias)
   ===================================================================== */
.place-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #edf0f3;
  border-radius: 22px;
  overflow: hidden;
  background: var(--white);
}

.place-media {
  position: relative;
  height: 168px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.place-media--clinic {
  background: linear-gradient(135deg, #1b3b64 0%, #24507f 100%);
}

.place-media--pharmacy {
  background: linear-gradient(135deg, #1e8789 0%, #1b6f7a 100%);
}

.place-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath fill='%235c9247' d='M78,0 L66,100 L100,100 L100,0 Z' /%3E%3C/svg%3E");
  background-size: 100% 100%;
  opacity: 0.9;
}

.place-media img {
  position: relative;
  height: 150px;
  width: auto;
  max-width: 80%;
  object-fit: contain;
  margin-bottom: -6px;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18));
}

.place-ribbon {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--white);
  color: var(--primary-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 6px 10px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.place-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.place-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.place-card .pro-name {
  font-size: 19px;
  font-weight: 800;
  margin: 0;
  text-align: left;
}

.place-status {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

.place-status.is-open {
  color: #15803d;
  background: #dcfce7;
}

.place-status.is-closed {
  color: #b91c1c;
  background: #fee2e2;
}

.place-type {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  text-align: left;
}

.place-desc {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.55;
  color: #4b5563;
  text-align: left;
}

.place-card .place-tags {
  justify-content: flex-start;
  margin: 14px 0 6px;
}

.badge--24h {
  background-color: var(--secondary-orange);
}

.place-info {
  margin: 8px 0 16px;
  border-top: 1px solid #eef0f3;
}

.place-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #eef0f3;
  text-align: left;
}

.place-row dt {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-light);
  padding-top: 2px;
}

.place-row dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: #1f2937;
  overflow-wrap: anywhere;
}

.place-row dd a {
  color: var(--primary-blue);
  font-weight: 600;
  text-decoration: none;
}

.place-row dd a:hover {
  text-decoration: underline;
}

.place-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}

.place-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  text-align: center;
}

.place-btn--primary {
  background: var(--primary-blue);
  color: var(--white);
}

.place-btn--green {
  background: var(--primary-green);
  color: var(--white);
}

.place-btn--ghost {
  background: var(--white);
  color: var(--primary-blue);
  border-color: #d5dbe2;
}

@media (min-width: 768px) {
  #clinicsList > .place-card,
  #pharmaciesList > .place-card {
    max-width: 560px;
  }
}

@media (max-width: 359px) {
  .place-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .place-body {
    padding: 16px;
  }
}

/* --- Foto real do estabelecimento --- */
.place-media--photo {
  height: 200px;
  align-items: stretch;
  background: #e5e7eb;
}

.place-media--photo::before {
  display: none;
}

.place-media--photo img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 40%;
  margin: 0;
  filter: none;
}

.place-media--photo::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.18), transparent);
  pointer-events: none;
}

/* --- Ver detalhes (abre/fecha com animação) --- */
.place-toggle {
  gap: 8px;
  cursor: pointer;
  font-family: inherit;
}

.place-toggle-mark {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.25s ease;
}

.place-card.is-expanded .place-toggle-mark {
  transform: translateY(2px) rotate(-135deg);
}

.place-details {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.place-card.is-expanded .place-details {
  grid-template-rows: 1fr;
}

.place-details-inner {
  min-height: 0;
  overflow: hidden;
}

.place-details .place-info {
  margin: 16px 0 14px;
}

.place-actions--secondary {
  margin: 0 0 2px;
}

.list-empty-filter {
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  padding: 28px 16px;
}

/* =====================================================================
   Clínicas e Farmácias — experiência no celular
   ===================================================================== */
#clinicsSearchForm,
#pharmaciesSearchForm {
  background: var(--white) !important;
  border: 1px solid #e8ecf0 !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05) !important;
  margin-bottom: 16px !important;
}

#clinicsSearchInput,
#pharmaciesSearchInput {
  font-size: 15px !important;
  color: var(--text-dark);
}

#openFilterModal {
  min-width: 36px;
  min-height: 28px;
  justify-content: center;
}

#advancedFilters {
  padding: 20px !important;
  gap: 18px !important;
  border-radius: 18px !important;
}

#advancedFilters .filter-btn {
  padding: 9px 16px;
  font-size: 13px;
}

#clinicsList .place-card,
#pharmaciesList .place-card {
  margin-bottom: 18px;
  box-shadow: 0 6px 24px rgba(27, 59, 100, 0.08);
}

@media (max-width: 767px) {
  .place-card {
    border-radius: 20px;
  }

  .place-body {
    padding: 18px 18px 20px;
  }

  .place-card .pro-name {
    font-size: 20px;
  }

  .place-desc {
    font-size: 14px;
  }

  .place-btn {
    padding: 14px 10px;
    font-size: 15px;
    border-radius: 14px;
  }

  .place-row {
    grid-template-columns: 78px minmax(0, 1fr);
    padding: 11px 0;
  }

  .place-row dd {
    font-size: 14.5px;
  }
}

@media (max-width: 359px) {
  .place-media--photo {
    height: 170px;
  }

  .place-actions {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .place-media--photo {
    height: 220px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .place-details,
  .place-toggle-mark {
    transition: none;
  }
}

.place-btn {
  white-space: nowrap;
}

/* --- Preferências (Clínicas) --- */
.clinic-prefs {
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid #e8ecf0;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.clinic-prefs-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-light);
}

.clinic-prefs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.clinic-prefs-row .ios-switch-container {
  flex: 1 1 140px;
  justify-content: flex-start;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--primary-blue);
  background: var(--bg-color);
}

/* --- Janela de detalhes (modal central) --- */
.place-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 30, 50, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.place-modal.is-open {
  opacity: 1;
}

.place-modal-dialog {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

@supports not (height: 100dvh) {
  .place-modal-dialog {
    max-height: calc(100vh - 32px);
  }
}

.place-modal.is-open .place-modal-dialog {
  transform: none;
}

.place-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.95);
  color: var(--primary-blue);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 2px;
}

.place-modal-media {
  position: relative;
  flex-shrink: 0;
  height: 190px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

.place-modal-media.place-media--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.place-modal-media.place-media--clinic,
.place-modal-media.place-media--pharmacy {
  background: linear-gradient(135deg, #1b3b64 0%, #24507f 100%);
}

.place-modal-media:not(.place-media--photo) img {
  height: 160px;
  width: auto;
  margin-bottom: -6px;
}

.place-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 20px 22px 8px;
}

.place-modal-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-blue);
  line-height: 1.2;
}

.place-modal .place-tags {
  justify-content: flex-start;
  margin: 12px 0 4px;
}

.place-modal .place-info {
  margin: 10px 0 8px;
}

.place-modal-actions {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 14px 22px calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid #eef0f3;
  background: var(--white);
}

.place-btn--wide {
  grid-column: 1 / -1;
}

body.place-modal-lock {
  overflow: hidden;
}

@media (max-width: 359px) {
  .place-modal {
    padding: 10px;
  }
  .place-modal-media {
    height: 150px;
  }
  .place-modal-body {
    padding: 16px 16px 6px;
  }
  .place-modal-actions {
    padding: 12px 16px 14px;
  }
}

@media (max-height: 640px) {
  .place-modal-media {
    height: 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .place-modal,
  .place-modal-dialog {
    transition: none;
  }
}

/* --- Modo aplicativo (Calculadora / Bulário instalados) --- */
html.is-app [data-site-link] {
  display: none !important;
}

/* =====================================================================
   Lista de profissionais / Pet sitter / Atendimento em casa (sem imagem)
   ===================================================================== */
html body #proList {
  display: block;
}

.person-list {
  background: var(--white);
  border: 1px solid #e8ecf0;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #eef0f3;
}

.person-row:last-child {
  border-bottom: none;
}

.person-main {
  flex: 1;
  min-width: 0;
}

.person-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}

.person-kind {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
}

.person-example {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #6b7280;
  background: #f1f3f6;
  padding: 2px 7px;
  border-radius: 6px;
}

.person-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-blue);
  line-height: 1.3;
  margin: 0;
}

.person-spec {
  font-size: 13.5px;
  color: #4b5563;
  margin-top: 2px;
  line-height: 1.4;
}

.person-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.person-tag {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary-blue);
  background: var(--bg-color);
  border: 1px solid #e5e9ee;
  padding: 3px 9px;
  border-radius: 20px;
}

.person-btn {
  flex-shrink: 0;
  padding: 11px 18px;
  border-radius: 12px;
  background: var(--primary-green);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(92, 146, 71, 0.25);
}

.person-btn:active {
  transform: scale(0.97);
}

@media (hover: hover) and (pointer: fine) {
  .person-row {
    transition: background-color 0.2s;
  }
  .person-row:hover {
    background-color: #fafbfc;
  }
}

@media (max-width: 359px) {
  .person-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px;
  }
  .person-btn {
    text-align: center;
  }
}

@media (min-width: 768px) {
  .person-row {
    padding: 18px 24px;
  }
  .person-name {
    font-size: 17px;
  }
}
