/* ==========================================================================
   MeCAT Site Header Branding
   ========================================================================== */

/* Outer wrapper – full-width dark navy bar */
.mecat-header-branding {
  background-color: #0d1f3c;
  width: 100%;
  padding: 20px 20px;
  box-sizing: border-box;
}

/* Centred inner container */
.mecat-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 28px;
  box-sizing: border-box;
}

/* ── Block: Text ─────────────────────────────────────────── */
.mecat-header-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Logo MeCAT în blocul de text – deasupra supra_text */
.mecat-header-text__logo-wrap {
  display: inline-flex;
  align-self: flex-end;
}
.mecat-header-text__logo {
  display: block;
  height: 60px;
  width: auto;
  margin-bottom: 4px;
}

/* Supra line */
.mecat-header-supra {
  margin: 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #8da8cc;
  line-height: 1.3;
}

/* Main title */
.mecat-header-title {
  margin: 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(0.95rem, 1.7vw, 1.75rem);
  font-weight: 700;
  color: #e8eef6;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

/* Subtitle / tagline */
.mecat-header-subtitle {
  margin: 0;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 0.9rem;
  font-style: italic;
  font-weight: 400;
  color: #4da6d6;
  line-height: 1.4;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .mecat-header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 0 8px;
  }


  .mecat-header-title {
    font-size: 0.95rem;
  }

  .mecat-header-supra {
    font-size: 0.65rem;
  }
}

@media (min-width: 641px) and (max-width: 960px) {
  .mecat-header-inner {
    gap: 20px;
  }

  .mecat-header-title {
    font-size: 1.1rem;
  }
}

/* ==========================================================================
   Header Region – flex row layout (branding left / search right)
   ========================================================================== */
.mecat-header-region {
  background-color: #0d1f3c;
  width: 100%;
  box-sizing: border-box;
}
.mecat-header-region__inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  box-sizing: border-box;
}
/* Branding block – occupies the left, no own background inside region */
.mecat-header-region #block-mecat-site-header-branding {
  flex: 1 1 auto;
  min-width: 0;
}
.mecat-header-region .mecat-header-branding {
  background: transparent;
  padding: 0;
  width: auto;
}
.mecat-header-region .mecat-header-inner {
  max-width: none;
  margin: 0;
  padding: 0;
}
/* ==========================================================================
   Header Search Block (right side)
   ========================================================================== */
.mecat-header-search-block {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}
/* Remove the default block-search styles that add margin/padding */
.mecat-header-search-block form {
  display: flex !important;
  align-items: center !important;
  background: rgba(255, 255, 255, 0.10) !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  border-radius: 7px !important;
  padding: 0 10px 0 12px !important;
  gap: 0 !important;
  width: auto !important;
  overflow: hidden;
}
/* Search icon prefix inside the form */
.mecat-header-search-block .js-form-item-keys {
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
}
.mecat-header-search-block .js-form-item-keys::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  margin-right: 8px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.55)' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center/contain no-repeat;
}
.mecat-header-search-block input[type="search"],
.mecat-header-search-block input.form-search {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
  color: #e8eef6 !important;
  padding: 9px 4px !important;
  width: 280px;
  font-size: 0.82rem !important;
  font-family: inherit !important;
}
.mecat-header-search-block input[type="search"]::placeholder,
.mecat-header-search-block input.form-search::placeholder {
  color: rgba(255, 255, 255, 0.48) !important;
}
.mecat-header-search-block input[type="search"]:focus,
.mecat-header-search-block input.form-search:focus {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}
/* Hide the submit button (use Enter) */
.mecat-header-search-block .form-actions,
.mecat-header-search-block #edit-actions,
.mecat-header-search-block input[type="submit"] {
  display: none !important;
}
/* Contact line below the search */
.mecat-header-contact-line {
  font-size: 0.75rem;
  color: rgba(200, 215, 235, 0.75);
  text-align: right;
  line-height: 1.4;
  font-family: 'Source Serif 4', Georgia, serif;
  white-space: nowrap;
}
.mecat-header-contact-line strong {
  color: #e8eef6;
  font-weight: 700;
}
/* ==========================================================================
   Responsive overrides for the new region layout
   ========================================================================== */
@media (max-width: 900px) {
  .mecat-header-region__inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 16px;
  }
  .mecat-header-search-block {
    align-items: flex-start;
    width: 100%;
  }
  .mecat-header-search-block input[type="search"],
  .mecat-header-search-block input.form-search {
    width: 100%;
  }
  .mecat-header-contact-line {
    text-align: left;
  }
}
/* ── Logo MAI – stânga în branding ──────────────────────── */
.mecat-header-mai-logo-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.mecat-header-mai-logo {
  display: block;
  height: 70px;
  width: auto;
}
@media (max-width: 640px) {
  .mecat-header-mai-logo {
    height: 50px;
  }
}
