/* ==========================================================================
   Ovoclinic Surveys — Frontend
   Capa de presentación sobre Gravity Forms. GF sigue siendo el único motor
   de campos, validación, lógica condicional, AJAX y almacenamiento.
   ========================================================================== */

:root{
  --ovo-brand:#ED3591;
  --ovo-brand-dark:#B91867;
  --ovo-brand-soft:#FFF2F8;
  --ovo-ink:#182230;
  --ovo-text:#344054;
  --ovo-muted:#667085;
  --ovo-line:#E7EAF0;
  --ovo-card-border:rgba(214,220,228,.78);
  --ovo-card-shadow:0 8px 28px rgba(17,24,39,.035);
  --ovo-bg:#F5F6F8;
  --ovo-card:#FFFFFF;
  --ovo-max-width:1240px;
  --ovo-radius:16px;
}

.ovo-survey-app,.ovo-survey-app *,.ovo-survey-enhanced,.ovo-survey-enhanced *{box-sizing:border-box}
.ovo-survey-app{width:100vw;margin-left:calc(50% - 50vw);background:var(--ovo-bg);color:var(--ovo-ink);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:18px;line-height:1.5;-webkit-font-smoothing:antialiased}

/* Landing limpia en GeneratePress */
body.ovo-survey-landing #masthead,
body.ovo-survey-landing .site-header,
body.ovo-survey-landing #site-navigation,
body.ovo-survey-landing .main-navigation,
body.ovo-survey-landing .site-footer,
body.ovo-survey-landing .site-info,
body.ovo-survey-landing .footer-widgets{display:none!important}
body.ovo-survey-landing #page,
body.ovo-survey-landing .site.grid-container,
body.ovo-survey-landing .site-content,
body.ovo-survey-landing #primary,
body.ovo-survey-landing .content-area,
body.ovo-survey-landing .site-main,
body.ovo-survey-landing article,
body.ovo-survey-landing .inside-article,
body.ovo-survey-landing .entry-content{width:100%!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;background:transparent!important}
body.ovo-survey-landing .entry-header,body.ovo-survey-landing .entry-title{display:none!important}
body.ovo-survey-landing{background:var(--ovo-bg)!important}

/* Hero */
.ovo-survey-hero{position:relative;min-height:440px;overflow:hidden;isolation:isolate;background:var(--ovo-brand-dark)}
.ovo-survey-hero__media{position:absolute;inset:0;z-index:0;width:100%;height:100%;max-width:none!important;display:block;object-fit:cover;object-position:center 48%;margin:0!important;padding:0!important}
.ovo-survey-hero::before{content:"";position:absolute;inset:0;z-index:1;background:linear-gradient(90deg,rgba(177,18,94,.91) 0%,rgba(222,41,137,.77) 42%,rgba(227,55,147,.54) 67%,rgba(37,19,29,.18) 100%);pointer-events:none}
.ovo-survey-hero__shade{display:none!important}
.ovo-survey-hero__inner{position:relative;z-index:2;width:min(var(--ovo-max-width),calc(100% - 64px));min-height:440px;margin:0 auto;padding:58px 0;display:flex;flex-direction:column;justify-content:center}
.ovo-survey-hero__logo{width:220px;height:auto;margin:0 0 22px;filter:brightness(0) invert(1)}
.ovo-survey-hero__copy{max-width:690px;color:#fff}
.ovo-survey-hero h1{margin:0 0 16px;color:#fff;font-size:clamp(46px,4.7vw,68px);line-height:1.01;letter-spacing:-.045em;font-weight:820}
.ovo-survey-hero p{margin:0;color:#fff;font-size:18px;line-height:1.62;text-wrap:pretty}
.ovo-survey-hero__time{display:inline-flex!important;width:max-content;align-items:center;gap:8px;margin-top:22px!important;padding:9px 14px;border:1px solid rgba(255,255,255,.42);border-radius:999px;background:rgba(255,255,255,.14);font-size:14px!important;line-height:1!important;font-weight:750;backdrop-filter:blur(4px)}

/* Contenedor */
.ovo-survey-main{padding:54px 28px 96px;background:var(--ovo-bg)}
.ovo-survey-main__inner,.ovo-survey-enhanced{width:min(var(--ovo-max-width),100%)!important;max-width:none!important;margin:0 auto!important}
.ovo-survey-enhanced{padding:0!important}
.ovo-survey-enhanced .gform_heading,.ovo-survey-enhanced .gform_required_legend{display:none!important}
.ovo-survey-enhanced form,.ovo-survey-enhanced .gform_fields{width:100%!important;max-width:none!important}
.ovo-survey-enhanced .gform_fields{display:block!important;margin:0!important;padding:0!important}

/* Secciones 01–05 */
.ovo-section{margin:0 0 42px}
.ovo-section:last-child{margin-bottom:24px}
.ovo-section__head{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:12px;margin:0 0 18px;padding:0 4px}
.ovo-section__number{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:max-content;min-width:auto;height:auto;padding:0;border:0;border-radius:0;background:transparent;color:#7B8494;font-size:12px!important;font-weight:850!important;line-height:1!important;letter-spacing:.12em!important;font-variant-numeric:tabular-nums!important;box-shadow:none!important}
.ovo-section__head h2{margin:0!important;color:#C1176B!important;font-size:clamp(24px,2vw,31px)!important;line-height:1.16!important;font-weight:790!important;letter-spacing:-.025em!important;text-transform:none!important}
.ovo-section__body{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px!important;align-items:start!important}

/* Tarjetas de pregunta */
.ovo-question{min-width:0!important;margin:0!important;padding:20px 22px!important;border:0!important;border-radius:var(--ovo-radius)!important;background:var(--ovo-card)!important;box-shadow:0 0 0 1px var(--ovo-card-border),var(--ovo-card-shadow)!important;grid-column:span 1!important}
.ovo-question--wide,.ovo-rating{grid-column:1/-1!important}
.ovo-question--conditional{padding:20px 22px!important;background:#FBFCFD!important}

/* Gravity Forms usa <fieldset><legend> en radios y checkboxes.
   Normalizamos el comportamiento nativo de legend para que el título quede DENTRO de la tarjeta.
   No usar position:absolute, márgenes negativos ni legends flotantes para esto. */
.ovo-survey-enhanced fieldset.ovo-question{display:flex!important;flex-direction:column!important;min-inline-size:0!important;padding-block:20px!important;padding-inline:22px!important}
.ovo-survey-enhanced fieldset.ovo-question[data-conditional-logic="hidden"]{display:none!important}
.ovo-survey-enhanced fieldset.ovo-question>legend{box-sizing:border-box!important;display:block!important;position:static!important;float:none!important;width:100%!important;min-width:0!important;max-width:none!important;margin:0 0 15px!important;padding:0!important;inset:auto!important;transform:none!important;background:transparent!important}
.ovo-survey-enhanced fieldset.ovo-question>.ginput_container{min-width:0!important;margin:0!important}
.ovo-survey-enhanced .gfield:not(fieldset).ovo-question>.gfield_label{margin-top:0!important}
.ovo-survey-enhanced .gfield_label,.ovo-survey-enhanced .gform-field-label,.ovo-survey-enhanced legend{display:block!important;position:static!important;float:none!important;width:100%!important;max-width:none!important;margin:0 0 15px!important;padding:0!important;transform:none!important;background:transparent!important;color:#182230!important;font-size:18px!important;line-height:1.35!important;font-weight:720!important;letter-spacing:-.01em!important;text-wrap:pretty}
.ovo-survey-enhanced .gfield_required{color:var(--ovo-brand)!important}
.ovo-survey-enhanced .gfield_description,.ovo-survey-enhanced .instruction{margin-top:10px!important;color:var(--ovo-muted)!important;font-size:14px!important}

/* Neutralización adicional de estilos de Gravity Forms que pueden sacar el label fuera de la tarjeta */
.ovo-survey-enhanced .ovo-question>.gfield_label,
.ovo-survey-enhanced .ovo-question>legend.gfield_label,
.ovo-survey-enhanced .ovo-question>legend.gform-field-label{top:auto!important;left:auto!important;right:auto!important;bottom:auto!important;clip:auto!important;overflow:visible!important;white-space:normal!important}
.ovo-survey-enhanced .ovo-question .ginput_container{width:100%!important}

/* Grid de opciones */
.ovo-survey-enhanced .gfield_radio,.ovo-survey-enhanced .gfield_checkbox{display:grid!important;grid-template-columns:1fr!important;gap:9px!important;width:100%!important;margin:0!important;padding:0!important}
.ovo-survey-enhanced .ovo-options--2 .gfield_radio,.ovo-survey-enhanced .ovo-options--2 .gfield_checkbox{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.ovo-survey-enhanced .ovo-options--3 .gfield_radio,.ovo-survey-enhanced .ovo-options--3 .gfield_checkbox{grid-template-columns:repeat(3,minmax(0,1fr))!important}
.ovo-survey-enhanced .gchoice{position:relative!important;display:block!important;width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;padding:0!important;justify-self:stretch!important}
.ovo-survey-enhanced .gchoice input[type=radio],.ovo-survey-enhanced .gchoice input[type=checkbox]{position:absolute!important;opacity:0!important;pointer-events:none!important}
.ovo-survey-enhanced .gchoice label.ovo-choice-label{position:relative!important;display:flex!important;align-items:center!important;width:100%!important;max-width:none!important;min-height:52px!important;margin:0!important;padding:12px 14px 12px 46px!important;border:1px solid #E4E8EE!important;border-radius:11px!important;background:#FCFCFD!important;color:#334155!important;font-size:15px!important;line-height:1.3!important;font-weight:560!important;cursor:pointer!important;white-space:normal!important;transition:border-color .16s ease,background .16s ease,box-shadow .16s ease!important}
.ovo-survey-enhanced .gchoice label.ovo-choice-label:hover{border-color:#E9A6C9!important;background:#FFF9FC!important;box-shadow:0 3px 10px rgba(237,53,145,.055)!important}
.ovo-survey-enhanced .gchoice label.ovo-choice-label:before{content:"";position:absolute;left:15px;top:50%;width:19px;height:19px;transform:translateY(-50%);border:1.5px solid #AEB7C4;border-radius:50%;background:#fff;transition:.16s ease}
.ovo-survey-enhanced .gfield_checkbox .gchoice label.ovo-choice-label:before{border-radius:5px}
.ovo-survey-enhanced .gchoice input:focus-visible+label.ovo-choice-label,.ovo-survey-enhanced .gchoice input:focus-visible~label.ovo-choice-label{outline:3px solid rgba(237,53,145,.20)!important;outline-offset:2px!important}
.ovo-survey-enhanced .gchoice input:checked+label.ovo-choice-label,.ovo-survey-enhanced .gchoice input:checked~label.ovo-choice-label{border-color:rgba(237,53,145,.62)!important;background:#FFF3F9!important;color:#9D1555!important;font-weight:700!important;box-shadow:0 0 0 2px rgba(237,53,145,.06)!important}
.ovo-survey-enhanced .gchoice input:checked+label.ovo-choice-label:before,.ovo-survey-enhanced .gchoice input:checked~label.ovo-choice-label:before{border-color:var(--ovo-brand);background:var(--ovo-brand);box-shadow:inset 0 0 0 4px #fff}
.ovo-survey-enhanced .gfield_checkbox .gchoice input:checked+label.ovo-choice-label:before,.ovo-survey-enhanced .gfield_checkbox .gchoice input:checked~label.ovo-choice-label:before{box-shadow:none;background:var(--ovo-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/13px no-repeat}

/* Valoraciones: Mala / Regular / Buena / Excelente — cuatro botones a todo el ancho */
.ovo-survey-enhanced .ovo-rating{padding:19px 22px!important}
.ovo-survey-enhanced .ovo-rating .gfield_label,.ovo-survey-enhanced .ovo-rating legend{margin-bottom:14px!important;font-size:18px!important}
.ovo-survey-enhanced .ovo-rating .gfield_radio{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important;width:100%!important}
.ovo-survey-enhanced .ovo-rating .gchoice{width:100%!important;justify-self:stretch!important}
.ovo-survey-enhanced .ovo-rating .gchoice label.ovo-choice-label{justify-content:center!important;width:100%!important;min-height:56px!important;padding:13px 14px 13px 44px!important;text-align:center!important;font-size:15px!important;font-weight:690!important;color:#344054!important;border:1px solid #E1E6ED!important;background:#FAFBFC!important}
.ovo-survey-enhanced .ovo-rating .gchoice label.ovo-choice-label:before{left:15px!important}
.ovo-survey-enhanced .ovo-rating .gchoice label.ovo-choice-label:hover{border-color:#E58AB8!important;background:#FFF7FB!important}
.ovo-survey-enhanced .ovo-rating .gchoice input:checked+label.ovo-choice-label,.ovo-survey-enhanced .ovo-rating .gchoice input:checked~label.ovo-choice-label{background:#ED3591!important;border-color:#ED3591!important;color:#fff!important;box-shadow:0 7px 18px rgba(237,53,145,.18)!important}
.ovo-survey-enhanced .ovo-rating .gchoice input:checked+label.ovo-choice-label:before,.ovo-survey-enhanced .ovo-rating .gchoice input:checked~label.ovo-choice-label:before{background:#fff!important;border-color:#fff!important;box-shadow:inset 0 0 0 5px var(--ovo-brand)!important}

/* Inputs de texto */
.ovo-survey-enhanced input[type=text],.ovo-survey-enhanced input[type=email],.ovo-survey-enhanced input[type=tel],.ovo-survey-enhanced input[type=number],.ovo-survey-enhanced input[type=url],.ovo-survey-enhanced select,.ovo-survey-enhanced textarea{width:100%!important;min-height:56px!important;margin:0!important;padding:13px 15px!important;border:1px solid #D9DEE7!important;border-radius:11px!important;background:#FCFCFD!important;color:var(--ovo-ink)!important;font:inherit!important;font-size:16px!important;box-shadow:none!important;transition:border-color .16s ease,box-shadow .16s ease!important}
.ovo-survey-enhanced textarea{min-height:150px!important;resize:vertical}
.ovo-survey-enhanced input:focus,.ovo-survey-enhanced select:focus,.ovo-survey-enhanced textarea:focus{outline:none!important;border-color:var(--ovo-brand)!important;box-shadow:0 0 0 4px rgba(237,53,145,.12)!important}

/* Errores */
.ovo-survey-enhanced .gform_validation_errors{margin:0 0 24px!important;padding:18px 20px!important;border:1px solid #F4B5D4!important;border-radius:14px!important;background:#FFF5FA!important;box-shadow:none!important}
.ovo-survey-enhanced .gfield_error{border-color:#F0A8CB!important;background:#FFF9FC!important}
.ovo-survey-enhanced .validation_message{margin-top:10px!important;color:#A31256!important;font-size:14px!important;font-weight:650!important}

/* Envío */
.ovo-survey-enhanced .ovo-submit-area,.ovo-survey-enhanced .gform_footer{display:flex!important;justify-content:center!important;margin:28px 0 0!important;padding:0!important}
.ovo-survey-enhanced .gform_button,.ovo-survey-enhanced input[type=submit]{min-width:250px!important;min-height:58px!important;margin:0!important;padding:14px 28px!important;border:0!important;border-radius:12px!important;background:var(--ovo-brand)!important;color:#fff!important;font-size:17px!important;font-weight:800!important;line-height:1!important;box-shadow:0 8px 20px rgba(237,53,145,.20)!important;cursor:pointer!important;transition:transform .16s ease,box-shadow .16s ease,background .16s ease!important}
.ovo-survey-enhanced .gform_button:hover,.ovo-survey-enhanced input[type=submit]:hover{background:var(--ovo-brand-dark)!important;transform:translateY(-1px);box-shadow:0 13px 28px rgba(185,24,103,.27)!important}
.ovo-survey-enhanced .gform_button:focus-visible,.ovo-survey-enhanced input[type=submit]:focus-visible{outline:3px solid rgba(237,53,145,.35)!important;outline-offset:3px!important}

/* Gravity Forms: neutralizar layout propio (columnas/anchos nativos) */
.ovo-survey-enhanced .gfield{width:auto!important;max-width:none!important}
.ovo-survey-enhanced .gform-grid-row,.ovo-survey-enhanced .gfield--width-half,.ovo-survey-enhanced .gfield--width-third,.ovo-survey-enhanced .gfield--width-quarter{width:auto!important;grid-column:auto!important}

/* Ajustes puntuales por campo */
.ovo-field-3,.ovo-field-4,.ovo-field-19{padding-top:18px!important;padding-bottom:18px!important}
.ovo-field-5,.ovo-field-6{min-height:0!important}

/* ==========================================================================
   Responsive: tablet
   ========================================================================== */
@media (max-width:1024px){
  .ovo-survey-hero{min-height:400px}
  .ovo-survey-hero__inner{width:min(var(--ovo-max-width),calc(100% - 44px));min-height:400px;padding:48px 0}
  .ovo-survey-hero__media{object-position:58% center}
  .ovo-survey-main{padding:44px 22px 78px}
  .ovo-section{margin-bottom:36px}
  .ovo-section__body{gap:16px!important}
  .ovo-question{padding:18px!important}
  .ovo-survey-enhanced fieldset.ovo-question{padding-block:18px!important;padding-inline:18px!important}
  .ovo-survey-enhanced .ovo-options--3 .gfield_radio,.ovo-survey-enhanced .ovo-options--3 .gfield_checkbox{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .ovo-survey-enhanced .ovo-rating .gfield_radio{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

/* ==========================================================================
   Responsive: móvil
   ========================================================================== */
@media (max-width:767px){
  .ovo-survey-app{font-size:16px}
  .ovo-survey-hero{min-height:390px}
  .ovo-survey-hero__inner{width:calc(100% - 32px);min-height:390px;padding:42px 0}
  .ovo-survey-hero__media{object-position:64% center}
  .ovo-survey-hero::before{background:linear-gradient(90deg,rgba(175,18,93,.94) 0%,rgba(225,49,145,.83) 64%,rgba(132,39,83,.58) 100%)}
  .ovo-survey-hero__logo{width:174px;margin-bottom:18px}
  .ovo-survey-hero h1{font-size:clamp(38px,11vw,48px)}
  .ovo-survey-hero p{font-size:16px;line-height:1.55}
  .ovo-survey-main{padding:34px 14px 64px}
  .ovo-section{margin-bottom:32px}
  .ovo-section__head{grid-template-columns:1fr;gap:6px;margin-bottom:13px}
  .ovo-section__number{width:max-content;min-width:44px;height:29px;font-size:11px!important}
  .ovo-section__head h2{font-size:23px!important}
  .ovo-section__body{grid-template-columns:1fr!important;gap:14px!important}
  .ovo-question,.ovo-question--wide,.ovo-rating{grid-column:1!important;padding:17px 15px!important;border-radius:15px!important}
  .ovo-survey-enhanced fieldset.ovo-question{padding-block:17px!important;padding-inline:15px!important}
  .ovo-survey-enhanced .gfield_label,.ovo-survey-enhanced .gform-field-label,.ovo-survey-enhanced legend{font-size:17px!important;margin-bottom:14px!important}
  .ovo-survey-enhanced .ovo-options--2 .gfield_radio,.ovo-survey-enhanced .ovo-options--2 .gfield_checkbox,.ovo-survey-enhanced .ovo-options--3 .gfield_radio,.ovo-survey-enhanced .ovo-options--3 .gfield_checkbox{grid-template-columns:1fr!important}
  .ovo-survey-enhanced .gchoice label.ovo-choice-label{min-height:52px!important;font-size:15px!important;padding:12px 12px 12px 44px!important}
  .ovo-survey-enhanced .ovo-rating .gfield_radio{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .ovo-survey-enhanced .ovo-rating .gchoice label.ovo-choice-label{min-height:54px!important;padding:13px 10px 13px 42px!important;font-size:15px!important}
  .ovo-survey-enhanced .ovo-rating .gchoice label.ovo-choice-label:before{left:14px!important}
  .ovo-survey-enhanced .gform_button,.ovo-survey-enhanced input[type=submit]{width:100%!important;min-width:0!important;min-height:58px!important}
}

/* Pantallas muy estrechas: valoraciones a 1 columna */
@media (max-width:420px){
  .ovo-survey-hero__media{object-position:68% center}
  .ovo-survey-main{padding-left:10px;padding-right:10px}
  .ovo-survey-enhanced .ovo-rating .gfield_radio{grid-template-columns:1fr!important}
  .ovo-survey-enhanced .ovo-rating .gchoice label.ovo-choice-label{justify-content:flex-start!important;padding-left:50px!important;text-align:left!important}
  .ovo-survey-enhanced .ovo-rating .gchoice label.ovo-choice-label:before{left:17px!important}
}

@media (prefers-reduced-motion:reduce){
  .ovo-survey-app *{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
