/**
 * Global Presence 3x3 Grid Layout for Mobile
 */

/* Override any existing styles to ensure grid layout */
.operational-regions {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: var(--spacing-md);
    perspective: 800px;
    flex: 1; /* Take up remaining space */
    margin-top: auto; /* Push to the bottom */
    width: 100%;
}

/* Base styles for region buttons */
.region-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(212, 169, 104, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Optimize for mobile screens */
@media (max-width: 768px) {
    /* Ensure the grid maintains 3 columns */
    .operational-regions {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 10px;
        margin-top: 15px;
    }

    /* Make buttons more compact */
    .region-button {
        min-height: 90px;
        padding: 8px;
        margin: 0;
    }

    /* Reduce icon size */
    .region-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 6px;
    }

    /* Adjust text sizes */
    .region-name {
        font-size: 0.8rem;
        margin-bottom: 3px;
        line-height: 1.2;
    }

    .region-stat {
        font-size: 0.7rem;
        padding: 2px 5px;
        line-height: 1.1;
    }

    /* Adjust network intro for mobile */
    .network-intro {
        margin-bottom: 15px;
    }

    .network-text p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* Further optimize for smaller screens */
@media (max-width: 480px) {
    .operational-regions {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px;
    }

    .region-button {
        min-height: 75px;
        padding: 5px;
        border-radius: 6px;
    }

    .region-icon {
        width: 28px;
        height: 28px;
        margin-bottom: 4px;
    }

    .region-icon i {
        font-size: 0.75rem;
    }

    .region-name {
        font-size: 0.7rem;
        margin-bottom: 2px;
    }

    .region-stat {
        font-size: 0.6rem;
        padding: 1px 3px;
    }

    /* Simplify hover effects for better performance */
    .region-button:hover {
        transform: translateY(-2px);
    }

    .region-button:hover .region-icon {
        transform: scale(1.05);
    }
}
