.m-stats-2__section {
 display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.m-stats-2__wrapper {
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  max-height: var(--a-paper-height);
  max-width: var(--content-width);
  width: 100%;
  overflow: clip;/* Clip overflow more compatibly */
}
.m-stats-2__wrapper.t-1-default { 
 max-height: 100%;
}

.m-stats-2 {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem; /* Better spacing between items */
  justify-content: center; /* Center-align items horizontally */
  align-items: center; /* Center-align items vertically */
  width: 100%; /* Ensure the container spans full width */
  margin: 20px auto;
}

.m-stats-2 div {
  background-color: #f9f9f9;
  border: 2px solid #80808047;
  border-radius: 10px;
  padding: 0.5rem;
  text-align: center;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
  width: 220px; /* Consistent width */
  height: 140px; /* Consistent height */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
 /*  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);  Subtle shadow for depth */
}

.m-stats-2 div:hover {
  transform: scale(1.05); 
}

.m-stats-2__header {
  margin-bottom: 0.5rem;
}



.m-stats-2__statistic {
  margin: 0;
  transition: color 0.3s ease;
  font-size: 26px;
  color: var(--gray); /* Use primary color for statistics */
}


/* Gold Styling for Top-Tier Scores */
.m-stats-2 div.gold-tier {
  background-color: #F9E79F; /* Warm gold background */
  border-color: #D4AC0D;    /* Rich goldenrod border */
  color: #7D6608;           /* Deep gold text for readability */
}

/* Button Styling */
.m-stats-2__buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
  width: 100%;
  /*position: sticky;  Keep it fixed relative to the parent */
  /* top: 0; /* Stick to the top of the parent container */
  padding: 0.5rem 0; /* Optional: Add padding for better spacing */
}


.m-stats-2__toggle-button {
  padding: 1rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #ccc;
  font-size: var(--font-xl);
  color: var(--black);
  transition: background-color 0.3s ease;
}

.m-stats-2__toggle-button.active {
  background-color: var(--white, #fff);
  color: var(--white, #fff);
  background-color: var(--black);

  border-radius: 5px;
}

.m-stats-2__toggle-button:hover {
 opacity: 0.9;
 border-radius: 5px;
}

/* Hidden Section */
.hidden {
  display: none;
}

/* Smooth Fiery Gold Border */
.t-1-gold-border {
  font-size: 1.5rem;
  color: #fff;
  background: #222; /* Dark background to make the fiery glow stand out */
  border-radius: 10px; /* Rounded corners */
  animation: fiery-border-glow 4s infinite linear;
}

@keyframes fiery-border-glow {
  0% {
    border-image-source: linear-gradient(135deg, #ff4500, #ffd700, #ffae42);
    box-shadow: 0 0 10px #ff4500, 0 0 20px #ffd700, 0 0 30px #ffae42;
  }
  20% {
    border-image-source: linear-gradient(135deg, #ffd700, #ffae42, #ff4500);
    box-shadow: 0 0 12px #ffd700, 0 0 24px #ff4500, 0 0 36px #ffae42;
  }
  40% {
    border-image-source: linear-gradient(135deg, #ffae42, #ff4500, #ffd700);
    box-shadow: 0 0 15px #ffae42, 0 0 28px #ff4500, 0 0 40px #ffd700;
  }
  60% {
    border-image-source: linear-gradient(135deg, #ff4500, #ffd700, #ffae42);
    box-shadow: 0 0 12px #ff4500, 0 0 24px #ffd700, 0 0 36px #ffae42;
  }
  80% {
    border-image-source: linear-gradient(135deg, #ffd700, #ffae42, #ff4500);
    box-shadow: 0 0 10px #ffd700, 0 0 20px #ff4500, 0 0 30px #ffae42;
  }
  100% {
    border-image-source: linear-gradient(135deg, #ff4500, #ffd700, #ffae42);
    box-shadow: 0 0 10px #ff4500, 0 0 20px #ffd700, 0 0 30px #ffae42;
  }
}

@media screen and (min-width: 768px) {
  .m-stats-2__wrapper:hover { 
    border: var(--border-1);
  }
}
@media (max-width: 1670px) {
  .m-stats-2__section {
  grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 1052px) {
.m-stats-2__section {
  grid-template-columns: 1fr;
}
}

/* Responsive Styling */
@media (max-width: 767px) {
  .m-stats-2__wrapper {
    max-height: 100%;
  }
  .m-stats-2 {
      align-items: center; /* Center-align items */
  }

  .m-stats-2 div {
      width: 100%; /* Make each item span full width */
      max-width: calc(119px + 8vw); /* Limit width for readability */
      padding: calc(0.2rem + 1.8vw); /* Adjust padding for better spacing */
  }
  h4.m-stats-2__header {
    margin: 5px 0;
    font-size: calc(1rem + 0.4vw); /* Responsive font size */
    color: var(--black);
  }
  .m-stats-2__statistic {
    font-size: calc(1.1rem + 0.5vw); /* Responsive font size */
  }
}
@media  (max-width: 567px) {
  .m-stats-2 div {
    max-width: calc(17px + 40vw);
  }
  h4.m-stats-2__header {
    font-size: calc(0.7rem + 3vw);
  }
  .m-stats-2__statistic {
    font-size: calc(0.75rem + 3.2vw);
  }
}

@media (max-width: 412px) {
  .m-stats-2__buttons {
    gap: 0.1rem; /* Adjust spacing for smaller screens */
  }
  
}