#colonySection {
    background-image: url('../assets/images/background1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    align-items: flex-start;
    padding-left: 20px;
    box-sizing: border-box;
}

.section-header {
    width: 100%;
    margin-bottom: 10px;
    margin-top: 20px;
    font-size: 1.2em;
    color: #FFF;
}

.mining-category-container {
    background-color: #000;
    border: 1px solid #444;
    padding: 15px;
    width: fit-content; /* FIXED: Changed from 100% to fit-content */
    box-sizing: border-box;
}

/* Base style for all image-based buttons in this section */
.image-button {
    /* --- Sizing and Layout --- */
    width: 180px;
    height: 55px;
    position: relative;
	overflow: hidden;	
    display: flex;
    align-items: center;    /* This vertically centers everything */
    justify-content: center;  /* This horizontally centers the group */
    gap: 10px;                /* FIXED: Adds space between the count and the name */
    padding: 0 10px;

    /* --- Background Image --- */
    background-image: url('../assets/images/PNG/Button03.png');
    background-size: 100% 100%;
    background-color: transparent;

    /* --- Text and Font --- */
    color: #EAEAEA;
    font-size: 14px;
    font-weight: bold;
    text-shadow: 1px 1px 2px #000;

    /* --- General --- */
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.image-button:hover {
    background-image: url('../assets/images/PNG/Button04.png');
    color: #FFF;
    transform: scale(1.05);
}

/* Special element for the building count */
.building-count {
    /* FIXED: Removed all absolute positioning */
    font-size: 14px; /* Make font size consistent with the name */
    background-color: transparent; /* Remove the dark background */
    padding: 0;
    border-radius: 0;
    color: #90EE90;
}

/* This defines the "bounce" animation */
@keyframes button-click-bounce {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
  }
}

/* We'll add this class with JavaScript to trigger the animation */
.is-clicking {
  animation: button-click-bounce 0.2s ease;
}

.image-button.unaffordable {
    filter: grayscale(60%); /* Make the button less vibrant */
    opacity: 0.7;
    cursor: not-allowed;
}

/* Make the text color red, but only for the name, not the count */
.image-button.unaffordable .building-name {
    color: #E74C3C; /* A nice red color */
    text-shadow: none;
}