/*
 * PRAETORIA – Hacienda y Seguridad Social funnel
 * Every selector is scoped under .phf-funnel so this stylesheet cannot leak
 * into the Astra/Elementor theme or any other plugin on the page.
 * Tokens below were measured from the live praetoriaabogados.es homepage
 * and /derecho-mercantil/ page (computed styles, Sep 2026):
 *   CTA red        #C10000  (hover #AE0202)
 *   Heading ink    #111111
 *   Body text      #334155  /  secondary text #7A7A7A
 *   Soft section   #F0F5FA
 *   Border         #D1D5DB
 *   Heading font   "Roboto", weight 600–700 (site loads Roboto + Roboto Slab already)
 *   Button shape   50px pill radius
 */
.phf-funnel{
  --phf-red:#C10000;
  --phf-red-dark:#AE0202;
  --phf-ink:#111111;
  --phf-text:#334155;
  --phf-text-2:#7A7A7A;
  --phf-bg:#FFFFFF;
  --phf-bg-soft:#F0F5FA;
  --phf-border:#D1D5DB;
  --phf-whatsapp:#25D366;
  --phf-whatsapp-dark:#1DA851;
  --phf-heading-font:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif;
  --phf-body-font:"Roboto",Helvetica,Arial,sans-serif;
  font-family:var(--phf-body-font);
  color:var(--phf-text);
  background:var(--phf-bg);
  line-height:1.65;
  font-size:16px;
}
.phf-funnel *,.phf-funnel *:before,.phf-funnel *:after{box-sizing:border-box}
.phf-funnel [hidden]{display:none!important}
.phf-funnel img{max-width:100%}
.phf-funnel a{color:inherit}
.phf-funnel button,.phf-funnel input,.phf-funnel select,.phf-funnel textarea{font:inherit;color:inherit}
.phf-funnel .phf-eyebrow{text-transform:uppercase;letter-spacing:.15em;font-size:.75rem;font-weight:700;color:var(--phf-red)}
.phf-funnel .phf-eyebrow.phf-light{color:#f3c9c4}
.phf-funnel h1,.phf-funnel h2,.phf-funnel h3{font-family:var(--phf-heading-font);font-weight:700;color:var(--phf-ink);letter-spacing:-.02em;margin:.5rem 0 1rem}
.phf-funnel h1{font-size:clamp(2.4rem,5.2vw,4.4rem);line-height:1.05;max-width:900px}
.phf-funnel h1 em,.phf-funnel h2 em{color:var(--phf-red);font-style:normal}
.phf-funnel h2{font-size:clamp(1.9rem,3.6vw,3rem);line-height:1.12}
.phf-funnel h3{font-size:1.3rem;line-height:1.3}
.phf-funnel .phf-section{padding:clamp(3rem,7vw,6rem) clamp(1.25rem,6vw,4.5rem);max-width:1200px;margin:0 auto}
.phf-funnel .phf-section.phf-soft{background:var(--phf-bg-soft)}
.phf-funnel .phf-hero{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,.9fr);gap:clamp(2rem,5vw,4.5rem);align-items:center}
.phf-funnel .phf-assessment{display:grid;grid-template-columns:.75fr 1.25fr;gap:clamp(2rem,5vw,3.5rem);border-radius:8px}
.phf-funnel .phf-section-heading{display:grid;grid-template-columns:1.4fr .6fr;gap:3rem;align-items:end}
.phf-funnel .phf-section-heading>p{color:var(--phf-text)}
.phf-funnel .phf-lead{font-size:clamp(1.05rem,1.4vw,1.2rem);color:var(--phf-text);max-width:640px}
.phf-funnel .phf-trust-row{display:flex;flex-wrap:wrap;gap:.6rem 1.6rem;margin:1.5rem 0}
.phf-funnel .phf-trust-row span{font-weight:600;color:var(--phf-ink);font-size:.92rem}
.phf-funnel .phf-trust-row span:before{content:"";display:inline-block;width:9px;height:9px;border-radius:2px;background:var(--phf-red);transform:rotate(45deg);margin-right:.6rem;vertical-align:middle}

/* Buttons — same pill shape and red as the live PRAETORIA CTAs */
.phf-funnel .phf-btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;min-height:52px;padding:.85rem 1.75rem;border:0;border-radius:50px;background:var(--phf-red);color:#fff;font-weight:600;text-decoration:none;cursor:pointer;transition:background .18s,transform .18s}
.phf-funnel .phf-btn:hover{background:var(--phf-red-dark);transform:translateY(-1px)}
.phf-funnel .phf-btn:focus-visible{outline:3px solid var(--phf-red-dark);outline-offset:3px}
.phf-funnel .phf-btn-ghost{background:transparent;border:1px solid var(--phf-border);color:var(--phf-ink)}
.phf-funnel .phf-btn-ghost:hover{background:var(--phf-bg-soft)}
.phf-funnel .phf-btn-whatsapp{background:var(--phf-whatsapp)}
.phf-funnel .phf-btn-whatsapp:hover{background:var(--phf-whatsapp-dark)}
.phf-funnel .phf-text-link{display:inline-flex;gap:.6rem;font-weight:600;text-decoration:none;border-bottom:2px solid var(--phf-red);padding-bottom:.15rem;color:var(--phf-ink)}

/* Deadline callout card in the hero */
.phf-funnel .phf-deadline-card{background:var(--phf-ink);color:#fff;padding:clamp(1.75rem,3vw,2.5rem);border-radius:4px;position:relative}
.phf-funnel .phf-deadline-card .phf-card-number{color:#ff8a7a;font:700 3.6rem var(--phf-heading-font);opacity:.5;display:block}
.phf-funnel .phf-deadline-card h2{color:#fff;font-size:1.7rem;margin:.2rem 0 .8rem}
.phf-funnel .phf-deadline-card p{color:#d8d8d8;margin:0}
.phf-funnel .phf-deadline-line{margin-top:1.5rem;padding-top:1.1rem;border-top:1px solid rgba(255,255,255,.18);display:flex;gap:.7rem}
.phf-funnel .phf-deadline-line span{width:8px;height:8px;border-radius:50%;background:var(--phf-red);margin-top:.4rem;flex:none}
.phf-funnel .phf-deadline-line small{font-size:.8rem;color:#bdbdbd}

/* Diagnostic form */
.phf-funnel .phf-assessment-intro h2{margin-top:.4rem}
.phf-funnel .phf-privacy-note{font-size:.82rem;color:var(--phf-text-2);border-left:3px solid var(--phf-red);padding-left:1rem;margin-top:1.6rem}
.phf-funnel .phf-progress-wrap{display:flex;align-items:center;gap:1rem;color:var(--phf-text-2);font-size:.78rem;text-transform:uppercase;letter-spacing:.08em;margin-bottom:1rem}
.phf-funnel progress.phf-progress{width:100%;height:4px;border:0;border-radius:2px;background:var(--phf-border)}
.phf-funnel progress.phf-progress::-webkit-progress-bar{background:var(--phf-border);border-radius:2px}
.phf-funnel progress.phf-progress::-webkit-progress-value{background:var(--phf-red);border-radius:2px}
.phf-funnel progress.phf-progress::-moz-progress-bar{background:var(--phf-red);border-radius:2px}
.phf-funnel fieldset{border:0;padding:1.75rem 0 0;margin:0}
.phf-funnel .phf-step{display:none}
.phf-funnel .phf-step.phf-active{display:block;animation:phf-fade .22s ease}
@keyframes phf-fade{from{opacity:0;transform:translateY(6px)}}
.phf-funnel legend{font:700 clamp(1.3rem,2.2vw,1.8rem)/1.25 var(--phf-heading-font);color:var(--phf-ink);margin-bottom:1.3rem}
.phf-funnel legend:focus{outline:none}
.phf-funnel legend:focus-visible{outline:3px solid var(--phf-red-dark);outline-offset:4px}
.phf-funnel .phf-option-grid{display:grid;grid-template-columns:1fr 1fr;gap:.75rem}
.phf-funnel .phf-option{display:block;cursor:pointer}
.phf-funnel .phf-option input{position:absolute;opacity:0}
.phf-funnel .phf-option span{display:flex;flex-direction:column;border:1px solid var(--phf-border);border-radius:6px;padding:1.1rem;min-height:84px;transition:.18s;background:#fff}
.phf-funnel .phf-option span b{color:var(--phf-ink)}
.phf-funnel .phf-option span small{color:var(--phf-text-2)}
.phf-funnel .phf-option input:checked+span{border-color:var(--phf-red);box-shadow:inset 3px 0 var(--phf-red);background:#fff5f4}
.phf-funnel .phf-option input:focus-visible+span{outline:3px solid var(--phf-red-dark);outline-offset:2px}
.phf-funnel .phf-field{display:block;margin-bottom:1.1rem}
.phf-funnel .phf-field>span{display:block;font-weight:600;color:var(--phf-ink);margin-bottom:.4rem}
.phf-funnel .phf-field i{font-style:normal;color:var(--phf-text-2);font-weight:400}
.phf-funnel .phf-field input,.phf-funnel .phf-field select,.phf-funnel .phf-field textarea{width:100%;border:1px solid var(--phf-border);border-radius:6px;background:#fff;color:var(--phf-ink);padding:.8rem 1rem}
.phf-funnel .phf-field input:focus-visible,.phf-funnel .phf-field select:focus-visible,.phf-funnel .phf-field textarea:focus-visible{outline:3px solid var(--phf-red-dark);outline-offset:1px;border-color:var(--phf-red)}
.phf-funnel .phf-field input,.phf-funnel .phf-field select{min-height:50px}
.phf-funnel .phf-field textarea{resize:vertical}
.phf-funnel .phf-field-help,.phf-funnel .phf-counter,.phf-funnel .phf-legal-small{font-size:.78rem;color:var(--phf-text-2)}
.phf-funnel .phf-counter{display:block;text-align:right}
.phf-funnel .phf-two-cols{display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.phf-funnel .phf-warning{border-left:3px solid var(--phf-red);background:#fff2f1;padding:1rem 1.1rem;color:var(--phf-ink);font-size:.9rem;border-radius:0 6px 6px 0}
.phf-funnel .phf-consent{display:flex;gap:.7rem;align-items:flex-start;margin:1rem 0}
.phf-funnel .phf-consent input{margin-top:.35rem;width:18px;height:18px;accent-color:var(--phf-red)}
.phf-funnel .phf-consent a{color:var(--phf-red);text-decoration:underline}
.phf-funnel .phf-form-actions{display:flex;justify-content:flex-end;gap:.75rem;margin-top:1.5rem;flex-wrap:wrap}
.phf-funnel .phf-form-error{color:#b3261e;min-height:1.4rem;margin-top:.65rem;font-weight:600}
.phf-funnel .phf-success{padding-top:1.5rem}
.phf-funnel .phf-success h3{font-size:1.8rem;margin:.3rem 0 .9rem}
.phf-funnel .phf-success .phf-actions{display:flex;flex-wrap:wrap;gap:.75rem;margin:1.2rem 0 .4rem;align-items:center}
.phf-funnel .phf-plain-button{background:none;border:0;color:var(--phf-text-2);text-decoration:underline;cursor:pointer;padding:.4rem 0;font-size:.9rem}

/* Feature / checklist lists, matching the red-chevron bullet style on derecho-mercantil */
.phf-funnel ul.phf-check{list-style:none;padding:0;margin:0}
.phf-funnel ul.phf-check li{padding:.6rem 0;border-bottom:1px solid var(--phf-border);padding-left:1.4rem;position:relative}
.phf-funnel ul.phf-check li:before{content:"\203A";position:absolute;left:0;color:var(--phf-red);font-weight:700}

.phf-funnel .phf-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:clamp(2rem,5vw,4rem)}
.phf-funnel .phf-method-steps{list-style:none;padding:0;margin:1.5rem 0 0}
.phf-funnel .phf-method-steps li{display:grid;grid-template-columns:56px 1fr;gap:1rem;border-top:1px solid var(--phf-border);padding:1.15rem 0}
.phf-funnel .phf-method-steps li>span{color:var(--phf-red);font:700 1.5rem var(--phf-heading-font)}
.phf-funnel .phf-method-steps h3{margin:0 0 .25rem;font-size:1.15rem}
.phf-funnel .phf-method-steps p{margin:0;color:var(--phf-text)}

.phf-funnel details.phf-faq{border-top:1px solid var(--phf-border);padding:1.1rem 0}
.phf-funnel details.phf-faq:last-child{border-bottom:1px solid var(--phf-border)}
.phf-funnel details.phf-faq summary{font-weight:700;cursor:pointer;list-style:none;padding-right:2rem;position:relative;color:var(--phf-ink)}
.phf-funnel details.phf-faq summary::-webkit-details-marker{display:none}
.phf-funnel details.phf-faq summary:after{content:"+";position:absolute;right:.2rem;font:1.3rem var(--phf-heading-font);color:var(--phf-red)}
.phf-funnel details.phf-faq[open] summary:after{content:"\2212"}
.phf-funnel details.phf-faq p{color:var(--phf-text);padding-right:2rem;margin:.6rem 0 0}

.phf-funnel .phf-final-cta{text-align:center;background:var(--phf-ink);color:#fff;border-radius:8px}
.phf-funnel .phf-final-cta h2{color:#fff;max-width:820px;margin:0 auto 1.6rem}
.phf-funnel .phf-final-cta .phf-btn-ghost{background:transparent;border-color:rgba(255,255,255,.4);color:#fff}
.phf-funnel .phf-final-cta .phf-btn-ghost:hover{background:rgba(255,255,255,.1)}

@media(max-width:850px){
  .phf-funnel .phf-hero{grid-template-columns:1fr}
  .phf-funnel .phf-grid-2{grid-template-columns:1fr}
  .phf-funnel .phf-assessment{grid-template-columns:1fr}
  .phf-funnel .phf-section-heading{grid-template-columns:1fr;gap:1rem}
}
@media(max-width:560px){
  .phf-funnel .phf-option-grid,.phf-funnel .phf-two-cols{grid-template-columns:1fr}
  .phf-funnel .phf-form-actions{flex-direction:column-reverse}
  .phf-funnel .phf-form-actions .phf-btn{width:100%}
}
@media(prefers-reduced-motion:reduce){
  .phf-funnel *,.phf-funnel *:before,.phf-funnel *:after{animation:none!important;transition:none!important}
}
