.kh2-form, .kh2-calculator {
  margin-top: 2rem;
  padding: clamp(1.25rem,4vw,2.5rem);
  border: 1px solid #d7e4ee;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(0,16,48,.08);
}
.kh2-form__grid, .kh2-calculator__grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; }
.kh2-form__wide { grid-column: 1/-1; }
.kh2-form label, .kh2-calculator label { display: grid; gap: .42rem; color: #061e36; font-size: .87rem; font-weight: 750; }
.kh2-form input, .kh2-form select, .kh2-form textarea, .kh2-calculator input {
  width: 100%; box-sizing: border-box; padding: .88rem .95rem; border: 1px solid #bfd2e3; border-radius: 11px;
  color: #061e36; background: #f5fbfc; font: inherit; font-weight: 500;
}
.kh2-form input:focus, .kh2-form select:focus, .kh2-form textarea:focus, .kh2-calculator input:focus { outline: 3px solid rgba(22,119,255,.20); border-color: #1677ff; }
.kh2-form textarea { resize: vertical; }
.kh2-form small { color: #526b82; font-size: .72rem; font-weight: 500; }
.kh2-form__consent { display: flex !important; grid-template-columns: auto 1fr !important; align-items: flex-start; margin-top: 1.2rem; }
.kh2-form__consent input { width: 1.1rem; margin-top: .2rem; }
.kh2-form__submit { margin-top: 1.2rem; padding: .92rem 1.35rem; border: 0; border-radius: 12px; color: #f5fbfc; background: #1677ff; box-shadow: 0 12px 24px rgba(22,119,255,.2); font: inherit; font-weight: 800; cursor: pointer; }
.kh2-form__submit:hover { background: #061e36; }
.kh2-form__submit:focus-visible { outline: 3px solid #21d4e6; outline-offset: 3px; }
.kh2-form__fineprint { color: #526b82; font-size: .77rem; }
.kh2-contact-form { margin-top: 0; }
.kh2-honeypot { position: absolute !important; overflow: hidden !important; width: 1px !important; height: 1px !important; clip: rect(1px,1px,1px,1px) !important; }
.kh2-form-notice { margin: 1.25rem 0; padding: 1rem 1.15rem; border-radius: 12px; font-weight: 700; }
.kh2-form-notice--success { border: 1px solid #9dd9a8; color: #175e25; background: #eefaf0; }
.kh2-form-notice--error { border: 1px solid #edb2b2; color: #8b1d1d; background: #fff1f1; }

.kh2-calculator { background: linear-gradient(135deg,#fff,#f2f9ff); }
.kh2-calculator__intro { max-width: 760px; margin-bottom: 1.6rem; }
.kh2-calculator__intro h3 { margin: .85rem 0 .45rem; font-size: clamp(1.5rem,3vw,2.2rem); }
.kh2-calculator__source { grid-column: 1/-1; }
.kh2-calculator__result { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-top: 1.5rem; }
.kh2-calculator__result > div { padding: 1.2rem; border: 1px solid #d7e4ee; border-radius: 16px; background: white; }
.kh2-calculator__result span { display: block; color: #526b82; font-size: .76rem; font-weight: 750; text-transform: uppercase; }
.kh2-calculator__result strong { display: block; margin-top: .4rem; color: #061e36; font-size: clamp(1.25rem,2.5vw,1.8rem); }
.kh2-calculator__result p { grid-column: 1/-1; margin: 0; color: #536b81; font-size: .84rem; }

.kh2-language-switcher { position: relative; flex: 0 0 auto; color: #061e36; font-size: .84rem; font-weight: 800; z-index: 1002; }
.kh2-language-switcher summary { display: flex; align-items: center; gap: .45rem; min-width: 76px; min-height: 44px; box-sizing: border-box; padding: .55rem .7rem; border: 1px solid #8bc8ef; border-radius: 11px; background: #fff; cursor: pointer; list-style: none; }
.kh2-language-switcher summary::-webkit-details-marker { display: none; }
.kh2-language-switcher summary:hover { border-color: #1677ff; box-shadow: 0 6px 18px rgba(32,143,224,.14); }
.kh2-language-switcher summary:focus-visible { outline: 3px solid rgba(32,143,224,.26); outline-offset: 2px; }
.kh2-language-switcher__flag { font-size: 1.15rem; line-height: 1; }
.kh2-language-switcher__flag img { display: block; width: 24px; height: 16px; object-fit: cover; border-radius: 2px; }
.kh2-language-switcher__chevron { margin-left: auto; color: #526b82; transition: transform .2s ease; }
.kh2-language-switcher[open] .kh2-language-switcher__chevron { transform: rotate(180deg); }
.kh2-language-switcher ul { position: absolute; top: calc(100% + .5rem); right: 0; width: 196px; margin: 0; padding: .45rem; border: 1px solid #d7e4ee; border-radius: 14px; background: #061e36; box-shadow: 0 18px 44px rgba(6,30,54,.24); list-style: none; }
.kh2-language-switcher li { margin: 0; }
.kh2-language-switcher li a { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: .55rem; padding: .7rem .65rem; border-radius: 9px; color: #fff; text-decoration: none; }
.kh2-language-switcher li a:hover, .kh2-language-switcher li a:focus-visible { color: #061e36; background: #21d4e6; outline: none; }
.kh2-language-switcher li a[aria-current="page"] { color: #061e36; background: #78e6c6; }
.kh2-language-switcher li img { width: 24px; height: 16px; object-fit: cover; border-radius: 2px; }
.kh2-language-switcher li small { color: #9bb0c4; font-size: .68rem; }
.kh2-language-switcher:not([open]) > ul { display: none !important; }
.kh2-language-switcher-fallback { position: fixed; top: 1rem; right: 1rem; z-index: 1002; }

/* El tema usa un único selector accesible en la cabecera. Evita el flotante duplicado de TranslatePress. */
#trp-floater-ls, .trp-floater-ls, .trp-floating-switcher { display: none !important; }

.kh2-social-links { display: flex; flex-wrap: wrap; gap: .6rem; margin-block: 1rem; }
.kh2-social-link { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .35rem .7rem .35rem .35rem; border: 1px solid #c8dae9; border-radius: 999px; color: #061e36; background: #fff; font-size: .8rem; font-weight: 750; line-height: 1; text-decoration: none; }
.kh2-social-link:hover { color: #fff; border-color: #1677ff; background: #1677ff; }
.kh2-social-link:focus-visible { outline: 3px solid #21d4e6; outline-offset: 2px; }
.kh2-social-link__mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: #1677ff; font-size: .67rem; font-weight: 900; }
.kh2-social-link:hover .kh2-social-link__mark { color: #1677ff; background: #fff; }
.kh2-social-links--footer .kh2-social-link { color: #dceaf8; border-color: rgba(255,255,255,.2); background: rgba(255,255,255,.06); }

.kh2-contact-widget { position: fixed; right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); z-index: 999; display: grid; justify-items: end; gap: .65rem; }
.kh2-contact-widget__toggle { display: inline-flex; align-items: center; gap: .55rem; min-height: 52px; padding: .7rem 1rem; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg,#1677ff,#21d4e6); box-shadow: 0 14px 32px rgba(0,16,48,.26); font: inherit; font-weight: 850; cursor: pointer; }
.kh2-contact-widget__toggle:hover { transform: translateY(-1px); box-shadow: 0 18px 38px rgba(6,27,58,.32); }
.kh2-contact-widget__toggle:focus-visible { outline: 3px solid #21d4e6; outline-offset: 3px; }
.kh2-contact-widget__panel { width: min(310px, calc(100vw - 36px)); box-sizing: border-box; padding: 1rem; border: 1px solid #d7e4ee; border-radius: 18px; background: #fff; box-shadow: 0 20px 56px rgba(0,16,48,.24); }
.kh2-contact-widget__panel[hidden] { display: none; }
.kh2-contact-widget__panel > strong, .kh2-contact-widget__panel > span { display: block; }
.kh2-contact-widget__panel > strong { color: #061e36; font-size: 1.05rem; }
.kh2-contact-widget__panel > span { margin-top: .25rem; color: #536b81; font-size: .8rem; }
.kh2-social-links--widget { display: grid; margin-bottom: 0; }
.kh2-social-links--widget .kh2-social-link { width: 100%; box-sizing: border-box; }

@media (max-width: 700px) {
  .kh2-form__grid, .kh2-calculator__grid, .kh2-calculator__result { grid-template-columns: 1fr; }
  .kh2-calculator__source, .kh2-calculator__result p { grid-column: auto; }
  .kh2-form__submit { width: 100%; }
  .kh2-language-switcher__current { font-size: .78rem; }
  .kh2-language-switcher { max-width: 76px; }
  .kh2-language-switcher summary { min-width: 72px; min-height: 44px; padding-inline: .55rem; }
  .kh2-language-switcher ul { position: absolute; top: calc(100% + .5rem); right: 0; width: min(230px,calc(100vw - 24px)); max-height: calc(100dvh - 96px); overflow-y: auto; }
  body.admin-bar .kh2-language-switcher ul { top: calc(100% + .5rem); }
  .kh2-social-link__label { font-size: .76rem; }
  .kh2-contact-widget { right: max(12px,env(safe-area-inset-right)); bottom: max(12px,env(safe-area-inset-bottom)); }
  .kh2-contact-widget__toggle { min-height: 48px; padding: .62rem .85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .kh2-contact-widget__toggle, .kh2-language-switcher__chevron { transition: none; }
}

/* Legal, privacidad y newsletter — componentes ligeros, sin dependencias externas. */
.kh2-legal-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-top: 2rem; }
.kh2-legal-card, .kh2-legal-infographic > div { padding: 1.35rem; border: 1px solid #d8e3e8; border-radius: 18px; background: #fff; box-shadow: 0 12px 30px rgba(6,30,54,.06); }
.kh2-legal-card { display: flex; min-width: 0; flex-direction: column; }
.kh2-legal-card h3 { margin: .8rem 0 .55rem; color: #061e36; }
.kh2-legal-card p { flex: 1; color: #526b82; }
.kh2-legal-status { display: inline-flex; width: fit-content; padding: .32rem .58rem; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.kh2-legal-status--verified { color: #075c45; background: #dffaf1; }
.kh2-legal-status--pending { color: #7b4700; background: #fff3d6; }
.kh2-legal-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.kh2-legal-actions a { display: inline-flex; align-items: center; min-height: 42px; padding: .55rem .75rem; border: 1px solid #1677ff; border-radius: 10px; color: #1677ff; font-weight: 750; text-decoration: none; }
.kh2-legal-actions a:hover { color: #f5fbfc; background: #1677ff; }
.kh2-legal-infographic { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1rem; margin-block: 1.5rem; }
.kh2-legal-disclaimer { margin-top: 1.3rem; color: #526b82; font-size: .82rem; font-style: italic; }
.kh2-policy { max-width: 860px; }
.kh2-policy h2 { margin-top: 2.4rem; }
.kh2-cookie-table { display: grid; gap: .75rem; }
.kh2-cookie-table > div { display: grid; grid-template-columns: 160px 1fr; gap: 1rem; padding: 1rem; border: 1px solid #d8e3e8; border-radius: 14px; background: #fff; }

.kh2-consent, .kh2-newsletter-popup { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: end center; padding: 1rem; }
.kh2-consent[hidden], .kh2-newsletter-popup[hidden] { display: none; }
.kh2-consent__backdrop, .kh2-newsletter-popup__backdrop { position: absolute; inset: 0; background: rgba(6,30,54,.62); backdrop-filter: blur(4px); }
.kh2-consent__panel, .kh2-newsletter-popup__panel { position: relative; z-index: 1; width: min(720px,calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; box-sizing: border-box; padding: clamp(1.2rem,4vw,2rem); border: 1px solid #b9c7ce; border-radius: 22px; color: #061e36; background: #f5fbfc; box-shadow: 0 26px 80px rgba(6,30,54,.35); }
.kh2-consent__panel h2, .kh2-newsletter-popup__panel h2 { margin: .2rem 0 .7rem; }
.kh2-consent__choices { display: grid; gap: .6rem; margin-block: 1rem; }
.kh2-consent__choices label { display: flex; gap: .8rem; padding: .85rem; border: 1px solid #d8e3e8; border-radius: 12px; background: #fff; }
.kh2-consent__choices span, .kh2-consent__choices small { display: block; }
.kh2-consent__choices small { color: #526b82; }
.kh2-consent__actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.kh2-consent__actions button { min-height: 44px; padding: .65rem .9rem; border: 1px solid #1677ff; border-radius: 10px; color: #1677ff; background: #fff; font: inherit; font-weight: 750; cursor: pointer; }
.kh2-consent__actions button:first-child, .kh2-consent__actions button:hover { color: #f5fbfc; background: #1677ff; }
.kh2-consent__links { margin-bottom: 0; font-size: .82rem; }
.kh2-newsletter-popup { place-items: center; }
.kh2-newsletter-popup__panel { width: min(560px,calc(100vw - 2rem)); }
.kh2-newsletter-popup__close { position: absolute; top: .75rem; right: .75rem; width: 44px; height: 44px; border: 0; border-radius: 50%; color: #061e36; background: #fff; font-size: 1.6rem; cursor: pointer; }
.kh2-newsletter-form { display: grid; gap: .85rem; }
.kh2-newsletter-form label { display: grid; gap: .4rem; font-weight: 700; }
.kh2-newsletter-form input[type="email"] { width: 100%; box-sizing: border-box; padding: .85rem; border: 1px solid #b9c7ce; border-radius: 10px; font: inherit; }
.kh2-newsletter-form .kh2-form__consent { font-size: .82rem; font-weight: 500; }
.kh2-newsletter-form .kh2-form__consent input { width: 18px; height: 18px; }
.kh2-newsletter-form small { color: #526b82; }
.elementor-page .kh2-main, .elementor-page .entry-content { max-width: none; padding: 0; }

@media (max-width: 800px) {
  .kh2-legal-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 560px) {
  .kh2-legal-grid, .kh2-legal-infographic { grid-template-columns: 1fr; }
  .kh2-cookie-table > div { grid-template-columns: 1fr; gap: .35rem; }
  .kh2-consent__actions { display: grid; }
  .kh2-consent__actions button { width: 100%; }
  .kh2-contact-widget { z-index: 900; }
}

