/* RH Media Suite — formularios y chat */
:root {
	--rh-navy: #1c0a40;
	--rh-magenta: #cc29a3;
	--rh-magenta-d: #a31f82;
	--rh-pink: #fcb8fc;
	--rh-sky: #e5f6ff;
	--rh-ink2: #4a3d6b;
	--rh-line: #d9d1ec;
}
.rh-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.rh-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

:where(.rh-btn) { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 24px; border-radius: 999px; border: 0; font: inherit; font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .25s, transform .25s; }
:where(.rh-btn--magenta) { background: var(--rh-magenta); color: #fff; }
:where(.rh-btn--magenta:hover) { background: var(--rh-magenta-d); color: #fff; }
:where(.rh-btn--navy) { background: var(--rh-navy); color: #fff; }
:where(.rh-btn--navy:hover) { background: #2b1857; color: #fff; }
:where(.rh-btn:disabled) { opacity: .6; cursor: wait; }

/* Formulario de contacto */
.rh-form { font-family: inherit; color: var(--rh-navy); }
.rh-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.rh-field { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rh-field--full { grid-column: 1 / -1; }
.rh-field label { font-size: 14px; font-weight: 700; }
.rh-field input, .rh-field select, .rh-field textarea { width: 100%; box-sizing: border-box; min-height: 50px; padding: 12px 16px; border: 1px solid var(--rh-line); border-radius: 14px; background: #fff; color: var(--rh-navy); font: inherit; font-size: 16px; }
.rh-field textarea { min-height: 120px; resize: vertical; }
.rh-field input:focus, .rh-field select:focus, .rh-field textarea:focus { outline: 3px solid rgba(204, 41, 163, .35); outline-offset: 1px; border-color: var(--rh-magenta); }
[aria-invalid="true"] { border-color: #c62828 !important; }
.rh-check { margin: 14px 0 0; font-size: 14px; line-height: 1.5; }
.rh-check label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.rh-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--rh-magenta); flex: none; }
.rh-check a { color: inherit; text-decoration: underline; }
.rh-form__actions { margin: 20px 0 0; }
.rh-form__msg { margin: 12px 0 0; font-size: 15px; font-weight: 600; min-height: 1em; }
.rh-form__msg.is-ok { color: #0b7a4b; }
.rh-form__msg.is-error { color: #c62828; }
.rh-form--oscuro .rh-form__msg.is-ok { color: #7fe0b0; }
.rh-form--oscuro .rh-form__msg.is-error { color: #ffb4b4; }
@media (max-width: 640px) { .rh-form__grid { grid-template-columns: 1fr; } }

/* Newsletter */
.rh-news__row { display: flex; gap: 8px; flex-wrap: wrap; }
.rh-news__row input { flex: 1 1 180px; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--rh-line); background: #fff; color: var(--rh-navy); font: inherit; font-size: 15px; }
.rh-form--oscuro .rh-news__row input { background: transparent; color: #fff; border-color: rgba(229, 246, 255, .4); }
.rh-form--oscuro .rh-news__row input::placeholder { color: rgba(229, 246, 255, .7); }

/* Chat */
.rh-chat { font-family: Raleway, system-ui, sans-serif; }
.rh-chat__fab { position: fixed; right: 24px; bottom: 24px; z-index: 9990; width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--rh-navy); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 30px rgba(28, 10, 64, .3); transition: transform .3s, background .3s; }
.rh-chat__fab:hover { transform: scale(1.06); }
.rh-chat.is-open .rh-chat__fab { background: var(--rh-magenta); }
.rh-chat__panel { position: fixed; right: 24px; bottom: 100px; z-index: 9991; width: min(400px, calc(100vw - 32px)); height: min(600px, calc(100vh - 140px)); display: flex; flex-direction: column; background: #fff; color: var(--rh-navy); border-radius: 24px; overflow: hidden; border: 1px solid var(--rh-line); box-shadow: 0 24px 60px rgba(28, 10, 64, .3); animation: rhChatIn .4s cubic-bezier(.2, .7, .2, 1); transform-origin: bottom right; }
.rh-chat__panel[hidden] { display: none; }
@keyframes rhChatIn { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
.rh-chat__head { background: var(--rh-navy); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; }
.rh-chat__head img { width: 38px; height: auto; }
.rh-chat__who { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 16px; }
.rh-chat__who span { font-size: 13px; color: var(--rh-sky); display: flex; align-items: center; gap: 6px; }
.rh-chat__who i { width: 8px; height: 8px; border-radius: 50%; background: #7fe0b0; display: inline-block; }
.rh-chat__close { width: 44px; height: 44px; border: 0; background: transparent; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.rh-chat__close:hover { background: rgba(255, 255, 255, .1); }
.rh-chat__log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: #f6fbff; overscroll-behavior: contain; }
.rh-chat__msg { display: flex; }
.rh-chat__msg > div { max-width: 82%; padding: 11px 15px; font-size: 15px; line-height: 1.5; border-radius: 18px; white-space: pre-line; }
.rh-chat__msg--bot > div { background: #fff; border: 1px solid #e3ddf0; border-bottom-left-radius: 6px; }
.rh-chat__msg--user { justify-content: flex-end; }
.rh-chat__msg--user > div { background: var(--rh-magenta); color: #fff; border-bottom-right-radius: 6px; }
.rh-chat__typing div { display: flex; gap: 4px; }
.rh-chat__typing i { width: 7px; height: 7px; border-radius: 50%; background: #b9add6; animation: rhDot 1s infinite; }
.rh-chat__typing i:nth-child(2) { animation-delay: .15s; } .rh-chat__typing i:nth-child(3) { animation-delay: .3s; }
@keyframes rhDot { 0%, 100% { opacity: .3; } 50% { opacity: 1; } }
.rh-chat__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; background: #f6fbff; border-top: 1px solid #e3ddf0; }
.rh-chat__chips[hidden] { display: none; }
.rh-chat__chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--rh-magenta); background: #fff; color: var(--rh-magenta-d); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; }
.rh-chat__chip:hover { background: var(--rh-magenta); color: #fff; }
.rh-chat__lead { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--rh-line); border-radius: 16px; padding: 14px; }
.rh-chat__lead[hidden] { display: none; }
.rh-chat__lead label { font-size: 13px; font-weight: 700; }
.rh-chat__lead input[type="text"], .rh-chat__lead input[type="email"], .rh-chat__lead input[type="tel"] { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid #c9bfe0; font: inherit; font-size: 15px; margin-bottom: 4px; }
.rh-chat__check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500 !important; line-height: 1.4; margin: 4px 0 8px; }
.rh-chat__check input { accent-color: var(--rh-magenta); margin-top: 2px; }
.rh-chat__check a { color: inherit; }
.rh-chat__input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e3ddf0; background: #fff; }
.rh-chat__input input { flex: 1; min-height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid #c9bfe0; font: inherit; font-size: 15px; color: var(--rh-navy); }
.rh-chat__input button { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--rh-navy); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.rh-chat__wa { display: block; text-align: center; padding: 10px; font-size: 14px; font-weight: 700; color: #0b7a4b; text-decoration: none; border-top: 1px solid #e3ddf0; }
@media (max-width: 520px) { .rh-chat__fab { right: 16px; bottom: 16px; } .rh-chat__panel { right: 16px; bottom: 92px; } }
@media (prefers-reduced-motion: reduce) { .rh-chat__panel { animation: none; } }
.rh-chat__links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; white-space: normal; }
.rh-chat__links a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 999px; background: var(--rh-navy); color: #fff; font-size: 13px; font-weight: 700; text-decoration: none; }
.rh-chat__links a:hover { background: var(--rh-magenta); color: #fff; }
.rh-chat__links a.is-wa { background: #128c4b; }
.rh-chat__links a.is-wa:hover { background: #0b6e3a; }
.rh-chat__wa-top { width: 40px; height: 40px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.rh-chat__wa-top:hover { background: #1fb457; color: #fff; }
.rh-chat__leadbtns { display: flex; gap: 10px; align-items: center; }
.rh-chat__later { border: 0; background: none; color: var(--rh-navy); font: inherit; font-size: 14px; font-weight: 700; text-decoration: underline; cursor: pointer; padding: 8px 4px; }
.rh-chat__nudge { position: fixed; right: 96px; bottom: 34px; z-index: 9989; display: flex; align-items: center; gap: 4px; background: #fff; color: var(--rh-navy); border-radius: 18px 18px 4px 18px; box-shadow: 0 12px 30px rgba(28, 10, 64, .2); padding: 6px 8px 6px 4px; max-width: 260px; animation: rhChatIn .4s cubic-bezier(.2, .7, .2, 1); }
.rh-chat__nudge[hidden] { display: none; }
.rh-chat__nudge-t { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700; color: inherit; text-align: left; cursor: pointer; padding: 6px 8px; line-height: 1.35; }
.rh-chat__nudge-x { border: 0; background: none; color: #8a7fa6; font-size: 20px; line-height: 1; cursor: pointer; width: 28px; height: 28px; flex: none; }
.rh-chat.is-open .rh-chat__nudge { display: none; }
@media (max-width: 520px) { .rh-chat__nudge { right: 84px; bottom: 26px; max-width: calc(100vw - 110px); } }

/* Popup de correos */
html.rh-pop-lock { overflow: hidden; }
.rh-pop { position: fixed; inset: 0; z-index: 100001; display: flex; align-items: center; justify-content: center; padding: 20px; font-family: Raleway, system-ui, sans-serif; color: var(--rh-navy); }
.rh-pop[hidden] { display: none; }
.rh-pop__backdrop { position: absolute; inset: 0; background: rgba(18, 6, 43, .72); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
.rh-pop__box { position: relative; display: grid; grid-template-columns: 42% 1fr; width: min(820px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 28px; box-shadow: 0 30px 80px rgba(18, 6, 43, .45); opacity: 0; transform: translateY(24px) scale(.97); transition: opacity .3s, transform .4s cubic-bezier(.2, .7, .2, 1); }
.rh-pop.is-open .rh-pop__backdrop { opacity: 1; }
.rh-pop.is-open .rh-pop__box { opacity: 1; transform: none; }
.rh-pop__media { position: relative; min-height: 100%; background: var(--rh-navy); }
.rh-pop__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 35% 40%; }
.rh-pop__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(28, 10, 64, 0) 55%, rgba(204, 41, 163, .35)); }
.rh-pop__body { padding: 44px 44px 32px; display: flex; flex-direction: column; }
.rh-pop__logo { width: 140px; height: auto; margin-bottom: 26px; }
.rh-pop__eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--rh-magenta); }
.rh-pop__title { margin: 0 0 12px; font-size: clamp(26px, 3.4vw, 34px); line-height: 1.08; font-weight: 900; letter-spacing: -.02em; color: var(--rh-navy); }
.rh-pop__text { margin: 0 0 22px; font-size: 16px; line-height: 1.55; color: var(--rh-ink2); }
.rh-pop__form { display: grid; gap: 10px; }
.rh-pop__input { width: 100%; box-sizing: border-box; min-height: 52px; padding: 0 20px; border: 1px solid var(--rh-line); border-radius: 999px; background: #fff; color: var(--rh-navy); font: inherit; font-size: 16px; }
.rh-pop__input:focus { outline: 3px solid rgba(204, 41, 163, .35); outline-offset: 1px; border-color: var(--rh-magenta); }
.rh-pop__btn { width: 100%; min-height: 52px; font-size: 16px; }
.rh-pop__form .rh-form__msg { margin: 2px 0 0; }
.rh-pop__form .rh-form__msg:empty { display: none; }
.rh-pop.is-done .rh-pop__input, .rh-pop.is-done .rh-pop__btn, .rh-pop.is-done .rh-pop__no { display: none; }
.rh-pop.is-done .rh-form__msg { font-size: 17px; }
.rh-pop__fine { margin: 14px 0 0; font-size: 13px; line-height: 1.5; color: var(--rh-ink2); }
.rh-pop__fine a { color: inherit; text-decoration: underline; }
.rh-pop__no { align-self: center; margin-top: 14px; padding: 6px 10px; border: 0; background: none; color: var(--rh-ink2); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }
.rh-pop__x { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--rh-sky); color: var(--rh-navy); cursor: pointer; transition: background .2s, transform .2s; }
.rh-pop__x:hover { background: var(--rh-pink); transform: rotate(90deg); }
.rh-pop button:focus-visible, .rh-pop a:focus-visible { outline: 3px solid var(--rh-magenta); outline-offset: 2px; }
@media (max-width: 720px) {
	.rh-pop { align-items: flex-end; padding: 0; }
	.rh-pop__box { grid-template-columns: 1fr; border-radius: 26px 26px 0 0; max-height: 92vh; transform: translateY(100%); }
	.rh-pop__media { height: 150px; min-height: 0; }
	.rh-pop__media img { object-position: 30% 35%; }
	.rh-pop__body { padding: 24px 22px 22px; }
	.rh-pop__logo { display: none; }
	.rh-pop__x { background: rgba(255, 255, 255, .92); }
}
@media (prefers-reduced-motion: reduce) { .rh-pop__box, .rh-pop__backdrop { transition: none; } }
html.rh-dm .rh-pop__box  { background: #1c0a40; }
html.rh-dm .rh-pop__title{ color: #fff; }
html.rh-dm .rh-pop__text, html.rh-dm .rh-pop__fine, html.rh-dm .rh-pop__no{ color: #d8cdee; }
html.rh-dm .rh-pop__eyebrow{ color: var(--rh-pink); }
html.rh-dm .rh-pop__input{ background: transparent; color: #fff; border-color: rgba(229, 246, 255, .35); }
html.rh-dm .rh-pop .rh-form__msg.is-ok{ color: #7fe0b0; }
html.rh-dm .rh-pop__logo { filter: brightness(0) invert(1); }
