/* ==== Project Matrix Section ==== */
.project-matrix-section {
  width: 100%;
  background-color: #dae6f2;
  margin: 0;
  padding: 30px 0 35px 0;
  direction: rtl;
  position: relative;
  z-index: 1;
}

.matrix-container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* Two-column layout */
.matrix-content-row {
  display: flex;
  align-items: stretch;
  gap: 24px;
  width: 100%;
  direction: rtl;
}

/* Right column (in RTL): Industrial Photo */
.matrix-image-wrapper {
  flex: 0 0 33%;
  max-width: 33%;
  height: 226px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(11, 26, 47, 0.15);
  display: flex;
}

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

/* Left column (in RTL): Table and Title */
.matrix-table-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.matrix-title {
  width: 100%;
  font-family: 'Koodak', 'Sahel', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #0b1a2f;
  text-align: center;
  margin: 0 auto 18px auto;
  letter-spacing: -0.3px;
}

.matrix-table {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Table Header */
.matrix-header-row {
  display: flex;
  align-items: center;
  height: 44px;
  background: #081a32;
  border-radius: 6px 6px 0 0;
  color: #ffffff;
  font-family: 'Sahel', 'Vazirmatn', sans-serif;
  font-size: 15px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(8, 78, 138, 0.2);
}

.matrix-th {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  border-left: 1px solid rgba(255, 255, 255, 0.25);
  padding: 0 12px;
  box-sizing: border-box;
}

.matrix-th:last-child {
  border-left: none;
}

/* Table Column Widths (matching the image) */
.col-conditions {
  flex: 1.1;
}

.col-solution {
  flex: 1.5;
}

.col-goal {
  flex: 0.9;
}

/* Table Body Rows */
.matrix-body {
  display: flex;
  flex-direction: column;
}

.matrix-tr {
  display: flex;
  align-items: center;
  height: 41px;
  margin-top: 4px;
  border-radius: 6px;
  font-family: 'Vazirmatn', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #0b1a2f;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.matrix-td {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  border-left: 1px solid rgba(165, 192, 218, 0.45);
  padding: 0 12px;
  box-sizing: border-box;
}

.matrix-td:last-child {
  border-left: none;
}

/* Alternating Row Colors */
.row-light {
  background-color: #edf3f8;
  border: 1px solid rgba(195, 215, 235, 0.7);
}

.row-blue {
  background-color: #bcd4eb;
  border: 1px solid rgba(165, 192, 218, 0.7);
}

/* Bottom Bar */
.matrix-bottom-bar {
  width: 100%;
  margin: 22px auto 0 auto;
  height: 44px;
  background-color: #cdddeb;
  border: 1.5px solid #111e30;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.matrix-bottom-text {
  font-family: 'Vazirmatn', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #0b1a2f;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 991px) {
  .matrix-content-row {
    flex-direction: column-reverse;
    align-items: center;
    gap: 20px;
  }

  .matrix-table-wrapper {
    width: 100%;
  }

  .matrix-image-wrapper {
    flex: none;
    max-width: 100%;
    width: 100%;
    height: 200px;
  }

  .matrix-title {
    font-size: 22px;
  }

  .matrix-header-row {
    font-size: 13.5px;
  }

  .matrix-tr {
    font-size: 13px;
    height: 38px;
  }

  .matrix-bottom-bar {
    max-width: 100%;
  }
}

@media (max-width: 576px) {
  .project-matrix-section {
    padding: 24px 0 28px 0;
  }

  .matrix-title {
    font-size: 20px;
  }

  .matrix-header-row {
    font-size: 12px;
    height: 40px;
  }

  .matrix-th,
  .matrix-td {
    padding: 0 4px;
  }

  .matrix-tr {
    font-size: 12px;
    height: 36px;
  }

  .matrix-bottom-text {
    font-size: 12.5px;
  }
}