:root {
  --brand-red: #e51937;
  --text-gray: #888;
  --hr-gray: #e6e6e6;
}

.features-grid {
  display: grid;
  font-family: "Myriad Pro", "Segoe UI", Roboto, sans-serif;
  gap: 40px 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.feature-item img {
  width: 80px; /* Adjust based on your SVG design */
  height: auto;
  margin-bottom: 15px;
}

.feature-item h2 {
  color: var(--brand-red);
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 10px;
  text-transform: none;
}

.feature-item p {
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.4;
  margin: 0;
}

/* 1. DESKTOP: Row of 3, then Row of 2 (Centered) */
@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  /* Row 1: Items 1, 2, and 3 span 2 columns each (fills 6/6) */
  .feature-item:nth-child(-n+3) { 
    grid-column: span 2; 
  }

  /* Row 2: Item 4 starts at column 2 and spans 2 columns */
  .feature-item:nth-child(4) { 
    grid-column: 2 / span 2; 
  }

  /* Row 2: Item 5 spans 2 columns (automatically follows Item 4) */
  .feature-item:nth-child(5) { 
    grid-column: span 2; 
  }
}
/* 2. TABLET: Row of 2, then Row of 1, then Row of 2 */
@media (min-width: 600px) and (max-width: 1023px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* The 3rd item spans both columns to be "the 1 in the middle" */
  .feature-item:nth-child(3) {
    grid-column: span 2;
    padding: 0 20%; /* Optional: narrows text for the single centered item */
  }
}

/* 3. MOBILE: All stacked */
@media (max-width: 599px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.grid-footer-rule {
  /* This tells the item to span from the first grid line to the very last one */
  grid-column: 1 / -1; 
  
  border-top: 2px solid var(--hr-gray);
  margin-top: 20px; /* Space between the items and the line */
  width: 100%;
}

.grid-header-logo {
  /* Default for Mobile: takes the full width */
  grid-column: 1 / -1; 
  margin-bottom: 10px;
}

.grid-header-logo img {
  max-width: 100%; /* Ensures it doesn't overflow on small screens */
  height: auto;
  display: block;
  margin: 0 auto; /* Centers the image inside its container */
}

/* DESKTOP adjustment for the 4-column span */
@media (min-width: 1024px) {
  .grid-header-logo {
    /* Starts at column 2 and spans 4, leaving columns 1 and 6 empty */
    grid-column: 2 / span 4;
  }
}

/* TABLET adjustment to keep it centered on the 2-column grid */
@media (min-width: 600px) and (max-width: 1023px) {
  .grid-header-logo {
    grid-column: 1 / -1;
  }
}