/* Reset y variables */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root{
  --bg: #f7f8fb;
  --card: #ffffff;
  --muted: #6b7280;
  --accent: #2563eb;
  --radius: 12px;
  --container-width: 1100px;
  --gap: 20px;
  --shadow: 0 8px 24px rgba(16,24,40,0.06);
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
html,body{height:100%;}
body{
  font-family: var(--font);
  background: linear-gradient(180deg,var(--bg), #eef2ff 60%);
  color: #0f1724;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.4;
}

/* Layout */
.container{ max-width: var(--container-width); margin: 0 auto; padding: 28px; }
.hero{ text-align:center; padding: 36px 0; }
.title{ font-size: 38px; margin-bottom: 6px; }
.subtitle{ color: var(--muted); font-size: 15px; }

/* Grid */
.business-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap);
    padding: 20px 0 56px 0;
}

/* Card */
.card{
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 300px;
  text-align: center;
}
.card:hover{ transform: translateY(-6px); box-shadow: 0 18px 40px rgba(16,24,40,0.09); }

/* Logo arriba (controlado) */
.logo-wrap{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: linear-gradient(135deg,#f7fafc,#fff);
}
.logo-wrap .logo-img{
  max-width: 220px;      /* ancho máximo de la imagen */
  max-height: 120px;     /* altura máxima que NO tapa el contenido */
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
}

/* Contenido */
.content{ padding: 16px 18px 22px 18px; display:flex; flex-direction:column; gap:10px; flex:1 1 auto; }
.name{ font-weight:700; font-size:17px; }
.desc{ color:var(--muted); font-size:14px; flex:1 1 auto; overflow:hidden; text-overflow:ellipsis; }

/* Botón */
.visit{
  display:inline-block;
  padding:10px 14px;
  border-radius:12px;
  background:var(--accent);
  color:#fff;
  text-decoration:none;
  font-weight:600;
  align-self:center;
  box-shadow: 0 6px 18px rgba(37,99,235,0.12);
  transition: transform .12s ease;
}
.visit:active{ transform: translateY(1px); }
.visit:focus{ outline: 3px solid rgba(37,99,235,0.16); outline-offset: 2px; }

/* Footer */
.footer{ text-align:center; color:var(--muted); padding: 22px 0; }

/* Responsivo */

@media (max-width: 768px) {
  .business-grid {
    grid-template-columns: 1fr; /* Una tarjeta por línea */
    gap: 24px;
    padding: 20px;
  }

  .card {
    max-width: 90%;
    margin: 0 auto;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  }

  .logo-wrap {
    padding: 16px;
  }

  .logo-wrap .logo-img {
    max-width: 80%;
    max-height: 140px;
    margin: 0 auto;
  }

  .content {
    padding: 16px;
  }

  .name {
    font-size: 18px;
  }

  .desc {
    font-size: 15px;
    color: #4b5563;
  }

  .visit {
    font-size: 15px;
    padding: 12px 20px;
    border-radius: 14px;
  }
}
