/* =====================================================================
   USA Publishing Studio — WordPress & Contact Form 7 Compatibility
   Loaded after style.css & fit.css
   ===================================================================== */

/* WordPress Admin Bar offset so sticky header never sits behind WP toolbar */
body.admin-bar .hdr {
  top: calc(32px + env(safe-area-inset-top, 0px));
}
@media screen and (max-width: 782px) {
  body.admin-bar .hdr {
    top: calc(46px + env(safe-area-inset-top, 0px));
  }
}

/* WordPress Screen Reader Text & Core Alignments */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
.alignwide { max-width: 1240px; margin-inline: auto; }
.alignfull { width: 100%; max-width: 100%; }

/* Keep WordPress wp_nav_menu clean inside footer */
.ftr ul.menu {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ftr-bar nav ul.menu {
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ftr-bar nav li + li {
  margin-top: 0;
}

/* Ensure Services inline page classes work seamlessly in WordPress */
.trust { border-bottom: 1px solid var(--line-light); padding-block: 28px; }
.trust-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.ti { display: flex; align-items: center; gap: 12px; }
.ti svg { width: 30px; height: 30px; flex: none; color: var(--gold-deep); }
.ti span { font-size: 13px; line-height: 1.35; color: var(--ink-soft); }
.ti b { display: block; font: 600 15px/1.3 var(--body); color: var(--ink); }
.gw-about { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
.gw-copy { display: grid; gap: 22px; }
.cf-grid { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line-dark); }
.cf { padding: clamp(24px, 2.6vw, 36px); display: grid; gap: 12px; align-content: start; border-right: 1px solid var(--line-dark); }
.cf:last-child { border-right: 0; }
.cf .ic { width: 32px; height: 32px; color: var(--gold); }
.cf h3 { font-size: 24px; }
.cf p { font-size: 15px; color: var(--mute-dark); }
@media (max-width: 980px) {
  .trust-row { grid-template-columns: 1fr 1fr; }
  .gw-about { grid-template-columns: 1fr; }
  .cf-grid { grid-template-columns: 1fr 1fr; }
  .cf:nth-child(2) { border-right: 0; }
  .cf:nth-child(-n+2) { border-bottom: 1px solid var(--line-dark); }
}
@media (max-width: 560px) {
  .trust-row, .cf-grid { grid-template-columns: 1fr; }
  .cf { border-right: 0; border-bottom: 1px solid var(--line-dark); }
  .cf:last-child { border-bottom: 0; }
}
.hero h1 em, .h2 em { padding-right: 0.1em; }
.svc[id] { scroll-margin-top: 100px; }

.dc-img.cv { background: radial-gradient(circle at 50% 40%, #1f6048 0%, #0B2B20 62%, #071a13 100%); }
.dc-img.cv img { inset: 12px 0 18px; height: calc(100% - 30px); object-fit: contain !important; filter: drop-shadow(0 10px 14px rgba(0,0,0,.55)); }
.center-sec { display: grid; justify-items: center; text-align: center; gap: 22px; max-width: 980px; }
.center-sec .lede { max-width: 70ch; margin-inline: auto; }
.chips-c { justify-content: center; max-width: 860px; margin-top: 6px; }
.chips-c li { border-color: #F6C53A; opacity: 0.9; color: var(--alabaster); }
.grid-c { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; --cols: 4; }
.grid-c.g3 { --cols: 3; }
.grid-c.g4 { --cols: 4; }
.grid-c > * { flex: 0 0 calc((100% - 22px * (var(--cols) - 1)) / var(--cols)); min-width: 0; }
.tc { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: clamp(22px, 2.2vw, 30px); background: #fff; border: 1.5px solid #F6C53A; border-radius: 6px; text-align: left; transition: transform .25s, box-shadow .25s; }
.tc:hover { transform: translateY(-4px); box-shadow: 0 22px 30px -22px rgba(11,43,32,.5); }
.tc .pic { width: 48px; height: 48px; background: var(--emerald); color: var(--gold); display: grid; place-items: center; border-radius: 50%; flex: none; }
.tc h3 { font-size: clamp(20px, 1.7vw, 23px); line-height: 1.2; }
.tc p { color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
.tc .vb { margin-top: auto; padding-top: 6px; white-space: nowrap; }
.grid-c.tall .tc, .grid-c.pil .tc { text-align: center; align-items: center; }

.dc { display: flex; flex-direction: column; background: var(--emerald); color: var(--alabaster); border: 1.5px solid #F6C53A; border-radius: 6px; overflow: hidden; scroll-margin-top: 100px; }
.dc-img { position: relative; aspect-ratio: 16/10; background: #07140f; border-bottom: 1.5px solid #F6C53A; }
.dc-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dc-ic { position: absolute; left: 14px; bottom: -22px; width: 44px; height: 44px; border-radius: 50%; background: var(--emerald); border: 1.5px solid #F6C53A; color: var(--gold); display: grid; place-items: center; }
.dc-body { display: flex; flex-direction: column; gap: 10px; padding: 34px 22px 22px; flex: 1; }
.dc h3 { font-size: clamp(21px, 1.8vw, 25px); line-height: 1.2; }
.dc p { color: var(--mute-dark); font-size: 15px; line-height: 1.55; }
.dc .svc-link { margin-top: auto; padding-top: 8px; color: var(--gold); }
.why-show { margin: 0 auto clamp(28px, 4vw, 44px); width: 100%; max-width: 720px; border: 1.5px solid #F6C53A; border-radius: 6px; overflow: hidden; background: var(--emerald); }
.why-show img { display: block; width: 100%; height: auto; }
.why-show figcaption { padding: 16px 20px; text-align: center; color: var(--alabaster); font: italic 400 clamp(19px, 2vw, 24px)/1.3 var(--display); }
.conf-box { border: 2px solid #F6C53A; border-radius: 8px; padding: clamp(28px, 4vw, 56px); background: rgba(0,0,0,.14); }
.conf-box .sec-head { margin-bottom: clamp(28px, 3.5vw, 44px); }
.conf-box .cf-grid { border: 0; gap: 20px; grid-template-columns: repeat(4, 1fr); }
.conf-box .cf { border: 1px solid rgba(246,197,58,.55); border-radius: 6px; text-align: center; justify-items: center; background: rgba(250,250,250,.04); }
.conf-box .cf:last-child { border-right: 1px solid rgba(246,197,58,.55); }

/* Hero Form Light Variant (used on Services & Single Service / Ghostwriting) */
.hero-form.qform.hero-form-light,
.page-template-page-services .hero-form,
.single-ups_service .hero-form {
  background: #fff;
  color: var(--ink);
  border: 2px solid #F6C53A;
  box-shadow: 0 30px 50px -28px rgba(0,0,0,.6);
}
.page-template-page-services .hero-form h3,
.single-ups_service .hero-form h3 { color: var(--emerald); }
.page-template-page-services .hero-form h3 em,
.single-ups_service .hero-form h3 em { color: var(--gold-deep); }
.page-template-page-services .hero-form .sub,
.single-ups_service .hero-form .sub { color: var(--ink-soft); }
.hero-form.qform.hero-form-light input,
.hero-form.qform.hero-form-light select,
.hero-form.qform.hero-form-light textarea,
.page-template-page-services .hero-form input,
.page-template-page-services .hero-form select,
.page-template-page-services .hero-form textarea,
.single-ups_service .hero-form input,
.single-ups_service .hero-form select,
.single-ups_service .hero-form textarea {
  color: var(--ink);
  background: #fff;
  border-color: rgba(11,43,32,.28);
}
.hero-form.qform.hero-form-light select:invalid,
.page-template-page-services .hero-form select:invalid,
.single-ups_service .hero-form select:invalid {
  color: #55635c;
}
.hero-form.qform.hero-form-light input::placeholder,
.hero-form.qform.hero-form-light textarea::placeholder,
.page-template-page-services .hero-form input::placeholder,
.page-template-page-services .hero-form textarea::placeholder,
.single-ups_service .hero-form input::placeholder,
.single-ups_service .hero-form textarea::placeholder { color: #6b7a72; }
.page-template-page-services .hero-form .field > svg.fi,
.single-ups_service .hero-form .field > svg.fi { color: var(--gold-deep); }
.page-template-page-services .hero-form .field > svg.chev,
.single-ups_service .hero-form .field > svg.chev { color: var(--emerald); }
.page-template-page-services .hero-form .fine,
.single-ups_service .hero-form .fine { color: var(--ink-soft); }

@media (max-width: 1100px) {
  .grid-c.g4, .grid-c.g3 { --cols: 2; }
  .conf-box .cf-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-c.g4, .grid-c.g3 { --cols: 1; }
  .conf-box .cf-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Contact Form 7 (.wpcf7) Integration Inside Custom Quote Shells
   ===================================================================== */
.ups-cf7-host .wpcf7 { width: 100%; }
.ups-cf7-host .wpcf7-form { display: grid; gap: inherit; }
.ups-cf7-host .wpcf7-form-control-wrap { display: block; width: 100%; position: relative; }
.ups-cf7-host .wpcf7-submit { cursor: pointer; }
.ups-cf7-host .wpcf7-spinner { margin: 8px auto 0; display: none; }
.ups-cf7-host form.submitting .wpcf7-spinner { display: block; }
.ups-cf7-host .wpcf7-not-valid-tip {
  display: block;
  font-size: 12px;
  color: #ffb9b2;
  margin-top: 4px;
}
.page-template-page-services .hero-form .wpcf7-not-valid-tip,
.single-ups_service .hero-form .wpcf7-not-valid-tip {
  color: #b3261e;
}
.ups-cf7-host .wpcf7-response-output {
  margin: 6px 0 0 !important;
  padding: 11px 14px !important;
  border-radius: 8px;
  font-size: 13.5px;
  border: 1px solid rgba(212, 175, 55, 0.55) !important;
  background: rgba(212, 175, 55, 0.14);
  color: var(--alabaster);
}
.page-template-page-services .hero-form .wpcf7-response-output,
.single-ups_service .hero-form .wpcf7-response-output {
  color: var(--ink);
  background: rgba(246, 197, 58, 0.16);
}
.ups-cf7-host .wpcf7 form.sent .wpcf7-response-output {
  border-color: #2ecc71 !important;
}
.ups-cf7-host .wpcf7 form.invalid .wpcf7-response-output,
.ups-cf7-host .wpcf7 form.aborted .wpcf7-response-output {
  border-color: #ff9d94 !important;
}
