/* ============================================================================
   BID CSI ESTIMATION - Construction Industry Standard Design
   Original B2B SaaS for Construction Estimating Services
   ============================================================================ */

:root {
  --navy-900: #0B1B3D;
  --navy-800: #07152E;
  --blue-industry: #0F4C81;
  --blue-light: #0A3866;
  --amber-safety: #F59E0B;
  --yellow-construction: #EAB308;
  --white-crisp: #F8FAFC;
  --slate-dark: #1F2937;
}

/* ============================================================================
   Global Styles
   ============================================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #0F172A;
  background-color: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hero-architectural {
  background:
    linear-gradient(135deg, rgba(11, 27, 61, 0.92) 0%, rgba(15, 76, 129, 0.82) 55%, rgba(11, 27, 61, 0.94) 100%),
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(245, 158, 11, 0.10), transparent 35%),
    url('images/hero-blueprint-bg.jpg');
  background-size: cover, cover, cover, cover;
  background-position: center center, 0% 50%, 100% 100%, center;
  background-repeat: no-repeat;
  position: relative;
  isolation: isolate;
  animation: heroPan 16s ease-in-out infinite alternate;
}

.hero-architectural::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
  opacity: 0.35;
  z-index: 0;
  animation: gridFloat 18s linear infinite;
}

.quick-lead-shell {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.quick-lead-shell:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.quick-lead-panel {
  transform: translateY(18px) scale(0.96);
  opacity: 0;
  transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}

.quick-lead-shell:not(.hidden) .quick-lead-panel {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.quick-lead-close {
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.quick-lead-close:hover {
  transform: scale(1.06);
  box-shadow: 0 12px 18px rgba(15, 23, 42, 0.18);
}

.glass-feature-card {
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.20);
}

.software-logo-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease, border-color 0.25s ease;
  border-color: rgba(148, 163, 184, 0.18);
}

.software-logo-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
  border-color: rgba(15, 76, 129, 0.22);
}

.trade-specialty-card {
  position: relative;
  border-top: 4px solid var(--amber-safety);
  overflow: hidden;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.trade-specialty-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 24px 40px rgba(15, 23, 42, 0.10);
  border-color: rgba(245, 158, 11, 0.44);
}

.workflow-card {
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.workflow-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 30px rgba(15, 23, 42, 0.10);
  border-color: rgba(15, 76, 129, 0.28);
}

.trade-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(59, 130, 246, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.15);
}

.lead-form-shell {
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(248, 250, 252, 1));
  background-image: linear-gradient(rgba(148, 163, 184, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.07) 1px, transparent 1px), linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(248, 250, 252, 1));
  background-size: 32px 32px, 32px 32px, cover;
}

.lead-form-card {
  background: rgba(255, 255, 255, 0.96);
}

.upload-dropzone {
  border-width: 2px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.upload-dropzone:hover {
  border-color: var(--blue-industry);
  background: rgba(239, 246, 255, 0.9);
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

/* ============================================================================
   Typography
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.25rem, 5vw, 3.75rem);
}

h2 {
  font-size: clamp(1.875rem, 4vw, 3rem);
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.125rem;
}

p {
  line-height: 1.7;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

/* ============================================================================
   Form Elements
   ============================================================================ */

input,
select,
textarea {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: #9CA3AF;
}

/* ============================================================================
   Utility Classes
   ============================================================================ */

.sticky {
  position: sticky;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

@media (min-width: 1024px) {
  nav.hidden.lg\:flex {
    display: flex !important;
  }

  #mobile-menu {
    display: none !important;
  }
}

.z-40 {
  z-index: 40;
}

.z-50 {
  z-index: 50;
}

/* ============================================================================
   Modal Animations
   ============================================================================ */

#quote-modal {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

#quote-modal > div {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================================
   Hover States
   ============================================================================ */

button:hover {
  cursor: pointer;
}

button:active {
  transform: scale(0.98);
}

.document-stack {
  position: relative;
  height: 340px;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

.doc-sheet {
  position: absolute;
  inset: 0 auto auto 0;
  width: 82%;
  min-height: 220px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.10);
  padding: 1.1rem 1.1rem 1.2rem;
}

.doc-sheet--back {
  left: 28px;
  top: 28px;
  transform: rotate(4deg);
  background: linear-gradient(180deg, rgba(241, 245, 249, 0.9) 0%, rgba(255,255,255,1) 100%);
}

.doc-sheet--mid {
  left: 16px;
  top: 16px;
  transform: rotate(-3deg);
}

.doc-sheet--front {
  left: 0;
  top: 0;
  border-color: rgba(15, 76, 129, 0.24);
  box-shadow: 0 30px 80px rgba(11, 27, 61, 0.12);
}

.doc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
}

.doc-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.8rem;
  width: 1.8rem;
  border-radius: 0.55rem;
  background: rgba(245, 158, 11, 0.12);
  color: #0B1B3D;
  font-size: 0.7rem;
  font-weight: 800;
}

.doc-lines {
  display: grid;
  gap: 0.5rem;
}

.doc-line {
  display: block;
  height: 0.6rem;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(15, 76, 129, 0.20), rgba(15, 76, 129, 0.08));
}

.doc-line--short { width: 42%; }
.doc-line--med { width: 72%; }
.doc-line--long { width: 100%; }

.faq-panel {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.35s ease;
  max-height: 0;
  opacity: 0;
}

.faq-panel.is-open {
  max-height: 300px;
  opacity: 1;
}

.faq-button i {
  transition: transform 0.2s ease;
}

.faq-button[aria-expanded="true"] i {
  transform: rotate(180deg);
}

/* Keep the header and footer legible when utility CSS loads late or is unavailable. */
header.sticky {
  background-color: #FFFFFF;
  border-bottom: 1px solid #E2E8F0;
}

footer {
  background-color: #0B1B3D !important;
  border-top: 3px solid #F59E0B;
  color: #FFFFFF;
}

footer.bg-navy-900 {
  background-color: #0B1B3D !important;
  color: #FFFFFF;
}

footer.bg-navy-900 .text-slate-300 {
  color: #CBD5E1 !important;
}

footer.bg-navy-900 .text-slate-400 {
  color: #94A3B8 !important;
}

footer.bg-navy-900 .text-blue-100 {
  color: #DBEAFE !important;
}

a:hover {
  opacity: 0.8;
}

/* ============================================================================
   Desktop Mega Navigation
   ============================================================================ */

.nav-dropdown {
  position: relative;
}

.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0;
  padding: 0.5rem 0.25rem;
  border: none;
  background: transparent;
}

.nav-trigger i {
  font-size: 0.7rem;
}

.nav-trigger:hover,
.nav-trigger:focus {
  color: var(--blue-industry);
}

.nav-flyout {
  position: absolute;
  left: 0;
  top: calc(100% + 0.4rem);
  min-width: 320px;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 0.9rem;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  padding: 0.35rem 0;
  opacity: 0;
  visibility: hidden;
  z-index: 50;
  transform: translateY(8px);
  transition: all 0.18s ease;
}

.nav-dropdown:hover > .nav-flyout,
.nav-dropdown:focus-within > .nav-flyout,
.nav-dropdown > .nav-trigger:hover + .nav-flyout,
.nav-dropdown > .nav-trigger:focus + .nav-flyout {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-flyout-group {
  position: relative;
}

.nav-flyout-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--slate-dark);
  background: transparent;
  border: none;
  text-align: left;
}

.nav-flyout-item i {
  font-size: 0.7rem;
  opacity: 0.8;
}

.nav-flyout-item:hover,
.nav-flyout-item:focus,
.nav-flyout-item.is-active {
  background: var(--blue-industry);
  color: #ffffff;
}

.nav-flyout-item:hover i,
.nav-flyout-item:focus i,
.nav-flyout-item.is-active i {
  opacity: 1;
}

.nav-submenu {
  position: absolute;
  left: calc(100% + 0.15rem);
  top: 0;
  min-width: 290px;
  background: #ffffff;
  border: 1px solid #E2E8F0;
  border-radius: 0.9rem;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  padding: 0.35rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(8px);
  transition: all 0.18s ease;
  z-index: 55;
}

.nav-flyout-group:hover > .nav-submenu,
.nav-flyout-group:focus-within > .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.nav-submenu a {
  display: block;
  padding: 0.7rem 1rem;
  font-size: 0.8rem;
  color: #334155;
  font-weight: 500;
}

.nav-submenu a:hover,
.nav-submenu a:focus {
  background: #F8FAFC;
  color: var(--blue-industry);
}

/* ============================================================================
   Transitions
   ============================================================================ */

.transition {
  transition: all 0.2s ease;
}

.transition-colors {
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 640px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  body {
    font-size: 0.95rem;
  }
}

/* ============================================================================
   Print Styles
   ============================================================================ */

@media print {
  body {
    background-color: white;
  }

  button {
    display: none;
  }

}

/* ============================================================================
   Accessibility
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

:focus-visible {
  outline: 3px solid var(--blue-industry);
  outline-offset: 2px;
}

/* ============================================================================
   Scrollbar Styling
   ============================================================================ */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #9CA3AF;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #6B7280;
}

/* ============================================================================
   Selection
   ============================================================================ */

::selection {
  background-color: var(--blue-industry);
  color: white;
}

::-moz-selection {
  background-color: var(--blue-industry);
  color: white;
}

/* ============================================================================
   Custom Animations
   ============================================================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes heroPan {
  0% {
    background-position: center center, 0% 50%, 100% 100%, center;
  }
  100% {
    background-position: center center, 100% 50%, 0% 100%, center;
  }
}

@keyframes gridFloat {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -6px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* ============================================================================
   Utility Classes for Industry Design
   ============================================================================ */

.nav-dropdown {
  position: relative;
}

/* ============================================================================
   Card Styles
   ============================================================================ */

.card {
  background: white;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* ============================================================================
   Badge Styles
   ============================================================================ */

.badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  background-color: #F3F4F6;
  color: #1F2937;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 9999px;
}

/* ============================================================================
   Section Spacing
   ============================================================================ */

section {
  padding: 5rem 0;
}

@media (max-width: 768px) {
  section {
    padding: 3rem 0;
  }
}

/* ============================================================================
   Container
   ============================================================================ */

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ============================================================================
   Custom Grid
   ============================================================================ */

.grid-cols-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-cols-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 768px) {
  .md\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .md\:grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4,
  .grid-cols-5 {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   Trade & Service Inner Page Layouts
   ============================================================================ */

.page-banner {
  background: linear-gradient(135deg, var(--blue-light) 0%, var(--blue-industry) 45%, var(--navy-900) 100%);
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(245, 158, 11, 0.22), transparent 28%);
}

.page-banner > div {
  position: relative;
  z-index: 1;
}

.content-shell {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(290px, 0.9fr);
  gap: 2rem;
  align-items: start;
}

.content-main {
  min-width: 0;
}

.service-intro,
.content-block {
  margin-bottom: 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.info-card,
.sidebar-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.info-card {
  padding: 1.5rem;
}

.info-card h3,
.sidebar-card h3 {
  margin-bottom: 0.75rem;
  color: var(--slate-dark);
}

.info-card ul,
.check-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.info-card li,
.check-list li {
  position: relative;
  padding-left: 1.35rem;
  color: #475569;
}

.info-card li::before,
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--blue-industry);
  font-weight: 800;
}

.mini-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.mini-grid span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: var(--blue-industry);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.6rem 0.9rem;
  border-radius: 9999px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
  align-self: start;
}

.sidebar-card {
  padding: 1.5rem;
  background: #F8FAFC;
  width: 100%;
  overflow: hidden;
}

.sticky-box {
  position: sticky;
  top: 6rem;
  z-index: 1;
}

.compact-list {
  gap: 0.75rem;
}

.phone-email {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
  color: #334155;
  font-weight: 600;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.related-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #CBD5E1;
  background: #fff;
  color: var(--slate-dark);
  padding: 0.8rem 1rem;
  border-radius: 9999px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.related-links a:hover {
  border-color: var(--blue-industry);
  color: var(--blue-industry);
  box-shadow: 0 8px 18px rgba(15, 76, 129, 0.08);
}

@media (max-width: 1024px) {
  .content-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    max-width: 680px;
    width: 100%;
    margin: 0 auto;
  }

  .sticky-box {
    position: static;
    top: auto;
  }
}

@media (max-width: 640px) {
  .card-grid {
    grid-template-columns: 1fr;
  }

  .info-card,
  .sidebar-card {
    padding: 1.2rem;
  }
}
