/* 3i Staffing — classic corporate layout (3mesolutions.com–style: gray chrome, blue header, white content) */
:root {
  --header-bg: #1a4480;
  --header-solid: #214a84;
  --header-border: #0f2847;
  --accent: #c9a227;
  --text: #222222;
  --muted: #555555;
  --page-bg: #cccccc;
  --bg: #e8e8e8;
  --card: #ffffff;
  --sidebar: #f4f4f4;
  --border-classic: #b3b3b3;
  --link: #003399;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--page-bg);
}

a {
  color: var(--link);
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Reference-style header: logo + links in primary nav, full-width blue bar (cf. 3mesolutions.com) */
.site-header {
  position: relative;
  color: #fff;
}

.nav-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.header-nav-wrap {
  background: linear-gradient(180deg, #1b4f86 0%, #123a62 48%, #0d2f52 100%);
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  overflow: visible;
}

.header-nav-wrap .header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.4rem 1rem 0.45rem;
}

/* Logo lives inside primary-nav (same landmark as main links) */
.primary-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
  overflow: visible;
}

.primary-nav .logo {
  line-height: 0;
  flex: 0 0 auto;
}

.primary-nav .logo a {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.primary-nav .logo a:hover {
  opacity: 0.92;
  text-decoration: none;
}

.primary-nav .logo span {
  color: var(--accent);
}

.primary-nav .logo img {
  display: block;
  height: 44px;
  width: auto;
  max-width: min(200px, 48vw);
}

.nav-toggle-label {
  display: none;
  cursor: pointer;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.12);
  padding: 0.35rem 0.65rem;
  border-radius: 2px;
  flex: 0 0 auto;
  margin-left: auto;
}

.nav-toggle-label:hover {
  background: rgba(0, 0, 0, 0.2);
}

.primary-nav > ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  flex: 1 1 auto;
  justify-content: center;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.primary-nav > ul > li {
  display: flex;
  align-items: center;
}

/* Pipe separators between top-level links */
.primary-nav > ul > li:not(:last-child)::after {
  content: "|";
  color: rgba(255, 255, 255, 0.45);
  font-weight: 400;
  font-size: 0.85rem;
  padding: 0 0.45rem;
  user-select: none;
  pointer-events: none;
}

/* Services — dropdown list */
.primary-nav-item--services {
  position: relative;
}

.primary-nav-item--services > a {
  white-space: nowrap;
}

.primary-nav-submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0;
  padding: 0.4rem 0;
  list-style: none;
  min-width: min(320px, calc(100vw - 2rem));
  background: #ffffff;
  border: 1px solid var(--border-classic);
  border-top: 3px solid var(--accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  z-index: 200;
  flex-direction: column;
  align-items: stretch;
}

.primary-nav-item--services:hover .primary-nav-submenu,
.primary-nav-item--services:focus-within .primary-nav-submenu {
  display: flex;
}

.primary-nav-submenu li {
  display: block;
}

.primary-nav-submenu a {
  color: var(--link) !important;
  padding: 0.45rem 1rem !important;
  font-size: 0.86rem !important;
  display: block;
  text-decoration: none;
}

.primary-nav-submenu a:hover,
.primary-nav-submenu a:focus {
  background: var(--sidebar);
  text-decoration: none;
}

.primary-nav-submenu a.active {
  color: var(--header-solid) !important;
  font-weight: 700;
  background: rgba(201, 162, 39, 0.12);
}

.primary-nav a {
  color: #ffffff;
  text-decoration: none;
  padding: 0.35rem 0.15rem;
  font-size: 0.88rem;
  font-weight: 400;
}

.primary-nav a:hover,
.primary-nav a:focus {
  color: #fff;
  text-decoration: underline;
}

.primary-nav a.active {
  color: #ffeb99;
  font-weight: 700;
}

/* Home banner: full browser width (content below stays max-width) */
.hero.hero-slider {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.35rem 0 0.5rem;
  box-sizing: border-box;
}

/* Hero image slider — professional: calm motion, depth, glass controls */
.hero-slider {
  position: relative;
  padding-bottom: 0.35rem;
  width: 100%;
}

@keyframes heroKenBurns {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.035);
  }
}

.hero-slider-viewport {
  border-radius: 0;
  overflow: hidden;
  background: #1a1a1a;
  border: none;
  border-bottom: 1px solid var(--border-classic);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Banner height scales with viewport width and height */
.hero-slider-slides {
  position: relative;
  width: 100%;
  height: clamp(160px, min(32vw, 38vh), 520px);
}

@media (max-width: 720px) {
  .hero-slider-slides {
    height: clamp(140px, min(42vw, 32vh), 280px);
  }
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    visibility 0.7s linear;
  z-index: 0;
}

.hero-slide.is-active {
  opacity: 1;
  visibility: visible;
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-slide.is-active {
    transition: none;
  }

  .hero-slider-viewport {
    box-shadow: none;
  }
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  position: relative;
  z-index: 0;
}

/* Subtle cinematic drift — slow, barely noticeable */
.hero-slide.is-active img {
  animation: heroKenBurns 18s ease-in-out infinite alternate;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slide.is-active img {
    animation: none;
  }
}

.hero-slide-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 0.65rem clamp(1rem, 4vw, 3rem) 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(26, 68, 128, 0.88);
  color: #ffffff;
}

.hero-slide-caption h1 {
  margin: 0 0 0.15rem;
  font-size: clamp(1rem, 2.4vw, 1.28rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.2;
  font-family: Arial, Helvetica, sans-serif;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
}

.hero-slide-caption p {
  margin: 0;
  font-size: clamp(0.75rem, 1.65vw, 0.88rem);
  line-height: 1.35;
  max-width: 40rem;
  color: #f0f4f8;
  text-shadow: none;
}

.hero-slide-kicker {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  margin-bottom: 0.2rem !important;
}

.hero-slide-title {
  font-size: clamp(0.95rem, 2.2vw, 1.2rem) !important;
  font-weight: 700;
  line-height: 1.2;
}

.hero-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 2rem;
  height: 2rem;
  border: 1px solid #666666;
  border-radius: 2px;
  background: rgba(240, 240, 240, 0.92);
  color: #214a84;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.hero-slider-arrow:hover,
.hero-slider-arrow:focus-visible {
  background: #ffffff;
  border-color: var(--accent);
  outline: none;
}

.hero-slider-arrow:focus-visible {
  box-shadow: 0 0 0 1px var(--header-solid);
}

.hero-slider-arrow:active {
  transform: translateY(-50%) scale(0.96);
}

.hero-slider-prev {
  left: clamp(0.5rem, 2.5vw, 1.5rem);
}

.hero-slider-next {
  right: clamp(0.5rem, 2.5vw, 1.5rem);
}

.hero-slider-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.5rem clamp(1rem, 3vw, 2rem) 0;
}

.hero-slider-dots button {
  width: 6px;
  height: 6px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.22);
  cursor: pointer;
  transition:
    width 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    background 0.25s ease,
    opacity 0.25s ease;
  opacity: 0.75;
}

.hero-slider-dots button[aria-selected="true"] {
  width: 1.35rem;
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.hero-slider-dots button:hover,
.hero-slider-dots button:focus-visible {
  background: rgba(15, 23, 42, 0.4);
  opacity: 1;
  outline: none;
}

.hero-slider-dots button[aria-selected="true"]:hover {
  background: #d4af37;
}

.hero-strip {
  background: linear-gradient(120deg, #1e3a5f 0%, #2563eb 45%, #0f172a 100%);
  color: #f8fafc;
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  min-height: 140px;
  display: flex;
  align-items: center;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.2);
}

.hero-strip h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.hero-dots {
  margin-top: 0.65rem;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.hero-dots span {
  display: inline-block;
  width: 1.5rem;
  height: 0.35rem;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 2px;
}

.hero-dots span:first-child {
  background: var(--accent);
}

/* Service tiles — image + title (reference-style row of links) */
.service-grid {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.35rem 1rem 0.75rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 0.5rem;
}

@media (min-width: 900px) {
  .service-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.service-tile {
  background: var(--card);
  border: 1px solid var(--border-classic);
  border-radius: 2px;
  overflow: hidden;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.service-tile:hover {
  border-color: var(--header-solid);
  box-shadow: 0 6px 16px rgba(15, 40, 80, 0.12);
  transform: translateY(-2px);
}

.service-tile-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.service-tile-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.service-tile-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg);
}

.service-tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.25s ease;
}

.service-tile:hover .service-tile-media img {
  transform: scale(1.04);
}

.service-tile-heading {
  margin: 0;
  padding: 0.5rem 0.35rem 0.6rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.2;
  color: var(--header-solid);
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

.service-tile-link:hover .service-tile-heading {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 1px;
}

.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

/* —— Job seekers & CTAs —— */
.lead {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 1rem;
}

.section-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--header-solid);
  margin-bottom: 0.35rem;
}

.highlight-box {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2f7 100%);
  border: 1px solid var(--border-classic);
  border-left: 4px solid var(--accent);
  border-radius: 2px;
}

.jobseeker-cta {
  width: 100%;
  background: linear-gradient(180deg, #f0f4fa 0%, #e2e8f0 100%);
  border-top: 1px solid var(--border-classic);
  border-bottom: 1px solid var(--border-classic);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.jobseeker-cta__inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1.25rem 1rem 1.35rem;
  display: grid;
  gap: 1rem;
}

@media (min-width: 720px) {
  .jobseeker-cta__inner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

.jobseeker-cta__copy h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  color: var(--header-solid);
  font-weight: 700;
}

.jobseeker-cta__copy p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  max-width: 36rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
}

a.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 3px;
  border: 1px solid transparent;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

a.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a.btn-primary {
  background: var(--header-solid);
  color: #fff !important;
  border-color: var(--header-border);
  box-shadow: 0 2px 6px rgba(15, 40, 70, 0.25);
}

a.btn-primary:hover {
  background: #163a66;
  box-shadow: 0 4px 12px rgba(15, 40, 70, 0.3);
  transform: translateY(-1px);
}

a.btn-secondary {
  background: #fff;
  color: var(--header-solid) !important;
  border-color: var(--border-classic);
}

a.btn-secondary:hover {
  border-color: var(--header-solid);
  background: #fafbfc;
  transform: translateY(-1px);
}

.step-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

@media (min-width: 640px) {
  .step-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step-card {
  position: relative;
  padding: 1rem 0.9rem 1rem 2.75rem;
  background: var(--card);
  border: 1px solid var(--border-classic);
  border-radius: 3px;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.step-card:hover {
  border-color: var(--header-solid);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
}

.step-card__num {
  position: absolute;
  left: 0.65rem;
  top: 0.85rem;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--header-solid);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.step-card h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  color: var(--header-solid);
}

.step-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.faq-section {
  margin: 1.25rem 0 0.5rem;
}

.faq-section > h2 {
  margin-bottom: 0.65rem;
}

.faq-item {
  border: 1px solid var(--border-classic);
  border-radius: 3px;
  margin-bottom: 0.45rem;
  background: #fafbfc;
  transition: background 0.15s ease;
}

.faq-item:hover {
  background: #fff;
}

.faq-item summary {
  padding: 0.65rem 0.85rem;
  cursor: pointer;
  font-weight: 700;
  color: var(--header-solid);
  list-style-position: outside;
}

.faq-item summary::-webkit-details-marker {
  color: var(--accent);
}

.faq-item[open] summary {
  border-bottom: 1px dashed var(--border-classic);
}

.faq-item p {
  margin: 0;
  padding: 0.65rem 0.85rem 0.85rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.jobseeker-contact-intro {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  background: linear-gradient(120deg, #1a3a5c 0%, #214a84 55%, #1e4976 100%);
  color: #f1f5f9;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(15, 35, 60, 0.2);
}

.jobseeker-contact-intro__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.jobseeker-contact-intro p {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.5;
  opacity: 0.95;
}

.jobseeker-contact-intro a.btn {
  margin-top: 0.15rem;
}

.jobseeker-contact-intro a.btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.45);
}

.jobseeker-contact-intro a.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: #fff;
}

.contact-panel {
  padding: 1rem 1rem 1.1rem;
  background: #fafbfc;
  border: 1px solid var(--border-classic);
  border-radius: 3px;
  margin-bottom: 0.5rem;
}

.sidebar-quicklinks {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.sidebar-quicklinks li {
  margin-bottom: 0.4rem;
}

.sidebar-quicklinks a {
  font-size: 0.88rem;
}

.layout {
  max-width: 1000px;
  margin: 0 auto 1.5rem;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 0;
  align-items: stretch;
  background: var(--card);
  border: 1px solid var(--border-classic);
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.content-panel {
  background: var(--card);
  border: none;
  border-right: 1px solid var(--border-classic);
  border-radius: 0;
  padding: 1rem 1.15rem 1.25rem;
}

.content-panel h1,
.content-panel h2.panel-title {
  margin-top: 0;
  font-size: 1.35rem;
  color: var(--header-solid);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.3rem;
  font-family: Arial, Helvetica, sans-serif;
}

.content-panel h2 {
  font-size: 1.05rem;
  color: var(--header-solid);
}

.content-panel section {
  margin-top: 1.35rem;
}

.content-panel section:first-of-type {
  margin-top: 1rem;
}

.content-panel ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.35rem;
}

.sidebar {
  background: var(--sidebar);
  border: none;
  border-radius: 0;
  padding: 1rem 0.85rem;
}

.sidebar h2 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--header-solid);
  font-family: Arial, Helvetica, sans-serif;
  border-bottom: 1px solid var(--border-classic);
  padding-bottom: 0.35rem;
}

.sidebar h2 ~ h2 {
  margin-top: 1.25rem;
}

.testimonial-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.testimonial-list li {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border-classic);
  font-size: 0.92rem;
  color: var(--muted);
}

.testimonial-list li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.testimonial-list cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-weight: 700;
  color: var(--text);
}

.breadcrumb {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0.75rem 1rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--link);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.site-footer {
  border-top: 3px solid var(--accent);
  background: #d4d4d4;
  padding: 1rem 1rem 1.1rem;
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Faint background watermark (footer area) */
.site-footer::before {
  content: "UNDER DEVELOPMENT";
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%) rotate(-9deg);
  font-size: clamp(1.5rem, 6.5vw, 2.85rem);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(15, 58, 99, 0.065);
  pointer-events: none;
  white-space: nowrap;
  z-index: 0;
  font-family: Arial, Helvetica, sans-serif;
  user-select: none;
}

.site-footer > * {
  position: relative;
  z-index: 1;
}

.footer-watermark {
  margin: 0.85rem auto 0;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(100, 116, 139, 0.5);
  max-width: 46rem;
  font-size: 0.68rem;
  line-height: 1.45;
  color: #64748b;
  font-family: Arial, Helvetica, sans-serif;
}

.footer-nav {
  margin-top: 0.35rem;
}

.footer-nav a {
  color: var(--header-solid);
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.contact-block h2,
.contact-block h3 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--header-solid);
}

.contact-block address {
  font-style: normal;
  margin-bottom: 1rem;
}

.form-grid {
  display: grid;
  gap: 0.5rem 0.75rem;
}

.form-grid label {
  font-weight: 700;
  font-size: 0.88rem;
}

.form-grid input,
.form-grid textarea {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-grid input:hover,
.form-grid textarea:hover {
  border-color: #94a3b8;
}

.form-grid input:focus-visible,
.form-grid textarea:focus-visible {
  outline: none;
  border-color: var(--header-solid);
  box-shadow: 0 0 0 2px rgba(33, 74, 132, 0.2);
}

.form-actions {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5rem;
}

button {
  font: inherit;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  border-radius: 2px;
  border: 1px solid #94a3b8;
  background: #f8fafc;
}

button[type="submit"] {
  background: var(--header-bg);
  color: #fff;
  border-color: var(--header-border);
}

button[type="submit"]:hover {
  background: #0c3258;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.portfolio-item {
  border: 1px solid var(--border-classic);
  border-radius: 2px;
  padding: 1rem;
  background: var(--sidebar);
  min-height: 100px;
}

@media (max-width: 860px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .content-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-classic);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .primary-nav {
    flex-wrap: wrap;
  }

  .nav-toggle-label {
    display: inline-block;
  }

  .primary-nav > ul {
    display: none;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0.35rem 0 0.5rem;
    order: 3;
  }

  .nav-toggle:checked ~ .header-nav-wrap .primary-nav > ul {
    display: flex;
  }

  .primary-nav > ul > li:not(:last-child)::after {
    content: none;
  }

  .primary-nav > ul > li > a {
    display: block;
    padding: 0.45rem 0.2rem;
  }

  /* Services submenu: stacked under label when menu is open */
  .primary-nav-item--services {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-nav-item--services .primary-nav-submenu {
    display: flex;
    position: static;
    min-width: 0;
    width: 100%;
    margin: 0.15rem 0 0.35rem;
    padding: 0.25rem 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top-width: 3px;
    border-top-color: var(--accent);
    background: rgba(0, 0, 0, 0.18);
    box-shadow: none;
  }

  .primary-nav-item--services:hover .primary-nav-submenu,
  .primary-nav-item--services:focus-within .primary-nav-submenu {
    display: flex;
  }

  .primary-nav-submenu a {
    color: #fff !important;
    padding: 0.4rem 0.65rem !important;
  }

  .primary-nav-submenu a:hover,
  .primary-nav-submenu a:focus {
    background: rgba(255, 255, 255, 0.1);
  }

  .primary-nav-submenu a.active {
    color: #ffeb99 !important;
    background: rgba(0, 0, 0, 0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .service-tile:hover {
    transform: none;
  }

  a.btn-primary:hover,
  a.btn-secondary:hover {
    transform: none;
  }
}
