/* AE-57 Servicios Hospital Metropolitano */
/* Clean version - fixed chips styling */
/* ========== HEADER SHADOW FIX ========== */
body.page-id-10421 #header.affix,
body.page-id-10421 header#header.affix,
body.page-id-10421 .head.affix,
body.page-id-10421 #header.head.affix,
body.page-id-10421 .affix {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
}
body.page-id-10421 #header,
body.page-id-10421 header#header,
body.page-id-10421 .head {
  box-shadow: none !important;
}
/* ========== PAGE LAYOUT FIXES ========== */
body.page-id-10421 .page-header.text-center {
  display: none !important;
}
body.page-id-10421 section {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body.page-id-10421 section .col-sm-12.col-md-4,
body.page-id-10421 section #secondary {
  display: none !important;
}
body.page-id-10421 section .col-sm-12.col-md-8.left-block,
body.page-id-10421 section .col-md-8 {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 100% !important;
}
body.page-id-10421 section .container {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 20px !important;
}
body.page-id-10421 section .row,
body.page-id-10421 section .blog-block,
body.page-id-10421 section article,
body.page-id-10421 section #dslc-theme-content,
body.page-id-10421 section #dslc-theme-content-inner {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
}
body.page-id-10421 section .blog-img {
  display: none !important;
}
body.page-id-10421 section #dslc-theme-content-inner {
  font-size: 0;
  line-height: 0;
}
body.page-id-10421 section #dslc-theme-content-inner > * {
  font-size: 1rem;
  line-height: 1.55;
}
body.page-id-10421 section #dslc-theme-content-inner > p,
body.page-id-10421 section #dslc-theme-content-inner > br {
  display: none !important;
}
/* ========== HERO BANNER ========== */
.ae57-banner-hero {
  width: 100vw !important;
  max-width: 100vw !important;
  margin: 0 calc(-50vw + 50%) !important;
  padding: 0 !important;
  line-height: 0;
}
.ae57-banner-hero img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
}
/* ========== SERVICIOS CONTAINER ========== */
#ae57-servicios {
  --hm-blue: #052c7d;
  --hm-navy: #16254c;
  --hm-blue-mid: #5890e5;
  --hm-blue-hover: #03205c;
  --hm-green: #75c594;
  --hm-text: #33475b;
  --hm-muted: #6b7684;
  --hm-surface: #fff;
  --hm-border: #e6ebf1;
  font-family: 'Montserrat', Arial, sans-serif;
  color: var(--hm-text);
  line-height: 1.55;
  max-width: 1400px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 20px 40px 40px !important;
  box-sizing: border-box !important;
}
#ae57-servicios *, #ae57-servicios *::before, #ae57-servicios *::after {
  box-sizing: border-box;
}
/* ========== HERO TITLE SECTION (Blue box) ========== */
#ae57-servicios .ae57-hero {
  background: linear-gradient(135deg, var(--hm-blue), var(--hm-navy));
  color: #fff;
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-radius: 14px;
  margin-bottom: 0.5rem;
}
#ae57-servicios .ae57-hero h1 {
  color: #fff !important;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}
#ae57-servicios .ae57-hero p {
  text-align: center !important;
  color: #fff !important;
  opacity: 0.9;
  font-size: 1rem;
  margin: 0;
}
/* ========== SEARCH ========== */
#ae57-servicios .ae57-search {
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  border-radius: 12px;
  padding: 1.1rem;
  margin: 1.4rem 0;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 12px rgba(5,44,125,.06);
}
#ae57-servicios .ae57-search input[type=search] {
  width: 100%;
  padding: .85rem 1.1rem;
  border: 1px solid #d5dde7;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}
#ae57-servicios .ae57-search input[type=search]:focus {
  border-color: var(--hm-blue-mid);
  box-shadow: 0 0 0 3px rgba(88,144,229,.15);
}
/* ========== CHIPS - Override theme button styles ========== */
#ae57-servicios .ae57-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .8rem;
}
#ae57-servicios .ae57-chip,
#ae57-servicios button.ae57-chip {
  border: 1px solid #d5dde7 !important;
  background: #fff !important;
  background-color: #fff !important;
  color: #16254c !important;
  padding: .4rem .9rem !important;
  font-size: .78rem !important;
  cursor: pointer;
  font-family: inherit;
  border-radius: 999px !important;
  transition: all .15s;
  font-weight: 500 !important;
}
#ae57-servicios .ae57-chip:hover,
#ae57-servicios button.ae57-chip:hover {
  border-color: #5890e5 !important;
  color: #052c7d !important;
  background: #fff !important;
  background-color: #fff !important;
}
#ae57-servicios .ae57-chip.active,
#ae57-servicios button.ae57-chip.active {
  background: #052c7d !important;
  background-color: #052c7d !important;
  color: #fff !important;
  border-color: #052c7d !important;
}
#ae57-servicios .ae57-count {
  margin: .8rem 0 0;
  font-weight: 500;
  color: var(--hm-muted);
  font-size: .88rem;
}
/* ========== SECTIONS ========== */
#ae57-servicios .ae57-spec-section {
  margin: 2.2rem 0;
}
#ae57-servicios .ae57-spec-section h2 {
  color: var(--hm-navy);
  font-weight: 700;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1.1rem;
}
#ae57-servicios .ae57-spec-section h2::before {
  content: '';
  width: 6px;
  height: 20px;
  background: var(--hm-green);
  border-radius: 3px;
}
/* ========== GRID ========== */
#ae57-servicios .ae57-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1.5rem !important;
}
/* ========== CARDS ========== */
#ae57-servicios .ae57-card {
  background: var(--hm-surface);
  border: 1px solid var(--hm-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
  box-shadow: 0 1px 3px rgba(16,37,76,.05);
}
#ae57-servicios .ae57-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(5,44,125,.13);
}
#ae57-servicios .ae57-card-head {
  background: var(--hm-green);
  padding: 1rem 1.1rem .85rem;
  display: flex;
  align-items: center;
  gap: .7rem;
}
#ae57-servicios .ae57-card-icon {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#ae57-servicios .ae57-card-icon svg {
  width: 28px;
  height: 28px;
  stroke: #fff;
  stroke-width: 1.6;
  fill: none;
}
#ae57-servicios .ae57-card-head h3 {
  margin: 0;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
}
#ae57-servicios .ae57-card-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
#ae57-servicios .ae57-card-body p {
  margin: 0 0 1.1rem;
  font-size: .9rem;
  flex: 1;
}
/* ========== CTA ========== */
#ae57-servicios .ae57-cta {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  background: var(--hm-blue);
  color: #fff;
  text-decoration: none;
  padding: .7rem 1.1rem;
  font-weight: 600;
  font-size: .85rem;
  justify-content: center;
  border-radius: 9px;
  transition: background .15s;
}
#ae57-servicios .ae57-cta:hover {
  background: var(--hm-blue-hover);
  color: #fff;
}
/* ========== EMERGENCY ========== */
#ae57-servicios .ae57-emergency .ae57-card-head {
  background: #c0392b;
}
#ae57-servicios .ae57-emergency-note {
  background: #fff5f4;
  border: 1px solid #f0c7c2;
  border-radius: 9px;
  padding: .8rem 1rem;
  font-size: .85rem;
  margin-bottom: 1.1rem;
}
#ae57-servicios .ae57-emergency-section h2::before {
  background: #c0392b;
}
#ae57-servicios .ae57-hidden {
  display: none !important;
}
/* ========== RESPONSIVE ========== */
@media (max-width: 1199px) {
  #ae57-servicios .ae57-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
@media (max-width: 768px) {
  #ae57-servicios .ae57-grid {
    grid-template-columns: 1fr !important;
  }
  #ae57-servicios {
    padding: 15px 20px 30px !important;
  }
  #ae57-servicios .ae57-hero {
    padding: 1.5rem 1rem;
  }
  #ae57-servicios .ae57-hero h1 {
    font-size: 1.6rem;
  }
}

/* Hide edit link for logged-in users */
body.page-id-10421 .edit-link,
body.page-id-10421 a.post-edit-link,
body.page-id-10421 footer.entry-footer {
  display: none !important;
}


  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 48 48'%3E%3Ccircle cx='20' cy='14' r='6' fill='none' stroke='%23fff' stroke-width='3'/%3E%3Cpath d='M24 18l8 8M20 20v16M12 40h24' stroke='%23fff' stroke-width='3'/%3E%3Crect x='16' y='32' width='8' height='8'/%3E%3C/svg%3E");
}


/* ========== HEALTH ICONS - OUTLINE STYLE ========== */
#ae57-servicios .ae57-card-icon {
  width: 20px;
  height: 20px;
  display: block;
  background-size: 18px 18px;
  background-repeat: no-repeat;
  background-position: center;
}

/* Emergencias - ambulance outline */
#ae57-servicios .ae57-card[data-spec="Emergencias"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2'%3E%3Crect x='6' y='14' width='22' height='18' rx='2'/%3E%3Cpath d='M28 20h6l6 6v6h-12v-12z'/%3E%3Ccircle cx='14' cy='34' r='3'/%3E%3Ccircle cx='34' cy='34' r='3'/%3E%3Cpath d='M17 20v6m-3-3h6'/%3E%3C/svg%3E");
}

/* Cardiología - heart outline */
#ae57-servicios .ae57-card[data-spec="Cardiología"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='M24 40s-14-8.35-14-17.5c0-5 4-9 9-9 3 0 5.5 1.5 5 4 .5-2.5 2-4 5-4 5 0 9 4 9 9C38 31.65 24 40 24 40z'/%3E%3C/svg%3E");
}

/* Dermatología - body/skin outline */
#ae57-servicios .ae57-card[data-spec="Dermatología"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Ccircle cx='24' cy='12' r='5'/%3E%3Cpath d='M16 42v-12c0-4.4 3.6-8 8-8s8 3.6 8 8v12'/%3E%3C/svg%3E");
}

/* Endocrinología - thyroid outline */
#ae57-servicios .ae57-card[data-spec="Endocrinología"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='M24 8v32M18 14c-4 2-6 6-6 10s2 8 6 10M30 14c4 2 6 6 6 10s-2 8-6 10'/%3E%3C/svg%3E");
}

/* Farmacia - pills outline */
#ae57-servicios .ae57-card[data-spec="Farmacia"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Crect x='10' y='18' width='12' height='20' rx='6'/%3E%3Cellipse cx='33' cy='24' rx='5' ry='9' transform='rotate(45 33 24)'/%3E%3Cpath d='M10 28h12'/%3E%3C/svg%3E");
}

/* Fisiatría - rehabilitation outline */
#ae57-servicios .ae57-card[data-spec="Fisiatría"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Ccircle cx='24' cy='10' r='4'/%3E%3Cpath d='M24 14v10m-6 4h12m-10 0l-2 12m10-12l2 12'/%3E%3C/svg%3E");
}

/* Geriatría - elderly outline */
#ae57-servicios .ae57-card[data-spec="Geriatría"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Ccircle cx='20' cy='12' r='4'/%3E%3Cpath d='M20 16v8l-4 16M20 24l6 4v12M32 20v20'/%3E%3C/svg%3E");
}

/* Ginecología - female symbol outline */
#ae57-servicios .ae57-card[data-spec="Ginecología"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Ccircle cx='24' cy='18' r='10'/%3E%3Cpath d='M24 28v12M18 36h12'/%3E%3C/svg%3E");
}

/* Medicina general - stethoscope outline */
#ae57-servicios .ae57-card[data-spec="Medicina general"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='M14 10v8c0 5.5 4.5 10 10 10s10-4.5 10-10v-8'/%3E%3Ccircle cx='38' cy='26' r='3'/%3E%3Cpath d='M38 29v5c0 3.3-2.7 6-6 6h-8c-5.5 0-10-4.5-10-10v-4'/%3E%3C/svg%3E");
}

/* Oncología - cell outline */
#ae57-servicios .ae57-card[data-spec="Oncología"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Ccircle cx='24' cy='24' r='12'/%3E%3Ccircle cx='24' cy='24' r='4'/%3E%3Cpath d='M24 6v6M24 36v6M6 24h6M36 24h6'/%3E%3C/svg%3E");
}

/* Optometría - eye outline */
#ae57-servicios .ae57-card[data-spec="Optometría / Ortopedia / Audiología"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='M6 24s6-10 18-10 18 10 18 10-6 10-18 10S6 24 6 24z'/%3E%3Ccircle cx='24' cy='24' r='5'/%3E%3C/svg%3E");
}

/* Otros - grid/misc outline */
#ae57-servicios .ae57-card[data-spec="Otros"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Crect x='8' y='8' width='12' height='12' rx='2'/%3E%3Crect x='28' y='8' width='12' height='12' rx='2'/%3E%3Crect x='8' y='28' width='12' height='12' rx='2'/%3E%3Crect x='28' y='28' width='12' height='12' rx='2'/%3E%3C/svg%3E");
}

/* Radiología - x-ray outline */
#ae57-servicios .ae57-card[data-spec="Radiología"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Crect x='10' y='6' width='28' height='36' rx='2'/%3E%3Ccircle cx='24' cy='16' r='4'/%3E%3Cpath d='M20 24h8M18 30h12M16 36h16'/%3E%3C/svg%3E");
}

/* Reumatología - joints outline */
#ae57-servicios .ae57-card[data-spec="Reumatología"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='M18 8c-3 0-6 3-6 6v6c0 3 3 4 6 4h2v4h-2c-3 0-6 1-6 4v6c0 3 3 6 6 6h12c3 0 6-3 6-6v-6c0-3-3-4-6-4h-2v-4h2c3 0 6-1 6-4v-6c0-3-3-6-6-6H18z'/%3E%3C/svg%3E");
}

/* Urología - kidney outline */
#ae57-servicios .ae57-card[data-spec="Urología / Vascular"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='M16 12c-5 0-8 5-8 12s3 12 8 12c3 0 5-2 8-2s5 2 8 2c5 0 8-5 8-12s-3-12-8-12c-3 0-5 2-8 2s-5-2-8-2z'/%3E%3C/svg%3E");
}

/* Laboratorio - microscope outline */
#ae57-servicios .ae57-card[data-spec="Laboratorio de patología"] .ae57-card-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' fill='none' stroke='white' stroke-width='2.5'%3E%3Ccircle cx='18' cy='14' r='6'/%3E%3Cpath d='M22 18l10 10M18 20v14M10 40h28'/%3E%3Crect x='14' y='30' width='8' height='10'/%3E%3C/svg%3E");
}

/* Override: Hide inline SVGs, use only background images */
#ae57-servicios .ae57-card-icon svg {
  display: none !important;
}
#ae57-servicios .ae57-card-icon {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex: 0 0 20px !important;
  background-size: 18px 18px !important;
  overflow: visible !important;
}

/* Fix icon clipping - allow overflow in containers */
#ae57-servicios .ae57-card-head {
  overflow: visible !important;
}
#ae57-servicios .ae57-card {
  overflow: visible !important;
}
#ae57-servicios article.ae57-card {
  overflow: visible !important;
}

/* Increase icon size - final adjustment */
#ae57-servicios .ae57-card-icon {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  flex: 0 0 28px !important;
  background-size: 26px 26px !important;
}

/* Final icon size - 32px */
#ae57-servicios .ae57-card-icon {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  flex: 0 0 32px !important;
  background-size: 30px 30px !important;
}

/* Remove whitespace above hero */
.page-id-10421 .page-header,
.page-id-10421 .entry-header,
.page-id-10421 .breadcrumb-wrapper,
.page-id-10421 #content > .container:first-child {
  display: none !important;
}
.page-id-10421 #content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.page-id-10421 .site-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.page-id-10421 main#main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.page-id-10421 article.page {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.page-id-10421 .entry-content {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
#ae57-servicios {
  margin-top: 0 !important;
}
#ae57-servicios .ae57-hero {
  margin-top: 0 !important;
}

/* Override theme margin-top: 3em on container */
body.page-id-10421 .container,
body.page-id-10421 .page-header,
body.page-id-10421 .widthcomplete {
  margin-top: 0 !important;
}
body.page-id-10421 #content .container {
  margin-top: 0 !important;
}
body.page-id-10421 .site-content > .container,
body.page-id-10421 #primary > .container,
body.page-id-10421 main > .container {
  margin-top: 0 !important;
}

/* Remove header shadow */
body.page-id-10421 .site-header,
body.page-id-10421 #masthead,
body.page-id-10421 header.site-header,
body.page-id-10421 .header-wrapper,
body.page-id-10421 .main-header {
  box-shadow: none !important;
}

/* Remove header shadow - correct selectors */
body.page-id-10421 #header,
body.page-id-10421 #header.head,
body.page-id-10421 header#header,
body.page-id-10421 header.head,
body.page-id-10421 .head {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
}

/* Completely remove page-header (breadcrumb section) */
body.page-id-10421 .page-header,
body.page-id-10421 .page-header.text-center,
body.page-id-10421 div.page-header {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  visibility: hidden !important;
}

/* NUCLEAR FIX - Remove all spacing and shadows above hero */
body.page-id-10421 * {
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
}
body.page-id-10421 section,
body.page-id-10421 .container,
body.page-id-10421 .row,
body.page-id-10421 article,
body.page-id-10421 #content,
body.page-id-10421 .site-content,
body.page-id-10421 main {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
body.page-id-10421 .ae57-banner-hero {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body.page-id-10421 .ae57-banner-hero + #ae57-servicios {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Remove section wrapper spacing - CRITICAL FIX */
body.page-id-10421 section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
body.page-id-10421 section > .container {
  padding-top: 0 !important;
  margin-top: 0 !important;
}
body.page-id-10421 section > .container > .row {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Remove blog-text paragraph spacing - ROOT CAUSE */
body.page-id-10421 .blog-text,
body.page-id-10421 p.blog-text {
  margin: 0 !important;
  padding: 0 !important;
}
body.page-id-10421 .blog-text > p:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Restore border-radius to cards */
#ae57-servicios .ae57-card {
  border-radius: 12px !important;
  overflow: hidden !important;
}

/* Make card a flex container to push button to bottom */
#ae57-servicios .ae57-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

/* Card body grows to fill space */
#ae57-servicios .ae57-card-body {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}

/* Push button to bottom */
#ae57-servicios .ae57-card-body p:last-child {
  margin-top: auto !important;
}

/* Ensure button container is at bottom */
#ae57-servicios .ae57-card-actions {
  margin-top: auto !important;
}

/* Force button to stick to bottom of card */
#ae57-servicios .ae57-card-body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
}
#ae57-servicios .ae57-card-body > p:last-of-type {
  margin-bottom: 0 !important;
  margin-top: auto !important;
}

/* FINAL FIX: Align all buttons at bottom */
#ae57-servicios .ae57-card {
  height: 100% !important;
}
#ae57-servicios .ae57-card-body {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  gap: 1rem !important;
}
/* First p (description) - let it grow naturally */
#ae57-servicios .ae57-card-body > p:first-child {
  flex: 0 1 auto !important;
  margin-bottom: 0 !important;
}
/* Second p (button container) - push to bottom */
#ae57-servicios .ae57-card-body > p:last-child {
  margin-top: auto !important;
  margin-bottom: 0 !important;
}

/* ============================================================= */
/* FIX DEFINITIVO ICONOS (2026-09-23)                            */
/* Causa: reglas previas ocultaban el <svg> inline (display:none) */
/* y ponian iconos por background-image solo para ~18 data-spec,  */
/* dejando el resto de cards sin icono. Solucion: volver al SVG    */
/* inline (existe para los 65 cards) y anular los backgrounds.     */
/* Prefijo body.page-id-10421 para ganar la cascada con seguridad. */
/* ============================================================= */
body.page-id-10421 #ae57-servicios .ae57-card-icon {
  background-image: none !important;
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  flex: 0 0 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  overflow: visible !important;
}
body.page-id-10421 #ae57-servicios .ae57-card[data-spec] .ae57-card-icon {
  background-image: none !important;
}
body.page-id-10421 #ae57-servicios .ae57-card-icon svg {
  display: inline-block !important;
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  fill: #fff !important;
  stroke: none !important;
  visibility: visible !important;
  opacity: 1 !important;
}
body.page-id-10421 #ae57-servicios .ae57-card-icon svg path {
  fill: #fff !important;
  stroke: none !important;
}
