/* ============================================
       GALLERY CATEGORIES GRID
       Desktop: 3 columns | Tablet: 2 columns | Mobile: 1 column
       ============================================ */
    .cgm-categories-grid { 
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
        margin: 30px 0;
    }
    
    .cgm-category-item { 
        background: #fff; 
        border: 2px solid #e8e8e8; 
        border-radius: 10px; 
        overflow: hidden; 
        text-align: center; 
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }
    
    .cgm-category-item:hover { 
        box-shadow: 0 8px 25px rgba(0,0,0,0.12); 
        transform: translateY(-6px);
        border-color: #007cba;
    }
    
    .cgm-category-item a { 
        text-decoration: none; 
        color: inherit; 
        display: block; 
    }
    
    .cgm-category-thumb { 
        height: 220px;
        overflow: hidden; 
        background: #f5f5f5;
        position: relative;
    }
    
    .cgm-category-thumb img { 
        width: 100%; 
        height: 100%; 
        object-fit: cover; 
        transition: transform 0.4s ease;
    }
    
    .cgm-category-item:hover .cgm-category-thumb img {
        transform: scale(1.08);
    }
    
    .cgm-category-title { 
        padding: 18px 15px; 
        margin: 0; 
        font-size: 18px; 
        font-weight: 600;
        background: #fafafa;
        color: #333;
        letter-spacing: 0.5px;
        border-top: 1px solid #f0f0f0;
    }

    /* ============================================
       CATEGORY GROUPS GRID
       Desktop: 4 columns | Tablet: 2 columns | Mobile: 1 column
       ============================================ */
    .cgm-groups-wrapper {
        max-width: 1200px;
        margin: 0 auto;
        padding: 20px 15px;
    }

    .cgm-groups-header {
        margin-bottom: 35px;
        padding-bottom: 20px;
        border-bottom: 3px solid #007cba;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .cgm-groups-header h1 {
        margin: 0;
        font-size: 32px;
        color: #222;
        font-weight: 700;
    }

    .cgm-groups-header .cgm-back-link {
        display: inline-block;
        padding: 8px 20px;
        background: #007cba;
        color: #fff;
        text-decoration: none;
        border-radius: 5px;
        font-weight: 500;
        transition: background 0.3s ease;
    }

    .cgm-groups-header .cgm-back-link:hover {
        background: #005a87;
        text-decoration: none;
    }

    .cgm-no-category {
        text-align: center;
        padding: 60px 20px;
        background: #f9f9f9;
        border-radius: 10px;
        color: #666;
    }

    .cgm-no-category a {
        color: #007cba;
        text-decoration: none;
        font-weight: 500;
    }

    .cgm-no-category a:hover {
        text-decoration: underline;
    }

    .cgm-group-section { 
        margin-bottom: 40px; 
        padding: 25px; 
        background: #fff; 
        border-radius: 10px; 
        box-shadow: 0 2px 12px rgba(0,0,0,0.06);
        border: 1px solid #eee;
    }
    
    .cgm-group-category-title { 
        color: #222; 
        font-size: 28px; 
        margin: 0 0 10px 0; 
        padding-bottom: 12px; 
        border-bottom: 3px solid #007cba;
        font-weight: 700;
    }
    
    .cgm-group-title { 
        color: #555; 
        font-size: 20px; 
        margin: 0 0 20px 0; 
        font-weight: 500;
        padding-left: 5px;
    }
    
    .cgm-group-grid { 
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
    
    .cgm-group-item { 
        overflow: hidden; 
        border-radius: 8px; 
        box-shadow: 0 2px 8px rgba(0,0,0,0.08); 
        transition: all 0.3s ease; 
        background: #fff;
        border: 1px solid #e8e8e8;
    }
    
    .cgm-group-item:hover { 
        transform: scale(1.04); 
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        border-color: #007cba;
        z-index: 1;
    }
    
    .cgm-group-item img { 
        width: 100%; 
        height: 220px; 
        object-fit: cover; 
        display: block; 
    }
    
    .cgm-group-item a { 
        display: block; 
    }

    /* ============================================
       RESPONSIVE BREAKPOINTS
       ============================================ */

    /* Tablet: 2 columns for categories, 2 columns for groups */
    @media screen and (max-width: 992px) {
        .cgm-categories-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }
        
        .cgm-group-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 15px;
        }
        
        .cgm-category-thumb {
            height: 200px;
        }
        
        .cgm-group-item img {
            height: 200px;
        }
        
        .cgm-groups-header h1 {
            font-size: 28px;
        }
    }

    /* Mobile: 1 column for both */
    @media screen and (max-width: 576px) {
        .cgm-categories-grid {
            grid-template-columns: 1fr;
            gap: 18px;
            margin: 20px 0;
        }
        
        .cgm-group-grid {
            grid-template-columns: 1fr;
            gap: 12px;
        }
        
        .cgm-category-thumb {
            height: 200px;
        }
        
        .cgm-group-item img {
            height: 220px;
        }
        
        .cgm-category-title {
            font-size: 16px;
            padding: 15px;
        }
        
        .cgm-groups-header {
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
        }
        
        .cgm-groups-header h1 {
            font-size: 24px;
        }
        
        .cgm-groups-header .cgm-back-link {
            padding: 6px 16px;
            font-size: 14px;
        }
        
        .cgm-group-section {
            padding: 15px;
        }
        
        .cgm-group-category-title {
            font-size: 22px;
        }
        
        .cgm-group-title {
            font-size: 17px;
        }
    }

    /* Small phones */
    @media screen and (max-width: 400px) {
        .cgm-categories-grid {
            gap: 14px;
        }
        
        .cgm-category-thumb {
            height: 170px;
        }
        
        .cgm-group-item img {
            height: 190px;
        }
        
        .cgm-category-title {
            font-size: 15px;
            padding: 12px;
        }
        
        .cgm-groups-header h1 {
            font-size: 20px;
        }
    }