/*
Theme Name: PREGOS Corporativo
Theme URI: https://pregos.cl/
Author: PREGOS
Description: Tema personalizado para PREGOS - Asesoría en Prevención de Riesgos.
Version: 1.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: pregos
*/
:root{--navy:#08294c;--deep:#061d36;--blue:#0878ee;--pale:#f2f7fc;--ink:#102c48;--muted:#5a6e80}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;font-family:Arial,Helvetica,sans-serif;color:var(--ink);line-height:1.55;background:#fff}a{text-decoration:none;color:inherit}button,input,select,textarea{font:inherit}img{max-width:100%;height:auto}.wrap{max-width:1160px;margin:auto;padding:0 24px}.site-header{background:white;position:sticky;top:0;z-index:20;box-shadow:0 2px 14px #102c4810}.head{min-height:83px;display:flex;align-items:center;gap:30px}.brand{display:flex;align-items:center;margin-right:auto}.brand img{width:204px;max-height:65px;object-fit:contain}.nav{display:flex;align-items:center;gap:28px;font-size:14px;font-weight:700}.nav a:hover,.footer a:hover{color:var(--blue)}.head-phone{font-size:14px;font-weight:700;white-space:nowrap}.btn{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:13px 23px;border-radius:7px;background:var(--blue);color:#fff;border:1px solid var(--blue);font-weight:700;font-size:13px;cursor:pointer;transition:transform .15s,background .15s}.btn:hover{background:#005ec4;transform:translateY(-1px)}.btn-outline{background:transparent;border-color:#ffffffb0}.btn-outline:hover{background:#ffffff1c}.menu-toggle{display:none;background:transparent;border:0;font-size:25px;color:var(--navy);cursor:pointer}.hero{background:linear-gradient(105deg,#051b32 0%,#083965 65%,#0a5595 100%);color:white;position:relative;overflow:hidden}.hero:after{content:"";position:absolute;width:560px;height:560px;border:100px solid #ffffff0a;border-radius:50%;right:-190px;top:-150px;pointer-events:none}.hero-inner{min-height:480px;display:grid;grid-template-columns:1.3fr .7fr;align-items:center;gap:50px;padding-top:72px;padding-bottom:72px;position:relative;z-index:1}.eyebrow{font-size:12px;letter-spacing:2px;font-weight:800;text-transform:uppercase;color:#69baff}.hero h1{font-size:clamp(35px,4.4vw,59px);line-height:1.09;letter-spacing:-1.8px;margin:17px 0 21px;max-width:780px}.hero h1 em{font-style:normal;color:#42a5ff}.hero p{font-size:17px;max-width:560px;color:#d9e8f6}.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:29px}.hero-panel{border:1px solid #ffffff40;border-radius:22px;padding:36px;background:linear-gradient(145deg,#ffffff1c,#ffffff05);box-shadow:0 22px 65px #0003}.hero-panel .big{font-size:76px;font-weight:800;line-height:1;color:white}.hero-panel p{margin:12px 0 0}.hero-panel strong{color:#77c4ff}.section{padding:80px 0}.section-header{margin-bottom:30px}.section-header h2,.emergency h2,.about h2,.contact h2{font-size:clamp(29px,3vw,42px);letter-spacing:-1px;line-height:1.16;margin:8px 0 12px}.section-header h2 span,.emergency h2 span,.about h2 span{color:var(--blue)}.section-header p{color:var(--muted);margin:0}.services-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.service{border-radius:13px;background:var(--pale);min-height:155px;padding:25px 20px;display:flex;flex-direction:column;justify-content:space-between;border:1px solid #e8f0f8}.service svg{width:33px;height:33px;color:var(--blue);stroke-width:1.7}.service h3{font-size:16px;line-height:1.3;margin:19px 0 0}.emergency{background:#edf5fd}.emergency-inner{display:grid;grid-template-columns:1fr 1.15fr;gap:55px;align-items:center}.building-art{min-height:310px;border-radius:20px;background:linear-gradient(135deg,#d6e9f8,#f7fbff);display:grid;place-items:center;overflow:hidden;position:relative}.building-art svg{width:205px;height:205px;color:#3e91d5;stroke-width:1}.building-art:after{content:"";position:absolute;bottom:-100px;left:-70px;width:420px;height:180px;border-radius:50%;background:#75b9e51f}.emergency p,.about p{color:var(--muted);max-width:540px}.about-inner{display:grid;grid-template-columns:1fr 1fr;gap:70px;align-items:center}.stats{display:flex;gap:15px}.stat{flex:1;background:var(--pale);padding:25px 15px;border-radius:12px;text-align:center}.stat strong{display:block;color:var(--blue);font-size:32px}.stat small{font-size:13px;font-weight:700}.contact{background:linear-gradient(120deg,#061e36,#0a426e);color:white}.contact-inner{display:grid;grid-template-columns:.8fr 1.2fr;gap:65px;align-items:start}.contact p{color:#d8e7f4}.contact-lines{display:grid;gap:12px;margin-top:25px}.contact-lines a{overflow-wrap:anywhere}.form-card{background:white;color:var(--ink);padding:30px;border-radius:14px;box-shadow:0 18px 40px #0002}.form-card h3{margin:0 0 18px;font-size:23px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}.field{width:100%;padding:12px 13px;border:1px solid #d9e2ec;border-radius:6px;background:#fff;color:var(--ink)}.full{grid-column:1/-1}textarea.field{resize:vertical;min-height:105px}.form-card .btn{width:100%;margin-top:13px}.form-status{margin:12px 0 0;color:#145a35;font-weight:700}.footer{background:#f8fbff;border-top:1px solid #e6edf4}.footer-inner{padding-top:28px;padding-bottom:28px;display:flex;align-items:center;justify-content:space-between;gap:24px}.footer img{width:160px}.footer small{color:var(--muted)}.skip-link{position:absolute;left:-9999px;top:0;background:white;color:black;padding:10px;z-index:99}.skip-link:focus{left:10px}.screen-reader-text{position:absolute;clip:rect(1px,1px,1px,1px);width:1px;height:1px;overflow:hidden}.page-content{padding:70px 24px;max-width:1000px;margin:auto}@media(max-width:960px){.head{gap:18px}.head-phone{display:none}.nav{gap:16px}.services-grid{grid-template-columns:repeat(2,1fr)}.hero-inner{grid-template-columns:1fr .5fr}.hero-panel{padding:24px}.hero-panel .big{font-size:56px}}@media(max-width:720px){.wrap{padding-left:20px;padding-right:20px}.head{min-height:70px}.brand img{width:164px}.menu-toggle{display:block;margin-left:auto}.nav{display:none;position:absolute;top:70px;left:0;right:0;background:white;box-shadow:0 10px 20px #0002;padding:20px;flex-direction:column;align-items:stretch;gap:18px}.nav.open{display:flex}.header-cta{display:none}.hero-inner{grid-template-columns:1fr;min-height:0;padding-top:65px;padding-bottom:65px;gap:30px}.hero h1{font-size:39px}.hero-panel{display:none}.section{padding:60px 0}.services-grid{gap:10px}.service{min-height:133px;padding:17px 14px}.service h3{font-size:14px}.service svg{width:28px;height:28px}.emergency-inner,.about-inner,.contact-inner{grid-template-columns:1fr;gap:28px}.building-art{min-height:220px}.building-art svg{width:150px;height:150px}.stats{gap:8px}.stat{padding:18px 8px}.stat strong{font-size:26px}.fields{grid-template-columns:1fr}.footer-inner{flex-direction:column;text-align:center}.form-card{padding:22px}.contact-inner{gap:35px}}

/* PREGOS – actualización visual */
.hero-inner{grid-template-columns:minmax(0,1fr);max-width:1160px}.hero h1{max-width:920px}.hero-actions .btn{width:245px;min-height:54px}.hero-actions .wa-icon{font-size:19px;line-height:1}.section#servicios{background:#f4f8fb}.section#servicios .section-header{text-align:center;margin-bottom:36px}.service{background:#fff;border:1px solid #dce6ee;border-radius:15px;min-height:220px;align-items:center;justify-content:flex-start;text-align:center;padding:26px 17px;box-shadow:0 6px 20px #102c4809;transition:transform .2s,box-shadow .2s}.service:hover{transform:translateY(-3px);box-shadow:0 14px 28px #102c4815}.service svg{background:#eaf5fb;width:58px;height:58px;padding:15px;border-radius:15px;flex-shrink:0}.service h3{color:#0676bc;margin:17px 0 9px;font-size:16px}.service p{font-size:13px;color:#53687d;line-height:1.5;margin:0}.section-photo{border-radius:18px;overflow:hidden;min-height:300px}.section-photo img{width:100%;height:100%;min-height:300px;max-height:370px;object-fit:cover;display:block}.about-inner{grid-template-columns:1fr 1fr}.about .section-photo{order:2}@media(max-width:960px){.services-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:720px){.hero-actions .btn{width:100%;max-width:360px}.services-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.service{min-height:225px;padding:20px 10px}.service h3{font-size:14px}.service p{font-size:12px}.section-photo,.section-photo img{min-height:230px}.about .section-photo{order:0}}@media(max-width:390px){.services-grid{grid-template-columns:1fr}.service{min-height:0}}

/* PREGOS v1.2 — mejoras responsive y enlaces de servicios */
.phone-icon{display:inline-block;width:17px;height:17px;vertical-align:-3px;color:inherit;flex-shrink:0}
.head-phone{display:inline-flex;align-items:center;gap:7px}
.contact-lines a{display:inline-flex;align-items:center;gap:9px;width:fit-content}
.contact-lines .phone-icon{color:#fff;width:19px;height:19px}
.hero-actions{align-items:stretch}
.hero-actions .btn{width:260px;min-width:260px;min-height:56px;padding:13px 15px;white-space:nowrap}
.hero-actions .wa-icon{display:block;width:21px;height:21px;flex-shrink:0;color:#fff}
.service{color:var(--ink);cursor:pointer}
.service:focus-visible{outline:3px solid #0878ee;outline-offset:3px}
.service-hint{display:block;margin-top:auto;padding-top:15px;color:#0676bc;font-size:12px;font-weight:700}
.section-photo{border-radius:16px;overflow:hidden}
.section-photo img{border-radius:16px}
@media(max-width:720px){.hero-actions{display:flex;flex-direction:column;align-items:stretch}.hero-actions .btn{width:100%;min-width:0;max-width:none;min-height:56px}.service-hint{font-size:11px}}

/* PREGOS v1.3: tamaño seguro del auricular y recorte real de fotografías */
.site-header .head-phone { display:inline-flex; align-items:center; gap:8px; flex-shrink:0; white-space:nowrap; line-height:1.2; }
.site-header .head-phone svg.phone-icon,
.contact .contact-lines svg.phone-icon {
  display:inline-block !important;
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  min-height:18px !important;
  max-width:18px !important;
  max-height:18px !important;
  flex:0 0 18px !important;
  vertical-align:middle !important;
  overflow:visible;
}
.contact .contact-lines a { display:inline-flex; align-items:center; gap:9px; }
.section-photo, .emergency .section-photo, .about .section-photo {
  border-radius:20px !important;
  overflow:hidden !important;
  clip-path:inset(0 round 20px);
  isolation:isolate;
}
.section-photo > img, .emergency .section-photo > img, .about .section-photo > img {
  display:block;
  width:100%;
  border-radius:20px !important;
  clip-path:inset(0 round 20px);
}
@media (max-width:960px) {
  .site-header .head-phone { display:none; }
}

/* v1.4: portada amplia y CTA de consulta */
@media(min-width:721px){.hero-inner{min-height:650px;padding-top:100px;padding-bottom:100px}}
.hero-actions .btn{width:300px;min-width:300px}
@media(max-width:720px){.hero-actions .btn{width:100%;min-width:0;max-width:none}}

/* v1.5: portada equilibrada */
@media(min-width:721px){.hero-inner{min-height:535px;padding-top:72px;padding-bottom:72px}.hero:after{opacity:.48;width:490px;height:490px;right:-230px;top:-145px;border-width:75px}}
.hero-actions .btn{width:290px;min-width:290px;min-height:56px}
@media(max-width:720px){.hero-inner{padding-top:58px;padding-bottom:58px}.hero-actions .btn{width:100%;min-width:0;max-width:none}}

/* v1.6 — portada fotográfica, texto y botones HTML independientes */
.hero{background:#072e53;isolation:isolate}
.hero::before{content:"";position:absolute;inset:0 0 0 42%;background-image:url('assets/portada-profesional.jpg');background-size:cover;background-position:center 38%;z-index:-2}
.hero::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,#061d36 0%,#073359 34%,rgba(7,48,83,.94) 49%,rgba(7,48,83,.43) 69%,rgba(7,48,83,.02) 100%);border:0;border-radius:0;width:auto;height:auto;right:0;top:0;opacity:1;z-index:-1}
.hero-inner{max-width:1160px;min-height:570px;display:flex;align-items:center;padding-top:75px;padding-bottom:75px}
.hero-inner>div{width:100%;max-width:770px}
.hero h1{font-size:clamp(38px,4vw,58px);max-width:770px;line-height:1.12}
.hero p{max-width:580px}
.hero-actions .btn{width:290px;min-width:290px}
@media(max-width:720px){
.hero::before{inset:0;background-position:63% center;opacity:.42}
.hero::after{background:linear-gradient(90deg,rgba(5,26,49,.96),rgba(6,40,72,.83))}
.hero-inner{min-height:0;padding-top:70px;padding-bottom:75px}
.hero h1{font-size:clamp(34px,8vw,42px);letter-spacing:-1px}
.hero-actions .btn{width:100%;min-width:0}
}

/* v1.7 — tarjetas de servicios aprobadas: sobrias, completas y clicables */
#servicios{background:#f4f8fb}
#servicios .service{background:#fff;border:1px solid #dce6ee;border-radius:18px;box-shadow:0 7px 22px rgba(16,44,72,.06);padding:29px 19px;min-height:235px;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;text-align:center;gap:0;color:#102c48;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
#servicios .service svg{width:60px;height:60px;padding:16px;border-radius:16px;background:#eaf5fb;color:#0878ee;flex:none}
#servicios .service h3{color:#102c48;font-size:16px;font-weight:700;line-height:1.35;margin:19px 0 10px}
#servicios .service p{color:#5a6e80;font-size:13px;line-height:1.55;margin:0}
#servicios .service:hover{transform:translateY(-3px);box-shadow:0 15px 32px rgba(16,44,72,.12);border-color:#bdd8eb}
#servicios .service:focus-visible{outline:3px solid #0878ee;outline-offset:3px}
@media(max-width:720px){#servicios .service{min-height:230px;padding:22px 12px}#servicios .service svg{width:52px;height:52px;padding:13px}#servicios .service h3{font-size:14px}#servicios .service p{font-size:12px}}
@media(max-width:390px){#servicios .service{min-height:0;padding:24px 18px}}

/* v1.8 — ajustes exclusivamente para teléfonos; escritorio intacto */
@media (max-width:720px) {
  /* Portada: fotografía visible en la mitad superior y lectura cómoda abajo. */
  .hero::before {
    inset:0;
    background-size: auto 68%;
    background-repeat:no-repeat;
    background-position: 62% top;
    opacity:1;
  }
  .hero::after {
    background:linear-gradient(to bottom,
      rgba(5,27,50,.08) 0%,
      rgba(5,27,50,.12) 22%,
      rgba(5,27,50,.78) 42%,
      #061d36 62%,
      #061d36 100%);
  }
  .hero-inner {
    min-height:0;
    padding-top:clamp(250px,75vw,370px);
    padding-bottom:48px;
    align-items:flex-end;
  }
  .hero h1{font-size:clamp(32px,8vw,40px);line-height:1.13}
  .hero-actions{gap:12px}
  .hero-actions .btn{width:100%;max-width:none;min-height:58px}
  /* Quiénes somos: columna completa y foto debajo del texto. */
  .about .about-inner{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:25px;
    align-items:start;
  }
  .about .about-inner > div:first-child{min-width:0;order:1}
  .about .about-inner > .section-photo{min-width:0;width:100%;order:2;min-height:0}
  .about .section-photo img{
    width:100%;height:auto;min-height:0;max-height:none;
    aspect-ratio:4/3;object-fit:cover;object-position:center;
  }
  .about h2{font-size:clamp(30px,8vw,39px)}
  .about p{max-width:none;font-size:16px;line-height:1.7}
}

/* PREGOS v1.9 — confirmación de envío legible y temporal */
.form-card .form-status--success{display:flex;align-items:flex-start;gap:12px;margin:0 0 18px;padding:14px 15px;background:#eef6ff;border:1px solid #b7d9f7;border-radius:10px;color:#102c48;font-size:15px;line-height:1.45;opacity:1;transition:opacity .25s ease}
.form-card .form-status--success strong{display:block;color:#07599b;font-size:15px;letter-spacing:.035em;margin-bottom:3px}
.form-card .form-status--success span:not(.form-status__check){display:block;color:#213e57;font-weight:400}
.form-card .form-status__check{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#0878ee;color:white;font-weight:800;font-size:18px}
.form-card .form-status--success.is-hiding{opacity:0}
