/* Bloques de "Añadir bloque…" (menú contextual del editor de la ruta, ver
   view_helper::block_templates()). Se carga en todas las rutas — los ve
   cualquier visitante, no solo el admin — y por eso todo va con prefijo
   eb- y sin tocar nada de fuera. Fuentes, colores y redondeo salen de las
   variables del proyecto (resources/css/root.css), así cada bloque nuevo
   se parece ya a la web donde se mete. Cualquier retoque se hace luego con
   "Editar estilo…" sobre el propio bloque. */

.eb-heading,
.eb-subheading,
.eb-text,
.eb-badge,
.eb-quote,
.eb-list,
.eb-actions,
.eb-figure,
.eb-split,
.eb-gallery,
.eb-media,
.eb-cols,
.eb-box,
.eb-sep,
.eb-space,
.eb-stack,
.eb-steps,
.eb-stats,
.eb-testimonial,
.eb-price,
.eb-cta,
.eb-faq,
.eb-table-wrap,
.eb-note,
.eb-contact,
.eb-social {
  --eb-accent: var(--secondary_color, #2563eb);
  --eb-ink: var(--primary_color_font, #111827);
  --eb-muted: var(--secondary_color_font, #6b7280);
  --eb-radius: var(--general_border_radius, 12px);
  --eb-line: color-mix(in srgb, currentColor 14%, transparent);
  --eb-soft: color-mix(in srgb, var(--eb-accent) 8%, transparent);
  box-sizing: border-box;
}

.eb-heading,
.eb-subheading,
.eb-text,
.eb-badge,
.eb-quote,
.eb-list,
.eb-actions,
.eb-figure,
.eb-split,
.eb-gallery,
.eb-media,
.eb-cols,
.eb-box,
.eb-stack,
.eb-steps,
.eb-stats,
.eb-testimonial,
.eb-price,
.eb-cta,
.eb-faq,
.eb-table-wrap,
.eb-note,
.eb-contact,
.eb-social {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Un bloque dentro de otro (columna, tarjeta...) no repite el margen lateral. */
:is(.eb-cols, .eb-split, .eb-stack, .eb-box, .eb-card__body, .eb-price, .eb-cta, .eb-col) > :is(.eb-heading, .eb-subheading, .eb-text, .eb-badge, .eb-list, .eb-actions, .eb-figure, .eb-quote, .eb-media, .eb-stack, .eb-note, .eb-table-wrap) {
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

/* ---------- Texto ---------- */
.eb-heading {
  font-family: var(--primary_font, inherit);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  font-weight: 700;
  margin-top: 1.2rem;
  margin-bottom: .6rem;
}
.eb-subheading {
  font-family: var(--primary_font, inherit);
  font-size: clamp(1.15rem, 1rem + .6vw, 1.5rem);
  line-height: 1.25;
  font-weight: 700;
  margin-top: 1rem;
  margin-bottom: .4rem;
}
.eb-text {
  font-family: var(--secondary_font, inherit);
  font-size: 1rem;
  line-height: 1.65;
  margin-top: 0;
  margin-bottom: 1rem;
}
.eb-text--lead { font-size: 1.15rem; color: var(--eb-muted); }
.eb-stack { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; }
.eb-stack > * { margin-top: 0; }
.eb-badge {
  display: inline-block;
  width: fit-content;
  margin-left: 16px;
  margin-right: 16px;
  padding: .3em .8em;
  border-radius: 999px;
  background: var(--eb-soft);
  color: var(--eb-accent);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
:is(.eb-stack, .eb-price) > .eb-badge { margin-left: 0; margin-right: 0; }
.eb-quote {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--eb-accent);
  padding-top: .25rem;
  padding-bottom: .25rem;
}
.eb-quote p {
  font-family: var(--primary_font, inherit);
  font-size: 1.35rem;
  line-height: 1.45;
  font-style: italic;
  margin: 0 0 .5rem;
}
.eb-quote cite { color: var(--eb-muted); font-style: normal; font-size: .95rem; }
.eb-quote cite::before { content: "— "; }

.eb-list { margin-top: 0; margin-bottom: 1rem; padding-left: calc(16px + 1.3em); line-height: 1.6; }
.eb-list li { margin-bottom: .35rem; }
.eb-list--check { list-style: none; padding-left: 16px; }
.eb-list--check li { position: relative; padding-left: 1.7em; }
.eb-list--check li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .3em;
  width: 1.1em;
  height: 1.1em;
  border-radius: 50%;
  background: var(--eb-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm3.5 5.1L7 9.6 4.5 7.1 3.4 8.2 7 11.8l5.6-5.6z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm3.5 5.1L7 9.6 4.5 7.1 3.4 8.2 7 11.8l5.6-5.6z'/%3E%3C/svg%3E") center / contain no-repeat;
}
:is(.eb-price, .eb-col, .eb-stack) > .eb-list--check { padding-left: 0; }

/* ---------- Botones y enlaces ---------- */
.eb-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .5rem; margin-bottom: 1.25rem; }
.eb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 46px;
  padding: .7em 1.5em;
  border-radius: var(--eb-radius);
  border: 2px solid var(--eb-accent);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.eb-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--eb-accent) 70%, transparent); }
.eb-btn--primary { background: var(--eb-accent); color: #fff !important; }
.eb-btn--outline { background: transparent; color: var(--eb-accent) !important; }
.eb-btn--outline:hover { background: var(--eb-soft); }
.eb-btn--light { background: #fff; border-color: #fff; color: var(--eb-ink) !important; }
.eb-btn--whatsapp { background: #25d366; border-color: #25d366; color: #fff !important; }
.eb-btn--link { border-color: transparent; padding-left: 0; padding-right: 0; min-height: 0; color: var(--eb-accent) !important; }
.eb-btn--link:hover { box-shadow: none; text-decoration: underline !important; }
.eb-link { color: var(--eb-accent); font-weight: 700; text-decoration: none; }
.eb-link:hover { text-decoration: underline; }

.eb-social { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .5rem; margin-bottom: 1.25rem; }
.eb-social a {
  display: inline-flex;
  align-items: center;
  padding: .45em 1em;
  border-radius: 999px;
  border: 1px solid var(--eb-line);
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}
.eb-social a:hover { border-color: var(--eb-accent); color: var(--eb-accent); }

/* ---------- Imagen y multimedia ---------- */
.eb-figure { margin-top: 0; margin-bottom: 1.25rem; }
.eb-img { display: block; width: 100%; height: auto; border-radius: var(--eb-radius); object-fit: cover; }
.eb-figure figcaption { margin-top: .5rem; color: var(--eb-muted); font-size: .9rem; text-align: center; }
.eb-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 1.25rem; }
.eb-gallery .eb-figure { margin: 0; padding: 0; }
.eb-gallery .eb-img { aspect-ratio: 1; height: 100%; }
.eb-media { margin-bottom: 1.25rem; }
.eb-media video,
.eb-media iframe { display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--eb-radius); background: #000; }
.eb-media--map iframe { aspect-ratio: 16 / 7; background: #e5e7eb; }

.eb-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.25rem, 4vw, 3rem); align-items: center; margin-top: 1.5rem; margin-bottom: 1.5rem; }
.eb-split .eb-figure { margin: 0; }
.eb-split--reverse > .eb-figure { order: 2; }

/* ---------- Estructura ---------- */
.eb-cols { display: grid; gap: clamp(1rem, 3vw, 2rem); margin-top: 1.25rem; margin-bottom: 1.25rem; }
.eb-cols--1 { grid-template-columns: minmax(0, 420px); }
.eb-cols--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.eb-cols--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.eb-col > :first-child { margin-top: 0; }
.eb-box,
.eb-card,
.eb-price,
.eb-testimonial {
  border: 1px solid var(--eb-line);
  border-radius: var(--eb-radius);
  background: color-mix(in srgb, currentColor 3%, transparent);
}
.eb-box { padding: clamp(1.25rem, 3vw, 2rem); margin-top: 1.25rem; margin-bottom: 1.25rem; }
.eb-box > :first-child { margin-top: 0; }
.eb-box > :last-child { margin-bottom: 0; }
.eb-card { overflow: hidden; display: flex; flex-direction: column; }
.eb-card__media { margin: 0; padding: 0; }
.eb-card__media .eb-img { border-radius: 0; aspect-ratio: 3 / 2; }
.eb-card__body { padding: 1.1rem 1.25rem 1.25rem; }
.eb-card__body > :first-child { margin-top: 0; }
.eb-card__body .eb-btn { margin-top: auto; }
.eb-sep { max-width: 1140px; margin: 2rem auto; border: 0; border-top: 1px solid var(--eb-line); opacity: 1; }
.eb-space { height: 48px; }

/* ---------- Secciones hechas ---------- */
.eb-feature { display: flex; gap: .9rem; align-items: flex-start; }
.eb-feature__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--eb-soft);
  color: var(--eb-accent);
  font-size: 1.35rem;
  line-height: 1;
}
.eb-feature .eb-subheading { margin-top: .1rem; }

.eb-steps { list-style: none; display: grid; gap: 1rem; margin-top: 1.25rem; margin-bottom: 1.25rem; }
.eb-step { display: flex; gap: 1rem; align-items: flex-start; }
.eb-step__num {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--eb-accent);
  color: #fff;
  font-weight: 800;
}
.eb-step .eb-subheading { margin-top: .35rem; }

.eb-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; margin-bottom: 1.25rem; text-align: center; }
.eb-stat { display: flex; flex-direction: column; gap: .25rem; padding: 1.25rem .75rem; border-radius: var(--eb-radius); background: var(--eb-soft); }
.eb-stat__num { font-family: var(--primary_font, inherit); font-size: clamp(1.8rem, 1.3rem + 2vw, 2.8rem); font-weight: 800; line-height: 1; color: var(--eb-accent); }
.eb-stat__label { color: var(--eb-muted); font-size: .95rem; }

.eb-testimonial { padding: clamp(1.25rem, 3vw, 2rem); margin-top: 1.25rem; margin-bottom: 1.25rem; }
.eb-testimonial blockquote { font-family: var(--primary_font, inherit); font-size: 1.25rem; line-height: 1.5; margin: 0 0 1rem; }
.eb-testimonial figcaption { display: flex; align-items: center; gap: .75rem; }
.eb-testimonial figcaption span { display: flex; flex-direction: column; }
.eb-testimonial small { color: var(--eb-muted); }
.eb-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }

.eb-price { max-width: 380px; padding: 1.5rem; margin-top: 1.25rem; margin-bottom: 1.25rem; }
.eb-price > :first-child { margin-top: 0; }
.eb-price__amount { font-family: var(--primary_font, inherit); font-size: 2.2rem; font-weight: 800; margin: .25rem 0 1rem; }
.eb-price .eb-actions { margin-bottom: 0; }
.eb-price .eb-btn { width: 100%; }

.eb-cta {
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
  padding-top: clamp(1.75rem, 5vw, 3rem);
  padding-bottom: clamp(1.75rem, 5vw, 3rem);
  border-radius: var(--eb-radius);
  background: var(--eb-accent);
  color: #fff;
  text-align: center;
}
.eb-cta .eb-heading { margin-top: 0; color: inherit; }
.eb-cta .eb-text { color: inherit; opacity: .9; }
.eb-cta .eb-actions { justify-content: center; margin-bottom: 0; }

.eb-faq { margin-top: 1.25rem; margin-bottom: 1.25rem; }
.eb-faq__item { border-bottom: 1px solid var(--eb-line); }
.eb-faq__item summary {
  position: relative;
  list-style: none;
  cursor: pointer;
  padding: 1rem 2rem 1rem 0;
  font-weight: 700;
  font-size: 1.05rem;
}
.eb-faq__item summary::-webkit-details-marker { display: none; }
.eb-faq__item summary::after {
  content: "+";
  position: absolute;
  right: .25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--eb-accent);
}
.eb-faq__item[open] summary::after { content: "−"; }
.eb-faq__item .eb-text { padding-bottom: .5rem; }

.eb-table-wrap { overflow-x: auto; margin-top: 1rem; margin-bottom: 1.25rem; }
.eb-table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.eb-table th,
.eb-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--eb-line); text-align: left; }
.eb-table thead th { font-weight: 700; background: var(--eb-soft); }

.eb-note {
  margin-top: 1rem;
  margin-bottom: 1.25rem;
  padding-top: .9rem;
  padding-bottom: .9rem;
  border-left: 4px solid var(--eb-accent);
  border-radius: 0 var(--eb-radius) var(--eb-radius) 0;
  background: var(--eb-soft);
}

.eb-contact { list-style: none; display: grid; gap: .65rem; margin-top: 1rem; margin-bottom: 1.25rem; }
.eb-contact li { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.eb-contact__label { min-width: 7.5rem; font-weight: 700; }
.eb-contact a { color: var(--eb-accent); text-decoration: none; }
.eb-contact a:hover { text-decoration: underline; }

@media (max-width: 767.98px) {
  .eb-split,
  .eb-cols--2,
  .eb-cols--3 { grid-template-columns: 1fr; }
  .eb-split--reverse > .eb-figure { order: 0; }
  .eb-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eb-stats { grid-template-columns: 1fr; }
}
