/* The container */
.category-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 10px;
}

/* The clickable header */
.category-header {
    font-weight: 600;
    cursor: pointer;
    padding: 5px;
    color: #212529;
    list-style: none;
}

/* Custom indicator: adds a "+" or arrow before the text */
.category-header::before {
    content: '▶';
    display: inline-block;
    margin-right: 10px;
    transition: transform 0.2s;
    font-size: 0.8rem;
}

/* Rotate the arrow when open */
.category-container[open] .category-header::before {
    transform: rotate(90deg);
}

/* The grid inside */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.image-card img {
    width: 100%;
    /* Remove 'height: 200px' to stop cropping */
    height: auto; 
    
    /* This ensures that if the image is huge, it still fits the card width */
    max-height: 400px; 
    
    /* 'contain' shows the whole image; 'cover' crops it to fill the box */
    object-fit: contain; 
    
    background: #ebebeb; /* Adds a light grey background for odd-shaped images */
    display: block;
}

#link-list {
    margin: 20px auto;
}

.json-item-wrapper {
    background: #ffffff;
    border: 1px solid #ced4da;
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 10px;
}

.json-header {
    font-weight: 600;
    cursor: pointer;
    padding: 5px;
    color: #212529;
}

.json-code-block {
    background: #2b2b2b; /* Dark theme */
    color: #a9b7c6;      /* Code text color */
    padding: 15px;
    border-radius: 4px;
    overflow-x: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 15px 0;
}

.view-link {
    font-size: 0.8rem;
    color: #007bff;
    text-decoration: none;
}