/* =========================================================
   SBS ENGINEERING CONSULTANCY
   COMPONENT-SPECIFIC STYLES
   ========================================================= */


/* =========================================================
   COMPONENT BUTTONS
   ========================================================= */

.service-card .btn,
.project-content .btn,
.insight-content .btn {
  border: 1px solid rgba(11,31,54,.15);

  background: transparent;

  color: var(--primary-color);
}

.service-card .btn:hover,
.project-content .btn:hover,
.insight-content .btn:hover {
  background: var(--primary-color);

  color: var(--white);
}


/* =========================================================
   CARD HEIGHT
   ========================================================= */

.project-card,
.service-card,
.insight-card,
.contact-card,
.values-grid .card {
  height: 100%;
}


/* =========================================================
   HERO ANIMATION
   ========================================================= */

.hero .hero-content,
.page-hero .container {
  animation: heroContentIn .8s ease both;
}

@keyframes heroContentIn {

  from {
    opacity: 0;

    transform: translateY(18px);
  }

  to {
    opacity: 1;

    transform: none;
  }

}


/* =========================================================
   SBS AI FLOATING ASSISTANT
   ========================================================= */

.sbs-ai-widget {
  position: fixed;

  right: 24px;
  bottom: 82px;

  z-index: 95;

  font-family: inherit;
}


/* =========================================================
   AI LAUNCHER
   ========================================================= */

.sbs-ai-launcher {
  position: relative;

  display: flex;
  align-items: center;

  gap: 9px;

  min-height: 46px;

  padding: 0 15px 0 10px;

  border: 1px solid rgba(196,154,61,.42);

  border-radius: 999px;

  background: rgba(16,31,48,.96);

  color: var(--white);

  font-family: inherit;

  font-size: .76rem;
  font-weight: 600;

  cursor: pointer;

  overflow: hidden;

  box-shadow:
    0 12px 30px rgba(10,25,40,.16),
    0 0 0 1px rgba(255,255,255,.04) inset;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  transition:
    transform var(--transition-smooth),
    box-shadow var(--transition),
    border-color var(--transition),
    background var(--transition);
}

.sbs-ai-launcher::after {
  content: "";

  position: absolute;

  inset: -1px;

  border-radius: inherit;

  pointer-events: none;

  background:
    linear-gradient(
      115deg,
      transparent 20%,
      rgba(255,255,255,.16) 50%,
      transparent 72%
    );

  transform: translateX(-130%);

  transition: transform .65s ease;
}

.sbs-ai-launcher:hover::after {
  transform: translateX(130%);
}

.sbs-ai-launcher:hover {
  transform: translateY(-4px) scale(1.015);

  border-color: rgba(196,154,61,.78);

  box-shadow:
    0 18px 40px rgba(10,25,40,.23),
    0 0 0 5px rgba(196,154,61,.055);
}

.sbs-ai-launcher.active {
  border-color: rgba(196,154,61,.75);
}


/* =========================================================
   AI ICON
   ========================================================= */

.sbs-ai-launcher-icon {
  width: 30px;
  height: 30px;

  display: grid;
  place-items: center;

  flex: 0 0 30px;

  border-radius: 50%;

  background: var(--secondary-color);

  color: var(--white);

  font-size: .85rem;

  box-shadow:
    0 0 0 5px rgba(196,154,61,.08);

  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.sbs-ai-launcher:hover .sbs-ai-launcher-icon {
  transform: rotate(12deg) scale(1.06);

  box-shadow:
    0 0 0 6px rgba(196,154,61,.10),
    0 6px 18px rgba(196,154,61,.20);
}

.sbs-ai-launcher-text {
  white-space: nowrap;
}


/* =========================================================
   AI ATTENTION ANIMATION
   ========================================================= */

.sbs-ai-launcher.attention {
  animation:
    aiWidgetAttention .8s ease-in-out 2;
}

@keyframes aiWidgetAttention {

  0% {
    transform: translateY(0);
  }

  35% {
    transform: translateY(-4px);
  }

  70% {
    transform: translateY(2px);
  }

  100% {
    transform: translateY(0);
  }

}


/* =========================================================
   AI PANEL
   ========================================================= */

.sbs-ai-panel {
  position: absolute;

  right: 0;
  bottom: 62px;

  width: 340px;

  overflow: hidden;

  border: 1px solid rgba(15,35,58,.10);

  border-radius: 17px;

  background: var(--white);

  box-shadow:
    0 28px 75px rgba(10,25,40,.20),
    0 0 0 1px rgba(255,255,255,.55);

  opacity: 0;
  visibility: hidden;

  transform:
    translateY(14px)
    scale(.97);

  transform-origin: bottom right;

  transition:
    opacity .25s ease,
    visibility .25s ease,
    transform .25s ease;
}

.sbs-ai-panel.active {
  opacity: 1;
  visibility: visible;

  transform:
    translateY(0)
    scale(1);
}


/* =========================================================
   AI PANEL HEADER
   ========================================================= */

.sbs-ai-panel-header {
  display: flex;

  align-items: center;
  justify-content: space-between;

  padding: 16px 17px;

  background: #101f30;

  color: var(--white);
}

.sbs-ai-panel-identity {
  display: flex;

  align-items: center;

  gap: 10px;
}

.sbs-ai-mini-avatar {
  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  border-radius: 10px;

  background: var(--secondary-color);

  color: var(--white);

  font-size: .9rem;
}

.sbs-ai-panel-identity strong {
  display: block;

  color: var(--white);

  font-size: .82rem;
  font-weight: 600;
}

.sbs-ai-panel-identity span {
  display: block;

  margin-top: 2px;

  color: rgba(255,255,255,.52);

  font-size: .65rem;
}

.sbs-ai-close {
  width: 30px;
  height: 30px;

  display: grid;
  place-items: center;

  border: 0;
  border-radius: 50%;

  background: rgba(255,255,255,.06);

  color: rgba(255,255,255,.7);

  font-size: 1.15rem;

  cursor: pointer;

  transition:
    background var(--transition-fast),
    color var(--transition-fast);
}

.sbs-ai-close:hover {
  background: rgba(255,255,255,.12);
  color: var(--white);
}


/* =========================================================
   AI PANEL BODY
   ========================================================= */

.sbs-ai-panel-body {
  padding: 20px;
}

.sbs-ai-welcome {
  display: flex;

  gap: 12px;

  margin-bottom: 18px;
}

.sbs-ai-welcome-icon {
  width: 30px;
  height: 30px;

  flex: 0 0 30px;

  display: grid;
  place-items: center;

  border-radius: 8px;

  background: rgba(196,154,61,.10);

  color: #b8892f;

  font-size: .8rem;
}

.sbs-ai-welcome strong {
  display: block;

  margin-bottom: 5px;

  color: #172b3f;

  font-size: .78rem;
  font-weight: 600;
}

.sbs-ai-welcome p {
  margin: 0;

  color: #7b858e;

  font-size: .7rem;

  line-height: 1.6;
}


/* =========================================================
   AI QUICK QUESTIONS
   ========================================================= */

.sbs-ai-quick-actions {
  display: flex;

  flex-direction: column;

  gap: 7px;
}

.sbs-ai-quick-actions button {
  position: relative;

  width: 100%;

  padding: 10px 34px 10px 11px;

  overflow: hidden;

  border: 1px solid rgba(15,35,58,.08);

  border-radius: 9px;

  background: #fafbfc;

  color: #4d5a66;

  text-align: left;

  font-family: inherit;

  font-size: .69rem;

  cursor: pointer;

  transition:
    transform var(--transition-fast),
    border-color var(--transition-fast),
    background var(--transition-fast),
    color var(--transition-fast);
}

.sbs-ai-quick-actions button::after {
  content: "→";

  position: absolute;

  right: 12px;
  top: 50%;

  opacity: 0;

  transform: translate(-5px,-50%);

  transition:
    opacity var(--transition-fast),
    transform var(--transition-fast);
}

.sbs-ai-quick-actions button:hover {
  transform: translateX(3px);

  border-color: rgba(196,154,61,.32);

  background: rgba(196,154,61,.05);

  color: #172b3f;
}

.sbs-ai-quick-actions button:hover::after {
  opacity: 1;

  transform: translate(0,-50%);
}


/* =========================================================
   AI PANEL FOOTER
   ========================================================= */

.sbs-ai-panel-footer {
  padding: 13px 17px;

  border-top: 1px solid rgba(15,35,58,.07);

  background: #fafbfc;
}

.sbs-ai-full-link {
  display: flex;

  align-items: center;
  justify-content: space-between;

  color: var(--secondary-dark);

  font-size: .7rem;
  font-weight: 600;

  text-decoration: none;
}

.sbs-ai-full-link span {
  display: inline-block;

  transition: transform var(--transition-fast);
}

.sbs-ai-full-link:hover {
  color: #7f5c1c;
}

.sbs-ai-full-link:hover span {
  transform: translateX(5px);
}


/* =========================================================
   AI FOCUS ACCESSIBILITY
   ========================================================= */

.sbs-ai-launcher:focus-visible,
.sbs-ai-close:focus-visible {
  outline: 2px solid var(--secondary-color);
  outline-offset: 3px;
}


/* =========================================================
   MOBILE AI
   ========================================================= */

@media (max-width: 600px) {

  .sbs-ai-widget {
    right: 15px;
    bottom: 76px;
  }

  .sbs-ai-launcher {
    width: 48px;
    height: 48px;

    min-height: 48px;

    justify-content: center;

    padding: 0;
  }

  .sbs-ai-launcher-text {
    display: none;
  }

  .sbs-ai-panel {
    right: 0;
    bottom: 60px;

    width: min(
      340px,
      calc(100vw - 30px)
    );
  }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .sbs-ai-launcher.attention {
    animation: none;
  }

  .sbs-ai-launcher,
  .sbs-ai-launcher::after,
  .sbs-ai-launcher-icon,
  .sbs-ai-panel,
  .sbs-ai-quick-actions button,
  .sbs-ai-quick-actions button::after,
  .sbs-ai-full-link span {
    transition: none !important;
  }

  .sbs-ai-launcher:hover,
  .sbs-ai-launcher:hover .sbs-ai-launcher-icon,
  .sbs-ai-quick-actions button:hover {
    transform: none;
  }

}