/* Contact component parity: the shared Twig also renders outside #contacts.
 * Load after egzmaster/revision.css (theme weight 40, explicit version).
 * Keep data, templates, global layout and ordinary relative/z50 header intact.
 */
/* Keep the 24px header clearance inside the white main surface.
 * Breadcrumb top margin otherwise collapses through the heading/main. */
.egz-internal .egz-internal-heading {
  padding-top: 24px;
}
.egz-internal .breadcrumb {
  margin-top: 0;
}
:is(#contacts, .egz-internal) .contacts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
  margin-bottom: 24px;
}
:is(#contacts, .egz-internal) .contact-card {
  min-width: 0;
  /* Exact reference finish; the texture URL is supplied by the shared variable. */
  background-color: #f1f4f6;
  background-image: linear-gradient(110deg, rgba(249,250,251,.89), rgba(241,245,247,.92)), var(--steel-texture-image);
  background-position: center;
  background-size: cover;
  border: 1px solid #c9d1d6;
  border-radius: var(--radius, 10px);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-sizing: border-box;
}
:is(#contacts, .egz-internal) .c-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
:is(#contacts, .egz-internal) .c-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--color-border, #d9e0e6);
  color: var(--color-dark, #14181b);
  flex-shrink: 0;
}
:is(#contacts, .egz-internal) .c-term {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  color: var(--accent-steel, #5c6b75);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
:is(#contacts, .egz-internal) .c-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
  min-width: 0;
}
:is(#contacts, .egz-internal) .c-highlight-link {
  font-size: 19px;
  font-weight: 800;
  color: var(--color-dark, #14181b);
  display: inline-block;
  line-height: 1.3;
  word-break: break-word;
  overflow-wrap: anywhere;
}
:is(#contacts, .egz-internal) .c-highlight-link--mail {
  font-size: 16px;
  font-weight: 700;
}
:is(#contacts, .egz-internal) .c-def-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-dark, #14181b);
  line-height: 1.3;
  letter-spacing: .01em;
  overflow-wrap: anywhere;
}
:is(#contacts, .egz-internal) .c-card-footer {margin-top: 2px;}
:is(#contacts, .egz-internal) .c-messengers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
:is(#contacts, .egz-internal) .c-btn-messenger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
}
@media (max-width: 1024px) {
  :is(#contacts, .egz-internal) .contacts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}
@media (max-width: 640px) {
  :is(#contacts, .egz-internal) .contacts-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }
  :is(#contacts, .egz-internal) .contact-card {padding: 20px 18px;}
  :is(#contacts, .egz-internal) .c-highlight-link {font-size: 18px;}
  :is(#contacts, .egz-internal) .c-def-title {font-size: 18px;}
}

/* Shared managed customer logo, including its original wordmark. */
#header .egz-brand-image { display:block; width:80px; height:66px; object-fit:contain; }
#i2peae .egz-brand-image { display:block; width:140px; height:auto; object-fit:contain; filter:invert(1); }
:is(#contacts, .egz-internal) .max-link--contact { display:inline-flex; align-items:center; justify-content:center; width:56px; height:56px; border-radius:12px; }
:is(#contacts, .egz-internal) .max-link--contact img { display:block; width:48px; height:48px; object-fit:contain; }
@media(max-width:640px) { #header .egz-brand-image { width:68px; height:56px; } }

/* Text MAX CTA, shared by header, drawer, footer and both contact sections. */
#iqst .max-link--header,
#mobileDrawer .max-link--mobile,
#i2peae .max-link--footer,
:is(#contacts, .egz-internal) .max-link--contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: auto;
  min-height: 40px;
  padding: 10px 18px;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: var(--radius, 3px);
  background: linear-gradient(110deg, #3355ee 0%, #5533ee 66.2%, #9933dd 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
}
#iqst .max-link--header span { display: inline; }
#iqst .max-link--header:hover,
#mobileDrawer .max-link--mobile:hover,
#i2peae .max-link--footer:hover,
:is(#contacts, .egz-internal) .max-link--contact:hover {
  background: linear-gradient(110deg, #2946d6 0%, #4929d4 66.2%, #8526c5 100%);
  color: #fff;
  border-color: transparent;
}
@media (max-width: 600px) {
  #iqst .max-link--header { min-height: 40px; padding: 10px 12px; font-size: 12px; }
}
@media (min-width: 1200px) and (max-width: 1399px) {
  #iqst .header-actions { gap: 10px; }
  #iqst .nav-desktop .nav-list { gap: 12px; }
  #iqst .btn-header { padding: 11px 12px; }
}



/* Floating MAX remains a bare icon, including hover/focus states. */
.floating-actions .max-link--floating,
.floating-actions .max-link--floating:hover,
.floating-actions .max-link--floating:focus {
  background: transparent;
  box-shadow: none;
  transform: none;
}

#i2peae .f-contacts .max-link--footer { color: #fff; }

/* Keep the shared phone visible above MAX in the compact header. */
@media (max-width: 1199px) {
  #iqst { gap: 8px; }
  #iqst .header-actions {
    display: grid;
    grid-template-columns: auto auto auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 10px;
    row-gap: 4px;
  }
  #iqst .header-phone {
    display: block;
    grid-column: 1 / 3;
    grid-row: 1;
    justify-self: center;
    font-size: 16px;
    line-height: 20px;
  }
  #iqst .max-link--header {
    grid-column: 2;
    grid-row: 2;
    justify-self: stretch;
    min-height: 36px;
    padding: 8px 12px;
    font-size: 12px;
  }
  #iqst .header-search-box { grid-column: 1; grid-row: 2; }
  #iqst .burger-btn { grid-column: 3; grid-row: 1 / 3; }
  #iqst .btn-header { display: none; }
}
@media (max-width: 600px) {
  #iqst { padding-inline: 12px; }
  #iqst .header-actions { column-gap: 8px; }
  #iqst .max-link--header { padding-inline: 8px; font-size: 11.5px; }
}
