body {
    font-size: 32px; /* Controls the base scaling */
    margin: 0;
    padding: 0;
    font-family: Helvetica, Arial, sans-serif;
    background-color: black;
    color: white;
}

.statistic-container {
    margin: 0;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13em, 1fr)); /* Dynamically adjusts the number of columns */
    gap: 20px; /* Space between cards */
    text-align: left;
}

.vital-statistic {
    width: auto; /* Allow card width to adjust based on grid */
    background-color: black;
    border: 2px solid #333;
    padding: 1em; /* Adjust padding based on font size */
    border-radius: 10px;
    display: flex;
    flex-direction: column; /* Stack content vertically */
    color: white;
    font-family: Helvetica;
    vertical-align: bottom;
}

.vital-statistic h1 {
    font-size: 1.2em; /* Dynamically scales with body font size */
    font-weight: 700;
    text-align: left;
    margin: 0 0 10px 0; /* Space below the title */
    color: inherit; /* Keep custom color */
}

.text-wrapper {
    display: flex;
    flex-direction: row; /* Align arrow and text in a row */
    align-items: center; /* Vertically center elements */
    height: auto; /* Allow flexibility in height */
}

.rate_arrow {
    height: 1.5em; /* Scale the arrow based on font size */
    width: auto;
    margin-right: 10px; /* Spacing between arrow and text */
}

.rotate_arrow {
    transform: rotate(180deg); /* Rotate for downward arrows */
}

.number_units {
    display: flex;
    flex-direction: column; /* Stack number and units */
    justify-content: flex-start;
    height: auto;
    width: fit-content;
}

.number {
    font-size: 1.5em; /* Dynamically scales with font size */
    font-weight: 400;
    color: white;
    display: block;
}

.units {
    font-size: 1em; /* Dynamically scales with font size */
    font-weight: 600;
    text-align: left;
    color: white;
}

/* Custom Colors for Titles Only */
.global_meansealevel h1 {
    color: #30f06d;
}

.ocean_mass h1 {
    color: #59C9A5;
}

.steric_height h1 {
    color: #D81E5B;
}

.greenland_ice h1 {
    color: #648cc8;
}

.antarctica_ice h1 {
    color: #FFFD98;
}

/* Media Queries for Responsive Adjustments */
@media (max-width: 1200px) {
    .statistic-container {
        grid-template-columns: repeat(3, 1fr); /* 3 cards per row on medium screens */
    }
}

@media (max-width: 768px) {
    .statistic-container {
        grid-template-columns: repeat(2, 1fr); /* 2 cards per row on smaller screens */
    }
}

@media (max-width: 480px) {
    .statistic-container {
        grid-template-columns: 1fr; /* 1 card per row on very small screens */
    }
}
