/* components.css - High-End Industrial Components */

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 24px;
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--brand-blue);
  color: #FFFFFF;
  border-color: var(--brand-blue);
  box-shadow: 0 4px 12px rgba(32, 76, 132, 0.25);
}

.btn-primary:hover {
  background-color: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(32, 76, 132, 0.35);
}

.btn-gold {
  background-color: var(--brand-gold);
  color: #0F172A;
  border-color: var(--brand-gold);
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(243, 181, 35, 0.3);
}

.btn-gold:hover {
  background-color: var(--brand-gold-hover);
  border-color: var(--brand-gold-hover);
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--text-main);
  border-color: var(--border-medium);
}

.btn-outline:hover {
  background-color: var(--bg-subtle);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

.section-dark .btn-outline,
.hero .btn-outline {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.3);
}

.section-dark .btn-outline:hover,
.hero .btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: #FFFFFF;
  color: #FFFFFF;
}

.btn-light {
  background: transparent;
  color: var(--brand-blue-dark);
  border: none;
  font-weight: 800;
  padding: 16px 36px;
  font-size: var(--text-base);
  position: relative;
  z-index: 0;
  overflow: hidden;
  border-radius: var(--radius-sm);
}

/* Large spinning gradient — clipped to the button shape by overflow:hidden */
.btn-light::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 500px;
  height: 500px;
  margin-top: -250px;
  margin-left: -250px;
  background: conic-gradient(transparent 60%, #E31E24 80%, #F3B523 100%);
  animation: rotateBorder 4s linear infinite;
  z-index: -2;
}

/* White fill that covers the center — only the 2px edge gap remains visible */
.btn-light::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: #FFFFFF;
  border-radius: inherit;
  z-index: -1;
}

@keyframes rotateBorder {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.btn-light:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.btn-light:hover::after {
  background: #F8FAFC;
}

/* Engineering Section Header */
.section-header {
  max-width: 760px;
  margin-bottom: var(--space-12);
}

.section-header.text-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

/* Feature & Capability Cards (Clean & Readable) */
.capability-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .capability-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .capability-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cap-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.cap-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-gold));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.cap-card:hover {
  border-color: var(--brand-blue-light);
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
}

.cap-card:hover::before {
  opacity: 1;
}

.cap-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-blue);
  font-weight: 800;
  font-size: var(--text-lg);
  margin-bottom: var(--space-6);
}

.cap-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--brand-blue);
  flex-shrink: 0;
}

.cap-card h3 {
  position: relative;
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  color: var(--text-main);
  padding-left: 18px;
}

.cap-card h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 6px;
  height: 6px;
  background-color: var(--brand-gold);
  border-radius: 1px;
}

.cap-card.no-bullet h3 {
  padding-left: 0;
}

.cap-card.no-bullet h3::before {
  display: none;
}

.cap-card p {
  font-size: var(--text-sm);
  margin-bottom: var(--space-6);
  flex-grow: 1;
}

.cap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border-light);
  padding-top: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.cap-list li {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.cap-list li::before {
  content: '•';
  color: var(--brand-blue);
  font-weight: 900;
  font-size: 1.2em;
}

.section-dark .cap-list, .section-brand .cap-list {
  border-top-color: var(--border-dark-subtle);
}

.section-dark .cap-list li, .section-brand .cap-list li {
  color: var(--text-inverse-muted);
}

.section-dark .cap-list li::before, .section-brand .cap-list li::before {
  color: var(--brand-gold);
}

.section-brand .cap-card {
  background-color: var(--bg-dark-surface);
  border-color: var(--border-dark-subtle);
  color: var(--text-inverse);
}

.section-brand .cap-card h3, .section-brand .cap-card h4 {
  color: var(--text-inverse);
}

/* Interactive Engineering Workflow Roadmap */
.workflow-track {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  position: relative;
  margin-top: var(--space-8);
}

@media (min-width: 1024px) {
  .workflow-track {
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-4);
  }
}

.workflow-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.workflow-num {
  font-size: var(--text-3xl);
  font-weight: 900;
  color: var(--brand-gold);
  line-height: 1;
  margin-bottom: var(--space-2);
  opacity: 0.8;
}

.workflow-card h4 {
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
  color: var(--text-main);
}

.workflow-card p {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

/* Real Project Cards */
.project-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  justify-content: center;
}

.filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--brand-blue);
  color: #FFFFFF;
  border-color: var(--brand-blue);
}

.projects-masonry {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .projects-masonry {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .projects-masonry {
    grid-template-columns: repeat(3, 1fr);
  }
}

.project-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--brand-blue-light);
}

.project-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #F8FAFC;
}

.project-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-slow);
}

.project-card:hover .project-img-wrap img {
  transform: scale(1.06);
}

.collage-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  height: 100%;
  gap: 2px;
  background-color: var(--border-light);
}

.collage-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform var(--transition-slow);
  background-color: #FFFFFF;
}

.collage-wrap > :first-child {
  grid-row: span 2;
}

.project-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 2px;
  border-left: 2px solid var(--brand-gold);
}

.project-content {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-content h4 {
  font-size: var(--text-lg);
  color: var(--text-main);
  margin-bottom: var(--space-2);
}

.project-content p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
  flex-grow: 1;
}

.project-specs {
  display: none;
}

.spec-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--brand-blue);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-light);
  padding: 2px 8px;
  border-radius: 2px;
}

/* Marquee Container */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: var(--space-4) 0;
  display: flex;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: scrollMarquee 40s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes scrollMarquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

.client-logo-card {
  flex: 0 0 200px;
  margin: 0 var(--space-3);
  background-color: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 95px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.client-logo-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-blue-light);
  transform: translateY(-2px);
}

.client-logo-card img {
  max-height: 48px;
  max-width: 100%;
  object-fit: contain;
}

/* Software Logo Marquee Cards */
.software-logo-card {
  flex: 0 0 auto;
  margin: 0 var(--space-3);
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.software-logo-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--brand-gold);
  transform: translateY(-2px);
}

.software-logo-card img {
  height: 28px;
  width: 28px;
  object-fit: contain;
}

.software-logo-card span {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brand-blue-dark);
  letter-spacing: 0.01em;
}

/* Compact contained marquee for software tools */
.software-marquee {
  border-radius: var(--radius-md);
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 16px 0;
}

/* Sector Grid */
.sector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}

@media (min-width: 768px) {
  .sector-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .sector-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

.sector-pill {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: var(--space-4) var(--space-2);
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
  letter-spacing: 0.05em;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

.sector-pill:hover {
  background-color: var(--brand-blue);
  color: #FFFFFF;
  border-color: var(--brand-blue);
}

/* Split Visual Showcase Section */
.split-showcase {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  align-items: center;
}

.split-showcase > div {
  min-width: 0;
  overflow: hidden;
}

@media (min-width: 1024px) {
  .split-showcase {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
  }
}

.showcase-media {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-light);
  background-color: #0F172A;
}

.showcase-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.showcase-badge-float {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  padding: 8px 16px;
  border-radius: 4px;
  border-left: 3px solid var(--brand-gold);
  color: #FFFFFF;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
}

/* Contact Cards & Form */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr 1.2fr;
    gap: var(--space-16);
  }
}

.location-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--brand-blue);
  border-radius: var(--radius-sm);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
}

.location-card h4 {
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
  color: var(--text-main);
}

.location-card p {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.5;
}

.contact-card-form {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
  color: var(--text-main);
}

.contact-card-form h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main) !important;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.contact-card-form p {
  font-size: 0.9375rem;
  color: var(--text-muted) !important;
  line-height: 1.6;
  margin-bottom: 1.75rem;
}

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: var(--space-2);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text-main);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  background-color: #FFFFFF;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(32, 76, 132, 0.15);
}

.form-textarea {
  min-height: 130px;
  resize: vertical;
}

/* --- SCROLL LIST HIGHLIGHT PATTERN --- */
.scroll-highlight-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  position: relative;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .scroll-highlight-container {
    flex-direction: row;
    gap: var(--space-12);
  }
}

.scroll-highlight-sticky {
  position: sticky;
  top: 140px;
  flex: 1;
  align-self: flex-start;
  padding-bottom: var(--space-12);
}

.scroll-highlight-list {
  flex: 1.5;
  display: flex;
  flex-direction: column;
  padding-top: 30vh;
  padding-bottom: 30vh;
}

.scroll-list-item {
  padding: var(--space-6) 0;
  opacity: 0.85;
  transform: translateX(-10px);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-left: 4px solid transparent;
  padding-left: var(--space-6);
  margin-bottom: var(--space-12);
}

.scroll-list-item h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin: 0;
  color: var(--text-main);
  line-height: 1.1;
}

.scroll-list-item p {
  font-size: var(--text-lg);
  margin-top: var(--space-4);
  color: var(--text-muted);
  max-width: 500px;
}

.scroll-list-item.active {
  opacity: 1;
  transform: translateX(0);
  border-left-color: var(--brand-gold);
}

.scroll-list-item.active h2 {
  color: var(--brand-blue-dark);
}

/* 2x2 Image Showcase */
.bento-gallery { 
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  align-items: center; /* Centers items vertically so they don't stretch */
} 
.bento-gallery .bento-item { 
  border-radius: var(--radius-md); 
  overflow: hidden; 
  box-shadow: var(--shadow-md); 
  position: relative; 
  background: var(--bg-card, #fff);
  display: flex;
  justify-content: center;
  align-items: center;
} 
.bento-gallery .bento-item img { 
  width: 100%; 
  height: auto; 
  max-height: 400px; /* Prevents images from making the section too tall */
  object-fit: contain; /* Ensures entire image is visible, zoomed out if needed */
  display: block;
  transition: transform 0.5s ease; 
} 
.bento-gallery .bento-item:hover img { 
  transform: scale(1.05); 
} 
@media (max-width: 768px) { 
  .bento-gallery { 
    grid-template-columns: 1fr; 
  } 
}

/* Lightbox Styles */
.img-lightbox-wrapper {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  cursor: zoom-in;
}

.lightbox-mag-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 48px;
  height: 48px;
  background: rgba(10, 15, 25, 0.7);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.img-lightbox-wrapper:hover .lightbox-mag-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 25, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
}

.lightbox-img {
  max-width: 90%;
  max-height: 90vh;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border-radius: 8px;
  border: 2px solid rgba(255,255,255,0.1);
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10000;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  color: var(--brand-blue);
}

/* ==========================================================================
   MOBILE RESPONSIVE OVERRIDES
   ========================================================================== */
@media (max-width: 767px) {
  .section-header {
    margin-bottom: var(--space-8);
  }

  .btn {
    padding: 10px 18px;
    font-size: var(--text-xs);
  }

  .btn-light {
    padding: 12px 24px;
    font-size: var(--text-sm);
  }

  .cap-card {
    padding: var(--space-6);
  }

  .cap-card h3 {
    font-size: var(--text-lg);
  }

  .workflow-card {
    padding: var(--space-4);
  }

  .project-content {
    padding: var(--space-4);
  }

  .contact-card-form {
    padding: var(--space-6);
  }

  .contact-card-form h3 {
    font-size: 1.25rem;
  }

  .location-card {
    padding: var(--space-4);
  }

  .scroll-highlight-sticky {
    position: relative;
    top: 0;
  }

  .scroll-highlight-list {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
  }

  .scroll-list-item {
    padding-left: var(--space-4);
    margin-bottom: var(--space-6);
  }

  .scroll-list-item h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
  }

  .accordion-header {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }

  .accordion-inner {
    padding: 0 16px 16px 16px;
  }

  .accordion-inner p {
    font-size: var(--text-base);
  }

  .client-logo-card {
    flex: 0 0 150px;
    height: 72px;
    padding: var(--space-4);
  }

  .client-logo-card img {
    max-height: 36px;
  }
}

@media (max-width: 480px) {
  .sector-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .sector-pill {
    padding: var(--space-3) var(--space-2);
    font-size: 0.65rem;
  }

  .cap-card {
    padding: var(--space-4);
  }

  .project-content h4 {
    font-size: var(--text-base);
  }

  .software-logo-card {
    padding: 10px 16px;
    gap: 8px;
  }

  .software-logo-card img {
    height: 22px;
    width: 22px;
  }

  .software-logo-card span {
    font-size: 0.82rem;
  }
}
