/* ========================================================================== 
   ESPO 2.5.1.123.36 — Final Visual Correction
   Removes remaining black action overrides and restores life to pale surfaces.
   ========================================================================== */

:root {
  --espo-final-blue: #0b6da8;
  --espo-final-blue-bright: #1389cf;
  --espo-final-blue-deep: #173d5a;
  --espo-final-blue-deeper: #123149;
  --espo-final-gold: #c39a45;
  --espo-final-ivory: #f8f4ea;
  --espo-final-ice: #f3f8fb;
}

/* --------------------------------------------------------------------------
   Header: kill the last charcoal overrides for good.
   -------------------------------------------------------------------------- */
.site-header.espo-floating-header .espo-header-discuss,
.site-header.espo-floating-header .espo-header-discuss.espo-btn,
.site-header.espo-floating-header .espo-header-discuss.espo-btn--primary {
  color: #fff !important;
  border-color: rgba(11,109,168,.84) !important;
  background: linear-gradient(135deg, #168ed6 0%, #0b6da8 62%, #095a89 100%) !important;
  box-shadow: 0 10px 24px rgba(11,109,168,.20), inset 0 1px 0 rgba(255,255,255,.18) !important;
}

.site-header.espo-floating-header .espo-header-discuss:hover,
.site-header.espo-floating-header .espo-header-discuss:focus-visible,
.site-header.espo-floating-header .espo-header-discuss.espo-btn--primary:hover,
.site-header.espo-floating-header .espo-header-discuss.espo-btn--primary:focus-visible {
  color: #fff !important;
  border-color: rgba(19,137,207,.95) !important;
  background: linear-gradient(135deg, #22a1e8 0%, #0f7dc0 58%, #0b6da8 100%) !important;
  box-shadow: 0 15px 32px rgba(11,109,168,.27), inset 0 1px 0 rgba(255,255,255,.18) !important;
}

/* Any remaining dark button now belongs to ESPO navy-blue, not black. */
body .espo-btn--dark {
  color: #fff !important;
  border-color: rgba(23,61,90,.94) !important;
  background: linear-gradient(135deg, #1c4b6f 0%, #173d5a 56%, #123149 100%) !important;
  box-shadow: 0 11px 26px rgba(18,49,73,.18) !important;
}

body .espo-btn--dark:hover,
body .espo-btn--dark:focus-visible {
  color: #fff !important;
  border-color: rgba(11,109,168,.95) !important;
  background: linear-gradient(135deg, #2077ac 0%, #0f7fc5 58%, #0b6da8 100%) !important;
  box-shadow: 0 16px 34px rgba(11,109,168,.24) !important;
}

/* Search remains blue even where older header rules had !important charcoal. */
.site-header.espo-floating-header .espo-search-toggle:hover,
.site-header.espo-floating-header .espo-search-toggle:focus-visible,
.site-header.espo-floating-header .espo-search-toggle[aria-expanded="true"] {
  color: #fff !important;
  border-color: rgba(11,109,168,.84) !important;
  background: linear-gradient(135deg, #168ed6, #0b6da8) !important;
  box-shadow: 0 12px 26px rgba(11,109,168,.20) !important;
}

/* --------------------------------------------------------------------------
   Contact page: replace sterile white with controlled architectural atmosphere.
   -------------------------------------------------------------------------- */
.espo-contact-page {
  background:
    radial-gradient(circle at 8% 22%, rgba(11,109,168,.035), transparent 22%),
    radial-gradient(circle at 92% 52%, rgba(195,154,69,.03), transparent 22%),
    #fffdf9;
}

.espo-contact-routes {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 12%, rgba(11,109,168,.075), transparent 29%),
    radial-gradient(circle at 88% 8%, rgba(195,154,69,.065), transparent 27%),
    linear-gradient(180deg, #fbfcfc 0%, #f7f4ec 48%, #f4f8fa 100%) !important;
}

.espo-contact-routes::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image:
    linear-gradient(rgba(11,109,168,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,109,168,.045) 1px, transparent 1px);
  background-size: 76px 76px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.55), transparent 90%);
}

.espo-contact-routes > .espo-contact-shell {
  position: relative;
  z-index: 1;
}

.espo-contact-routes__head h2 {
  color: #13283a;
}

.espo-contact-route {
  border-color: rgba(17,28,39,.09) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.97), rgba(248,246,239,.92)) !important;
  box-shadow: 0 18px 42px rgba(15,36,56,.065), inset 0 1px 0 rgba(255,255,255,.92) !important;
}

.espo-contact-route:nth-child(1) {
  background:
    radial-gradient(circle at 92% 8%, rgba(11,109,168,.055), transparent 28%),
    linear-gradient(180deg, #fff, #f7f9f9) !important;
}

.espo-contact-route:nth-child(2) {
  background:
    radial-gradient(circle at 90% 8%, rgba(195,154,69,.055), transparent 28%),
    linear-gradient(180deg, #fff, #faf7ef) !important;
}

.espo-contact-route:nth-child(3) {
  background:
    radial-gradient(circle at 90% 8%, rgba(11,109,168,.045), transparent 28%),
    linear-gradient(180deg, #fff, #f5f8fa) !important;
}

.espo-contact-route:hover {
  border-color: rgba(11,109,168,.18) !important;
  box-shadow: 0 26px 58px rgba(15,36,56,.10), inset 0 1px 0 rgba(255,255,255,.95) !important;
}

.espo-contact-route::before {
  height: 3px;
  background: linear-gradient(90deg, var(--espo-final-blue), #68a9ce 52%, var(--espo-final-gold)) !important;
}

.espo-contact-route__actions a {
  border-color: rgba(11,109,168,.11) !important;
  color: #17374f !important;
  background: rgba(255,255,255,.84) !important;
  box-shadow: 0 6px 14px rgba(15,36,56,.035);
}

.espo-contact-route__actions a:hover,
.espo-contact-route__actions a:focus-visible {
  color: #fff !important;
  border-color: var(--espo-final-blue) !important;
  background: linear-gradient(135deg, #168ed6, #0b6da8) !important;
  box-shadow: 0 10px 22px rgba(11,109,168,.18) !important;
}

.espo-contact-route__whatsapp {
  border-color: rgba(11,109,168,.14) !important;
  background: linear-gradient(135deg, rgba(11,109,168,.055), rgba(255,255,255,.78)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.88);
}

.espo-contact-route__whatsapp:hover,
.espo-contact-route__whatsapp:focus-visible {
  border-color: rgba(11,109,168,.28) !important;
  background: linear-gradient(135deg, rgba(11,109,168,.10), rgba(255,255,255,.94)) !important;
  box-shadow: 0 12px 26px rgba(11,109,168,.08) !important;
}

/* Info bar: rich blue instead of near-black. */
.espo-contact-detailbar {
  border-color: rgba(255,255,255,.08) !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(78,159,207,.17), transparent 28%),
    linear-gradient(135deg, #19415f 0%, #173851 48%, #123149 100%) !important;
  box-shadow: 0 22px 50px rgba(18,49,73,.18) !important;
}

.espo-contact-detailbar__item {
  border-inline-end-color: rgba(255,255,255,.10) !important;
}

.espo-contact-detailbar__item > span {
  color: #e0c676 !important;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.075) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07);
}

.espo-contact-detailbar__item small {
  color: rgba(255,255,255,.58) !important;
}

.espo-contact-detailbar__item strong {
  color: rgba(255,255,255,.96) !important;
}

/* The form region should transition from the routes instead of reverting to flat white. */
.espo-contact-form-section {
  background:
    radial-gradient(circle at 6% 18%, rgba(11,109,168,.055), transparent 25%),
    radial-gradient(circle at 92% 14%, rgba(195,154,69,.045), transparent 23%),
    linear-gradient(180deg, #f7f4ec 0%, #fbfaf6 58%, #f4f8fa 100%) !important;
}

.espo-contact-form-panel {
  border-color: rgba(17,28,39,.08) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(252,250,244,.95)) !important;
  box-shadow: 0 28px 72px rgba(15,36,56,.095), inset 0 1px 0 rgba(255,255,255,.96) !important;
}

/* Slight atmosphere for other known sterile light blocks, without redesigning them. */
.espo-contact-page .espo-contact-shell,
.espo-contact-page .espo-contact-form-layout {
  isolation: isolate;
}

@media (max-width: 767px) {
  .espo-contact-routes::before {
    background-size: 54px 54px;
    opacity: .22;
  }

  .espo-contact-detailbar {
    background: linear-gradient(145deg, #19415f, #123149) !important;
  }
}
