.clubs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 0;
}

.clubs-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 1rem;
}

#club-search, #club-sort {
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

#club-search {
    flex: 1 0 auto;
}

#club-search:focus, #club-sort:focus {
    outline: none;
    border-color: #4a90e2;
}

.clubs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

/* Method 1: Padding-based aspect ratio (most compatible) */
.club-block-wrapper {
    position: relative;
    padding-top: 100%; /* Creates 1:1 aspect ratio */
}

.club-block {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Method 2: Modern aspect-ratio with fallback */
@supports (aspect-ratio: 1) {
    .club-block-wrapper {
        position: static;
        padding-top: 0;
        aspect-ratio: 1 / 1;
    }
    
    .club-block {
        position: relative;
        width: 100%;
        height: 100%;
    }
}

.club-block:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.club-title {
    color: white;
    text-align: center;
    padding: 10px;
    font-size: 18px;
    font-weight: bold;
}

.club-details {
    display: none;
}

.no-results-message {
    text-align: center;
    font-size: 18px;
    color: #666;
    padding: 20px;
    background-color: #f8f8f8;
    border-radius: 8px;
    margin-top: 20px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: #fff;
    margin: 5vh auto;
    padding: 20px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#modal-body h2 {
    margin-top: 0;
    color: var(--wp--preset--color--primary);
}

.club-description {
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .clubs-controls {
        flex-direction: column;
    }
    
    #club-sort {
        width: 100%;
    }

    .clubs-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    /* Ensure aspect ratio works on mobile */
    .club-block-wrapper {
        position: relative;
        padding-top: 100%;
    }

    .club-block {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .modal-content {
        width: 95%;
        margin: 3vh auto;
    }
}