/* Sistema de botones. Se carga después de los estilos de cada página.
   Principal: .accion y .boton--wa · Secundario: .accion--linea y .boton · Controles: chips */
:root {
  --radio: 10px;
  --ico-wa: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round' d='M4 20l1.2-4A8.4 8.4 0 1 1 8 18.8zM9 8.5c0 4 2.500 6.500 6.500 6.500l1-1.500-2.200-1-1 1c-1.300-.5-2.300-1.500-2.800-2.800l1-1-1-2.200z'/%3E%3C/svg%3E");
  --ico-seguir: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M4 12h15M13 6l6 6-6 6'/%3E%3C/svg%3E");
  --ico-fuera: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M7 17L17 7M8 7h9v9'/%3E%3C/svg%3E");
}

body .accion, body .boton, body .nav a.nav__accion, body .mas {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radio);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms var(--ease), background-color 160ms ease, border-color 160ms ease, box-shadow 200ms var(--ease);
}

/* Principal */
body .accion, body .nav a.nav__accion { background: #d4b36a; color: #1c1c1a; }
body .boton--wa { background: #17753f; color: #fff; }

/* Secundario: se adapta al color del fondo donde esté */
body .accion--linea { border-color: color-mix(in srgb, currentColor 38%, transparent); background: color-mix(in srgb, currentColor 6%, transparent); color: #f1ede4; }
body .boton { border-color: #1f1f1d; background: #1f1f1d; color: #fff; }
body .boton.boton--wa { border-color: transparent; background: #17753f; }
body .mas { border-color: #1f1f1d; background: #fff; color: #1c1c1a; }
body .nav a.nav__accion { min-height: 44px; }

/* El ícono anticipa a dónde lleva */
body :is(a.accion, a.boton)[href^="https://wa.me"]::before,
body button.boton--wa::before,
body :is(a.accion, a.boton)[href*=".html"]::after,
body a.accion[href^="https://teyracreative"]::after {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: currentColor;
  mask: var(--ico) center / contain no-repeat;
}
body :is(a.accion, a.boton)[href^="https://wa.me"]::before, body button.boton--wa::before { --ico: var(--ico-wa); width: 20px; height: 20px; }
body :is(a.accion, a.boton)[href*=".html"]::after { --ico: var(--ico-seguir); transition: translate 180ms var(--ease); }
body a.accion[href^="https://teyracreative"]::after { --ico: var(--ico-fuera); transition: translate 180ms var(--ease); }

body :is(.accion, .boton, .mas, .nav__accion):active { transform: scale(0.97); }
body :is(.accion, .boton, .mas, .nav__accion):disabled { opacity: 0.5; cursor: not-allowed; }
body :is(.accion, .boton, .mas, .nav__accion):focus-visible { outline: 2px solid #d4b36a; outline-offset: 3px; }

/* Controles chicos: misma forma, menos presencia */
body :is(.ficha-filtro, .compartir, .mosaico__todas, .pausa, .visor__controles button, .motivos span, .segmentos span) {
  border-radius: var(--radio);
}
body :is(.ficha-filtro, .compartir, .mosaico__todas, .pausa, .visor__controles button) {
  transition: transform 160ms var(--ease), background-color 160ms ease, border-color 160ms ease;
}
body :is(.ficha-filtro, .compartir, .mosaico__todas, .pausa, .visor__controles button):active { transform: scale(0.97); }
body .segmentos { border-radius: 12px; }
body .segmentos span { border-radius: 8px; }

@media (hover: hover) and (pointer: fine) {
  body .accion:hover, body .nav a.nav__accion:hover { background: #e4c885; color: #1c1c1a; transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgb(212 179 106 / 0.9); }
  body .accion--linea:hover { border-color: #d4b36a; background: color-mix(in srgb, #d4b36a 16%, transparent); color: #fff; box-shadow: none; }
  body .boton:hover { background: #34342f; transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgb(0 0 0 / 0.7); }
  body .boton.boton--wa:hover { background: #1b8a4b; }
  body .mas:hover { background: #f1eee4; }
  body :is(.accion, .boton)[href*=".html"]:hover::after { translate: 4px 0; }
  body a.accion[href^="https://teyracreative"]:hover::after { translate: 3px -3px; }
  body .ficha-filtro:hover, body .compartir:hover { border-color: #1f1f1d; }
}

@media (max-width: 480px) {
  body :is(.titulo__acciones, .alianza__acciones) { width: 100%; flex-direction: column; align-items: stretch; }
}

/* En el menú de celular no va el botón: queda limpio, como el de Teyra */
@media (max-width: 820px) {
  body .nav a.nav__accion { display: none; }
}

/* Contacto es el botón destacado del menú (en celular se ve como un enlace más) */
@media (min-width: 821px) {
  body .nav a.nav__contacto {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 26px;
    border-radius: var(--radio);
    background: #d4b36a;
    color: #1c1c1a;
    font-weight: 600;
    transition: transform 160ms var(--ease), background-color 160ms ease, box-shadow 200ms var(--ease);
  }
  body .nav a.nav__contacto::after { display: none; }
  body .nav a.nav__contacto:active { transform: scale(0.97); }
  body .nav a.nav__contacto:focus-visible { outline: 2px solid #d4b36a; outline-offset: 3px; }
}
@media (min-width: 821px) and (hover: hover) and (pointer: fine) {
  body .nav a.nav__contacto:hover { background: #e4c885; transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgb(212 179 106 / 0.9); }
}
