/* ==========================================================================
   TRECTOR STYLES — Custom CSS for Frappe Migration
   Source: Trec-Tor-NextJS Tailwind config + globals.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS VARIABLES  (from tailwind.config.ts)
   -------------------------------------------------------------------------- */
:root {
  --trec-primary: #667eea;
  --trec-secondary: #764ba2;
  --trec-gradient: #6e64c6;
  --trec-accent: #f093fb;
  --trec-link: #4451b8;
  --trec-link-hover: #3340a0;

  --trec-text-primary: #111827;
  --trec-text-secondary: #4b5563;
  --trec-text-muted: #6b7280;

  --trec-bg-white: #ffffff;
  --trec-bg-gray-50: #f9fafb;
  --trec-bg-gray-100: #f3f4f6;
  --trec-bg-gray-900: #111827;

  --trec-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --trec-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --trec-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --trec-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --trec-shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);

  --trec-radius-sm: 0.25rem;
  --trec-radius: 0.5rem;
  --trec-radius-lg: 0.75rem;
  --trec-radius-xl: 1rem;
  --trec-radius-2xl: 1.5rem;
  --trec-radius-full: 9999px;

  --trec-font-sans: 'Inter', system-ui, -apple-system, sans-serif;

  /* Frappe navbar height override */
  --navbar-height: auto !important;
}

/* --------------------------------------------------------------------------
   BASE / RESET
   -------------------------------------------------------------------------- */
.trec-page {
  font-family: var(--trec-font-sans);
  color: var(--trec-text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.trec-page *,
.trec-page *::before,
.trec-page *::after {
  box-sizing: border-box;
}
.trec-page img { max-width: 100%; height: auto; }
.trec-page a { color: var(--trec-link); text-decoration: underline; text-decoration-color: rgba(68,81,184,.3); text-underline-offset: 2px; transition: all .2s ease; }
.trec-page a:hover { color: var(--trec-link-hover); text-decoration-color: rgba(51,64,160,.6); }

/* --------------------------------------------------------------------------
   TYPOGRAPHY
   -------------------------------------------------------------------------- */
.trec-text-xs  { font-size: .75rem;   line-height: 1rem; }
.trec-text-sm  { font-size: .875rem;  line-height: 1.25rem; }
.trec-text-base{ font-size: 1rem;     line-height: 1.5rem; }
.trec-text-lg  { font-size: 1.125rem; line-height: 1.75rem; }
.trec-text-xl  { font-size: 1.25rem;  line-height: 1.75rem; }
.trec-text-2xl { font-size: 1.5rem;   line-height: 2rem; }
.trec-text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.trec-text-4xl { font-size: 2.25rem;  line-height: 2.5rem; }
.trec-text-5xl { font-size: 3rem;     line-height: 1; }
.trec-text-6xl { font-size: 3.75rem;  line-height: 1; }
.trec-text-8xl { font-size: 6rem;     line-height: 1; }
.trec-text-9xl { font-size: 8rem;     line-height: 1; }

.trec-font-normal   { font-weight: 400; }
.trec-font-medium   { font-weight: 500; }
.trec-font-semibold { font-weight: 600; }
.trec-font-bold     { font-weight: 700; }

.trec-leading-tight   { line-height: 1.25; }
.trec-leading-relaxed { line-height: 1.625; }

.trec-text-center { text-align: center; }
.trec-text-left   { text-align: left; }
.trec-italic       { font-style: italic; }
.trec-not-italic   { font-style: normal; }

.trec-text-white     { color: #fff; }
.trec-text-gray-500  { color: #6b7280; }
.trec-text-gray-600  { color: var(--trec-text-secondary); }
.trec-text-gray-700  { color: #374151; }
.trec-text-gray-800  { color: #1f2937; }
.trec-text-gray-900  { color: var(--trec-text-primary); }
.trec-text-primary   { color: var(--trec-primary); }
.trec-text-secondary { color: var(--trec-secondary); }
.trec-text-green-400 { color: #4ade80; }
.trec-text-green-600 { color: #16a34a; }
.trec-text-blue-600  { color: #2563eb; }
.trec-text-orange-500{ color: #f97316; }
.trec-text-orange-600{ color: #ea580c; }
.trec-text-yellow-400{ color: #facc15; }

/* Gradient text */
.trec-gradient-text {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.trec-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 640px)  { .trec-container { padding-left: 1.5rem; padding-right: 1.5rem; } }
@media (min-width: 1024px) { .trec-container { padding-left: 2rem; padding-right: 2rem; } }

.trec-grid      { display: grid; gap: 2rem; }
.trec-grid-cols-1 { grid-template-columns: repeat(1, minmax(0,1fr)); }
.trec-grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.trec-grid-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.trec-grid-cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }

@media (min-width: 768px) {
  .trec-md-grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .trec-md-grid-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .trec-md-block { display: block !important; }
  .trec-md-flex  { display: flex !important; }
  .trec-md-hidden { display: none !important; }
}
@media (min-width: 1024px) {
  .trec-lg-grid-cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .trec-lg-grid-cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .trec-lg-grid-cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .trec-lg-block  { display: block; }
  .trec-lg-flex   { display: flex; }
  .trec-lg-hidden { display: none; }
  .trec-lg-text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
  .trec-lg-text-5xl { font-size: 3rem;   line-height: 1; }
  .trec-lg-text-6xl { font-size: 3.75rem; line-height: 1; }
  .trec-lg-text-2xl { font-size: 1.5rem; line-height: 2rem; }
  .trec-lg-py-32 { padding-top: 8rem; padding-bottom: 8rem; }
  .trec-lg-p-12  { padding: 3rem; }
  .trec-lg-min-h-500 { min-height: 500px; }
}

.trec-flex      { display: flex; }
.trec-flex-col  { flex-direction: column; }
.trec-flex-wrap { flex-wrap: wrap; }
.trec-flex-shrink-0 { flex-shrink: 0; }
.trec-items-center  { align-items: center; }
.trec-items-start   { align-items: flex-start; }
.trec-justify-center  { justify-content: center; }
.trec-justify-between { justify-content: space-between; }

.trec-gap-2  { gap: .5rem; }
.trec-gap-3  { gap: .75rem; }
.trec-gap-4  { gap: 1rem; }
.trec-gap-6  { gap: 1.5rem; }
.trec-gap-8  { gap: 2rem; }
.trec-gap-12 { gap: 3rem; }

/* --------------------------------------------------------------------------
   SPACING
   -------------------------------------------------------------------------- */
.trec-p-3  { padding: .75rem; }
.trec-p-4  { padding: 1rem; }
.trec-p-6  { padding: 1.5rem; }
.trec-p-8  { padding: 2rem; }
.trec-px-4 { padding-left: 1rem; padding-right: 1rem; }
.trec-px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.trec-px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.trec-px-8 { padding-left: 2rem; padding-right: 2rem; }
.trec-py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.trec-py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.trec-py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.trec-py-20{ padding-top: 5rem; padding-bottom: 5rem; }
.trec-py-24{ padding-top: 6rem; padding-bottom: 6rem; }
.trec-pt-6 { padding-top: 1.5rem; }

.trec-mb-2  { margin-bottom: .5rem; }
.trec-mb-3  { margin-bottom: .75rem; }
.trec-mb-4  { margin-bottom: 1rem; }
.trec-mb-6  { margin-bottom: 1.5rem; }
.trec-mb-8  { margin-bottom: 2rem; }
.trec-mb-12 { margin-bottom: 3rem; }
.trec-mb-16 { margin-bottom: 4rem; }
.trec-mt-2  { margin-top: .5rem; }
.trec-mt-4  { margin-top: 1rem; }
.trec-mt-8  { margin-top: 2rem; }
.trec-mt-12 { margin-top: 3rem; }
.trec-mx-auto { margin-left: auto; margin-right: auto; }

.trec-max-w-3xl { max-width: 48rem; }
.trec-max-w-4xl { max-width: 56rem; }
.trec-max-w-5xl { max-width: 64rem; }
.trec-max-w-6xl { max-width: 72rem; }
.trec-max-w-none { max-width: none; }
.trec-w-full { width: 100%; }

.trec-space-y-2 > * + * { margin-top: .5rem; }
.trec-space-y-3 > * + * { margin-top: .75rem; }
.trec-space-y-4 > * + * { margin-top: 1rem; }
.trec-space-y-6 > * + * { margin-top: 1.5rem; }

/* --------------------------------------------------------------------------
   POSITIONING
   -------------------------------------------------------------------------- */
.trec-relative { position: relative; }
.trec-absolute { position: absolute; }
.trec-z-10 { z-index: 10; }
.trec-z-20 { z-index: 20; }
.trec-inset-0 { top:0; right:0; bottom:0; left:0; }
.trec-overflow-hidden { overflow: hidden; }
.trec-hidden { display: none; }
.trec-block  { display: block; }
.trec-inline-block { display: inline-block; }

/* --------------------------------------------------------------------------
   BACKGROUNDS
   -------------------------------------------------------------------------- */
.trec-bg-white   { background-color: var(--trec-bg-white); }
.trec-bg-gray-50 { background-color: var(--trec-bg-gray-50); }
.trec-bg-gray-100{ background-color: var(--trec-bg-gray-100); }
.trec-bg-gray-900{ background-color: var(--trec-bg-gray-900); }

/* Hero gradient (from globals.css) */
.trec-hero-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #6e64c6 50%, #667eea 75%, #764ba2 100%);
  background-size: 400% 400%;
}
@media (min-width: 1024px) {
  .trec-hero-gradient { animation: trec-gradientShift 20s ease infinite; }
}
@keyframes trec-gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Gradient shimmer (from globals.css) */
.trec-gradient-shimmer { position: relative; overflow: hidden; }
@media (min-width: 1024px) {
  .trec-gradient-shimmer::after {
    content: '';
    position: absolute; top:0; left:0; width:100%; height:100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.08) 50%, transparent 100%);
    animation: trec-shimmer 8s infinite;
    pointer-events: none;
    z-index: 2;
  }
}
@keyframes trec-shimmer {
  0%   { transform: translate3d(-100%,0,0); }
  100% { transform: translate3d(100%,0,0); }
}

/* Dots pattern */
.trec-dots-pattern {
  background-image: radial-gradient(circle, rgba(102,126,234,.15) 1px, transparent 1px);
  background-size: 20px 20px;
}

/* Gradient overlay */
.trec-gradient-overlay-bottom {
  background: linear-gradient(to top, rgba(0,0,0,.3), transparent);
}

/* --------------------------------------------------------------------------
   ANIMATIONS  (from globals.css — GPU accelerated)
   -------------------------------------------------------------------------- */
@keyframes trec-float {
  0%, 100% { transform: translate3d(0,0,0); }
  50%      { transform: translate3d(0,-20px,0); }
}
@keyframes trec-bounce {
  0%, 100% { transform: translate3d(0,0,0); }
  50%      { transform: translate3d(0,-10px,0); }
}
@keyframes trec-pulseGlow {
  0%, 100% { box-shadow: 0 0 15px rgba(102,126,234,.2); }
  50%      { box-shadow: 0 0 30px rgba(118,75,162,.4); }
}
@keyframes trec-countUp {
  from { opacity: 0; transform: translate3d(0,20px,0); }
  to   { opacity: 1; transform: translate3d(0,0,0); }
}

.trec-float               { animation: trec-float 6s ease-in-out infinite; transform: translate3d(0,0,0); }
.trec-bounce-slow         { animation: trec-bounce 4s ease-in-out infinite; transform: translate3d(0,0,0); }
.trec-bounce-slow-delay-1 { animation: trec-bounce 4s ease-in-out infinite; animation-delay: .5s;  transform: translate3d(0,0,0); }
.trec-bounce-slow-delay-2 { animation: trec-bounce 4s ease-in-out infinite; animation-delay: 1s;   transform: translate3d(0,0,0); }
.trec-pulse-glow          { animation: trec-pulseGlow 3s ease-in-out infinite; }

.trec-stat-item { animation: trec-countUp .6s ease-out forwards; }
.trec-stat-item:nth-child(1) { animation-delay: .1s; }
.trec-stat-item:nth-child(2) { animation-delay: .2s; }
.trec-stat-item:nth-child(3) { animation-delay: .3s; }

/* --------------------------------------------------------------------------
   CARDS & SURFACES
   -------------------------------------------------------------------------- */
.trec-card {
  background: var(--trec-bg-white);
  border-radius: var(--trec-radius-xl);
  padding: 2rem;
  box-shadow: var(--trec-shadow-lg);
  transition: transform .3s ease, box-shadow .3s ease;
}
.trec-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--trec-shadow-2xl);
}
.trec-rounded-xl  { border-radius: var(--trec-radius-xl); }
.trec-rounded-2xl { border-radius: var(--trec-radius-2xl); }
.trec-rounded-lg  { border-radius: var(--trec-radius-lg); }
.trec-rounded-full{ border-radius: var(--trec-radius-full); }
.trec-shadow-sm   { box-shadow: var(--trec-shadow-sm); }
.trec-shadow-md   { box-shadow: var(--trec-shadow-md); }
.trec-shadow-lg   { box-shadow: var(--trec-shadow-lg); }
.trec-shadow-xl   { box-shadow: var(--trec-shadow-xl); }
.trec-shadow-2xl  { box-shadow: var(--trec-shadow-2xl); }

.trec-border-t { border-top: 1px solid #e5e7eb; }
.trec-border-l-4 { border-left: 4px solid; }
.trec-border-primary   { border-color: var(--trec-primary); }
.trec-border-secondary { border-color: var(--trec-secondary); }
.trec-border-green-500 { border-color: #22c55e; }
.trec-border-blue-500  { border-color: #3b82f6; }
.trec-border-orange-500{ border-color: #f97316; }
.trec-border-gray-100  { border-color: #f3f4f6; }
.trec-border-gray-200  { border-color: #e5e7eb; }
.trec-border-gray-800  { border-color: #1f2937; }

/* Service card */
.trec-service-card {
  background: #fff;
  border-radius: var(--trec-radius-xl);
  border: 1px solid #f3f4f6;
  padding: 2rem;
  box-shadow: var(--trec-shadow-lg);
  transition: all .3s ease;
}
.trec-service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--trec-shadow-2xl);
  border-color: rgba(102,126,234,.3);
}

/* Benefit card (why-consultants) */
.trec-benefit-card {
  background: #fff;
  border-radius: var(--trec-radius-xl);
  border-left: 4px solid;
  padding: 2rem;
  transition: all .3s ease;
}
.trec-benefit-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--trec-shadow-2xl);
}

/* Testimonial card */
.trec-testimonial-card {
  background: #fff;
  border-radius: var(--trec-radius-xl);
  padding: 2rem;
  box-shadow: var(--trec-shadow-lg);
  border-top: 3px solid var(--trec-primary);
  transition: all .3s ease;
}
.trec-testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--trec-shadow-xl);
}

/* Reason card (about - why choose us) */
.trec-reason-card {
  background: #fff;
  border-radius: var(--trec-radius-lg);
  border-left: 4px solid;
  padding: 1.5rem;
  box-shadow: var(--trec-shadow-md);
  transition: all .3s ease;
}
.trec-reason-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--trec-shadow-lg);
}

/* Value item (about - innovation/partnership/excellence) */
.trec-value-card {
  background: #fff;
  border-radius: var(--trec-radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--trec-shadow-sm);
}

/* Stats panel */
.trec-stats-panel {
  background: #fff;
  border-radius: var(--trec-radius-xl);
  padding: 2rem;
  box-shadow: var(--trec-shadow-xl);
}
@media (min-width: 1024px) { .trec-stats-panel { padding: 3rem; } }

/* Quote block */
.trec-quote-block {
  background: linear-gradient(135deg, rgba(102,126,234,.1), rgba(118,75,162,.05), rgba(102,126,234,.05));
  border-left: 4px solid;
  border-image: linear-gradient(to bottom, var(--trec-primary), var(--trec-secondary)) 1;
  border-radius: var(--trec-radius-2xl);
  padding: 2rem;
  box-shadow: var(--trec-shadow-lg);
}
@media (min-width: 1024px) { .trec-quote-block { padding: 3rem; } }

/* Expert note (consultant section) */
.trec-expert-note {
  border-left: 4px solid var(--trec-primary);
  border-radius: 0 var(--trec-radius-lg) var(--trec-radius-lg) 0;
  background: var(--trec-bg-gray-100);
  padding: 1.5rem;
  margin-top: 2rem;
}

/* --------------------------------------------------------------------------
   BUTTONS
   -------------------------------------------------------------------------- */
.trec-btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: var(--trec-radius-lg);
  font-weight: 600;
  text-decoration: none;
  transition: all .3s ease;
  cursor: pointer;
  border: none;
  font-family: var(--trec-font-sans);
  font-size: 1rem;
}
.trec-btn-white {
  background: #fff;
  color: var(--trec-primary);
  box-shadow: var(--trec-shadow-lg);
}
.trec-btn-white:hover {
  background: #f3f4f6;
  transform: scale(1.05);
  box-shadow: var(--trec-shadow-2xl);
  color: var(--trec-primary);
  text-decoration: none;
}
.trec-btn-accent {
  background: #fff;
  color: #f093fb;
  box-shadow: var(--trec-shadow-lg);
}
.trec-btn-accent:hover {
  background: #f3f4f6;
  transform: scale(1.05);
  box-shadow: var(--trec-shadow-2xl);
  color: #d946ef;
  text-decoration: none;
}
.trec-btn-outline,
.trec-btn-outline-white {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}
.trec-btn-outline:hover,
.trec-btn-outline-white:hover {
  background: #fff;
  color: var(--trec-primary);
  text-decoration: none;
  transform: scale(1.05);
}
.trec-btn-gradient {
  background: linear-gradient(to right, #667eea, #764ba2);
  color: #fff !important;
  box-shadow: var(--trec-shadow-lg);
  text-decoration: none !important;
  font-size: 1.125rem;
  padding: 1.125rem 2.5rem;
}
.trec-btn-gradient:hover {
  background: linear-gradient(to right, #5a6fd8, #6b4391);
  box-shadow: var(--trec-shadow-xl);
  color: #fff !important;
  text-decoration: none !important;
  transform: scale(1.05);
}

/* CTA gradient section — used at bottom of services and other pages */
.trec-cta-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #6e64c6 100%);
  position: relative;
}
.trec-cta-gradient h2 {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
@media (min-width: 768px) {
  .trec-cta-gradient h2 { font-size: 2.5rem; }
}

/* Learn More link inside service cards */
.trec-learn-more {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem 1.25rem;
  font-size: .875rem;
  font-weight: 600;
  border-radius: var(--trec-radius-lg);
  background: linear-gradient(to right, rgba(102,126,234,.1), rgba(118,75,162,.1));
  color: var(--trec-primary);
  border: 1px solid rgba(102,126,234,.2);
  text-decoration: none;
  transition: all .3s ease;
}
.trec-learn-more:hover {
  transform: translateY(-2px);
  box-shadow: var(--trec-shadow-lg);
  color: var(--trec-primary);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   BADGES & PILLS
   -------------------------------------------------------------------------- */
.trec-badge {
  display: inline-block;
  padding: .5rem 1.5rem;
  border-radius: var(--trec-radius-full);
  font-size: .875rem;
  font-weight: 600;
}
.trec-badge-gradient {
  background: linear-gradient(to right, #667eea, #764ba2);
  color: #fff;
}
.trec-badge-white-glass {
  display: inline-block;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  backdrop-filter: blur(8px);
  border-radius: 9999px;
  padding: .5rem 1rem;
  font-size: .875rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   ICON BOXES
   -------------------------------------------------------------------------- */
.trec-icon-box {
  width: 4rem; height: 4rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--trec-radius-2xl);
  font-size: 2rem;
  transition: transform .3s ease;
}
.trec-icon-box-sm {
  width: 3.5rem; height: 3.5rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--trec-radius-xl);
  font-size: 1.5rem;
}
.trec-icon-box-primary   { background: linear-gradient(135deg, rgba(102,126,234,.2), rgba(102,126,234,.1)); color: var(--trec-primary); }
.trec-icon-box-secondary { background: linear-gradient(135deg, rgba(118,75,162,.4), rgba(118,75,162,.2));   color: var(--trec-secondary); }
.trec-icon-box-green     { background: linear-gradient(135deg, rgba(34,197,94,.2), rgba(34,197,94,.1));     color: #16a34a; }
.trec-icon-box-blue      { background: linear-gradient(135deg, rgba(59,130,246,.2), rgba(59,130,246,.1));   color: #2563eb; }
.trec-icon-box-orange    { background: linear-gradient(135deg, rgba(249,115,22,.2), rgba(249,115,22,.1));   color: #ea580c; }
.trec-icon-box-brand     { background: linear-gradient(135deg, rgba(102,126,234,.15), rgba(118,75,162,.15)); color: var(--trec-primary); }

/* Service card icon box */
.trec-service-icon {
  width: 4rem; height: 4rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--trec-radius-2xl);
  font-size: 2rem;
  background: linear-gradient(135deg, rgba(102,126,234,.1), rgba(118,75,162,.1));
  color: var(--trec-primary);
  transition: all .3s ease;
}
.trec-service-card:hover .trec-service-icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, rgba(102,126,234,.2), rgba(118,75,162,.2));
}

/* --------------------------------------------------------------------------
   HERO FLOATING ELEMENTS
   -------------------------------------------------------------------------- */
.trec-floating-badge {
  position: absolute;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--trec-radius-xl);
  padding: .75rem 1rem;
  backdrop-filter: blur(8px);
  box-shadow: var(--trec-shadow-2xl);
}
.trec-hero-icon-circle {
  display: flex; align-items: center; justify-content: center;
  width: 16rem; height: 16rem;
  border-radius: 50%;
  border: 4px solid rgba(255,255,255,.3);
  background: linear-gradient(135deg, rgba(255,255,255,.2), rgba(255,255,255,.05));
  backdrop-filter: blur(16px);
  box-shadow: var(--trec-shadow-2xl);
}
@media (min-width: 1024px) { .trec-hero-icon-circle { width: 20rem; height: 20rem; } }
.trec-hero-inner-circle {
  display: flex; align-items: center; justify-content: center;
  width: 12rem; height: 12rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(102,126,234,.3), rgba(118,75,162,.3));
}
@media (min-width: 1024px) { .trec-hero-inner-circle { width: 14rem; height: 14rem; } }

/* Pulsing dots */
.trec-dot { border-radius: 50%; box-shadow: var(--trec-shadow-lg); }
.trec-dot-yellow { width:2rem; height:2rem; background: #facc15; }
.trec-dot-green  { width:1.5rem; height:1.5rem; background: #4ade80; }
.trec-dot-blue   { width:1rem; height:1rem; background: #60a5fa; }

/* Stat badge in hero */
.trec-hero-stat-badge {
  display: flex; align-items: center; gap: .75rem;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--trec-radius-xl);
  padding: 1rem;
  backdrop-filter: blur(8px);
  box-shadow: var(--trec-shadow-2xl);
}
.trec-hero-stat-icon {
  width: 2.5rem; height: 2.5rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--trec-radius-lg);
  color: #fff; font-size: 1.25rem;
}

/* Hero responsive heading / subtitle / visual */
.trec-hero-heading { font-size: 2.25rem; line-height: 2.5rem; }
.trec-hero-subtitle { font-size: 1.25rem; line-height: 1.75rem; }
.trec-hero-visual { min-height: 400px; }
.trec-hero-section { padding-top: 3rem; padding-bottom: 6rem; }
@media (min-width: 1024px) {
  .trec-hero-heading { font-size: 3rem; line-height: 1; }
  .trec-hero-subtitle { font-size: 1.5rem; line-height: 2rem; }
  .trec-hero-visual { min-height: 500px; }
  .trec-hero-section { padding-top: 4rem; padding-bottom: 8rem; }
}
@media (min-width: 1280px) {
  .trec-hero-heading { font-size: 3.75rem; line-height: 1; }
}

/* Footer logo */
.trec-footer-logo { height: 48px; width: auto; display: block; margin-bottom: 1rem; }

/* --------------------------------------------------------------------------
   SECTION HEADERS
   -------------------------------------------------------------------------- */
.trec-section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.trec-section-header h2 {
  font-size: 1.875rem; font-weight: 700;
  color: var(--trec-text-primary);
  margin-bottom: 1rem;
}
@media (min-width: 1024px) { .trec-section-header h2 { font-size: 2.25rem; } }
.trec-section-header p {
  font-size: 1.25rem;
  color: var(--trec-text-secondary);
}

/* --------------------------------------------------------------------------
   STARS (testimonials)
   -------------------------------------------------------------------------- */
.trec-stars { color: #facc15; font-size: 1.25rem; letter-spacing: 2px; }

/* --------------------------------------------------------------------------
   FORMS
   -------------------------------------------------------------------------- */
.trec-form-input,
.trec-form-select,
.trec-form-textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: var(--trec-radius-lg);
  font-size: 1rem;
  font-family: var(--trec-font-sans);
  transition: border-color .3s ease, box-shadow .3s ease;
  outline: none;
  background: #fff;
}
.trec-form-input:focus,
.trec-form-select:focus,
.trec-form-textarea:focus {
  border-color: var(--trec-primary);
  box-shadow: 0 0 0 3px rgba(102,126,234,.15);
}
.trec-form-label {
  display: block;
  font-weight: 600;
  color: var(--trec-text-primary);
  margin-bottom: .5rem;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.trec-footer {
  background: var(--trec-bg-gray-900);
  color: #9ca3af;
  padding: 3rem 0;
}
.trec-footer h4 { color: #fff; font-weight: 600; margin-bottom: 1rem; }
.trec-footer a { color: #9ca3af; text-decoration: none; transition: color .3s ease; }
.trec-footer a:hover { color: var(--trec-primary); }
.trec-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px)  { .trec-footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .trec-footer-grid { grid-template-columns: repeat(4, 1fr); gap: 3rem; } }

/* --------------------------------------------------------------------------
   LEGAL PAGES (Privacy Policy, Terms of Service)
   -------------------------------------------------------------------------- */
.trec-legal-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--trec-text-primary);
  margin-top: 2rem;
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid #e5e7eb;
}
.trec-legal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--trec-text-primary);
  margin-top: 1.25rem;
  margin-bottom: .5rem;
}
.trec-legal-content p {
  color: #4b5563;
  line-height: 1.75;
  margin-bottom: 1rem;
}
.trec-legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}
.trec-legal-content li {
  color: #4b5563;
  line-height: 1.75;
  margin-bottom: .35rem;
}
.trec-legal-content a {
  color: var(--trec-primary);
  text-decoration: none;
}
.trec-legal-content a:hover {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   UTILITY: reduced-motion + mobile perf
   -------------------------------------------------------------------------- */
/* Kill animations on mobile + reduced-motion in a single block */
@media (prefers-reduced-motion: reduce), (max-width: 768px) {
  .trec-hero-gradient,
  .trec-service-hero,
  .trec-gradient-shimmer::after,
  .trec-float,
  .trec-bounce-slow,
  .trec-bounce-slow-delay-1,
  .trec-bounce-slow-delay-2,
  .trec-pulse-glow,
  .trec-stat-item {
    animation: none !important;
  }
}

/* --------------------------------------------------------------------------
   SERVICE PAGE LAYOUTS
   -------------------------------------------------------------------------- */

/* Service page hero — smaller than homepage hero */
.trec-service-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #6e64c6 50%, #667eea 75%, #764ba2 100%);
  background-size: 400% 400%;
  animation: trec-gradientShift 20s ease infinite;
  padding: 5rem 0 4rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.trec-service-hero .trec-dots-pattern {
  position: absolute; inset: 0; opacity: .15;
}
.trec-service-hero h1 {
  font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem;
}
@media (min-width: 1024px) {
  .trec-service-hero h1 { font-size: 3.25rem; }
  .trec-service-hero { padding: 6rem 0 5rem; }
}

/* Service detail card (4-column grid on service pages) */
.trec-detail-card {
  background: #fff;
  border-radius: var(--trec-radius-xl);
  padding: 2rem;
  box-shadow: var(--trec-shadow-lg);
  transition: all .3s ease;
}
.trec-detail-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--trec-shadow-2xl);
}
.trec-detail-card h3 {
  font-size: 1.25rem; font-weight: 700; margin-bottom: 1rem;
  color: var(--trec-text-primary);
}

/* ── Process timeline stepper ────────────────────────────── */
.trec-process-timeline {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 2.5rem;
}
.trec-process-step {
  flex: 1;
  text-align: center;
  position: relative;
  max-width: 14rem;
}
.trec-process-circle {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--trec-primary), var(--trec-secondary));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 auto 1rem;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 12px rgba(124, 58, 237, .25);
}
.trec-process-connector {
  position: absolute;
  top: 1.625rem;              /* centre of the circle */
  left: calc(50% + 1.625rem); /* start right of circle */
  width: calc(100% - 3.25rem);
  height: 2px;
  background: linear-gradient(90deg, var(--trec-primary), var(--trec-secondary));
  opacity: .35;
  z-index: 0;
}
.trec-process-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--trec-text-primary);
  margin-bottom: .35rem;
}
.trec-process-desc {
  font-size: .875rem;
  color: var(--trec-text-secondary);
  line-height: 1.55;
  padding: 0 .25rem;
}

/* Stack vertically on small screens */
@media (max-width: 640px) {
  .trec-process-timeline {
    flex-direction: column;
    align-items: center;
    gap: 2rem;
  }
  .trec-process-step { max-width: 100%; }
  .trec-process-connector {
    display: none;
  }
}

/* Feature list inside detail cards */
.trec-feature-list {
  list-style: none; padding: 0; margin: 0;
}
.trec-feature-list li {
  display: flex; align-items: flex-start; gap: .5rem;
  padding: .375rem 0;
  font-size: .9375rem;
  color: var(--trec-text-secondary);
  line-height: 1.5;
}
.trec-feature-list li .trec-check {
  color: #22c55e; font-size: .75rem; margin-top: .375rem; flex-shrink: 0;
}

/* Stat highlight boxes */
.trec-stat-highlight {
  text-align: center;
  padding: 2rem 1rem;
  background: #fff;
  border-radius: var(--trec-radius-xl);
  box-shadow: var(--trec-shadow-lg);
}
.trec-stat-highlight .trec-stat-value {
  font-size: 2rem; font-weight: 700; color: var(--trec-primary);
  display: block;
}
.trec-stat-highlight .trec-stat-label {
  font-size: .875rem; color: var(--trec-text-secondary);
  margin-top: .25rem;
}

/* Engagement model / pricing cards */
.trec-model-card {
  background: #fff;
  border-radius: var(--trec-radius-xl);
  padding: 2rem;
  box-shadow: var(--trec-shadow-lg);
  border: 2px solid transparent;
  text-align: center;
  transition: all .3s ease;
  position: relative;
}
.trec-model-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--trec-shadow-2xl);
}
.trec-model-card.trec-model-popular {
  border-color: var(--trec-primary);
}
.trec-model-badge {
  position: absolute;
  top: -.75rem; left: 50%; transform: translateX(-50%);
  background: linear-gradient(to right, #667eea, #764ba2);
  color: #fff;
  font-size: .75rem; font-weight: 700;
  padding: .25rem 1rem;
  border-radius: var(--trec-radius-full);
  white-space: nowrap;
}
.trec-model-card h3 {
  font-size: 1.125rem; font-weight: 700; margin-bottom: .5rem;
  color: var(--trec-text-primary);
}
.trec-model-hours {
  font-size: 1.5rem; font-weight: 700; color: var(--trec-primary);
  margin-bottom: .5rem;
}
.trec-model-subtitle {
  font-size: .875rem; color: var(--trec-text-secondary); margin-bottom: 1.25rem;
}
.trec-model-features {
  list-style: none; padding: 0; margin: 0; text-align: left;
}
.trec-model-features li {
  padding: .375rem 0;
  font-size: .875rem; color: var(--trec-text-secondary);
}
.trec-model-features li::before {
  content: '•'; color: var(--trec-primary); margin-right: .5rem;
  font-weight: 700;
}

/* Who benefits audience cards */
.trec-audience-card {
  background: #fff;
  border-radius: var(--trec-radius-xl);
  padding: 2rem;
  box-shadow: var(--trec-shadow-md);
  transition: all .3s ease;
}
.trec-audience-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--trec-shadow-lg);
}
.trec-audience-card h3 {
  font-size: 1.125rem; font-weight: 700; margin-bottom: .75rem;
  color: var(--trec-text-primary);
}

/* Platform card (POS, E-commerce, Inventory integrations) */
.trec-platform-card {
  background: #fff;
  border-radius: var(--trec-radius-xl);
  padding: 2rem;
  box-shadow: var(--trec-shadow-lg);
  text-align: center;
  transition: all .3s ease;
}
.trec-platform-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--trec-shadow-2xl);
}
.trec-platform-card h3 {
  font-size: 1.25rem; font-weight: 700; margin-bottom: .5rem;
  color: var(--trec-text-primary);
}
.trec-platform-card .trec-platform-subtitle {
  font-size: .875rem; color: var(--trec-text-secondary); margin-bottom: 1rem;
}

/* Startup stage card */
.trec-stage-card {
  background: #fff;
  border-radius: var(--trec-radius-xl);
  padding: 2rem;
  box-shadow: var(--trec-shadow-lg);
  text-align: center;
  transition: all .3s ease;
}
.trec-stage-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--trec-shadow-2xl);
}
.trec-stage-card .trec-stage-emoji {
  font-size: 2.5rem; margin-bottom: .75rem;
}
.trec-stage-card h3 {
  font-size: 1.25rem; font-weight: 700; margin-bottom: .25rem;
  color: var(--trec-text-primary);
}
.trec-stage-card p {
  font-size: .875rem; color: var(--trec-text-secondary); margin-bottom: 1rem;
}

/* Transportation management compact cards */
.trec-transport-card {
  background: #fff;
  border-radius: var(--trec-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--trec-shadow-md);
}
.trec-transport-card h4 {
  font-size: 1rem; font-weight: 700; margin-bottom: .75rem;
  color: var(--trec-text-primary);
}
.trec-transport-card ul {
  list-style: none; padding: 0; margin: 0;
}
.trec-transport-card li {
  padding: .25rem 0;
  font-size: .875rem; color: var(--trec-text-secondary);
}
.trec-transport-card li::before {
  content: '•'; color: var(--trec-primary); margin-right: .5rem;
}

/* Integration tile (inventory page) */
.trec-integration-card {
  background: #fff;
  border-radius: var(--trec-radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--trec-shadow-sm);
  transition: all .3s ease;
}
.trec-integration-card:hover {
  box-shadow: var(--trec-shadow-md);
  transform: translateY(-2px);
}
.trec-integration-card h4 {
  font-size: 1rem; font-weight: 700; margin-bottom: .25rem;
  color: var(--trec-text-primary);
}
.trec-integration-card p {
  font-size: .8125rem; color: var(--trec-text-muted);
}

/* Why-choose cards on startup page */
.trec-why-card {
  text-align: center;
  padding: 1.5rem;
}
.trec-why-card h4 {
  font-size: 1rem; font-weight: 700; margin-bottom: .25rem;
  color: var(--trec-text-primary);
}
.trec-why-card p {
  font-size: .875rem; color: var(--trec-text-secondary);
}

/* CTA bottom section */
.trec-cta-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 4rem 0;
  text-align: center;
}
.trec-cta-section h2 {
  font-size: 2rem; font-weight: 700; margin-bottom: 1rem;
}
.trec-cta-section p {
  font-size: 1.125rem; opacity: .9; margin-bottom: 2rem;
  max-width: 40rem; margin-left: auto; margin-right: auto;
}

/* --------------------------------------------------------------------------
   BLOG INDEX — blog listing page styles
   -------------------------------------------------------------------------- */
.trec-blog-featured {
  background: #fff; border-radius: 1rem; padding: 2.5rem;
  box-shadow: 0 4px 24px rgba(0,0,0,.06); border: 1px solid #e2e8f0;
  margin-bottom: 2rem;
}
.trec-blog-featured-label {
  display: inline-block; font-size: .7rem; font-weight: 700;
  letter-spacing: .08em; color: var(--trec-primary);
  text-transform: uppercase; margin-bottom: .75rem;
}
.trec-blog-featured h2 { font-size: 1.75rem; font-weight: 700; margin-bottom: .75rem; }
.trec-blog-featured h2 a {
  color: var(--trec-text-primary); text-decoration: none;
}
.trec-blog-featured h2 a:hover { color: var(--trec-primary); }

.trec-blog-category {
  display: inline-block; padding: .25rem .75rem; border-radius: 9999px;
  font-size: .8rem; font-weight: 600; margin-bottom: .75rem;
}

.trec-blog-excerpt {
  color: var(--trec-text-secondary); line-height: 1.6;
  margin-bottom: .75rem; font-size: .95rem;
}

.trec-blog-meta {
  display: flex; gap: 1.25rem; font-size: .85rem;
  color: var(--trec-text-muted);
}
.trec-blog-meta span { display: flex; align-items: center; gap: .35rem; }

.trec-blog-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; margin-top: 1.5rem;
}
@media (max-width: 1024px) {
  .trec-blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .trec-blog-grid { grid-template-columns: 1fr; }
}

/* Blog hero subtitle (used on blog index) */
.trec-hero-sub {
  font-size: 1.15rem; color: rgba(255,255,255,.85); margin-top: .5rem;
}

.trec-blog-card {
  background: #fff; border-radius: .75rem; padding: 1.75rem;
  border: 1px solid #e2e8f0; transition: box-shadow .2s, transform .2s;
}
.trec-blog-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.08); transform: translateY(-2px);
}
.trec-blog-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
.trec-blog-card h3 a { color: var(--trec-text-primary); text-decoration: none; }
.trec-blog-card h3 a:hover { color: var(--trec-primary); }

.trec-blog-read-more {
  display: inline-block; margin-top: .75rem;
  color: var(--trec-primary); font-weight: 600; font-size: .9rem;
  text-decoration: none;
}
.trec-blog-read-more:hover { text-decoration: underline; }

/* Blog filter bar */
.trec-blog-filter-bar {
  display: flex; flex-wrap: wrap; gap: .5rem;
  justify-content: center;
}
.trec-blog-filter-btn {
  padding: .45rem 1rem; border-radius: 9999px;
  font-size: .85rem; font-weight: 500;
  border: 1px solid #e2e8f0; background: #fff;
  color: var(--trec-text-secondary); cursor: pointer;
  transition: all .2s ease;
}
.trec-blog-filter-btn:hover {
  border-color: var(--trec-primary); color: var(--trec-primary);
  background: rgba(102, 126, 234, .05);
}
.trec-blog-filter-btn.active {
  background: linear-gradient(135deg, var(--trec-primary), var(--trec-secondary));
  color: #fff; border-color: transparent;
}

/* Blog featured — side-by-side layout */
.trec-blog-featured-inner {
  display: grid; grid-template-columns: 1fr 280px;
  gap: 2.5rem; align-items: center;
}
@media (max-width: 768px) {
  .trec-blog-featured-inner { grid-template-columns: 1fr; }
  .trec-blog-featured-visual { display: none; }
}
.trec-blog-featured-visual {
  display: flex; align-items: center; justify-content: center;
}
.trec-blog-featured-icon {
  width: 10rem; height: 10rem; border-radius: 50%;
  background: linear-gradient(135deg, var(--trec-primary), var(--trec-secondary));
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem; color: #fff;
  box-shadow: 0 12px 40px rgba(102, 126, 234, .25);
}

/* --------------------------------------------------------------------------
   FRAPPE OVERRIDES — hide default Frappe chrome on public pages
   These wrappers sit OUTSIDE our .trec-page div so we target them globally.
   -------------------------------------------------------------------------- */

/* Collapse empty Frappe page-header and breadcrumbs (they render empty on Web Pages) */
.page-header-wrapper,
.page-header,
.page-breadcrumbs {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Remove Frappe's min-height on page_content so sections flow naturally */
.page_content {
  min-height: auto !important;
}

/* Let content be full-width — remove Frappe container padding that constrains our layout */
.page-content-wrapper {
  padding: 0 !important;
  margin: 0 !important;
}
.webpage-content {
  margin: 0 !important;
  padding: 0 !important;
}
.web-page-content {
  margin: 0 !important;
  padding: 0 !important;
  max-width: none !important;
}

/* Hide Frappe's default footer */
.web-footer,
footer.web-footer,
body .web-footer,
body footer.web-footer,
.powered-by,
.footer-powered {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}

/* --------------------------------------------------------------------------
   BLOG POST / SERVICE PAGE — Fix Next.js-era padding inside Frappe
   The original Next.js layout used a fixed navbar, so blog posts had pt-24
   (96px top padding) and service pages had large top padding. Frappe uses
   a sticky navbar that pushes content down naturally, so we reduce padding.
   -------------------------------------------------------------------------- */

/* Blog posts: reduce top padding from pt-24 (6rem) to 2rem */
.web-page-content > article.pt-24,
.web-page-content > .pt-24,
.web-page-content > div.pt-24 {
  padding-top: 2rem !important;
}

/* Blog posts wrapped in bg-gradient article */
.web-page-content > article.py-12 {
  padding-top: 2rem !important;
}

/* Blog post max-w-4xl containers — ensure proper centering */
.web-page-content .mx-auto.max-w-4xl {
  max-width: 56rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Ensure Tailwind prose content doesn't overflow Frappe wrappers */
.web-page-content .prose {
  max-width: none !important;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* --------------------------------------------------------------------------
   NAVBAR STYLING — Frappe default navbar override
   Uses body prefix for specificity over Frappe/Bootstrap without !important
   where possible. !important kept only where Frappe uses inline styles or
   its own !important rules.
   -------------------------------------------------------------------------- */

body .navbar {
  font-family: var(--trec-font-sans);
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 1px 3px rgba(0,0,0,.05);
  padding: .125rem 0;
  position: sticky;
  top: 0;
  z-index: 9000;
  overflow: visible;
  height: auto;
}
body .navbar > .container {
  max-width: 80rem;
  align-items: center;
  overflow: visible;
}

/* FORCE navbar-collapse visible on desktop — overrides Bootstrap .collapse:not(.show){display:none} */
@media (min-width: 992px) {
  body .navbar .navbar-collapse,
  body .navbar .collapse.navbar-collapse,
  body .navbar-expand-lg .navbar-collapse,
  body .collapse.navbar-collapse#navbarSupportedContent {
    display: flex !important;
    flex-basis: auto;
    overflow: visible;
    height: auto;
    visibility: visible;
    opacity: 1;
  }
}

/* Fix Frappe's 48px nav-item height constraint */
body .navbar .navbar-nav {
  align-items: center;
  display: flex;
}
body .navbar .navbar-nav .nav-item {
  height: auto;
  align-items: center;
}
/* Only force-show nav-items that aren't hidden by Frappe (e.g. post-login avatar) */
body .navbar .navbar-nav .nav-item:not([style*="display: none"]):not([style*="display:none"]) {
  display: flex;
  visibility: visible;
}
body .navbar .navbar-nav .nav-item.active {
  border-bottom: none;
}

/* Logo in navbar — matching original (h-20 to h-32) */
body .navbar .navbar-brand {
  padding: 0;
  margin-right: 1.5rem;
}
body .navbar .navbar-brand img {
  height: 80px !important;
  max-height: 80px !important;
  max-width: 420px;
  width: auto;
  object-fit: contain;
  transition: all .3s ease;
}
@media (min-width: 1024px) {
  body .navbar .navbar-brand img { height: 96px !important; max-height: 96px !important; }
}
@media (min-width: 1280px) {
  body .navbar .navbar-brand img { height: 110px !important; max-height: 110px !important; }
}
body .navbar .navbar-brand:hover img {
  transform: scale(1.05);
}

/* Nav links — matching original (px-5 py-3 text-[15px]) */
body .navbar .nav-link,
body .navbar-light .navbar-nav .nav-link,
body .navbar-light .navbar-nav .nav-item .nav-link,
body .navbar-expand-lg .navbar-nav .nav-link {
  font-family: var(--trec-font-sans);
  font-size: .9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #374151;
  padding: .75rem 1.25rem;
  border-radius: var(--trec-radius-lg);
  transition: all .3s ease;
  text-decoration: none;
  white-space: nowrap;
  display: inline-block;
  visibility: visible;
  opacity: 1;
}
body .navbar .nav-link:hover,
body .navbar .nav-link:focus,
body .navbar-light .navbar-nav .nav-link:hover,
body .navbar-light .navbar-nav .nav-link:focus {
  background: linear-gradient(to right, rgba(102,126,234,.1), rgba(118,75,162,.1));
  color: var(--trec-primary);
}
body .navbar .nav-link.active,
body .navbar .nav-item.active .nav-link,
body .navbar-light .navbar-nav .nav-link.active {
  background: linear-gradient(to right, #667eea, #764ba2);
  color: #fff;
}

/* Free Assessment — target by href for resilience to nav order changes */
body .navbar .nav-link[href="/technology-assessment"] {
  border: 2px solid var(--trec-primary);
  color: var(--trec-primary);
  font-weight: 600;
  border-radius: var(--trec-radius-lg);
  padding: .5rem 1.25rem;
  margin-right: .75rem;
  background: transparent;
}
body .navbar .nav-link[href="/technology-assessment"]:hover {
  background: var(--trec-primary);
  color: #fff;
}

/* --------------------------------------------------------------------------
   MOBILE HAMBURGER MENU — Frappe/Bootstrap navbar-toggler override
   -------------------------------------------------------------------------- */
body .navbar-toggler {
  border: 2px solid var(--trec-primary);
  border-radius: var(--trec-radius-md);
  padding: .375rem .625rem;
  transition: all .3s ease;
}
body .navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(102,126,234,.2);
  outline: none;
}
body .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%23667eea' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}
/* Mobile menu open state */
body .navbar-collapse {
  transition: all .3s ease;
}
@media (max-width: 991px) {
  /* On mobile, revert to Bootstrap collapse behavior */
  body .navbar .navbar-collapse,
  body .navbar .collapse.navbar-collapse,
  body .collapse.navbar-collapse#navbarSupportedContent {
    display: none !important;
    flex-basis: 100%;
  }
  body .navbar .navbar-collapse.show,
  body .navbar .navbar-collapse.collapsing,
  body .collapse.navbar-collapse.show#navbarSupportedContent {
    display: flex !important;
    flex-direction: column;
  }
  body .navbar .navbar-brand img {
    height: 56px !important;
  }
  body .navbar-collapse.show,
  body .navbar-collapse.collapsing {
    background: #fff;
    border-top: 1px solid rgba(0,0,0,.06);
    margin-top: .5rem;
    padding: .75rem 0;
  }
  body .navbar-collapse .nav-link {
    padding: .625rem 1rem;
    border-radius: var(--trec-radius-md);
  }
  /* Right-side nav items (e.g. Free Assessment) in mobile menu */
  .navbar-collapse .ml-auto {
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    gap: .5rem;
  }
}
