.cb-navigation.cb-navigation--has-toggle.cb-navigation--toggle-from-mobile
  .cb-navigation__toggle-button {
  border-radius: 3px;
}
.cardinal-header-row {
  position: relative;
  z-index: 999;
  width: calc(100% - 32px);
  margin: 0 auto;
  background-color: transparent;
  color: inherit;
  max-width: 100% !important;
}

.cardinal-header-row.is-scrolled {
  .cb-navigation.cb-navigation--has-toggle.cb-navigation--toggle-from-mobile
    .cb-navigation__toggle-button {
    background-color: transparent !important;
    color: var(--wp--preset--color--foreground, #1a1a2e) !important;
    border-color: var(--wp--preset--color--foreground, #1a1a2e) !important;
  }
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background-color: var(--wp--preset--color--background, #ffffff);
  color: var(--wp--preset--color--foreground, #1a1a2e);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease;
}

.cardinal-header-row.is-scrolled a,
.cardinal-header-row.is-scrolled .wp-block-navigation-item__content,
.cardinal-header-row.is-scrolled svg {
  color: var(--wp--preset--color--foreground, #1a1a2e);
  fill: var(--wp--preset--color--foreground, #1a1a2e);
}

/* Top-level menu hover when header is sticky */
.cardinal-header-row.is-scrolled .cb-navigation__list > li > a:hover,
.cardinal-header-row.is-scrolled .cb-navigation__list > li > a:focus {
  color: var(--wp--preset--color--secondary) !important;
}

/* SEARCH button style when header is sticky */
.cardinal-header-row.is-scrolled .wp-block-button__link {
  background-color: transparent !important;
  color: var(--wp--preset--color--foreground, #1a1a2e) !important;
  border-color: var(--wp--preset--color--border, #e2e8f0) !important;
}

/* Mobile toggle button color when header is sticky */
.cardinal-header-row.is-scrolled .cb-navigation__toggle-button {
  background-color: transparent !important;
  color: var(--wp--preset--color--foreground, #1a1a2e) !important;
  border-color: var(--wp--preset--color--foreground, #1a1a2e) !important;
}

.cardinal-bottom-image {
  z-index: -1;
}

/* Header CB Navigation: distribute items with space-around on desktop */
@media (min-width: 769px) {
  .cardinal-header-row nav.cb-navigation {
    --cb-navigation-justify-desktop: space-around !important;
  }
}

/* search button desktop style */
.wp-block-search.wp-block-search__button-only .wp-block-search__button {
  background: transparent;
  border: 1px solid #f1f1f1;
}

.wp-block-search__button svg {
  fill: #f1f1f1;
}

.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper {
  gap: 7px;
}
.wp-block-search.wp-block-search__button-only .wp-block-search__input {
  border-radius: 5px;
  background: #ffffff38;
}

.wp-block-search.wp-block-search__button-only .wp-block-search__input {
  color: #f1f1f1;
}

.cardinal-header-row.is-scrolled a,
.cardinal-header-row.is-scrolled .wp-block-navigation-item__content,
.cardinal-header-row.is-scrolled svg,
.cardinal-header-row.is-scrolled
  .wp-block-search.wp-block-search__button-only
  .wp-block-search__input,
.cardinal-header-row.is-scrolled
  .wp-block-search.wp-block-search__button-only
  .wp-block-search__button {
  color: var(--wp--preset--color--foreground, #1a1a2e);
  fill: var(--wp--preset--color--foreground, #1a1a2e);
  border-color: var(--wp--preset--color--foreground, #1a1a2e);
}

/* blog page */
/* Headings inside article content */
.single.single-post .entry-content h1,
.single.single-post .entry-content h2,
.single.single-post .entry-content h3,
.single.single-post .entry-content h4,
.single.single-post .entry-content h5,
.single.single-post .entry-content h6 {
  margin-top: 1rem;
  margin-bottom: 1rem;
}
/* Paragraphs */
.single.single-post .entry-content p {
  margin-top: 0;
  margin-bottom: 1rem;
}
/* Lists */
.single.single-post .entry-content ul,
.single.single-post .entry-content ol {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}

/* Mobile toggle button color when header is sticky */

@media (max-width: 768px) {
  .wp-block-site-logo img {
    width: 150px !important;
  }
  .cardinal-header-row {
    width: calc(100% - 20px);
    max-width: 100% !important;
  }

  div#cardinal-products {
    padding-top: 40px !important;
    padding-bottom: 20px !important;
  }

  div#cardinal-workspace-video {
    min-height: 450px !important;
  }

  div#cardinal-research .cardinal-col-left {
    display: none !important;
  }

  div#cardinal-research .cardinal-col-right {
    padding-top: 6rem !important;
  }
  div#cardinal-research .cardinal-col-right h2 {
    padding-bottom: var(--wp--preset--spacing--50) !important;
  }

  footer .footer-copy h6 {
    text-align: center !important;
  }

  .cardinal-bottom-image {
    margin-top: -220px !important;
  }
  .cardinal-genoss-cover {
    min-height: 320px !important;
  }
}

/* Contact Form 7 – Genoss-style (label left, input right, grey inputs, row lines) */
.wpcf7 form .wpcf7-contact-layout.wpcf7-genoss-style {
  max-width: none;
  width: 100%;
}

/* Two-column row: First name | Last name */
.wpcf7 form .wpcf7-contact-layout .wpcf7-row--half {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1.5rem;
  margin-bottom: 0;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #eee;
}

/* Every field row: label left, input right (also targets p without class) */
.wpcf7 form .wpcf7-contact-layout p:not(.wpcf7-submit-row) {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.5rem 1.5rem;
  align-items: start;
  margin-bottom: 0;
  padding-bottom: 1.25rem;
  padding-top: 1.25rem;
  border-bottom: 1px solid #eee;
}

.wpcf7 form .wpcf7-contact-layout .wpcf7-row--half p {
  padding-top: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.wpcf7 form .wpcf7-contact-layout p:not(.wpcf7-submit-row) > label {
  grid-column: 1;
  font-weight: normal;
  color: #1a1a1a;
}

.wpcf7 form .wpcf7-contact-layout p:not(.wpcf7-submit-row) > br {
  display: none;
}

.wpcf7
  form
  .wpcf7-contact-layout
  p:not(.wpcf7-submit-row)
  > .wpcf7-form-control-wrap,
.wpcf7 form .wpcf7-contact-layout p:not(.wpcf7-submit-row) > .wpcf7-helper {
  grid-column: 2;
}

/* Red asterisk for required */
.wpcf7 form .wpcf7-contact-layout .required {
  color: #b91c1c;
  margin-right: 2px;
}

.wpcf7 form .wpcf7-contact-layout .wpcf7-helper {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: #6b7280;
  font-style: italic;
}

/* Inputs: light grey background, soft border, rounded (Genoss look) */
.wpcf7 form .wpcf7-contact-layout.wpcf7-genoss-style input[type="text"],
.wpcf7 form .wpcf7-contact-layout.wpcf7-genoss-style input[type="email"],
.wpcf7 form .wpcf7-contact-layout.wpcf7-genoss-style input[type="tel"],
.wpcf7 form .wpcf7-contact-layout.wpcf7-genoss-style textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.9rem 0.95rem;
  background-color: #f5f5f5;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  color: #1a1a1a;
  font-size: 1rem;
  box-sizing: border-box;
  transition:
    background-color 0.15s ease,
    border-color 0.15s ease;
}

/* Fallback: style CF7 inputs even if wrapper classes are missing */
.wpcf7 form input[type="text"],
.wpcf7 form input[type="email"],
.wpcf7 form input[type="tel"],
.wpcf7 form textarea {
  background-color: #f5f5f5;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
}

.wpcf7 form .wpcf7-contact-layout.wpcf7-genoss-style input[type="file"] {
  width: 100%;
  max-width: 100%;
  padding: 0.45rem 0.75rem;
  font-size: 0.9375rem;
  color: #374151;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  background-color: #f5f5f5;
  box-sizing: border-box;
}

/* Modern browsers: style the file input button */
.wpcf7
  form
  .wpcf7-contact-layout.wpcf7-genoss-style
  input[type="file"]::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: 4px;
  background-color: var(--wp--preset--color--secondary, #0f172a);
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
}

.wpcf7
  form
  .wpcf7-contact-layout.wpcf7-genoss-style
  input[type="file"]::file-selector-button:hover {
  background-color: var(--wp--preset--color--foreground, #1a1a2e);
}

/* Safari/WebKit fallback */
.wpcf7
  form
  .wpcf7-contact-layout.wpcf7-genoss-style
  input[type="file"]::-webkit-file-upload-button {
  margin-right: 0.75rem;
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: 4px;
  background-color: var(--wp--preset--color--secondary, #0f172a);
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
}

.wpcf7
  form
  .wpcf7-contact-layout.wpcf7-genoss-style
  input[type="file"]::-webkit-file-upload-button:hover {
  background-color: var(--wp--preset--color--foreground, #1a1a2e);
}

.wpcf7 form .wpcf7-contact-layout.wpcf7-genoss-style input::placeholder,
.wpcf7 form .wpcf7-contact-layout.wpcf7-genoss-style textarea::placeholder {
  color: #9ca3af;
}

.wpcf7 form .wpcf7-contact-layout.wpcf7-genoss-style input[type="text"]:focus,
.wpcf7 form .wpcf7-contact-layout.wpcf7-genoss-style input[type="email"]:focus,
.wpcf7 form .wpcf7-contact-layout.wpcf7-genoss-style input[type="tel"]:focus,
.wpcf7 form .wpcf7-contact-layout.wpcf7-genoss-style textarea:focus {
  outline: none;
  background-color: #fafafa;
  border-color: #d1d5db;
}

.wpcf7 form .wpcf7-contact-layout.wpcf7-genoss-style textarea {
  min-height: 140px;
  resize: vertical;
}

/* Submit row: full width, no grid */
.wpcf7 form .wpcf7-contact-layout .wpcf7-submit-row {
  display: block;
  padding-top: 1.5rem;
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}

.wpcf7 form .wpcf7-contact-layout .wpcf7-submit-row .wpcf7-form-control-wrap {
  display: block;
}

.wpcf7 form .wpcf7-contact-layout .wpcf7-submit-row input[type="submit"] {
  padding: 0.85rem 2.25rem;
  background-color: var(--wp--preset--color--foreground, #1a1a2e);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
}

.wpcf7 form .wpcf7-contact-layout .wpcf7-submit-row input[type="submit"]:hover {
  background-color: var(--wp--preset--color--secondary, #0f172a);
}

@media (max-width: 600px) {
  .wpcf7 form .wpcf7-contact-layout .wpcf7-row--half {
    grid-template-columns: 1fr;
  }

  .wpcf7 form .wpcf7-contact-layout p:not(.wpcf7-submit-row) {
    grid-template-columns: 1fr;
  }

  .wpcf7
    form
    .wpcf7-contact-layout
    p:not(.wpcf7-submit-row)
    > .wpcf7-form-control-wrap,
  .wpcf7 form .wpcf7-contact-layout p:not(.wpcf7-submit-row) > .wpcf7-helper {
    grid-column: 1;
  }
}
