/* City Grid Styling for ADU regulations page */

/* Container for the city grid */
.city-grid-container {
    width: 100%;
    max-width: 1400px; /* Reduced from 1900px for better balance */
    margin: 50px auto 70px;
}

/* City grid layout */
.city-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Changed back to center for more even distribution */
    gap: 40px 40px; /* Even spacing */
    padding: 0 10px; /* Reduced padding but still keeping some */
}

/* Individual city item container */
.city-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 220px; /* Increased from 200px */
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.city-item:hover {
    transform: translateY(-5px);
}

/* City logo circle container */
.city-logo-container {
    width: 130px; /* Increased from 120px */
    height: 130px; /* Increased from 120px */
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f8f8f8;
    border-radius: 50%;
    padding: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.city-logo-container:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background-color: #f2f2f2;
}

/* City logo image */
.city-logo {
    max-width: 100px; /* Increased from 90px */
    max-height: 100px; /* Increased from 90px */
    object-fit: contain;
}

/* City button styling */
.city-button {
    display: inline-block;
    width: 180px; /* Increased from 160px */
    padding: 10px 0;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
    font-weight: 500;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.city-button:hover {
    background-color: var(--secondary-color);
    box-shadow: 0 5px 12px rgba(0,0,0,0.2);
    color: white;
}

/* Responsive adjustments */
@media only screen and (max-width: 1600px) {
    .city-grid {
        gap: 35px 40px;
    }
    
    .city-item {
        width: 210px;
    }
}

@media only screen and (max-width: 1400px) {
    .city-grid {
        gap: 30px 35px;
    }
    
    .city-item {
        width: 200px;
    }
}

@media only screen and (max-width: 1200px) {
    .city-grid {
        gap: 25px 30px;
    }
    
    .city-item {
        width: 190px;
    }
}

@media only screen and (max-width: 992px) {
    .city-grid {
        gap: 20px;
    }
    
    .city-item {
        width: 160px;
    }
    
    .city-logo-container {
        width: 100px;
        height: 100px;
    }
    
    .city-logo {
        max-width: 75px;
        max-height: 75px;
    }

    .city-button {
        width: 140px;
        font-size: 0.95rem;
    }
}

@media only screen and (max-width: 768px) {
    .city-grid {
        gap: 15px;
    }
    
    .city-item {
        width: 160px;
        margin-bottom: 20px;
    }
    
    .city-logo-container {
        width: 90px;
        height: 90px;
        margin-bottom: 12px;
    }
    
    .city-logo {
        max-width: 70px;
        max-height: 70px;
    }
    
    .city-button {
        width: 140px;
        padding: 8px 0;
        font-size: 0.9rem;
    }
}

@media only screen and (max-width: 576px) {
    .city-grid {
        gap: 10px;
    }
    
    .city-item {
        width: 45%;
        margin-bottom: 20px;
    }
    
    .city-logo-container {
        width: 80px;
        height: 80px;
        padding: 10px;
    }
    
    .city-logo {
        max-width: 60px;
        max-height: 60px;
    }
    
    .city-button {
        width: 120px;
        font-size: 0.85rem;
        padding: 7px 0;
    }
}

@media only screen and (max-width: 400px) {
    .city-grid {
        gap: 8px;
    }
    
    .city-item {
        width: 47%;
        margin-bottom: 15px;
    }
    
    .city-logo-container {
        width: 65px;
        height: 65px;
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .city-logo {
        max-width: 50px;
        max-height: 50px;
    }
    
    .city-button {
        width: 100px;
        font-size: 0.8rem;
        padding: 6px 0;
    }
}
