@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400&display=swap');

/* ===================================================
   GENERAL STYLES
================================================== */

/*Header Box*/

.how-we-differ {
  background-color: #ffffff; /* Matches page background */
  padding: 0px 30px; /* Increased padding for vertical space */
  padding-bottom: 100px;
  padding-top: 180px;
  text-align: center;
}

.how-we-differ-title {
  font-family: 'Montserrat', sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: 4px solid #00a9d2; /* changed here */
  padding: 40px 5px;
  font-weight: 400;
  border-radius: 15px;
  color: #00a9d2;
  width: clamp(50px, 100%, 1000px);  /* fluid width with min & max */
  margin: 0px auto 10px auto;
  transition: transform 0.3s ease;
  font-size: clamp(.5rem, 3vw, 2.5rem);
  background-color: #e6e6e6;
}

.how-we-differ-title:hover {
  transform: scale(1.02);
}

/*Header Box-End*/

/*Table*/
.container {
  max-width: 1350px;
  padding: 0px 30px; /* Moved padding here to scope it to the table section */
  background-color: #ffffff;
  margin: 0px auto 0px auto;
}

table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  color: #595959;
  overflow: hidden;
}

th,
td {
  padding: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: bold;
  border: 3px solid #ffffff;
  background-color: #F2F2F2;
  max-width: 100%;
  word-wrap: break-word;
}

th:first-child {
  background-color: #ffffff !important;
  font-weight: bolder;
}

th {
  background-color: #FFF4C3 !important;
  font-weight: bolder;
}

tr:first-child th:first-child {
  border: none;
  background-color: #ffffff;
}

/* Specific column widths */
tr > td:nth-child(1),
tr > th:nth-child(1) {
  max-width: 180px;
}

tr > td:nth-child(2),
tr > th:nth-child(2),
tr > td:nth-child(3),
tr > th:nth-child(3),
tr > td:nth-child(4),
tr > th:nth-child(4) {
  max-width: 60px;
}

tr:first-child th:nth-child(3),
tr:first-child th:nth-child(4) {
  max-width: 60px;
  padding: 10px 5px;
}

/* Spacer row */
.spacer-row td {
  background-color: #ffffff;
  border: none;
  padding: 0;
  height: 3px;
}

/* Checkmark box */
.check {
  color: #4EA72E;
  border: 2px solid #4EA72E;
  display: inline-block;
  width: 30px;
  height: 30px;
  line-height: 20px;
  vertical-align: middle;
  font-weight: bold;
  text-align: center;
}

/* Rarely text */
.rarely {
  color: red;
}

/* Text alignments */
.center {
  text-align: center;
}

.left-align {
  text-align: left;
}

/* White block container */
.white-block {
  background-color: white;
  margin: 30px auto 0;
  padding: 10px;
}

tr:first-child th:first-child {
  border: none;
  background-color: #ffffff;
}

/* ===================================================
   RESPONSIVE STYLES (Mobile only)
================================================== */
@media (max-width: 768px) {
  .container {
    padding: 20px 10px;
  }

  table {
    font-size: 9px;
    table-layout: auto;
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    padding: 2px;
    overflow: visible;
    overflow-x: auto;
  }

  th,
  td {
    padding: 3px;
    font-size: 9px;
    line-height: 1.2;
    border: 1px solid #ffffff !important;
    background-color: #e6e6e6;
    word-break: break-word;
    max-width: 100%;
    font-size: clamp(0.75rem, 1vw + 0.5rem, 1rem);
  }

  th:first-child {
    border: none !important;
    background-color: #ffffff !important;
    border: 1px solid #ffffff !important;
    border-radius: 10px 0 0 0;
  }

  tr:first-child th:nth-child(2) {
    border-radius: 10px 10px 0 0;
  }

  tr:first-child th:nth-child(3) {
    border-radius: 10px 0 0 0;
    background-color: #b1b1b1 !important;
  }

  tr:first-child th:nth-child(4) {
    border-radius: 0 10px 0 0;
    background-color: #b1b1b1 !important;
  }

  table tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
  }

  table tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
  }

  table tr:nth-child(2) td:first-child {
    border-top-left-radius: 10px;
  }

  tr:nth-child(9) td:nth-child(2) {
    border-bottom-right-radius: 10px;
  }
  tr:nth-child(9) td:nth-child(3) {
    border-bottom-left-radius: 10px;
  }

  th:nth-child(3),
  th:nth-child(4),
  td:nth-child(3),
  td:nth-child(4) {
    font-size: 6px;
    max-width: 20px;
    padding: 1px;
    line-height: 1;
    text-align: center;
  }

  /* Mobile only: Ensure top row has 1px borders */
  table tr:first-child th {
    border: 1px solid #ffffff !important;
  }

  .check {
    width: 18px;
    height: 18px;
    line-height: 18px;
    font-size: 12px;
  }

  .white-block {
    padding: 15px;
    margin-top: 20px;
  }

  tr:nth-child(2) td:nth-child(1) {
    border-top-left-radius: 30px;
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }
  
  tr:nth-child(3) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }
  
  tr:nth-child(4) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }

  tr:nth-child(5) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }

  tr:nth-child(6) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }

  tr:nth-child(7) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }

  tr:nth-child(8) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }

  tr:nth-child(9) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
    border-bottom-left-radius: 30px;
  }
}

/* ===================================================
   DESKTOP SPECIFIC STYLES
================================================== */
@media (min-width: 769px) {
  table th,
  table td {
    border-width: 3px !important;
  }

  /* Optional: Reduce PNG image size (if needed) */
  table td img {
    max-width: 20px !important;
    height: auto !important;
    display: block;
    margin: 0 auto;
  }

  .check {
    border-width: 4px !important;
  }

  /* Adjust column widths */
  tr > td:nth-child(1),
  tr > th:nth-child(1) {
    width: 50%; /* Significantly wider first column */
   }

  tr > td:nth-child(2),
  tr > th:nth-child(2),
  tr > td:nth-child(3),
  tr > th:nth-child(3),
  tr > td:nth-child(4),
  tr > th:nth-child(4) {
    max-width: 10px; /* Decreased width for columns 2, 3, and 4 */
  }

  tr:first-child th:nth-child(2),
  tr:first-child th:nth-child(3),
  tr:first-child th:nth-child(4) {
    max-width: 10px; /* Ensure header cells match the skinnier columns */
  }

  tr:first-child th:nth-child(2) {
    border-radius: 30px 30px 0 0;
  }

  tr:first-child th:nth-child(3) {
    border-radius: 30px 0 0 0;
    background-color: #b1b1b1 !important;
  }

  tr:first-child th:nth-child(4) {
    border-radius: 0 30px 0 0;
    background-color: #b1b1b1 !important;
  }

  table tr:last-child td:last-child {
    border-bottom-right-radius: 30px;
  }

  tr:nth-child(9) td:nth-child(3) {
    border-bottom-left-radius: 30px;
  }

  tr:nth-child(9) td:nth-child(2) {
    border-bottom-right-radius: 30px;
  }

  tr:nth-child(2) td:nth-child(1) {
    border-top-left-radius: 30px;
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }
  
  tr:nth-child(3) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }
  
  tr:nth-child(4) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }

  tr:nth-child(5) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }

  tr:nth-child(6) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }

  tr:nth-child(7) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }

  tr:nth-child(8) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
  }

  tr:nth-child(9) td:nth-child(1) {
    background-color: #00a9d2 !important;
    color: #ffffff;
    padding-left: 20px; /* Adjust the pixel value for your desired indent */
    border-bottom-left-radius: 30px;
  }
}