:root {
  --fh-accent: #6366f1;
  --fh-nav-start: #1e1b4b;
  --fh-nav-end: #312e81;
}

.bg-gradient-nav {
  background: linear-gradient(135deg, var(--fh-nav-start), var(--fh-nav-end)) !important;
}

.text-accent {
  color: var(--fh-accent) !important;
}

.letter-spacing {
  letter-spacing: 0.08em;
}

.hero-card {
  background: linear-gradient(160deg, #f8fafc 0%, #e0e7ff 100%);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2rem rgba(30, 27, 75, 0.12) !important;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.6s ease forwards;
}

.object-fit-cover {
  object-fit: cover;
}

/* stagger children slightly */
.fade-in:nth-child(1) { animation-delay: 0.05s; }
.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.15s; }

.admin-form-hero {
  background: linear-gradient(120deg, rgba(99, 102, 241, 0.12), rgba(30, 27, 75, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.services-toolbar {
  background: linear-gradient(180deg, var(--bs-body-bg), rgba(99, 102, 241, 0.04));
}

.portfolio-slide-media {
  max-height: 440px;
  background: #0f172a;
}

.portfolio-carousel .carousel-caption.portfolio-caption-bar {
  position: static;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.55));
  text-align: left;
}

.portfolio-thumbs .thumb-btn.active {
  background: var(--bs-primary);
  color: #fff;
}

.order-card-v2 {
  background: linear-gradient(165deg, var(--bs-body-bg) 0%, rgba(99, 102, 241, 0.06) 100%);
}

.lead-custom {
  font-size: 1.05rem;
  line-height: 1.65;
}

.fh-dot {
  opacity: 0.35;
  margin-right: 0.15rem;
}

.hero-block {
  padding-bottom: 0.5rem;
}

.fh-footer {
  background: var(--bs-tertiary-bg);
}

[data-bs-theme="dark"] .hero-card {
  background: linear-gradient(160deg, #1e293b 0%, #312e81 55%);
  border-color: rgba(129, 140, 248, 0.25);
}

[data-bs-theme="dark"] .admin-form-hero {
  background: linear-gradient(120deg, rgba(99, 102, 241, 0.2), rgba(15, 23, 42, 0.9));
  border-color: rgba(129, 140, 248, 0.2);
}

[data-bs-theme="dark"] .services-toolbar {
  background: linear-gradient(180deg, var(--bs-body-bg), rgba(30, 27, 75, 0.35));
}

.pre-line {
  white-space: pre-line;
}

/* —— Typography & shell —— */
.fh-app-body {
  font-family: "IBM Plex Sans", system-ui, sans-serif;
}

.fh-font-display {
  font-family: "Syne", "IBM Plex Sans", system-ui, sans-serif;
}

.letter-spacing-tight {
  letter-spacing: -0.02em;
}

@keyframes fhDrop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fh-footer-link {
  color: var(--bs-secondary-color);
  text-decoration: none;
  transition: color 0.15s ease;
}

.fh-footer-link:hover {
  color: var(--fh-accent);
}

.fh-theme-btn {
  transition: transform 0.2s ease;
}

.fh-theme-btn:hover {
  transform: rotate(18deg) scale(1.05);
}

/* —— Scroll reveal —— */
.fh-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.fh-reveal.fh-reveal-visible {
  opacity: 1;
  transform: translateY(0);
}

/* —— Marketing sections —— */
.fh-page-hero {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.12), rgba(15, 23, 42, 0.04));
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.fh-hero-glow {
  width: 120%;
  height: 200px;
  background: radial-gradient(
    ellipse at center,
    rgba(129, 140, 248, 0.35) 0%,
    transparent 65%
  );
  pointer-events: none;
  opacity: 0.7;
}

.fh-glass-card {
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(10px);
}

[data-bs-theme="dark"] .fh-glass-card {
  background: rgba(15, 23, 42, 0.55);
}

.fh-icon-tile {
  width: 2.75rem;
  height: 2.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(99, 102, 241, 0.15);
}

.fh-team-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fh-team-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 1.25rem 2.5rem rgba(30, 27, 75, 0.15) !important;
}

.fh-review-card {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  border: 1px solid transparent !important;
}

.fh-review-card:hover {
  box-shadow: 0 0.75rem 2rem rgba(99, 102, 241, 0.12) !important;
  border-color: rgba(99, 102, 241, 0.2) !important;
}

.fh-faq-accordion .accordion-button {
  box-shadow: none !important;
  background: var(--bs-body-bg);
}

.fh-faq-accordion .accordion-button:not(.collapsed) {
  background: rgba(99, 102, 241, 0.08);
  color: var(--bs-body-color);
}

/* —— Home —— */
.fh-tilt-subtle {
  transition: transform 0.35s ease;
}

.fh-float-slow {
  animation: fhFloat 5s ease-in-out infinite;
}

@keyframes fhFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

.fh-featured-item {
  transition: background-color 0.15s ease;
  border-radius: 0.5rem;
  margin-left: -0.5rem;
  margin-right: -0.5rem;
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
}

.fh-featured-item:hover {
  background-color: rgba(99, 102, 241, 0.06);
}

.fh-stat-card {
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.fh-stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.35) !important;
}

.fh-stat-value {
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--fh-accent);
}

.fh-btn-shine {
  position: relative;
  overflow: hidden;
}

.fh-btn-shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 30%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.fh-btn-shine:hover::after {
  transform: translateX(100%);
}

#homeTabs .nav-link {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#homeTabs .nav-link:hover {
  transform: translateY(-2px);
}

#homeTabs .nav-link.active {
  box-shadow: 0 0.35rem 1rem rgba(99, 102, 241, 0.35);
}

.fh-service-card img {
  transition: transform 0.45s ease;
}

.fh-service-card:hover img {
  transform: scale(1.06);
}

.fh-portfolio-teaser {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fh-portfolio-teaser:hover {
  transform: translateY(-3px);
  box-shadow: 0 0.75rem 1.75rem rgba(30, 27, 75, 0.1) !important;
}

.fh-portfolio-teaser-media {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.12), rgba(148, 163, 184, 0.2)) !important;
}

[data-bs-theme="dark"] .fh-portfolio-teaser-media {
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.22), rgba(30, 27, 75, 0.5)) !important;
}

/* —— Auth cards —— */
.fh-auth-card {
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: linear-gradient(180deg, var(--bs-body-bg) 0%, rgba(99, 102, 241, 0.04) 100%);
}

[data-bs-theme="dark"] .fh-auth-card {
  background: linear-gradient(180deg, var(--bs-body-bg) 0%, rgba(55, 48, 163, 0.2) 100%);
}

/* —— Shell & header —— */
.fh-main {
  background: radial-gradient(1200px 480px at 10% -10%, rgba(99, 102, 241, 0.07), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(56, 189, 248, 0.05), transparent 50%),
    var(--bs-body-bg);
}

@media (min-width: 1400px) {
  .fh-container {
    max-width: 1180px;
  }
}

.fh-header {
  z-index: 1030;
}

.fh-topnav {
  background: linear-gradient(118deg, #0f0a2e 0%, #1e1b4b 38%, #312e81 100%);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 32px rgba(15, 10, 46, 0.35);
}

.fh-topnav .navbar-brand {
  color: #fff !important;
}

.fh-brand-mark {
  width: 2rem;
  height: 2rem;
  font-size: 0.95rem;
  background: linear-gradient(145deg, rgba(129, 140, 248, 0.95), rgba(99, 102, 241, 0.75));
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.fh-nav-toggler .navbar-toggler-icon {
  filter: invert(1) grayscale(1);
}

.fh-nav-link {
  color: rgba(255, 255, 255, 0.78) !important;
  font-weight: 500;
  font-size: 0.925rem;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.fh-nav-link:hover,
.fh-nav-link:focus {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.08) !important;
}

.fh-nav-pill {
  background: rgba(251, 191, 36, 0.12) !important;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.fh-nav-pill:hover {
  background: rgba(251, 191, 36, 0.2) !important;
}

.fh-topnav .dropdown-menu {
  --bs-dropdown-bg: var(--bs-body-bg);
  --bs-dropdown-link-color: var(--bs-body-color);
  --bs-dropdown-link-hover-bg: rgba(99, 102, 241, 0.1);
  animation: fhDrop 0.22s ease forwards;
}

.fh-mega {
  min-width: 280px;
}

.fh-mega--wide {
  min-width: min(420px, 94vw);
}

.fh-mega-link {
  border: 1px solid transparent;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.fh-mega-link:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.18);
  transform: translateY(-1px);
}

.fh-mega-title {
  color: var(--bs-body-color);
}

.fh-user-pill {
  transition: box-shadow 0.2s ease, transform 0.15s ease;
  color: rgba(255, 255, 255, 0.92) !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}

.fh-user-pill:hover,
.fh-user-pill:focus {
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

.fh-user-avatar {
  width: 2rem;
  height: 2rem;
  background: linear-gradient(145deg, #818cf8, #6366f1);
  color: #fff;
  font-size: 0.75rem;
}

.fh-user-dropdown {
  min-width: 13rem;
}

.btn-fh-cta {
  --bs-btn-color: #1e1b4b;
  --bs-btn-bg: #e0e7ff;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-color: #1e1b4b;
  --bs-btn-hover-border-color: transparent;
  box-shadow: 0 4px 20px rgba(224, 231, 255, 0.35);
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7) !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
}

.btn-icon:hover {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.1);
}

.fh-nav-offcanvas.offcanvas {
  --bs-offcanvas-bg: linear-gradient(165deg, #0f0a2e 0%, #1e1b4b 100%);
  background: linear-gradient(165deg, #0f0a2e 0%, #1e1b4b 100%);
  color: rgba(255, 255, 255, 0.92);
}

@media (min-width: 992px) {
  .fh-nav-offcanvas.offcanvas-lg {
    position: static;
    transform: none !important;
    visibility: visible !important;
    z-index: auto;
    display: flex !important;
    flex-grow: 1;
    flex-basis: auto;
    width: auto !important;
    max-width: none;
    height: auto !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible;
    transition: none !important;
  }

  .fh-nav-offcanvas .offcanvas-body {
    overflow: visible;
    flex-grow: 1;
    padding: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
  }
}

.fh-header--compact .fh-topnav {
  box-shadow: 0 4px 24px rgba(15, 10, 46, 0.25);
}

/* —— Flash / toasts —— */
.fh-flash-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.fh-toast {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(99, 102, 241, 0.12);
  background: linear-gradient(120deg, var(--bs-body-bg), rgba(99, 102, 241, 0.06));
  box-shadow: 0 12px 40px rgba(30, 27, 75, 0.08) !important;
}

.fh-toast__body {
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.fh-toast__close {
  flex-shrink: 0;
  margin-top: 0.15rem;
  opacity: 0.55;
}

.fh-toast__icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1;
}

.fh-toast--success .fh-toast__icon {
  background: rgba(34, 197, 94, 0.18);
  color: #16a34a;
}

.fh-toast--success .fh-toast__icon::before {
  content: "✓";
}

.fh-toast--danger .fh-toast__icon,
.fh-toast--error .fh-toast__icon {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.fh-toast--danger .fh-toast__icon::before,
.fh-toast--error .fh-toast__icon::before {
  content: "!";
}

.fh-toast--warning .fh-toast__icon {
  background: rgba(245, 158, 11, 0.18);
  color: #d97706;
}

.fh-toast--warning .fh-toast__icon::before {
  content: "◆";
}

.fh-toast--info .fh-toast__icon,
.fh-toast--message .fh-toast__icon {
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
}

.fh-toast--info .fh-toast__icon::before,
.fh-toast--message .fh-toast__icon::before {
  content: "i";
  font-style: italic;
  font-family: Georgia, serif;
}

.fh-toast--primary .fh-toast__icon::before {
  content: "●";
  color: var(--fh-accent);
}

[data-bs-theme="dark"] .fh-toast {
  border-color: rgba(129, 140, 248, 0.22);
  background: linear-gradient(120deg, var(--bs-body-bg), rgba(49, 46, 129, 0.35));
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35) !important;
}

/* —— Custom modal-style dialogs —— */
.fh-dialog {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.fh-dialog[hidden] {
  display: none !important;
}

.fh-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.fh-dialog__panel {
  position: relative;
  width: min(100%, 400px);
  border-radius: 1.35rem;
  background: var(--bs-body-bg);
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 28px 80px rgba(30, 27, 75, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  overflow: hidden;
  animation: fhDialogIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes fhDialogIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.fh-dialog__glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 120px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.35), transparent 70%);
  opacity: 0.6;
  pointer-events: none;
}

.fh-dialog__inner {
  position: relative;
  padding: 1.75rem 1.75rem 1.5rem;
}

.fh-dialog__icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  font-size: 1.35rem;
  font-weight: 800;
  background: rgba(99, 102, 241, 0.12);
  color: var(--fh-accent);
}

.fh-dialog.fh-dialog--confirm .fh-dialog__icon {
  background: rgba(245, 158, 11, 0.16);
  color: #d97706;
}

.fh-dialog.fh-dialog--confirm .fh-dialog__icon::before {
  content: "?";
}

.fh-dialog.fh-dialog--danger .fh-dialog__icon {
  background: rgba(239, 68, 68, 0.14);
  color: #dc2626;
}

.fh-dialog.fh-dialog--danger .fh-dialog__icon::before {
  content: "!";
}

.fh-dialog.fh-dialog--info .fh-dialog__icon::before {
  content: "i";
  font-style: italic;
  font-family: Georgia, serif;
}

.fh-dialog__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.fh-dialog__desc {
  color: var(--bs-secondary-color);
  font-size: 0.96rem;
  line-height: 1.55;
}

.fh-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.fh-dialog--open {
  overflow: hidden;
}

/* —— Cards & forms (global polish) —— */
.card {
  border-radius: 1rem;
}

.card.shadow,
.card.shadow-sm {
  border: 1px solid rgba(99, 102, 241, 0.06);
}

.rounded-4.border-0.shadow {
  border: 1px solid rgba(99, 102, 241, 0.06) !important;
}

.form-control,
.form-select {
  border-radius: 0.65rem;
}

.btn {
  border-radius: 0.65rem;
}

.btn-lg.rounded-pill {
  border-radius: 999px !important;
}

.table {
  border-radius: 0.75rem;
  overflow: hidden;
}

/* —— Admin attention indicators —— */
.fh-attn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  background: linear-gradient(135deg, #dc2626, #ea580c);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.fh-attn-badge--sm {
  min-width: 1.25rem;
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
}

a.nav-link.fh-nav-attn {
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.55);
  background: rgba(251, 191, 36, 0.12);
}

[data-bs-theme="dark"] a.nav-link.fh-nav-attn {
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.08);
}

.fh-attn-pulse {
  width: 0.5rem;
  height: 0.5rem;
  background: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.45);
  animation: fh-attn-glow 2s ease-in-out infinite;
}

@keyframes fh-attn-glow {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.15);
  }
}

.fh-attn-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #ea580c);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

.fh-admin-attn-banner {
  background: linear-gradient(120deg, rgba(251, 191, 36, 0.22), rgba(254, 243, 199, 0.55));
  border: 1px solid rgba(217, 119, 6, 0.35) !important;
}

[data-bs-theme="dark"] .fh-admin-attn-banner {
  background: linear-gradient(120deg, rgba(180, 83, 9, 0.35), rgba(30, 27, 75, 0.65));
  border-color: rgba(251, 191, 36, 0.25) !important;
}
