/* Generella stilar för body och grundläggande layout */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    color: #333;
}

/* Container för hela galleriet */
.gallery-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Rubriker */
h1 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 30px;
    font-size: 2.5em;
}

h2.section-title {
    text-align: center;
    color: #007bff;
    margin-top: 40px;
    margin-bottom: 25px;
    font-size: 2em;
}

/* Lista för kategorier och album */
.list-items {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); /* Responsivt grid */
    gap: 20px;
    justify-content: center;
}

.list-items li {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.list-items li:hover {
    transform: translateY(-5px);
     transform: scale(1.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.list-items li a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    
}
.list-items li img {
    margin-bottom: 5px; /* Justera avståndet mellan bild och text/räknare */
    
}


/* Stil för standardikon om ingen miniatyrbild hittas */
.list-items li img.default-thumb {
    object-fit: contain; /* Visa hela ikonen utan beskärning */
    background-color: #e0e0e0; /* Lätt grå bakgrund för ikonen */
    padding: 10px; /* Lite extra padding runt ikonen */
}


.list-items li span {
    font-weight: bold;
    color: #555;
    margin-bottom: 5px; /* Avstånd mellan namn och bildräknare */
}

/* Bildräknare */
.image-count {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
    display: block;
}

/* Tillbaka-länk */
a.back-link {
    display: inline-block;
    margin: 20px 0;
    padding: 10px 15px;
    background-color: #6c757d;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}

a.back-link:hover {
    background-color: #5a6268;
}

/* Bildruta för enskilda bilder (Lightbox-sidan) */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px 0;
    
}

.image-grid a {
    display: block;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    border: 2px solid #fff;
}

.image-grid a:hover {
    transform: scale(1.1);
}

.image-grid img {
    width: 100%;
    height: 200px; /* Fast höjd för bilderna i rutnätet */
    object-fit: cover; /* Beskär för att fylla utrymmet */
    display: block;
    border-radius: 6px;
}
button .btn-logout {
        padding: 5px 8px;
    }

/* Responsive anpassningar */
@media (max-width: 768px) {
    h1 {
        font-size: 2em;
    }

    h2.section-title {
        font-size: 1.6em;
    }

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

    .list-items li img {
        width: 120px;
        height: 120px;
    }

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

    .image-grid img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .gallery-container {
        padding: 15px;
        margin: 10px auto;
    }

    h1 {
        font-size: 1.8em;
    }

    h2.section-title {
        font-size: 1.4em;
    }

    .list-items {
        grid-template-columns: 1fr 1fr; /* Två kolumner på små skärmar */
        gap: 15px;
    }
    
}