/* DADAIRE / 02 - Main header (Blocksy Header Builder)
 * Build with the native Logo | Menu | Button elements.
 * Never change Blocksy's header display/flex logic here; its responsive
 * menu calculations and sticky behavior must remain under theme control.
 */
#header [data-row="middle"] {
  border-bottom: 1px solid var(--dc-border);
  background-color: var(--dc-white);
}

/* Site logo: preserve its proportions and prevent stretching. */
/* Dadaire logo: Desktop */
#header .site-logo-container img,
#header .site-branding img {
    height: 64px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

/* Dadaire logo: Tablet and Mobile */
@media (max-width: 999px) {
    #header .site-logo-container img,
    #header .site-branding img {
        height: 42px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
    }
}

/* Desktop navigation. Text labels are still managed through WP Menus. */
@media (min-width: 1025px) {
  #header [data-id="menu"] .menu > li > a {
    color: var(--dc-navy);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: -0.012em;
    text-transform: none;
  }
  #header [data-id="menu"] .menu > li > a:hover,
  #header [data-id="menu"] .menu > li.current-menu-item > a,
  #header [data-id="menu"] .menu > li.current-menu-ancestor > a {
    color: var(--dc-forest);
  }
}

/* Native header button element, on desktop or mobile where placed. */
#header [data-id="button"] .ct-button,
#header [data-id="button"] a.ct-button {
  background-color: var(--dc-gold);
  color: var(--dc-navy);
  border-radius: 8px;
  box-shadow: none;
  font-weight: 700;
  transition: background-color 180ms ease, transform 180ms ease;
}
#header [data-id="button"] .ct-button:hover,
#header [data-id="button"] a.ct-button:hover {
  background-color: var(--dc-gold-hover);
  color: var(--dc-navy);
  transform: translateY(-1px);
}

/* Visible keyboard focus on branded interactive header elements. */
#header a:focus-visible,
#header button:focus-visible,
#header [role="button"]:focus-visible {
  outline: 0px solid var(--dc-gold);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  #header [data-id="button"] .ct-button,
  #header [data-id="button"] a.ct-button { transition: none; }
  #header [data-id="button"] .ct-button:hover,
  #header [data-id="button"] a.ct-button:hover { transform: none; }
}
/* Dadaire Search: Corporate Brand Colors */

[data-header*="type-1"] #search-modal {
    background-color: #F7F9F6 !important;
    color: #17324D;
}

[data-header*="type-1"] #search-modal .ct-search-form {
    --theme-link-initial-color: #176B4D;

    --theme-form-text-initial-color: #17324D;
    --theme-form-text-focus-color: #17324D;

    --theme-form-field-border-initial-color: #E4EAE7;
    --theme-form-field-border-focus-color: #176B4D;

    --theme-button-text-initial-color: #17324D;
    --theme-button-text-hover-color: #17324D;

    --theme-button-background-initial-color: #E5AA45;
    --theme-button-background-hover-color: #D79626;

    --theme-form-border-radius: 14px;
}

/* DADAIRE SEARCH MODAL PALETTE FIX v1.1.5
 * Scope: Blocksy header type-1 search overlay only.
 * Purpose: override Blocksy's white-on-dark search tokens and blue palette button.
 * Keep this after earlier search rules in assets/css/header.css.
 */

/* Light branded overlay; leave Blocksy's modal behavior untouched. */
[data-header*="type-1"] #search-modal {
  background-color: #F7F9F6 !important;
  color: #17324D;
  --theme-text-color: #17324D;
  --theme-heading-color: #17324D;
}

/* The original Blocksy rules assigned white input text and used
   var(--theme-palette-color-1) for both button states. Override locally. */
[data-header*="type-1"] #search-modal .ct-search-form {
  --theme-link-initial-color: #176B4D;
  --theme-form-text-initial-color: #17324D;
  --theme-form-text-focus-color: #17324D;
  --theme-form-field-border-initial-color: #E4EAE7;
  --theme-form-field-border-focus-color: #176B4D;
  --theme-button-text-initial-color: #17324D;
  --theme-button-text-hover-color: #17324D;
  --theme-button-background-initial-color: #E5AA45;
  --theme-button-background-hover-color: #D79626;
  --theme-form-border-radius: 14px;
}

/* Guard against more-specific direct button colors from other search rules. */
[data-header*="type-1"] #search-modal .ct-search-form button[type="submit"] {
  background-color: #E5AA45 !important;
  color: #17324D !important;
  border-color: #E5AA45 !important;
  --theme-icon-color: #17324D;
}
[data-header*="type-1"] #search-modal .ct-search-form button[type="submit"]:hover {
  background-color: #D79626 !important;
  border-color: #D79626 !important;
  color: #17324D !important;
}
[data-header*="type-1"] #search-modal .ct-search-form button[type="submit"]:focus-visible {
  outline: 3px solid #176B4D !important;
  outline-offset: 3px;
}


