/* About us section */
.about-text,
.about-image {
  width: 48%;
}
.about-image img {
  width: 100%;
  display: block;
}
.about-text h1 {
  margin-bottom: 20px;
}
.about-text p {
  margin-bottom: 20px;
}
.about-text p:last-of-type {
  margin-bottom: 0px;
}
.stats {
  margin-top: 30px;
  display: flex;
  justify-content: left;
  align-items: center;
  margin-left: -25px;
}
.stats h3 {
  color: var(--primary-color);
  font-size: 32px;
  line-height: 44px;
  margin-bottom: 10px;
}
.stats-card {
  padding: 0 25px;
}

/* Add divider on all except last */
.stats-card:not(:last-child) {
  border-right: 2px solid var(--light-border-color);
}


/* Mission & Vision section */
.mission-vision-section {
   background-color: var(--primary-color);
   color: var(--color-white);
}
.mission-vision-section .flex-row {
    align-items: flex-start;
}
.mission-vision {
  position: relative;
}
.mission-vision::before {
  content: "";
  position: absolute;
  top: 0%;
  bottom: 0%;
  left: 50%;
  width: 2px;
  background-color: rgba(255, 255, 255, 0.4);
}
.mission,
.vision {
  width: 45.5%;
}
.mission-vision h3 {
  color: var(--color-white);
  margin-bottom: 15px;
}

/* certificate section */
.certificate-section {
  position: relative;
  z-index: 1;
}
.certificate-img,
.certificate-text {
  width: 48%;
}
.certificate-img img {
  width: 100%;
}
.certificate-text h3 {
  margin-bottom: 15px;
}
.certificate-text p{
  margin-bottom: 30px;
}
.certificate-text ul {
  list-style: none;
  font-size: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.certificate-text li {
  color: var(--heading-text-color);
  padding-left: 20px;
  border-left: 1px solid var(--primary-color);
}
.certificate-section-bottom-right-bg {
  position: absolute;
  z-index: -1;
  bottom: 0;
  right: 0;
}

/* Specialists */

.specialists-section {
  /* background-color: var(--bg-2-color); */
  position: relative;
  z-index: 1;
}
.specialists-section-top-right-bg {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
}
.specialists-heading h3 {
  margin-bottom: 15px;
}
.specialists-heading {
  margin-bottom: 40px;
}
.specialists-grid {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  gap: 20px;
}
.specialists-grid .card {
  text-align: center;
  background: #F1F4F8;
  padding: 30px 20px;
  /* box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08); */
}
.specialists-grid h4 {
  margin-bottom: 10px;
}
.specialists-grid .card i {
  font-size: 34px;
  height: 74px;
  width: 74px;
  color: var(--primary-color);
  margin-bottom: 20px;
  /* background: #f8f4ed; */
  background: var(--color-white);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}

/* Add hover animation */
.specialists-grid .card:hover i {
  background: var(--primary-color);
  color: var(--color-white);
}


/* core values section */

.em-corevals-section-heading {
  margin-bottom: 40px;
}
.em-corevals-section-heading h3{
  margin-bottom: 15px;
}

.em-corevals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0; /* we draw separators via borders */
}

.em-corevals-card {
  padding: 26px 28px;
  box-sizing: border-box;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: transparent;
}

.em-corevals-icon {
  width: 44px;
  height: 44px;
  /* display: flex;
  align-items: center;
  justify-content: center; */
  margin-bottom: 6px;
}

.em-corevals-card h4{
  font-weight: 600;
}

/* vertical separators between columns:
   apply border-right to first and second column items (1,2,4,5) */
.em-corevals-card:nth-child(3n+1),
.em-corevals-card:nth-child(3n+2) {
  border-right: 1px solid #ddd;
}

/* horizontal separator between rows:
   apply border-top to the second row items (4,5,6). nth-child(n+4) matches 4.. */
.em-corevals-card:nth-child(n+4) {
  border-top: 1px solid #ddd;
}

/* subtle divider spacing - reduce border overlap look */
.em-corevals-card:nth-child(3n+1),
.em-corevals-card:nth-child(3n+2),
.em-corevals-card:nth-child(n+4) {
  padding: 26px 28px;
}



/* responsive css */

@media (max-width: 770px) {

  /* about us section */

  .about-text,
  .about-image {
    width: 100%;
  }
  .about-text {
    margin-bottom: 40px;
  }

  /* mission vision section */
  .mission,
.vision {
  width: 100%;
}
.mission-vision-section .flex-row {
    gap: 60px;
}
.mission-vision::before {
  top: 50%;
  left: 0%;
  width: 100%;
  height: 2px;
}

/* certificate section */
.certificate-img,
.certificate-text {
  width: 100%;
}
.certificate-img {
  margin-bottom: 30px;
}

/* specialists section */
.specialists-grid {
  grid-template-columns: repeat(2,1fr);
}

/* core values section */

.em-corevals-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Adjust borders for 2-col grid:
     items order: 1,2 (row1) 3,4 (row2) 5,6 (row3) */
  .em-corevals-card { border-right: none !important; border-top: none; }

  /* vertical separator between the two columns -> add border-right to first column items only */
  .em-corevals-card:nth-child(2n+1) { border-right: 1px solid #ddd !important; }

  /* horizontal separators between rows: items 3..6 get border-top */
  .em-corevals-card:nth-child(n+3) { border-top: 1px solid #ddd; }
}

@media (max-width: 425px) {

  /* about us section */
  .stats {
  margin-top: 10px;
  display: block;
  margin-left: unset;
}
.stats h3 {
  font-size: 28px;
  line-height: 36px;
}
.stats-card {
  padding: 15px 0;
}
.stats-card:last-of-type {
  padding: 15px 0px 0px 0px;
}
.stats-card:not(:last-child) {
  border-right: unset;
  border-bottom: 2px solid var(--light-border-color);
}

/* certificate section */
.certificate-text ul {
  font-size: 18px;
}

  /* specialists section */
.specialists-grid {
  grid-template-columns: repeat(1,1fr);
}

/* core values section */

  .em-corevals-grid { grid-template-columns: 1fr; }
  .em-corevals-card { border-right: none !important; border-top: 1px solid #ddd; padding: 18px; }
  .em-corevals-card:first-child { border-top: none; }
}

@media (max-width:500px) {
  .certificate-section-bottom-right-bg {
  width: 100%;
}
.specialists-section-top-right-bg {
  width: 100%;
}
}