/* Peterman Associates, Inc. — static rebuild of the former Wix site.
   Desktop dimensions below were measured from the original pages (980px column). */

:root {
  --page-width: 980px;
  --text: #605e5e;
  --text-dark: #2f2e2e;
  --link: #3d9be9;
  --panel: #ededed;
  --panel-border: #ccc;
  --rule: #cfcfcf;
  --btn: #207ea9;
  --btn-hover: #186285;
  --footer: #1c1c1c;
  --footer-text: #a0a09f;
  --dept-blue: #3588cc;
  --mail-link: #2b6ca3;
  /* The Wix site used DIN Next W01 Light (Wix-licensed, not reusable). Barlow is
     the closest free match: 400 ≈ DIN Next Light, 500 ≈ its synthesized bold. */
  --font: "Barlow", "DIN Next W01 Light", "Helvetica Neue", Arial, sans-serif;
  --bold: 500;
}

* { box-sizing: border-box; }

html { background: #2b2b2b url("../images/bg-texture.jpg") center top / cover fixed; }

body {
  margin: 0;
  font: 400 17px/1.2 var(--font);
  color: var(--text);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
b, strong { font-weight: var(--bold); }
p { margin: 0 0 1.2em; }   /* = one blank line, as on the Wix pages */

/* 20px bold sub-heading line used across pages (OQ groups, project names, etc.) */
.sub { display: block; font-size: 20px; font-weight: var(--bold); color: var(--text); }

hr.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }
hr.short-rule { border: 0; border-top: 1px solid var(--rule); width: 529px; max-width: 88%; margin: 0 auto; }

/* ---------- Header (150px white bar that fully contains the 227×134 logo) ---------- */
.site-header { background: #fff; position: sticky; top: 0; z-index: 20; height: 150px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.header-inner { max-width: var(--page-width); height: 150px; margin: 0 auto; position: relative; }
.brand { position: absolute; left: 52px; top: 8px; }
.brand img { width: 227px; }

.nav-toggle { display: none; }
.main-nav { position: absolute; left: 346px; top: 35px; }   /* two 40px rows, centered */
/* 5 items on top, 4 below, offset half a column so each lower item sits
   centered between two upper ones (10 half-width grid tracks). */
.main-nav ul {
  list-style: none; margin: 0; padding: 0; width: 619px;
  display: grid; grid-template-columns: repeat(10, 1fr); gap: 0;
}
.main-nav li { grid-column: span 2; }
.main-nav li:nth-child(-n+5) { border-bottom: 1px solid var(--rule); }  /* one continuous rule */
.main-nav li:nth-child(6) { grid-column: 2 / span 2; }
.main-nav a {
  display: block; padding: 9.5px 4px; text-align: center; white-space: nowrap;
  text-decoration: none; color: var(--text-dark); font-weight: var(--bold); font-size: 15px; line-height: 21px;
}
.main-nav li:nth-child(-n+5) a { padding-bottom: 8.5px; }
.main-nav a:hover { color: var(--link); }

/* ---------- Page shell ---------- */
.page { max-width: var(--page-width); margin: 0 auto; background: #fff; padding: 17px 19px 0 18px; }

/* Fade between pages: content fades, while the header, white column and footer stay put.
   Fades in with CSS on every load; site.js adds .page-leaving just before navigating. */
.hero, .content, .sidebar, .wide, .cert-logos { animation: page-in .35s ease-out; transition: opacity .2s ease-in; }
.page-leaving .hero, .page-leaving .content, .page-leaving .sidebar,
.page-leaving .wide, .page-leaving .cert-logos { opacity: 0; }
@keyframes page-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero, .content, .sidebar, .wide, .cert-logos { animation: none; transition: none; }
}

/* Hero slideshow: 943×320 grey frame around a 935×312 image */
.hero { background: var(--panel); padding: 4px; position: relative; overflow: hidden; }
.hero .slides { position: relative; aspect-ratio: 935 / 312; }
.hero .slides img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1s ease;
}
.hero .slides img.active { opacity: 1; }

/* Two-column body: 620px content + 27px gap + 292px sidebar */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 292px; gap: 27px; margin-top: 22px; padding-left: 4px; }
.page-home .layout { gap: 30px; margin-top: 21px; padding-left: 18px; }
.page-home .sidebar { margin-top: 6px; }

/* Full-width blocks that sit below the sidebar on the original */
.wide { padding-left: 4px; }

.page-title {
  font-size: 40px; font-weight: var(--bold); line-height: 51px; color: #000;  /* Barlow 40px ≈ DIN Next 42px */
  margin: 0 0 20px; padding-bottom: 7px; border-bottom: 1px solid var(--rule);
}
.content h2 { font-size: 20px; font-weight: var(--bold); line-height: 1.2; color: var(--text); margin: 1.2em 0 1em; }
.content h2:first-child { margin-top: 0; }
.content ul { margin: 0 0 1.2em; padding-left: 1.3em; }
.content li { margin: 0; }
.content ul.feature-list { padding-left: 1.5em; }
.content ul.feature-list li { font-weight: var(--bold); line-height: 1.7; }
.content a { color: inherit; }
.content a.mail-link { color: var(--mail-link); }
.content blockquote { margin: 0 0 1.2em; padding: 0 1em; font-style: italic; color: var(--text); }

/* Photo rows — sizes per page as on the original */
.photo-row { display: flex; gap: 12px; margin-bottom: 21px; }
.photo-row img { flex: none; object-fit: cover; border: 5px solid #fff; box-shadow: 0 0 0 1px var(--rule); }
.page-architectural .photo-row { gap: 12px; }
.page-architectural .photo-row img { width: 205px; height: 121px; }
.page-architectural .photo-row img:last-child { width: 192px; }
.page-engineering .photo-row { gap: 27px; margin-bottom: 24px; }
.page-engineering .photo-row img { width: 187px; height: 139px; }
.page-inspection .photo-row { gap: 5px; margin-bottom: 18px; }
.page-inspection .photo-row img { width: 153px; height: 115px; border-width: 0; box-shadow: none; }
.page-surveying .photo-row { gap: 25px; margin-top: 63px; }
.page-surveying .photo-row img { width: 297px; height: 154px; border-width: 8px; }
.page-title + .photo-row { margin-top: -2px; }

hr.eng-rule { width: 532px; margin: 19px 0 0 36px; }

.cred-group { margin-bottom: 1.2em; }
/* Inspection: certification groups as bulleted lists */
.cred-group { margin: 0 0 26px; }
.content .cred-group h3 {
  font-size: 20px; font-weight: var(--bold); line-height: 1.2; color: var(--text);
  margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--rule);
}
.content .cred-group ul { list-style: none; margin: 0; padding: 0; }
.content .cred-group ul.two-col { columns: 2; column-gap: 28px; }
.content .cred-group li {
  position: relative; padding-left: 16px; margin: 0 0 6px; line-height: 1.3;
  break-inside: avoid;
}
.content .cred-group li::before {
  content: ""; position: absolute; left: 2px; top: .5em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--dept-blue);
}

/* Land Development photos: below the sidebar, spanning the page */
.land-gallery { margin-top: 29px; }
.land-gallery hr.rule { width: 620px; }
.land-photos { position: relative; height: 546px; }
.land-photos img:first-child { position: absolute; left: 0; top: 4px; width: 375px; height: 546px; }
.land-photos img:last-child { position: absolute; left: 392px; top: 40px; width: 550px; height: 453px; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 13px; }
.page-home .sidebar { gap: 35px; }
.panel { background: var(--panel); border: 1px solid var(--panel-border); }
.panel h2 { text-align: center; font-weight: 400; font-size: 30px; line-height: 37px; margin: 0; color: var(--text); }

/* Contact form + Licensed In share one 292×744 box */
.side-box { padding: 9px 10px 20px 12px; min-height: 744px; }
.page-home .side-box { min-height: 750px; }

.contact-form label { display: block; font-size: 17px; line-height: 17px; color: var(--text-dark); margin: 15px 0 5px; }
.contact-form label:first-of-type { margin-top: 8px; }
.contact-form input, .contact-form textarea {
  display: block; width: 100%; height: 36px; border: 1px solid #ccc; background: #fff; padding: 6px 8px;
  font: inherit; font-size: 15px; color: var(--text-dark);
}
.contact-form textarea { height: 131px; resize: vertical; }
.contact-form .row-end { display: flex; justify-content: space-between; align-items: center; margin-top: 21px; gap: 10px; min-height: 33px; }
.contact-form button {
  background: var(--btn); color: #fff; border: 0; height: 33px; padding: 0 10px; font: inherit; font-size: 14px; cursor: pointer;
}
.contact-form button:hover { background: var(--btn-hover); }
.contact-form button:disabled { opacity: .6; cursor: wait; }
.form-status { font-size: 14px; color: var(--text-dark); }
.form-status.error { color: #b3261e; }
.hp-field { position: absolute; left: -9999px; }

hr.side-rule { border: 0; border-top: 1px solid var(--rule); margin: 15px 9px 0 7px; }
.licensed h2 { font-size: 34px; line-height: 41px; margin-top: 36px; }
.licensed p { text-align: center; font-size: 16px; line-height: 25px; margin: 0 0 25px; padding: 0 7px; }
.licensed h2 + p { margin-top: 32px; }
.licensed p:last-child { margin: 0; }
.licensed strong { font-size: 25px; font-weight: var(--bold); }

.odot-panel { text-align: center; padding: 13px 12px 20px; }
.odot-panel img { margin: 0 auto 10px; width: 115px; }
.page-home .odot-panel { min-height: 216px; }
.btn {
  display: inline-block; background: var(--link); color: #fff; text-decoration: none;
  padding: 10px 18px; font-size: 14px; font-weight: var(--bold); line-height: 1.4;
}
.btn:hover { background: #2a86d1; }
.odot-panel .btn { width: 100%; padding: 10px 6px; }
.odot-list { text-align: left; font-size: 16px; padding: 0 7px; }
.odot-list strong { display: block; font-size: 17px; font-weight: var(--bold); color: var(--text); margin-top: 1.2em; }
.odot-list strong:first-child { font-size: 20px; margin-top: 0; }
.page-about-us .odot-panel { min-height: 479px; }

/* ---------- Home ---------- */
.intro-logo { width: 344px; margin: 0 auto 12px; }
.page-home .content > hr.short-rule { margin-bottom: 21px; }
.page-home .content > a img { width: 547px; margin: 47px auto 0 !important; }
.departments { margin-top: 28px; }
.departments.wide { margin-top: 0; padding-left: 18px; max-width: 931px; }
.dept + .dept, .departments.wide .dept {
  margin-top: 18px; padding-top: 22px;
  background: linear-gradient(var(--rule), var(--rule)) no-repeat 38px 0 / 529px 1px;
}
.dept a { text-decoration: none; }
.dept h2 { display: flex; align-items: center; gap: 6px; font-size: 27px; font-weight: var(--bold); line-height: 1.2; color: var(--dept-blue); margin: 0 0 8px; }
.dept h2 img { width: 32px; height: 32px; }
.dept p { margin: 0; }
.dept a:hover h2 { text-decoration: underline; }

/* ---------- Accordions (Employment job listings, Engineering services) ---------- */
.accordion { margin: 1.4em 0; }
.acc { border: 1px solid #d3d3d3; border-radius: 4px; margin-top: 3px; background: #fff; }
.acc summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; font: 700 18px/1.3 Arial, Helvetica, sans-serif; color: #000;
  background: linear-gradient(#f6f6f6, #e6e6e6); border-radius: 3px;
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::before {
  content: ""; flex: none; border: 5px solid transparent; border-left-color: #888; border-right: 0;
  transition: transform .15s;
}
.acc summary:hover { background: linear-gradient(#fdfdfd, #ededed); }
.acc[open] summary { background: #fff; border-bottom: 1px solid #d3d3d3; border-radius: 3px 3px 0 0; }
.acc[open] summary::before { transform: rotate(90deg); border-left-color: #222; }
.acc summary:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.acc-body { padding: 18px 26px 6px 50px; font: 14px/1.7 Arial, Helvetica, sans-serif; color: var(--text); }
.acc-body p { margin: 0 0 1.3em; }
.acc-body strong { font-weight: 700; }   /* Arial has no 500 weight */
.content .acc-body ul { margin: 0 0 12px; padding-left: 18px; list-style: disc; }
.content .acc-body ul.two-col { columns: 2; column-gap: 28px; }
.content .acc-body li { break-inside: avoid; }
.page-employment .content > hr.rule { margin: 1.4em 0 30px; }

/* ---------- Contact page: 303px photo/address column, 285px text column ---------- */
.contact-cols { display: grid; grid-template-columns: 303px 285px; gap: 32px; margin-top: -1px; }
.contact-cols img { width: 303px; height: 207px; object-fit: cover; margin: 0 0 34px !important; }
.contact-cols address { font-style: normal; padding-left: 3px; }
.contact-cols > div:last-child p { margin-bottom: 102px; }   /* five blank lines on the original */

/* ---------- Certification logos ---------- */
.cert-logos { display: flex; align-items: center; gap: 90px; height: 116px; margin: 20px 0 0; padding: 0 0 25px 127px; box-sizing: content-box; }
.cert-logos img { width: 100px; }
.cert-logos img:nth-child(3) { margin-left: 12px; }   /* original spacing: 90 / 102 / 88px */
.cert-logos img:last-child { width: 109px; margin-left: -2px; }

/* ---------- Footer: 980×318 ---------- */
.site-footer { max-width: var(--page-width); height: 318px; margin: 0 auto; background: var(--footer); color: var(--footer-text); position: relative; }
.footer-inner > div { position: absolute; left: 324px; top: 21px; width: 300px; }
.site-footer h2 { margin: 0; font-size: 25px; font-weight: var(--bold); line-height: 30px; }
.site-footer p { margin: 0; font-size: 20px; line-height: 24px; }
.site-footer a[href^="tel:"] { text-decoration: none; }
.site-footer .spacer { height: 12px; }
.site-footer .btn {
  position: absolute; left: 0; top: 161px; width: 142px; height: 40px; padding: 0;
  font-size: 21px; line-height: 40px; text-align: center; color: #fff;
}
.site-footer iframe { position: absolute; left: 680px; top: 19px; width: 280px; height: 280px; border: 0; display: block; }
/* Social icons: 22px in from the left like the page content, top level with the address.
   The links have 7px padding, so the icons themselves sit at 22px/21px, 28px apart. */
.social { position: absolute; left: 15px; top: 14px; display: flex; gap: 14px; }
.social a { display: block; padding: 7px; line-height: 0; color: #7a7a79; transition: color .15s; }
.social a:hover, .social a:focus-visible { color: #d0d0cf; }
.social a:focus-visible { outline: 2px solid #d0d0cf; outline-offset: -2px; }

/* ---------- Narrower screens: switch to a fluid single-column layout ---------- */
@media (max-width: 1000px) {
  /* fixed full-screen backgrounds are slow on phones (and ignored by iOS) */
  html { background-attachment: scroll; background-size: auto; }
  .site-header { height: auto; }
  .header-inner { height: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; padding: 8px 16px; }
  .brand, .main-nav { position: static; }
  .brand img { width: 150px; }
  .nav-toggle {
    display: block; background: none; border: 1px solid var(--rule); padding: 8px 12px;
    font: inherit; font-size: 15px; color: var(--text-dark); cursor: pointer;
  }
  .main-nav { flex-basis: 100%; display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { grid-template-columns: 1fr; width: auto; }
  .main-nav li, .main-nav li:nth-child(6) { grid-column: auto; }
  .main-nav li, .main-nav li:nth-child(-n+5) { border-bottom: 0; border-top: 1px solid var(--rule); }
  .main-nav a, .main-nav li:nth-child(-n+5) a { text-align: left; padding: 12px 4px; }

  .page, .page-home .page { padding: 16px 16px 0; display: flex; flex-direction: column; }
  /* Flatten the two-column grid so the full-width blocks (home Surveying department,
     Land Development photos) stay with the page content and the sidebar follows them. */
  .layout, .page-home .layout { display: contents; }
  .content { margin-top: 22px; min-width: 0; }
  .sidebar, .page-home .sidebar { order: 1; margin-top: 30px; }
  .cert-logos { order: 2; }
  .wide, .departments.wide { padding-left: 0; }
  .side-box, .page-home .side-box, .page-about-us .odot-panel, .page-home .odot-panel { min-height: 0; }
  .side-box { padding: 12px 16px 20px; }

  .photo-row, .page-title + .photo-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px !important; margin-top: 0; }
  .photo-row img, .page-architectural .photo-row img:last-child { width: 100% !important; height: auto !important; aspect-ratio: 4 / 3; }
  .page-surveying .photo-row img { aspect-ratio: 2 / 1; }
  hr.eng-rule, .land-gallery hr.rule { width: auto; margin-left: 0; }
  .land-photos { position: static; height: auto; display: grid; gap: 16px; margin-top: 16px; }
  .land-photos img:first-child, .land-photos img:last-child { position: static; width: 100%; height: auto; }

  .contact-cols { grid-template-columns: 1fr 1fr; }
  .contact-cols img { width: 100%; height: auto; }

  .cert-logos { height: auto; padding: 0 0 25px; justify-content: space-around; gap: 20px; flex-wrap: wrap; }

  .site-footer { height: auto; padding: 28px 16px; }
  .footer-inner { display: grid; gap: 24px; }
  .footer-inner > div { position: static; width: auto; }
  .site-footer .btn { position: static; display: inline-block; margin-top: 18px; }
  .site-footer iframe { position: static; width: 100%; max-width: 420px; }
  .social { position: static; margin: -7px 0 0 -7px; }
}
@media (max-width: 600px) {
  .page-title { font-size: 34px; line-height: 1.2; }
  .contact-cols { grid-template-columns: 1fr; gap: 0; }
  .contact-cols > div:last-child p { margin-bottom: 1.2em; }
  .content .cred-group ul.two-col, .content .acc-body ul.two-col { columns: 1; }
  .page-home .content > a img { width: 100%; }
  .intro-logo { width: 240px; }
  .dept h2 { font-size: 23px; }
  .acc summary { font-size: 16px; }
  .acc-body { padding: 14px 16px 4px; }
}
