/* shared.css — IT Integration: cacheable styles shared across all pages
 * Contains: CSS vars, body reset, TwentyTwentyFive overrides, header, CTA, footer.
 * Enqueued via functions.php — cached after first page load.
 */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --pi-primary: #2563eb;
  --pi-primary-dark: #1d4ed8;
  --pi-primary-light: #dbeafe;
  --pi-accent: #f97316;
  --pi-accent-hover: #ea580c;
  --pi-dark: #0f172a;
  --pi-dark-light: #1e293b;
  --pi-text: #1e293b;
  --pi-text-secondary: #64748b;
  --pi-text-light: #64748b;
  --pi-bg-light: #f8fafc;
  --pi-bg-white: #ffffff;
  --pi-border: #e2e8f0;
  --pi-radius: 16px;
  --pi-radius-sm: 8px;
  --pi-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --pi-shadow-hover: 0 8px 32px rgba(0,0,0,0.12);
  --pi-max-width: 1200px;
  --pi-content-width: 800px;
  --pi-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== RESET & BASE ===== */
body {
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--pi-font) !important;
  font-weight: 400 !important;
  color: var(--pi-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  --wp--style--root--padding-top: 0px !important;
  --wp--style--root--padding-right: 0px !important;
  --wp--style--root--padding-bottom: 0px !important;
  --wp--style--root--padding-left: 0px !important;
}
.wp-site-blocks { padding: 0 !important; }

/* Override TwentyTwentyFive parent theme globals */
body, .wp-site-blocks, main {
  font-family: var(--pi-font) !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  line-height: 1.6 !important;
}
main { max-width: none !important; }
main > * {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--pi-font) !important;
  letter-spacing: -0.015em !important;
}
a:where(:not(.wp-element-button)) {
  text-decoration: none !important;
}
:where(.wp-site-blocks) > * { margin-block-start: 0 !important; }
.is-layout-constrained > * { max-width: none !important; }

/* ===== HEADER ===== */
.pi-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--pi-dark);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-family: var(--pi-font);
}
body.admin-bar .pi-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .pi-header { top: 46px; } }

.pi-header__inner {
  max-width: var(--pi-max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 32px;
}
.pi-header__logo {
  font-size: 1.375rem;
  font-weight: 800;
  color: #fff !important;
  text-decoration: none !important;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.pi-header__nav {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pi-header__nav a {
  color: rgba(255,255,255,0.75) !important;
  text-decoration: none !important;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}
.pi-header__nav a:hover { color: #fff !important; }
.pi-header__nav a.active { color: #fff !important; }
.pi-header__cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background: var(--pi-accent);
  color: #431407 !important;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--pi-radius-sm);
  text-decoration: none !important;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.pi-header__cta:hover {
  background: var(--pi-accent-hover);
  color: #431407 !important;
  transform: translateY(-1px);
}
.pi-header__toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  color: #fff;
}
.pi-header__toggle svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 2; }

@media (max-width: 900px) {
  .pi-header__inner { gap: 12px; }
  .pi-header__toggle { display: block; }
  .pi-header__nav { display: none; }
  .pi-header__cta { margin-left: auto; padding: 10px 16px; font-size: 0.8125rem; }
  .pi-header__inner.open .pi-header__nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--pi-dark);
    padding: 16px 24px 24px;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    z-index: 999;
  }
  .pi-header__inner.open .pi-header__nav a {
    display: block;
    padding: 12px 0;
    min-height: 44px;
    line-height: 20px;
  }
  body.admin-bar .pi-header__inner.open .pi-header__nav { top: 64px; }
}

/* ===== CTA SECTION ===== */
.pi-post-cta {
  background:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.03) 1px, transparent 0),
    linear-gradient(135deg, var(--pi-dark) 0%, var(--pi-dark-light) 100%);
  background-size: 32px 32px, 100% 100%;
  padding: 80px 0;
  color: #fff;
  text-align: center;
}
.pi-post-cta .pi-container {
  max-width: var(--pi-max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.pi-post-cta__title {
  font-size: 2rem !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  margin-bottom: 12px;
  letter-spacing: -0.02em !important;
}
.pi-post-cta__sub {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.pi-post-cta__form {
  max-width: 560px;
  margin: 0 auto;
  background: var(--pi-bg-white);
  border-radius: var(--pi-radius);
  padding: 36px 32px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  color: var(--pi-text);
  text-align: left;
}

/* ===== FOOTER ===== */
.pi-page-footer {
  background: var(--pi-dark);
  color: rgba(255,255,255,0.6);
  font-family: var(--pi-font);
  font-size: 0.875rem;
  line-height: 1.6;
}
.pi-page-footer a {
  color: rgba(255,255,255,0.6) !important;
  text-decoration: none !important;
  transition: color 0.2s;
}
.pi-page-footer a:hover { color: #fff !important; }
.pi-footer__top {
  max-width: var(--pi-max-width);
  margin: 0 auto;
  padding: 56px 24px 40px;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 40px;
}
.pi-footer__col h4 {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 16px;
}
.pi-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pi-footer__contact p { margin: 0 0 8px; }
.pi-footer__contact strong { color: #fff; }
.pi-footer__bottom {
  max-width: var(--pi-max-width);
  margin: 0 auto;
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .pi-post-cta { padding: 56px 0; }
  .pi-post-cta__title { font-size: 1.5rem !important; }
  .pi-post-cta__sub { font-size: 1rem; margin-bottom: 28px; }
  .pi-post-cta__form { padding: 24px 20px; }
  .pi-footer__top { grid-template-columns: 1fr; gap: 32px; padding: 40px 24px 32px; }
}

@media (max-width: 480px) {
  .pi-post-cta .pi-container { padding: 0 16px; }
  .pi-post-cta__form { padding: 20px 16px; border-radius: 12px; }
  .pi-footer__top { padding: 32px 16px 24px; }
  .pi-footer__bottom { padding: 16px; }
}

/* Prevent horizontal overflow */
html { overflow-x: hidden; scroll-behavior: smooth; }
