.main-section {
  width: 100%;
  background-color: var(--dark-gray-bg);
}

.container {
  max-width: var(--container-width);
  width: 100%;
  margin: 0 auto;
}

.section-header {
  text-align: left;
  margin-bottom: 60px;
}


.section-header p {
  color: #666;
  max-width: 600px;
}

.black-color {
  color: var(--color-dark);
}

/* --- Background Color Utilities --- */
.dark-bg {
  background-color: var(--dark-charcoal-bg);
  color: #f4f4f4;
}

.dark-bg p {
  color: #ccc;
}

.mid-bg {
  background-color: var(--dark-gray-bg);
  color: #f4f4f4;
}

.mid-bg p {
  color: #ccc;
}

/* --- Hero Section --- */
.teams-hero {
  background-image: url("../../../../images/team-bg.webp");
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  padding: 150px 0;
  margin-top: 97px;
}

.teams-hero h1 {
  font-size: 3.5rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

.teams-hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

.teams-header h1 {
  width: 100%;
  margin: 0 auto;
  text-align: center;
  line-height: 123%;
  letter-spacing: 0%;
  max-width: 900px;
}

.teams-description {
  width: 100%;
  text-align: center;
  background-color: var(--dark-gray-bg);
  padding: var(--container-py) 0;
}
/* --- Culture Section --- */
.culture-section,
.values-section,
.unites-section,
.team-section {
  padding: var(--container-py) 0;
}

.culture-section {
  background-color: #fff;
}

.culture-items {
  position: relative;
}

.culture-item {
  display: flex;
  align-items: center;
  gap: 50px;
  margin-bottom: 80px;
  width: 100%;
}

.culture-item:nth-child(even) {
  flex-direction: row-reverse;
  margin-left: auto;
}

.culture-item:nth-child(even) .culture-text p {
  text-align: right;
}

.culture-item:nth-child(even) .culture-text h3 {
  text-align: right;
}

.culture-item:last-child {
  margin-bottom: 0;
}

.culture-image {
  flex-shrink: 0;
}

.culture-image img {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  object-fit: cover;
}

.culture-image:first-child img {
  object-position: right;
}

.culture-text h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: #212121;
}

.culture-text p {
  line-height: 1.7;
  color: #555;
}

.values-grid,
.unites-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.value-item,
.unite-item {
  text-align: left;
}

.icon-block {
  display: flex;
  gap: 20px;
  align-items: center;
}

.icon-block img {
  width: 40px;
  height: 40px;
}

.icon-block i {
  font-size: 2rem;
}

.value-item h3,
.unite-item h3 {
  font-size: 1.4rem;
}

.team-grid-cards {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  text-align: left;
}

.team-card {
  display: flex;
  flex-direction: column;
  padding: 30px;
  border-radius: 8px;
  box-sizing: border-box;
  font-weight: 600;
  font-size: 1.1rem;
  transition: transform 0.2s ease-in-out;
  height: 200px;
  gap: 10px;
}

.team-card:hover .card-content i {
  color: var(--color-dark);
}

.card-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-content i {
  font-size: 24px;
}

.team-card p {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
  font-weight: 400;
  height: 160px;
}

.team-card:hover p {
  max-height: 100px;
  color: var(--color-dark);
}

.team-card:hover {
  background-color: var(--color-light);
  color: var(--color-dark);
}

.team-card:hover h3 {
  background-color: var(--color-light);
  color: var(--color-dark);
}

.team-card .icon-placeholder {
  margin-right: 15px;
  flex-shrink: 0;
  margin-bottom: 0;
}

/* This class makes a card span two columns */
.card-span-col-2 {
  grid-column: span 2;
}

/* This class makes a card span three columns */
.card-span-col-3 {
  grid-column: span 3;
}

/* Card Color Styles */
.card-bright-blue {
  background-color: #00b2ff;
  color: var(--color-dark);
}

.card-bright-blue h3,
.card-light-blue h3 {
  color: var(--color-dark);
}

.card-bright-blue i,
.card-light-blue i {
  color: var(--color-dark);
}

.card-light-blue {
  background-color: #58c8f9;
  color: var(--color-dark);
}

.card-dark-gray {
  background-color: #444;
  color: #f4f4f4;
}
.card-dark-gray .icon-placeholder {
  background-color: #f4f4f4;
}

.card-white-text {
  background-color: #444;
  color: var(--color-light);
}

/* --- CTA Section --- */
.cta-section {
  text-align: center;
}
.cta-section h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}
.cta-section p {
  margin-bottom: 2rem;
}
.btn-primary {
  background-color: #00b2ff;
  color: #fff;
  padding: 15px 35px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  display: inline-block;
}

.btn-primary:hover {
  background-color: #008fcc;
}

.bi-code-square {
  font-size: 40px;
  margin-left: 6px;
}

/* --- Responsive Design --- */
@media (max-width: 1158px) {
  .teams-hero {
    margin-top: 0px;
  }
  .culture-section,
  .values-section,
  .unites-section,
  .team-section {
    padding: var(--container-py) var(--container-px);
  }
}

@media (max-width: 1024px) {
  .teams-description.container,
  .teams-hero .container {
    padding-right: var(--container-px);
    padding-left: var(--container-px);
  }
}

@media (max-width: 992px) {
  /* TABLET VIEW */
  .team-grid-cards {
    /* We keep the 6-column grid as a flexible base for layouts */
    grid-template-columns: repeat(6, 1fr);
  }

  .culture-image img {
    width: 200px;
    height: 200px;
  }

  /* Reset any desktop-specific spans */
  .team-card {
    display: flex;
    flex-direction: column;
    padding: 30px;
    border-radius: 8px;
    box-sizing: border-box;
    font-weight: 600;
    font-size: 1.1rem;
    transition: transform 0.2s ease-in-out;
    /* ADDED: This resets any desktop spans so the tablet rules can take over */
    grid-column: auto;
  }

  .team-card p {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
  }

  .team-card:hover p {
    max-height: 100px;
  }

  /* ADDED: This is the missing rule for ODD rows. */
  /* ODD ROWS (1st, 3rd, etc.): Two equal cards */
  .team-card:nth-child(4n + 1),
  .team-card:nth-child(4n + 2) {
    grid-column: span 3; /* Each card takes half of the 6-column grid */
  }

  /* EVEN ROWS (2nd, 4th, etc.): Two unequal cards */
  /* Targets the 3rd, 7th, 11th, etc. children */
  .team-card:nth-child(4n + 3) {
    grid-column: span 4; /* This card is wider (4/6 of the grid) */
  }
  /* Targets the 4th, 8th, 12th, etc. children */
  .team-card:nth-child(4n + 4) {
    grid-column: span 2; /* This card is narrower (2/6 of the grid) */
  }

  .card-content h3 {
    font-size: 22px;
  }
}

@media (max-width: 768px) {
  /* MOBILE VIEW */
  .teams-hero h1 {
    font-size: 2.5rem;
  }

  .values-grid,
  .unites-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .icon-placeholder {
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 20px;
  }
  .team-grid-cards {
    grid-template-columns: 1fr;
  }
  /* This removes the column span on mobile for a single-column layout */
  .team-card.card-span-col-2,
  .team-card.card-span-col-3 {
    grid-column: span 1;
  }
}

@media (max-width: 598px) {
  .teams-description {
    padding: 50px 0;
  }

  .culture-item,
  .culture-item:nth-child(even) {
    flex-direction: column;
    text-align: left;
    gap: 20px;
  }

  .culture-item:nth-child(even) .culture-text p {
    text-align: left;
  }

  .culture-item:nth-child(even) .culture-text h3 {
    text-align: left;
  }

  .icon-block {
    gap: 10px;
  }

  .icon-block i {
    font-size: 1.5rem;
  }

  .icon-block img {
    width: 30px;
    height: 30px;
  }

  .culture-section,
  .values-section,
  .unites-section,
  .team-section {
    padding-top: var(--container-pt);
    padding-bottom: var(--container-pb);
  }
	.section-header h2{
		margin-bottom: 30px;
	}
	.section-header{
		margin-bottom: 40px;
	}
}
