/* Wrapper for the entire gallery */
.swg-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Gallery - grid view */
.swg-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

/* One item in the gallery */
.swg-item {
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.swg-item:hover {
    transform: scale(1.02);
}

.swg-item img {
    width: 100%;
    height: 200px; /* fixed height for uniform appearance */
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    display: block;
}

/* Title above the image in lightbox (optional if added) */
.swg-item-title {
    display: block;
    margin-top: 8px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

/* When the lightbox is open, hide the title */
.swg-lightbox-active {
    display: none !important;
}

/* Gallery list (gallery preview) */
.swg-gallery-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Search field */
#swg-search {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 20px auto;
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

/* Grid view of gallery list */
.swg-gallery-list ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 0;
    list-style: none;
}

/* Each gallery (thumbnail + title) */
.swg-gallery-list ul li {
    display: block;
    text-align: center;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.swg-gallery-list ul li:hover {
    transform: scale(1.03);
}

.swg-gallery-list ul li img {
    width: 100%;
    height: 150px; /* or 200px for larger size */
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
    display: block;
}

/* Gallery title in the list */
.swg-gallery-title {
    margin-top: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    text-align: center;
}

/* "Show more" button */
.swg-load-more {
    display: block;
    margin: 30px auto 10px auto;
    padding: 12px 25px;
    font-size: 16px;
    background-color: #0073e6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.swg-load-more:hover {
    background-color: #005bb5;
}

/* Hiding elements (e.g., for "Show more") */
.swg-hidden {
    display: none !important;
}

/* Responsive breakpoints */
@media screen and (max-width: 768px) {
    .swg-gallery-list ul {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .swg-gallery-list ul {
        grid-template-columns: 1fr;
    }
}

/* Adjust gallery title (previous version) */
.swg-gallery-title {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
    margin-top: 8px;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    transition: color 0.3s ease;
}

.swg-gallery-preview:hover .swg-gallery-title {
    color: #0073e6;
}

.swg-gallery-page-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 30px 0 10px;
    color: #222;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
