/* ========================================================================== 
   ESPO 2.5.1.123.34 — Button System Premium Refresh
   Gives site actions stronger character, better hierarchy, and warmer ESPO energy.
   ========================================================================== */

:root {
  --espo-btn-radius-premium: 1rem;
  --espo-btn-radius-pill: 999px;
  --espo-btn-shadow-soft: 0 10px 24px rgba(12, 34, 53, .08);
  --espo-btn-shadow-blue: 0 12px 28px rgba(11, 109, 168, .20);
  --espo-btn-shadow-gold: 0 12px 28px rgba(194, 154, 70, .18);
  --espo-btn-shadow-navy: 0 12px 28px rgba(15, 36, 56, .18);
}

.espo-btn {
  position: relative;
  isolation: isolate;
  min-height: 2.85rem;
  padding: .8rem 1.18rem;
  border-width: 1px;
  border-style: solid;
  border-radius: var(--espo-btn-radius-premium);
  font-weight: 720;
  letter-spacing: .01em;
  line-height: 1.1;
  text-shadow: none;
  box-shadow: var(--espo-btn-shadow, var(--espo-btn-shadow-soft));
  transition:
    transform .22s ease,
    box-shadow .22s ease,
    border-color .22s ease,
    background .22s ease,
    color .22s ease,
    filter .22s ease;
}

.espo-btn::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,0));
  opacity: .9;
  pointer-events: none;
  z-index: -1;
}

.espo-btn::after {
  content: "";
  position: absolute;
  inset: auto auto 0 1rem;
  width: calc(100% - 2rem);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.22), rgba(255,255,255,.6), rgba(255,255,255,.22));
  opacity: .4;
  pointer-events: none;
}

.espo-btn .espo-btn__content {
  position: relative;
  z-index: 1;
}

.espo-btn .espo-icon {
  transition: transform .24s cubic-bezier(.22,1,.36,1), opacity .24s ease;
}

.espo-btn:hover,
.espo-btn:focus-visible {
  transform: translateY(-2px);
  filter: saturate(1.04);
}

.espo-btn:active {
  transform: translateY(0);
}

.espo-btn:hover .espo-icon,
.espo-btn:focus-visible .espo-icon {
  transform: translateX(3px) translateY(-1px);
}

html[dir="rtl"] .espo-btn:hover .espo-icon,
html[dir="rtl"] .espo-btn:focus-visible .espo-icon {
  transform: rotate(180deg) translateX(3px) translateY(-1px);
}

.espo-btn--primary {
  --espo-btn-bg: linear-gradient(135deg, #1690dc, #0b6da8 60%, #0a5f93);
  --espo-btn-bg-hover: linear-gradient(135deg, #1aa1ef, #0d78bb 58%, #0b6da8);
  --espo-btn-color: #fff;
  --espo-btn-color-hover: #fff;
  --espo-btn-border: rgba(11,109,168,.96);
  --espo-btn-border-hover: rgba(11,109,168,.98);
  --espo-btn-shadow: var(--espo-btn-shadow-blue);
  --espo-btn-shadow-hover: 0 16px 34px rgba(11,109,168,.28);
}

.espo-btn--dark {
  --espo-btn-bg: linear-gradient(135deg, #173852, #12304a 58%, #0e2438);
  --espo-btn-bg-hover: linear-gradient(135deg, #1b4d74, #0f7fc5 62%, #0b6da8);
  --espo-btn-color: #fff;
  --espo-btn-color-hover: #fff;
  --espo-btn-border: rgba(18,48,74,.96);
  --espo-btn-border-hover: rgba(11,109,168,.96);
  --espo-btn-shadow: var(--espo-btn-shadow-navy);
  --espo-btn-shadow-hover: 0 16px 34px rgba(11,109,168,.24);
}

.espo-btn--accent {
  --espo-btn-bg: linear-gradient(135deg, #e2c878, #c89d47 62%, #b98c38);
  --espo-btn-bg-hover: linear-gradient(135deg, #edd897, #d5aa54 60%, #c2933f);
  --espo-btn-color: #132231;
  --espo-btn-color-hover: #132231;
  --espo-btn-border: rgba(194,154,70,.95);
  --espo-btn-border-hover: rgba(194,154,70,.98);
  --espo-btn-shadow: var(--espo-btn-shadow-gold);
  --espo-btn-shadow-hover: 0 16px 34px rgba(194,154,70,.24);
}

.espo-btn--secondary {
  --espo-btn-bg: linear-gradient(180deg, #ffffff, #f7fafc);
  --espo-btn-bg-hover: linear-gradient(180deg, #ffffff, #eef6fb);
  --espo-btn-color: #132231;
  --espo-btn-color-hover: #0b6da8;
  --espo-btn-border: rgba(17,28,39,.12);
  --espo-btn-border-hover: rgba(11,109,168,.22);
  --espo-btn-shadow: 0 10px 24px rgba(17,28,39,.06);
  --espo-btn-shadow-hover: 0 14px 28px rgba(11,109,168,.10);
}

.espo-btn--text {
  min-height: 2.5rem;
  padding-inline: 0;
  border-radius: 0;
  box-shadow: none !important;
}

.espo-btn--text::before,
.espo-btn--text::after {
  display: none;
}

.espo-button-on-dark {
  --espo-btn-bg: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03));
  --espo-btn-bg-hover: linear-gradient(180deg, rgba(11,109,168,.24), rgba(11,109,168,.18));
  --espo-btn-color: #fff;
  --espo-btn-color-hover: #fff;
  --espo-btn-border: rgba(255,255,255,.22);
  --espo-btn-border-hover: rgba(255,255,255,.34);
  --espo-btn-shadow: 0 10px 24px rgba(0,0,0,.12);
  --espo-btn-shadow-hover: 0 14px 28px rgba(11,109,168,.18);
  backdrop-filter: blur(10px);
}

/* Context refinements */
.site-header .espo-btn {
  min-height: 2.6rem;
  padding: .72rem 1.05rem;
  font-size: .76rem;
  border-radius: .88rem;
}

.espo-search-panel .espo-btn,
.espo-contact-form-panel .espo-btn,
.espo-profile-toolbar__actions :is(a, button) {
  border-radius: .92rem;
}

.home .espo-ohec-actions .espo-btn,
.home .espo-final-cta__actions .espo-btn,
.espo-home-cta-canonical .espo-final-cta__actions .espo-btn,
.espo-sectors-home-cta .espo-final-cta__actions .espo-btn,
.espo-projects-home-cta .espo-final-cta__actions .espo-btn {
  min-height: 2.95rem;
  padding-inline: 1.22rem;
  font-size: .78rem;
  border-radius: var(--espo-btn-radius-pill) !important;
}

.home .espo-ohec-actions .espo-btn--dark {
  color: #fff !important;
  border-color: rgba(11,109,168,.92) !important;
  background: linear-gradient(135deg, #153852, #0f7fc5 64%, #0b6da8) !important;
  box-shadow: 0 16px 32px rgba(11,109,168,.20) !important;
}

.home .espo-ohec-actions .espo-btn--dark:hover,
.home .espo-ohec-actions .espo-btn--dark:focus-visible {
  background: linear-gradient(135deg, #1d5480, #1798e5 62%, #0b6da8) !important;
  box-shadow: 0 18px 36px rgba(11,109,168,.26) !important;
}

.home .espo-ohec-actions .espo-btn--secondary {
  color: #13314c !important;
  border-color: rgba(194,154,70,.18) !important;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,241,231,.86)) !important;
}

.home .espo-ohec-actions .espo-btn--secondary:hover,
.home .espo-ohec-actions .espo-btn--secondary:focus-visible {
  color: #0b6da8 !important;
  border-color: rgba(11,109,168,.22) !important;
  background: linear-gradient(180deg, #ffffff, #eef6fb) !important;
}

.espo-contact-form-panel .espo-form-submit-action .espo-btn,
.espo-contact-form-panel button[type="submit"] {
  min-width: 12.75rem;
  font-weight: 740;
}

/* Slightly more alive tertiary controls */
.espo-profile-toolbar__actions :is(a,button),
.espo-footer-bottom button {
  transition: color .22s ease, border-color .22s ease, background .22s ease, transform .22s ease, box-shadow .22s ease;
}

.espo-profile-toolbar__actions :is(a,button):hover,
.espo-profile-toolbar__actions :is(a,button):focus-visible,
.espo-footer-bottom button:hover,
.espo-footer-bottom button:focus-visible {
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .espo-btn {
    min-height: 2.8rem;
    padding-inline: 1rem;
    font-size: .9rem;
  }

  .site-header .espo-btn {
    font-size: .74rem;
  }
}
