/* about us card modals

/* --- Read more trigger --- */
.team-read-more {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-decoration: underline;
}

/* --- Bio modal --- */
.team-bio-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.team-bio-modal.is-open {
    display: flex;
}

.team-bio-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.team-bio-modal-inner {
    position: relative;
    z-index: 1;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
}

.team-bio-modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.team-bio-modal-name { margin: 0 0 0.25rem; }
.team-bio-modal-role { margin: 0 0 1rem; }

/* Prevent background scroll while a modal is open */
body.team-bio-modal-lock {
    overflow: hidden;
}


.btn.btn-secondary { background-color: var(--white); color:var(--deep-sky-blue); }

/* ============================================================
   ADDITIONAL / OVERRIDE STYLES
   Loaded last per PROJECT-GUIDELINES.md so rules here always
   take priority over signstar.css, theme.css, forms.css.
   ============================================================ */


/* ---- Nav Dropdown — Centred Under Parent + Balanced Columns ----
   All dropdowns (1, 2, 3 col) sit centred horizontally beneath their
   parent link. Multi-column variants use CSS columns so items
   distribute evenly across the columns instead of filling top-down.
   Mobile (<=1024px) reverts to single column, full width, no centre.
   ============================================================ */

/* Centre every dropdown under its parent link. */
.has-dropdown:hover .dropdown-menu {
    left: 50%;
    transform: translateX(-50%);
}

/* 2- and 3-column variants — naturally balanced via CSS columns. */
.dropdown-menu--2col,
.dropdown-menu--3col {
    column-gap: 1rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}
.dropdown-menu--2col {
    column-count: 2;
    min-width: 460px;
}
.dropdown-menu--3col {
    column-count: 3;
    min-width: 680px;
}
/* Keep menu items intact within a column (no mid-item breaks). */
.dropdown-menu--2col li,
.dropdown-menu--3col li {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
}

/* Mobile — single column, full width, no centring transform. */
@media (max-width: 1024px) {
    .has-dropdown:hover .dropdown-menu,
    .has-dropdown:hover .dropdown-menu--2col,
    .has-dropdown:hover .dropdown-menu--3col {
        left: auto;
        transform: none;
    }
    .dropdown-menu--2col,
    .dropdown-menu--3col {
        column-count: 1;
        min-width: 0;
        padding-left: 0;
        padding-right: 0;
    }
}


/* ---- Gallery Image Caption Bar ----
   Always-visible translucent bar across the bottom of gallery
   tiles. Reads from the WP attachment Caption field.
   Used on cs-gallery-item (case study) and svc-gallery-item (service).
   ============================================================ */
.cs-gallery-item,
.svc-gallery-item {
    position: relative;       /* ensure caption is anchored to item */
}
.gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.6rem 0.9rem;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.85rem;
    line-height: 1.35;
    font-weight: 500;
    pointer-events: none;
    z-index: 2;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
@media (max-width: 600px) {
    .gallery-caption {
        font-size: 0.78rem;
        padding: 0.5rem 0.7rem;
    }
}


/* ---- Logo Invert ----
   Per-logo ACF toggle (invert_logo) adds .logo-strip__img--invert
   to a logo when it's dark-on-dark and needs to be made white.
   ============================================================ */
.logo-strip__img--invert {
    filter: brightness(0) invert(1);
}


/* ---- Mobile Nav (≤1024px) ----
   Overrides the existing 768px rules in signstar.css/theme.css so
   the drawer behaviour kicks in earlier. Drawer is scrollable.
   Parent-with-children items keep their child links hidden until
   the user taps the chevron toggle.
   ============================================================ */

/* Chevron toggle button is desktop-hidden by default. */
.dropdown-toggle {
    display: none;
    background: transparent;
    border: 0;
    padding: 0;
    margin-left: 0.35rem;
    color: inherit;
    cursor: pointer;
    line-height: 0;
    transition: transform 0.25s ease;
}
.dropdown-toggle svg { display: block; }

@media (max-width: 1024px) {

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex !important;
        z-index: 201;
    }

    /* Header positioned for absolute drawer */
    .header-nav { position: relative; }

    /* Drawer hidden by default, shown when .active */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface-dark);
        border-top: 1px solid var(--border-subtle);
        border-bottom: 1px solid var(--border-subtle);
        flex-direction: column;
        padding: 12px 20px 20px;
        z-index: 200;
        /* SCROLLABLE: cap at viewport minus header, scroll overflow */
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .nav-links.active { display: flex; }

    .nav-links li {
        list-style: none;
        width: 100%;
    }

    .nav-links a {
        font-size: 1rem;
        display: block;
        padding: 10px 12px;
        border-radius: 6px;
    }

    /* Parent item with children: align link + chevron in a row */
    .has-dropdown {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }
    .has-dropdown > a {
        flex: 1 1 auto;
    }
    .dropdown-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        flex-shrink: 0;
        border-radius: 6px;
    }
    .dropdown-toggle:hover,
    .dropdown-toggle:focus-visible {
        background: rgba(255, 255, 255, 0.06);
    }
    .has-dropdown.is-expanded > .dropdown-toggle {
        transform: rotate(180deg);
    }

    /* Submenu hidden by default; shown when parent has .is-expanded */
    .has-dropdown .dropdown-menu,
    .has-dropdown .dropdown-menu--2col,
    .has-dropdown .dropdown-menu--3col {
        display: none !important;
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0 0 0 1rem;
        min-width: 0;
        column-count: 1;
        flex-basis: 100%;
        transform: none;
        left: auto;
    }
    .has-dropdown.is-expanded .dropdown-menu,
    .has-dropdown.is-expanded .dropdown-menu--2col,
    .has-dropdown.is-expanded .dropdown-menu--3col {
        display: block !important;
    }

    .nav-cta {
        display: inline-block !important;
        width: auto !important;
        margin-top: 12px;
        text-align: center;
    }

    .header-tagline { display: none; }
}

/* ============================================================
   Block: Offices
   ============================================================ */

.offices-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  max-width: 1140px;   /* was 980px */
  margin: var(--space-xl) auto 0;
}

.office-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}

.office-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--deep-sky-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
  z-index: 2;
}

.office-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
}

.office-card:hover::before { transform: scaleX(1); }

.office-card-map {
  position: relative;
  width: 100%;
  height: 240px;
  background: var(--surface-card-hover);
  line-height: 0;
}

.office-card-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.office-card-body { padding: var(--space-md); }

.office-card-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 var(--space-sm);
}

.office-card-details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md) var(--space-lg);
  align-items: flex-start;
}

.office-address {
  flex: 1 1 200px;
  font-style: normal;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
}

.office-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-sm);
}

.office-meta li {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
}

.office-meta-label {
  flex: 0 0 56px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.office-meta a {
  color: var(--deep-sky-blue);
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
}

.office-meta a:hover { text-decoration: underline; }

@media (max-width: 767px) {
  .offices-grid { grid-template-columns: 1fr; }
}

/* Footer addresses */
.footer-addresses {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: var(--space-md);
}
.footer-address {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-style: normal;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 320px;
  padding: 0.8rem 0.95rem;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.footer-address:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}
.footer-address-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--glow-blue);
  display: grid;
  place-items: center;
}
.footer-address-icon::before {
  content: '';
  width: 18px;
  height: 18px;
  background-color: var(--deep-sky-blue);
  -webkit-mask: url('https://signstar.co.uk/wp-content/uploads/map-pin-thin-full.svg') no-repeat center / contain;
          mask: url('https://signstar.co.uk/wp-content/uploads/map-pin-thin-full.svg') no-repeat center / contain;
}
.footer-address-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--white);
  margin-bottom: 1px;
}

/* ============================================================
   Block: Team
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  align-items: start;
  margin: var(--space-xl) 0 0;
}

.team-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  transition: transform 0.35s var(--ease-out), border-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
  padding-bottom: 40px;
}

.team-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-accent);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.team-card-readmore {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--deep-sky-blue);
  transition: color 0.25s var(--ease-out);
}

.team-card-readmore:hover {
  color: var(--white);
}

.team-card-photo {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--surface-card-hover);
  overflow: hidden;
}

.team-card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card-body {
  padding: var(--space-sm);
}

.team-card-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 0.15rem;
}

.team-card-role {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--deep-sky-blue);
  margin: 0 0 0.5rem;
}

.team-card-bio {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.team-card-bio p { margin: 0; }

.team-card-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: var(--space-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--deep-sky-blue);
  text-decoration: none;
  transition: color 0.25s var(--ease-out);
  position: absolute;
  bottom: 20px;
}

/* Modal */
.team-modal[hidden] { display: none !important; }

/* Block editor preview: never show the modal overlay, and show the cards
   (the reveal animation JS does not run inside the editor canvas) */
.editor-styles-wrapper .team-modal,
.acf-block-preview .team-modal,
.team.is-editor-preview .team-modal { display: none !important; }
.editor-styles-wrapper .reveal,
.acf-block-preview .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}
.team-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.team-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.team-modal-body {
  width: 66%;
  padding: 2rem;
}
.team-modal-dialog {
    position: relative;
    z-index: 1;
    background: var(--surface-card);
    color: #1a1a1a;
    max-width: 768px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: teamModalIn 0.2s ease;

    display: flex;
}
@keyframes teamModalIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.team-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: var(--surface-card);
    color: var(--text-secondary);
    cursor: pointer;
    transition: 0.3s all ease-in-out;
}
.team-modal-close:hover { background: rgba(0, 0, 0, 0.12); }
.team-modal-photo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    margin-bottom: 1.25rem;
}

.team-modal-photo {
  width: 33%;
  min-height: 100%;
}

.team-modal-photo[hidden],
.team-modal-role[hidden],
.team-modal-bio[hidden],
.team-modal-linkedin[hidden] { display: none; }
.team-modal-name { margin: 0 0 0.25rem; font-size: 1.5rem; }
.team-modal-role { margin: 0 0 1rem; opacity: 0.7; }
.team-modal-bio { line-height: 1.6; margin-bottom: 1.5rem; }
.team-modal-linkedin {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    font-weight: 600;
}

.team-modal-name {
  color: var(--white);
}

.team-modal-role {
  color: var(--deep-sky-blue);
}

.team-modal-linkedin {
  color: var(--deep-sky-blue);
}

.team-modal-bio {
  color: var(--text-secondary);
}

/* Lock background scroll while the modal is open */
body.team-modal-open { overflow: hidden; }

.team-card-linkedin svg { flex: 0 0 16px; }

.team-card-linkedin:hover { color: var(--white); }

/* WYSIWYG intro text spacing (scoped to this block) */
.team .section-subtitle p { margin: 0 0 0.75em; }
.team .section-subtitle p:last-child { margin-bottom: 0; }

@media (max-width: 1200px) {
  .team-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .team-modal-photo, .team-modal-body {
    width: 50%;
  }
}

@media (max-width: 600px) {
  .team-modal-dialog {
    flex-direction: column;
  }
  .team-modal-photo, .team-modal-body {
    width: 100%;
  }
  .team-modal-photo {
    min-height: 400px;
  }
  .team-modal-photo img {
    max-height: 400px;
  }
}

@media (max-width: 479px) {
  .team-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Header Search
   Magnifier button in the nav bar toggles a full-width panel that
   drops beneath the nav. Esc / outside click / toggle closes it.
   ============================================================ */

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

/* Desktop: keep the menu flush right (the nav bar is space-between and
   the hamburger is hidden, so without this the links drift to the
   centre). Icon sits after the CTA button behind a thin divider. */
@media (min-width: 1025px) {
    .header-nav-inner .nav-links { margin-left: auto; }
    .header-actions {
        margin-left: 0.75rem;
        padding-left: 0.75rem;
        border-left: 1px solid var(--border-subtle);
    }
}

.nav-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.25s var(--ease-out), background 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.nav-search-toggle:hover,
.nav-search-toggle:focus-visible {
    color: var(--white);
    background: var(--surface-card);
    outline: none;
}
.nav-search-toggle[aria-expanded="true"] {
    color: var(--white);
    background: var(--surface-card);
    border-color: var(--border-accent);
}
.nav-search-toggle svg { display: block; }
.nav-search-toggle .nav-search-icon-close { display: none; }
.nav-search-toggle[aria-expanded="true"] .nav-search-icon-open { display: none; }
.nav-search-toggle[aria-expanded="true"] .nav-search-icon-close { display: block; }

/* Panel */
.header-nav { position: relative; }

.header-search {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 199;
    background: var(--surface-dark);
    border-bottom: 1px solid var(--border-accent);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
    padding: var(--space-md) 0 var(--space-sm);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.header-search.is-open {
    opacity: 1;
    transform: translateY(0);
}

.header-search-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 760px;
    margin: 0 auto;
    padding: 0.35rem 0.35rem 0.35rem 1rem;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.header-search-form:focus-within {
    border-color: var(--deep-sky-blue);
    box-shadow: 0 0 0 4px var(--glow-blue);
}
.header-search-form-icon {
    flex-shrink: 0;
    color: var(--deep-sky-blue);
}
.header-search-input {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1.05rem;
    padding: 0.6rem 0;
    -webkit-appearance: none;
    appearance: none;
}
.header-search-input::placeholder { color: var(--text-muted); }
.header-search-input::-webkit-search-decoration,
.header-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

.header-search-submit {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    background: var(--deep-sky-blue);
    color: var(--white);
    border: 0;
    border-radius: 6px;
    padding: 0.65rem 1.1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.header-search-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px var(--glow-blue-strong);
}
.header-search-submit svg { transition: transform 0.25s var(--ease-out); }
.header-search-submit:hover svg { transform: translateX(3px); }

.header-search-hint {
    text-align: center;
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
    color: var(--text-muted);
}
.header-search-hint kbd {
    display: inline-block;
    padding: 0.05rem 0.4rem;
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--surface-card);
}

/* Visually-hidden helper for form labels (not defined elsewhere in theme). */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1024px) {
    .header-actions { gap: 0; margin-left: 0; }
    .nav-search-toggle { width: 40px; height: 40px; }
    .header-search { padding: var(--space-sm) 0; }
    .header-search-hint { display: none; }
    .header-search-submit span { display: none; }
}
@media (max-width: 480px) {
    .header-search-form { padding: 0.25rem 0.25rem 0.25rem 0.75rem; gap: 0.5rem; }
    .header-search-input { font-size: 0.95rem; }
    .header-search-submit { padding: 0.6rem 0.8rem; gap: 0; }
    .header-search-submit svg { width: 18px; height: 18px; }
}


/* ============================================================
   Search Results Page (search.php)
   Header re-uses .blog-archive-header; cards re-use .blog-card.
   ============================================================ */

.search-header .blog-archive-header-inner { max-width: 720px; }
.search-header-tag { justify-content: center; }
.search-header-tag::after {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--deep-sky-blue);
}
.search-header-query { color: var(--deep-sky-blue); }
.search-header-count { margin-bottom: var(--space-md) !important; }

/* Inline re-search form under the heading */
.search-page-form {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 640px;
    margin: var(--space-md) auto 0;
    padding: 0.35rem 0.35rem 0.35rem 1rem;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    text-align: left;
    transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.search-page-form:focus-within {
    border-color: var(--deep-sky-blue);
    box-shadow: 0 0 0 4px var(--glow-blue);
}
.search-page-form-icon { flex-shrink: 0; color: var(--deep-sky-blue); }
.search-page-input {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    padding: 0.6rem 0;
    -webkit-appearance: none;
    appearance: none;
}
.search-page-input::placeholder { color: var(--text-muted); }
.search-page-input::-webkit-search-decoration,
.search-page-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-page-submit {
    flex-shrink: 0;
    padding: 0.65rem 1.2rem !important;
    font-size: 0.9rem !important;
}

/* Results grid */
.search-results { padding-bottom: var(--space-2xl); }

.search-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border-accent);
    background:
        radial-gradient(circle at 30% 20%, var(--glow-blue) 0%, transparent 55%),
        linear-gradient(135deg, var(--surface-card-hover) 0%, var(--surface-dark) 100%);
}

.search-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: capitalize;
    transition: color 0.25s var(--ease-out), gap 0.25s var(--ease-out);
}
.search-card:hover .search-card-link {
    color: var(--deep-sky-blue);
    gap: 0.6rem;
}

/* Empty state */
.search-empty {
    max-width: 560px;
    margin: 0 auto;
    padding: var(--space-xl) var(--space-md);
    text-align: center;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
}
.search-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: var(--space-md);
    border-radius: 50%;
    color: var(--deep-sky-blue);
    background: var(--glow-blue);
    border: 1px solid var(--border-accent);
}
.search-empty h2 {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 3vw, 1.8rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.25;
    margin-bottom: 0.75rem;
}
.search-empty p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 auto var(--space-md);
    max-width: 440px;
}
.search-empty-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
}

@media (max-width: 1024px) {
    .search-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .search-grid { grid-template-columns: 1fr; }
    .search-page-form { flex-wrap: wrap; padding: 0.75rem; }
    .search-page-form-icon { display: none; }
    .search-page-input { flex-basis: 100%; padding: 0.4rem 0.25rem; }
    .search-page-submit { width: 100%; justify-content: center; }
    .search-empty { padding: var(--space-lg) var(--space-sm); border-radius: 12px; }
    .search-empty-actions .btn { width: 100%; justify-content: center; }
}


/* ============================================================
   Hero background videos (home header, page header, case study
   header). Rendered by ss_hero_video(); driven by signstar.js.
   Sits over the hero image, under the gradient overlays.
   ============================================================ */
.ss-hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1.2s ease;
}
.ss-hero-video.is-visible { opacity: 1; }
.hero-bg .ss-hero-video { object-position: center 30%; }
/* Keep the home hero gradient above the video */
.hero-bg::after { z-index: 1; }
@media (prefers-reduced-motion: reduce) {
    .ss-hero-video { display: none; }
}


/* ============================================================
   Form status message (CF7 failures surfaced in the visible form)
   ============================================================ */
.ss-form-status {
    display: none;
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ffb4b4;
    font-size: 0.9rem;
    line-height: 1.5;
}
.ss-form-status.is-visible { display: block; }
.bg-white .ss-form-status,
.bg-alice-blue .ss-form-status,
.bg-grey .ss-form-status { color: #b42318; background: rgba(239, 68, 68, 0.08); }

.cs-video-unsupported {
    padding: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}
.cs-video-unsupported a { color: var(--deep-sky-blue); }


/* ============================================================
   404 page (404.php)
   ============================================================ */
.error-hero .ph-hero-inner { max-width: 760px; }
.error-hero .ph-hero-title { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.error-hero .ph-hero-text { max-width: 620px; }
.error-search-form { margin-left: 0; margin-top: var(--space-md); }

.error-body { padding-top: 0; }
.error-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: start;
    padding-bottom: var(--space-2xl);
}
.error-links .section-tag { margin-bottom: var(--space-sm); }
.error-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}
.error-link-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    background: var(--surface-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    transition: border-color 0.25s var(--ease-out), background 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.error-link-list a svg { color: var(--deep-sky-blue); flex-shrink: 0; transition: transform 0.25s var(--ease-out); }
.error-link-list a:hover {
    border-color: var(--border-accent);
    background: var(--surface-card-hover);
    transform: translateY(-2px);
}
.error-link-list a:hover svg { transform: translateX(3px); }

.error-help-card {
    padding: var(--space-lg);
    border-radius: 16px;
    background:
        radial-gradient(circle at 20% 0%, var(--glow-blue) 0%, transparent 55%),
        var(--surface-card);
    border: 1px solid var(--border-subtle);
}
.error-help-card h2 {
    font-family: var(--font-display);
    font-size: clamp(1.3rem, 2.6vw, 1.7rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.25;
    margin-bottom: 0.6rem;
}
.error-help-card p { color: var(--text-secondary); line-height: 1.7; margin-bottom: var(--space-sm); }
.error-requested code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    font-size: 0.85em;
}
.error-help-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-sm); }
.error-help-phone { margin: var(--space-sm) 0 0 !important; font-size: 0.95rem; }
.error-help-phone a { color: var(--deep-sky-blue); font-weight: 600; }

@media (max-width: 900px) {
    .error-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
}
@media (max-width: 560px) {
    .error-link-list { grid-template-columns: 1fr; }
    .error-help-card { padding: var(--space-md); border-radius: 12px; }
    .error-help-actions .btn { width: 100%; justify-content: center; }
}

/* ============================================================
   Cloudflare Turnstile inside the visible (mirrored) forms.
   Rendered by js/signstar.js; keys live in CF7 > Integration.
   ============================================================ */
.ss-turnstile { grid-column: 1 / -1; margin-top: 0.25rem; }
.ss-turnstile iframe { max-width: 100%; }

/* Neutral variant of the status box while Turnstile is still checking. */
.ss-form-status.is-info {
    background: rgba(0, 173, 239, 0.10);
    border-color: rgba(0, 173, 239, 0.35);
    color: var(--text-primary, #f0f4f7);
}
.bg-white .ss-form-status.is-info,
.bg-alice-blue .ss-form-status.is-info,
.bg-grey .ss-form-status.is-info { color: #1e3037; }
