:root{
  --bg:#021B3A;
  --card:#0B2A52;
  --text:#ffffff;
  --muted:rgba(255,255,255,.75);
  --accent:#11D3C8; /* turquesa farmacia */
  --border:rgba(255,255,255,.12);
}

/* Base / reset */
*,
*::before,
*::after{
  box-sizing:border-box;
}

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.header{
  padding: 20px 16px 10px;
  border-bottom: 1px solid var(--border);
}

.brand{
  max-width: 980px;
  margin:0 auto;
  line-height:1;
}

.brand__title{
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .2px;
}

.brand__sub{
  margin-top: 6px;
  font-size: 14px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: .6px;
}

.container{
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

.panel{
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}

h1{margin:0 0 6px}
.muted{color: var(--muted)}

/* Form layout */
.form{
  margin-top: 14px;
  display:grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items:end;
}

/* CLAVE: permite que items dentro de grid se puedan encoger (fix iOS/date overflow) */
.form > .field{
  min-width: 0;
}

.field span{
  display:block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

/* Controls */
input,
select{
  width:100%;
  max-width:100%;
  padding: 12px 12px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  outline:none;
}

input::placeholder{color: rgba(255,255,255,.5)}

/* Fix específico para input date en mobile (iOS/Android) */
input[type="date"]{
  width:100%;
  max-width:100%;
  min-width:0;
  appearance:none;
  -webkit-appearance:none;
}

.btn{
  width: 100%;
  max-width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #001018;
  font-weight: 800;
  cursor:pointer;
}

.btn:hover{filter: brightness(1.05)}

.status{
  margin-top: 12px;
  min-height: 22px;
  color: var(--muted);
}

.grid{
  margin-top: 16px;
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.card h3{
  margin:0 0 6px;
  font-size: 16px;
}

.card .line{
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.actions{
  margin-top: 12px;
  display:flex;
  gap: 10px;
}

.a{
  flex:1;
  text-align:center;
  padding: 10px 12px;
  border-radius: 12px;
  border:1px solid var(--border);
  color: var(--text);
  text-decoration:none;
  font-weight:700;
}

.a.primary{
  background: rgba(17,211,200,.12);
  border-color: rgba(17,211,200,.35);
}

.footer{
  margin-top: 26px;
  text-align:center;
}

/* Responsive */
@media (max-width: 860px){
  .form{grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px){
  .form{
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .grid{grid-template-columns: 1fr; }
}

/* Fix específico para Firefox desktop (dropdown de select invisible hasta hover) */
@-moz-document url-prefix() {
  select{
    background-color: #ffffff;
    color: #0b1620;
  }
  select option{
    background-color: #ffffff;
    color: #0b1620;
  }
}
.seo-text{
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
}

.seo-text h2{
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: .2px;
}

.seo-text p{
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

/* HOME: botones de servicios */
.homeActions{
  margin-top: 12px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.homeActions .aHero{
  flex: 1 1 240px; /* en pantallas medianas se acomodan */
  min-width: 0;
}

/* SOLO móviles: apilar (Atención médica debajo) */
@media (max-width: 480px){
  .homeActions{
    flex-direction: column;
    align-items: stretch;
  }
  .homeActions .aHero{
    width: 100%;
  }
}
/* HOME: evitar botones gigantes */
.homeActions .a{
  flex: none;
}

/* ===== HOME botones tipo "menu" ===== */
.homeActions--menu{
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

/* Botón */
.homeBtn{
  display: grid;
  grid-template-columns: 52px 1fr 22px; /* icono / texto / chevron */
  align-items: center;
  gap: 12px;

  padding: 12px 14px;
  border-radius: 16px;

  border: 1px solid rgba(17,211,200,.28);
  background: rgba(17,211,200,.05); /* sutil, no ensucia el icono */

  color: var(--text);
  text-decoration: none;
  font-weight: 800;

  /* tap feedback sin “saltos” raros */
  transition: transform .06s ease, background .12s ease, border-color .12s ease;
}

.homeBtn:hover{
  background: rgba(17,211,200,.07);
  border-color: rgba(17,211,200,.35);
}

/* “Farmacias” destacado */
.homeBtn.is-primary{
  background: rgba(17,211,200,.10);
  border-color: rgba(17,211,200,.45);
}

/* Icon wrapper: SIN fondo oscuro */
.homeBtn__icon{
  width: 52px;
  height: 52px;

  display: grid;
  place-items: center;

  border-radius: 14px;
  background: transparent;   /* <-- esto quita el bloque oscuro */
  box-shadow: none;
  padding: 0;
}

/* IMG: tamaño fijo para evitar CLS + consistente */
.homeBtn__img{
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
}

/* Texto */
.homeBtn__label{
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Chevron */
.homeBtn__chev{
  justify-self: end;
  font-size: 26px;
  line-height: 1;
  opacity: .9;
}

/* Tap feedback */
.homeBtn:active{
  transform: scale(.99);
}

/* ===== Tablet/PC ===== */
@media (min-width: 541px){
  .homeActions--menu{
    grid-template-columns: repeat(3, 1fr);
  }

  /* En desktop queda tipo card (sin chevron) */
  .homeBtn{
    grid-template-columns: 52px 1fr;
  }
  .homeBtn__chev{
    display: none;
  }
}

.vetSectionTitle{
  margin: 18px 0 10px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .2px;
}

.vetList{
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

/* Caja urgencia 24hs */
/*.vetUrgBox{
  margin-top: 14px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 80, 80, .55);
  background: rgba(255, 80, 80, .08);
  box-shadow: 0 0 0 1px rgba(255, 80, 80, .12);
}*/

.vetUrgHeader{
  display:flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

.vetUrgTitle{
  font-weight: 900;
  font-size: 16px;
}

.vetUrgHint{
  color: rgba(255,255,255,.8);
  font-size: 13px;
}

.vetUrgInner{
  display:grid;
  gap: 12px;
}

/* Cards */
.vetCard__title{
  margin: 0 0 4px;
  font-size: 16px;
}

.vetCard--urg{
  border-color: rgba(255, 80, 80, .50);
}

/* Un poquito más “urgente” visualmente */
.vetCard--big .a.primary{
  font-weight: 900;
}

/* Badges */
.vetBadges{
  display:flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0 8px;
}

.vetBadge{
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
}

.vetBadge.is-open{
  border-color: rgba(17,211,200,.45);
  background: rgba(17,211,200,.12);
}

.vetBadge.is-closed{
  opacity: .85;
}

.vetBadge.is-urg{
  border-color: rgba(255, 80, 80, .55);
  background: rgba(255, 80, 80, .12);
}

/* =========================
   Veterinarias: badges compactos arriba a la derecha
   ========================= */

/* Card veterinaria (solo si le ponés esta clase desde JS) */
.vetCard{
  position: relative;
  padding-top: 44px; /* espacio para los badges arriba */
}

/* Contenedor de badges: arriba-derecha */
.vetBadges{
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

/* Badge compacto tipo “reborde” */
.vetBadge{
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;

  background: transparent;
  border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.92);
  letter-spacing: .2px;
}

/* Abierto ahora: teal */
.vetBadge--open{
  border-color: rgba(17,211,200,.70);
  color: rgba(17,211,200,1);
}

/* Urgencia 24hs: rojo */
.vetBadge--urg{
  border-color: rgba(255,90,90,.80);
  color: rgba(255,90,90,1);
}

.vetCard{ padding-top: 54px; }

.a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;   /* 👈 clave */
}


/* --- FIX: badges “Abierto / Urgencia” siempre alineados --- */

/* la card veterinaria tiene que ser “contenedor” */
.vetCard{
  position: relative;
  padding-top: 46px; /* espacio arriba para que el badge no tape el título */
}

/* contenedor de badges arriba a la derecha */
.vetBadges{
  position: absolute;
  top: 12px;
  right: 12px;

  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;

  margin: 0 !important;   /* por si tenías margin viejo */
}

/* badge compacto y sin saltos */
.vetBadge{
  white-space: nowrap;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 999px;
}
