﻿/* ENGINEERING EXCELLENCE SECTION STYLES */

.eng-section {
  position: relative;
  overflow: hidden;
  padding: 8rem 0;
  background-color: #0c0c0e;
  color: #FFFFFF;
}

/* Blueprint Grid Background */
.eng-blueprint-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 150%;
  height: 150%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.09;
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(200, 16, 46, 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(200, 16, 46, 0.15) 1px, transparent 1px);
  transform: translate(-10%, -10%);
}

.eng-blueprint-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 8px, transparent 8px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 8px, transparent 8px);
  background-size: 8px 8px;
}

/* Moving Blueprint Laser Scanner Sweep */
@keyframes blueprintLaser {
  0% { transform: translateY(-30%); }
  50% { transform: translateY(100%); }
  100% { transform: translateY(-30%); }
}

.eng-blueprint-bg::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent 5%, var(--color-primary, #D62828) 40%, var(--color-accent-indigo, #4F46E5) 60%, transparent 95%);
  box-shadow: 0 0 20px 4px var(--color-primary, #D62828), 0 0 10px rgba(79, 70, 229, 0.5);
  animation: blueprintLaser 10s ease-in-out infinite;
  opacity: 0.65;
}

/* Floating architectural grid overlay */
.eng-blueprint-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

.eng-blueprint-line {
  position: absolute;
  background: rgba(200, 16, 46, 0.15);
}

.eng-blueprint-line.horizontal {
  height: 1px;
  width: 100%;
}

.eng-blueprint-line.vertical {
  width: 1px;
  height: 100%;
}

/* Section Containers */
.eng-container {
  position: relative;
  z-index: 5;
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

.eng-grid-hero {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr;
  gap: 5rem;
  align-items: center;
  margin-bottom: 6rem;
}

/* Left Side Copy styling */
.eng-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.eng-tag {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: rgba(200, 16, 46, 0.08);
  color: var(--color-primary, #C8102E);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(200, 16, 46, 0.15);
}

.eng-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 3.25rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
}

.eng-description {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #A1A1A6;
  margin-bottom: 2.5rem;
}

.eng-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.eng-btn-secondary {
  font-weight: 700;
  color: #FFFFFF;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.eng-btn-secondary:hover {
  color: var(--color-primary, #C8102E);
  transform: translateX(3px);
}

/* Visualization Frame (Right Side) */
.eng-visual-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #F8F9FA;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(200, 16, 46, 0.12);
  box-shadow: var(--shadow-luxury);
  overflow: hidden;
}

/* Sequence Image Loop styling */
.eng-sequence-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.eng-seq-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), transform 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.eng-seq-image.active {
  opacity: 1;
  transform: scale(1);
}

/* Custom Overlay for Blueprint Wireframe (SVG Overlay) */
.eng-blueprint-wireframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease;
  pointer-events: none;
  background-color: #0A1128;
  background-image: 
    radial-gradient(rgba(255, 255, 255, 0.15) 1px, transparent 1px),
    linear-gradient(to right, rgba(0, 102, 204, 0.1) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 102, 204, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
}

.eng-blueprint-wireframe.active {
  opacity: 1;
}

.eng-wireframe-svg {
  width: 100%;
  height: 100%;
  stroke: #00D2FF;
  stroke-width: 0.75px;
  fill: none;
  stroke-dasharray: 400;
  stroke-dashoffset: 400;
}

.eng-blueprint-wireframe.active .eng-wireframe-svg {
  animation: engDash 4s linear forwards;
}

@keyframes engDash {
  to {
    stroke-dashoffset: 0;
  }
}

/* Floating Blueprint Labels */
.eng-floating-label {
  position: absolute;
  padding: 0.4rem 0.9rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(200, 16, 46, 0.15);
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #1A1A1A;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: 10;
}

.eng-floating-label.active {
  opacity: 1;
  transform: translateY(0);
}

.eng-floating-label::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--color-primary, #C8102E);
  border-radius: 50%;
  margin-right: 0.45rem;
  vertical-align: middle;
}

/* Software Cards Grid */
.eng-software-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 7rem;
}

.eng-card {
  position: relative;
  background: rgba(20, 20, 25, 0.65);
  backdrop-filter: blur(20px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.eng-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(800px circle at var(--x, 0) var(--y, 0), rgba(200, 16, 46, 0.06), transparent 40%);
  z-index: 1;
  pointer-events: none;
}

.eng-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(200, 16, 46, 0.25), transparent, rgba(200, 16, 46, 0.05));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.eng-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(79, 70, 229, 0.25);
  border-color: rgba(79, 70, 229, 0.4);
  background: rgba(25, 25, 32, 0.85);
}

.eng-card:hover::after {
  opacity: 1;
}

.eng-card-icon-container {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(200, 16, 46, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
  transition: transform 0.4s ease;
}

.eng-card:hover .eng-card-icon-container {
  transform: rotate(5deg) scale(1.05);
  background: rgba(200, 16, 46, 0.1);
}

.eng-card-icon {
  width: 24px;
  height: 24px;
  fill: var(--color-primary, #C8102E);
}

.eng-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 2;
}

.eng-card-desc {
  font-size: 0.88rem;
  color: #A1A1A6;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 2;
}

.eng-card-features {
  list-style: none;
  padding: 0;
  margin: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  z-index: 2;
}

.eng-card-features li {
  font-size: 0.82rem;
  color: #A1A1A6;
  padding-left: 1rem;
  position: relative;
}

.eng-card-features li::before {
  content: '•';
  color: var(--color-primary, #C8102E);
  position: absolute;
  left: 0;
  font-weight: bold;
}

/* Timeline Components */
.eng-timeline-container {
  margin-bottom: 7rem;
  position: relative;
  padding: 2rem 0;
  overflow: hidden;
}

.eng-timeline-header {
  text-align: center;
  margin-bottom: 4rem;
}

.eng-timeline-header h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.25rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 0.5rem;
}

.eng-timeline-track-wrapper {
  position: relative;
  padding: 2rem 0;
}

/* Connecting Line */
.eng-timeline-line {
  position: absolute;
  top: 50%;
  left: 5%;
  width: 90%;
  height: 2px;
  background: rgba(255, 255, 255, 0.12);
  z-index: 1;
  transform: translateY(-50%);
}

.eng-timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--color-primary, #C8102E);
  transition: width 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.eng-timeline-steps {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.eng-timeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 12%;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.eng-timeline-step.animated {
  opacity: 1;
  transform: translateY(0);
}

.eng-timeline-node {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #18181f;
  border: 2px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  color: #A1A1A6;
  margin-bottom: 1.25rem;
  transition: all 0.4s ease;
  box-shadow: var(--shadow-sm);
}

.eng-timeline-step.active .eng-timeline-node {
  border-color: var(--color-primary, #C8102E);
  background: var(--color-primary, #C8102E);
  color: #FFFFFF;
  box-shadow: 0 0 15px rgba(200, 16, 46, 0.35);
  transform: scale(1.1);
}

.eng-timeline-step-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.35rem;
}

.eng-timeline-step-desc {
  font-size: 0.76rem;
  color: #A1A1A6;
  line-height: 1.4;
}

/* Dashboard Section Layout */
.eng-dashboard-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 5rem;
  align-items: center;
}

.eng-metrics-panel {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.eng-metric-card {
  background: rgba(20, 20, 25, 0.65);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eng-metric-card:hover {
  background: rgba(25, 25, 32, 0.85);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.3);
  transform: translateY(-4px);
}

.eng-metric-card.full-width {
  grid-column: span 2;
}

.eng-metric-val {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.85rem;
  font-weight: 800;
  color: var(--color-primary, #C8102E);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.eng-metric-label {
  font-size: 0.92rem;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 0.25rem;
}

.eng-metric-desc {
  font-size: 0.8rem;
  color: #A1A1A6;
  line-height: 1.4;
}

/* Badges Grid styling */
.eng-badges-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.eng-badges-header {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 1.5rem;
}

.eng-badges-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  width: 100%;
}

.eng-badge-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.9rem 1.25rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.eng-badge-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateX(4px);
}

.eng-badge-check {
  color: var(--color-primary, #C8102E);
  font-weight: 900;
}

/* Floating SVG Blueprint Decorations */
.eng-floating-deco {
  position: absolute;
  pointer-events: none;
  z-index: 3;
  opacity: 0.15;
  transition: transform 0.1s ease-out;
}

.eng-deco-compass {
  top: 15%;
  right: 5%;
  width: 120px;
  height: 120px;
  animation: engRotate 60s linear infinite;
}

.eng-deco-cube {
  bottom: 8%;
  left: 4%;
  width: 90px;
  height: 90px;
}

.eng-deco-measure {
  top: 45%;
  left: 2%;
  width: 80px;
  height: 80px;
}

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

/* RESPONSIVE MEDIA QUERIES */
@media (max-width: 1200px) {
  .eng-grid-hero {
    gap: 3rem;
  }
  .eng-heading {
    font-size: 2.75rem;
  }
  .eng-software-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .eng-timeline-step {
    width: 13%;
  }
  .eng-timeline-step-title {
    font-size: 0.82rem;
  }
}

@media (max-width: 991px) {
  .eng-section {
    padding: 6rem 0;
  }
  .eng-grid-hero {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  .eng-dashboard-layout {
    grid-template-columns: 1fr;
    gap: 4rem;
  }
  .eng-metrics-panel {
    order: 2;
  }
  .eng-badges-container {
    order: 1;
  }
  .eng-timeline-track-wrapper {
    padding: 1rem 0;
  }
  .eng-timeline-line {
    display: none;
  }
  .eng-timeline-steps {
    flex-direction: column;
    gap: 2rem;
    align-items: flex-start;
    padding-left: 2.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.15);
    position: relative;
  }
  .eng-timeline-steps::after {
    content: '';
    position: absolute;
    top: 0;
    left: -2px;
    width: 2px;
    height: 100%;
    background: var(--color-primary, #C8102E);
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.5s ease-out;
  }
  .eng-timeline-container.active .eng-timeline-steps::after {
    transform: scaleY(1);
  }
  .eng-timeline-step {
    flex-direction: row;
    align-items: center;
    text-align: left;
    width: 100%;
    gap: 1.5rem;
  }
  .eng-timeline-node {
    margin-bottom: 0;
    flex-shrink: 0;
  }
}

@media (max-width: 600px) {
  .eng-section {
    padding: 4rem 0;
  }
  .eng-heading {
    font-size: 2.15rem;
  }
  .eng-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .eng-actions .btn {
    text-align: center;
  }
  .eng-btn-secondary {
    justify-content: center;
  }
  .eng-software-grid {
    grid-template-columns: 1fr;
  }
  .eng-metrics-panel {
    grid-template-columns: 1fr;
  }
  .eng-metric-card.full-width {
    grid-column: span 1;
  }
  .eng-badges-grid {
    grid-template-columns: 1fr;
  }
}
