.hidden {
    display: none !important;
}

.button-container {
    margin: 20px 0;
}

/* Service buttons container - responsive grid layout */
#service-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

/* Chapter buttons container - same responsive layout */
#chapter-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 20px 0;
}

/* Button base styles */
button {
    background-color: #232B77;
    color: white;
    border: 2px solid #232B77;
    padding: 12px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-wrap: balance;
    line-height: 1.3;
}

button:hover {
    background-color: #b31e23;
    border-color: #b31e23;
}

.selected {
    background-color: #b31e23;
    color: white;
    border-color: #b31e23;
}

button.selected {
    background-color: #b31e23;
    color: white;
    border-color: #b31e23;
}

/* Button states */
.gray-button {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    border-color: #ccc;
}

.gray-button:disabled {
    pointer-events: none;
}

.active-button {
    background-color: #232B77;
    color: white;
}

/* Next button styling */
#next-button {
    background-color: #28a745;
    border-color: #28a745;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: bold;
    margin-top: 20px;
    max-width: 200px;
}

#next-button:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Mobile responsive - single column layout */
@media (max-width: 768px) {
    #service-buttons,
    #chapter-buttons {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    button {
        padding: 15px 20px;
        font-size: 16px;
        min-height: 52px;
    }
    
    #next-button {
        width: 100%;
        max-width: none;
        padding: 18px 20px;
    }
}

/* Tablet responsive - 2 columns */
@media (min-width: 769px) and (max-width: 1024px) {
    #service-buttons,
    #chapter-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}