/* 2026-10-20 Ad card width alignment: match standard 500px graphics.
   Border-box width includes padding and border. Keep media widths fluid. */
html body .directory-content .legacy-content .me-text-ad:not(.me-card-group):not(.me-city-navigation) {
  box-sizing: border-box !important;
  width: min(100%, 500px) !important;
  max-width: 500px !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
html body table.me-classic-text-ad {
  box-sizing: border-box !important;
  width: min(100%, 500px) !important;
  max-width: 500px !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
html body .doctor-grid:has(> .doctor-card) {
  box-sizing: border-box !important;
  grid-template-columns: minmax(0, 1fr) !important;
  width: min(100%, 500px) !important;
  max-width: 500px !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
html body .doctor-grid > .doctor-card {
  box-sizing: border-box !important;
  max-width: 100% !important;
  width: 100% !important;
  min-width: 0 !important;
}
@media (max-width: 540px) {
  html body .directory-content .legacy-content .me-text-ad:not(.me-card-group):not(.me-city-navigation),
  html body table.me-classic-text-ad,
  html body .doctor-grid:has(> .doctor-card) {
    width: 100% !important;
    max-width: 100% !important;
  }
}


/* V2: center graphic/banner advertisements on the SAME axis as text advertisements,
   without selecting editorial images or small physician portraits. */
html body .directory-content .legacy-content .legacy-table:not(.me-text-ad)
  > .legacy-row > .legacy-cell > p:has(> a > img[width="500"]),
html body .directory-content .legacy-content .legacy-table:not(.me-text-ad)
  > .legacy-body > .legacy-row > .legacy-cell > p:has(> a > img[width="500"]),
html body .directory-content .legacy-content .legacy-table:not(.me-text-ad)
  > .legacy-row > .legacy-cell > p:has(> a > img[width="501"]),
html body .directory-content .legacy-content .legacy-table:not(.me-text-ad)
  > .legacy-body > .legacy-row > .legacy-cell > p:has(> a > img[width="501"]) {
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:100%!important;max-width:100%!important;margin:7px auto 10px!important;
  padding:0!important;text-align:center!important;
}
html body .directory-content .legacy-content .legacy-table:not(.me-text-ad)
  > .legacy-row > .legacy-cell > p > a:has(> img[width="500"]),
html body .directory-content .legacy-content .legacy-table:not(.me-text-ad)
  > .legacy-body > .legacy-row > .legacy-cell > p > a:has(> img[width="500"]),
html body .directory-content .legacy-content .legacy-table:not(.me-text-ad)
  > .legacy-row > .legacy-cell > p > a:has(> img[width="501"]),
html body .directory-content .legacy-content .legacy-table:not(.me-text-ad)
  > .legacy-body > .legacy-row > .legacy-cell > p > a:has(> img[width="501"]) {
  display:block!important;width:min(100%,500px)!important;max-width:500px!important;
  margin:0 auto!important;
}
html body .directory-content .legacy-content .legacy-table:not(.me-text-ad)
  > .legacy-row > .legacy-cell > p > a > img[width="500"],
html body .directory-content .legacy-content .legacy-table:not(.me-text-ad)
  > .legacy-body > .legacy-row > .legacy-cell > p > a > img[width="500"],
html body .directory-content .legacy-content .legacy-table:not(.me-text-ad)
  > .legacy-row > .legacy-cell > p > a > img[width="501"],
html body .directory-content .legacy-content .legacy-table:not(.me-text-ad)
  > .legacy-body > .legacy-row > .legacy-cell > p > a > img[width="501"] {
  display:block!important;width:100%!important;max-width:500px!important;
  height:auto!important;object-fit:contain!important;margin:0 auto!important;
}
html body .directory-content .legacy-content .me-text-ad:not(.me-city-navigation) {
  box-sizing:border-box!important;max-width:500px!important;width:min(100%,500px)!important;
  float:none!important;position:relative!important;left:auto!important;right:auto!important;
  transform:none!important;margin:10px auto 14px!important;
}
html body .directory-content .legacy-content .me-text-ad:not(.me-city-navigation) > .legacy-row,
html body .directory-content .legacy-content .me-text-ad:not(.me-city-navigation) > .legacy-body > .legacy-row {
  width:100%!important;max-width:100%!important;
}
html body .directory-content .legacy-content .me-text-ad:not(.me-city-navigation) .legacy-cell {
  min-width:0!important;overflow-wrap:break-word!important;
}
html body .directory-content .legacy-content .me-text-ad:not(.me-city-navigation) h2:not(.me-doctor-name):not(:has(.me-name-link)),
html body .directory-content .legacy-content .me-text-ad:not(.me-city-navigation) h3:not(:has(.me-name-link)) {
  font-size:16px!important;line-height:1.4!important;font-weight:400!important;margin:5px 0!important;
}
html body .directory-content .legacy-content .me-text-ad:not(.me-city-navigation) .me-doctor-name {
  font-size:20px!important;line-height:1.3!important;font-weight:700!important;margin:0 0 7px!important;
}
html body .directory-content .legacy-content .me-text-ad:not(.me-city-navigation) .btn {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;
  vertical-align:middle!important;margin:5px 6px 3px 0!important;line-height:1.25!important;
}
html body .directory-content .legacy-content .me-text-ad:not(.me-city-navigation) p:has(>a.btn) {
  display:block!important;line-height:1.35!important;margin:9px 0 2px!important;
}
html body .directory-content .legacy-content .me-city-navigation {
  background:transparent!important;border:0!important;box-shadow:none!important;
  width:100%!important;max-width:750px!important;padding:5px 0!important;
}
html body .directory-content .legacy-content .me-email-inline {
  display:inline-flex!important;align-items:center!important;white-space:nowrap!important;
}
html body .directory-content .legacy-content .me-email-inline img {
  width:14px!important;height:14px!important;display:inline-block!important;
  margin:0 1px!important;float:none!important;vertical-align:middle!important;
}
/* A portrait beside the neurologist's text, never above the entire card */
html body .directory-content .legacy-content #table1230.me-mabel-profile
 > .legacy-row > .legacy-cell > .legacy-table > .legacy-row {
  display:grid!important;grid-template-columns:120px minmax(0,1fr)!important;
  gap:12px!important;align-items:start!important;
}
html body .directory-content .legacy-content #table1230.me-mabel-profile
 > .legacy-row > .legacy-cell > .legacy-table > .legacy-row > .legacy-cell {
  padding:0!important;min-width:0!important;
}
html body .directory-content .legacy-content #table1230.me-mabel-profile
 img[src*="mabelanuncio3"] {display:block!important;width:110px!important;max-width:100%!important;
 height:auto!important;margin:2px auto!important;border-radius:7px!important}
html body .directory-content .legacy-content #table1230.me-mabel-profile p.me-location-text {
  font-size:15px!important;line-height:1.37!important;margin:4px 0!important;
}
html body .directory-content .legacy-content #table731.me-text-ad {
  width:min(100%,500px)!important;max-width:500px!important;
  background:#eaf6ff!important;border:1px solid #7aaaca!important;
}
html body .directory-content .legacy-content #table731 .me-actions {
  display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important;
}
html body .directory-content .legacy-content #table731 .me-actions a {
  color:#fff!important;border-radius:6px!important;text-decoration:none!important;
  font-weight:bold!important;padding:10px 14px!important;
}
html body .directory-content .legacy-content #table731 .me-actions a.me-btn-profile{background:#0753a6!important}
html body .directory-content .legacy-content #table731 .me-actions a.me-btn-wa{background:#128c7e!important}
html body .directory-content .legacy-content #table1288.me-text-ad
 p:has(>img[src*="/botones/"]),html body .directory-content .legacy-content #table1288.me-text-ad
 p:has(>b>img[src*="/botones/"]){display:flex!important;align-items:center!important;gap:8px!important}
html body .directory-content .legacy-content #table1288.me-text-ad
 img[src*="direccion-consultorio"],html body .directory-content .legacy-content #table1288.me-text-ad
 img[src*="/botones/telefono"]{width:21px!important;height:auto!important;display:inline-block!important;
 margin:0 2px 0 0!important;vertical-align:middle!important}
html body .directory-content .legacy-content .me-text-ad .me-button-row {
  display:flex!important;align-items:center!important;gap:8px!important;flex-wrap:wrap!important;margin:10px 0 0!important;
}
html body .directory-content .legacy-content .me-button-row a.btn {
  display:inline-flex!important;align-items:center!important;justify-content:center!important;margin:0!important;
}
@media(max-width:420px){
  html body .directory-content .legacy-content #table1230.me-mabel-profile
  > .legacy-row > .legacy-cell > .legacy-table > .legacy-row {grid-template-columns:90px minmax(0,1fr)!important;gap:8px!important}
  html body .directory-content .legacy-content #table1230.me-mabel-profile img[src*="mabelanuncio3"]{width:85px!important}
}

/* 2026-10-20: centre paid graphic tier labels on the same 500px axis as images
   and text cards. All source text is retained verbatim. */
html body .directory-content .legacy-content .me-ad-tier-title {
 display:block!important;box-sizing:border-box!important;
 text-align:center!important;width:min(100%,500px)!important;
 max-width:500px!important;margin:7px auto 7px!important;
 font-size:16px!important;line-height:1.3!important;
 font-weight:700!important;color:#102e50!important;
 padding:0 3px!important;
}
html body .directory-content .legacy-content .me-compact-legacy {
 line-height:1.3!important;
}
html body .directory-content .legacy-content.me-compact-legacy .legacy-table {
 margin-top:0!important;margin-bottom:2px!important;
}
html body .directory-content .legacy-content.me-compact-legacy .legacy-cell {
 padding-top:0!important;padding-bottom:1px!important;
}
html body .directory-content .legacy-content.me-compact-legacy .legacy-row {
 gap:0!important;margin:0!important;
}
html body .directory-content .legacy-content.me-compact-legacy p {
 margin-top:2px!important;margin-bottom:5px!important;line-height:1.32!important
}
html body .directory-content .legacy-content.me-compact-legacy h2,
html body .directory-content .legacy-content.me-compact-legacy h3 {
 margin:8px auto 7px!important;line-height:1.25!important
}
html body .directory-content .legacy-content.me-compact-legacy h2:not(.me-doctor-name) {
 text-align:center!important;
}
html body .directory-content:has(.legacy-content.me-compact-legacy) {
 padding-top:10px!important;
}
