/**
 * Fronted CSS pro Stanektech Galerii
 */

/* Základní kontejner galerie */
.stanektech-gallery-wrapper {
    max-width: 100%;
    margin: 30px 0;
}

/* Výpis kategorií */
.stanektech-gallery-categories {
    display: grid;
    gap: 30px;
    margin-bottom: 40px;
}

/* Počet sloupců kategorií */
.stanektech-gallery-categories.stanektech-gallery-col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.stanektech-gallery-categories.stanektech-gallery-col-3 {
    grid-template-columns: repeat(3, 1fr);
}

.stanektech-gallery-categories.stanektech-gallery-col-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stanektech-gallery-categories.stanektech-gallery-col-5 {
    grid-template-columns: repeat(5, 1fr);
}

.stanektech-gallery-categories.stanektech-gallery-col-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Jednotlivá kategorie */
.stanektech-gallery-category {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stanektech-gallery-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stanektech-gallery-category-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.stanektech-gallery-category-image {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 66.67%; /* Poměr 3:2 */
    overflow: hidden;
}

.stanektech-gallery-category-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.stanektech-gallery-category:hover .stanektech-gallery-category-image img {
    transform: scale(1.05);
}

.stanektech-gallery-category-title {
    padding: 15px 20px 5px;
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.stanektech-gallery-category-count {
    padding: 0 20px 15px;
    color: #777;
    font-size: 14px;
}

/* Tlačítko zpět */
.stanektech-gallery-back {
    margin-bottom: 20px;
}

.stanektech-gallery-back-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background-color: #f5f5f5;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.stanektech-gallery-back-link:hover {
    background-color: #e9e9e9;
    color: #000;
}

.stanektech-gallery-back-icon {
    margin-right: 6px;
    font-weight: bold;
}

/* Název galerie */
.stanektech-gallery-title {
    margin-bottom: 20px;
}

.stanektech-gallery-title h2 {
    margin: 0;
    padding: 0;
    font-size: 24px;
    color: #222;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

/* Základní styl galerie */
.stanektech-gallery {
    display: grid;
    gap: 15px;
}

/* Počet sloupců */
.stanektech-gallery.stanektech-gallery-col-2 {
    grid-template-columns: repeat(2, 1fr);
}

.stanektech-gallery.stanektech-gallery-col-3 {
    grid-template-columns: repeat(3, 1fr);
}

.stanektech-gallery.stanektech-gallery-col-4 {
    grid-template-columns: repeat(4, 1fr);
}

.stanektech-gallery.stanektech-gallery-col-5 {
    grid-template-columns: repeat(5, 1fr);
}

.stanektech-gallery.stanektech-gallery-col-6 {
    grid-template-columns: repeat(6, 1fr);
}

/* Jednotlivý obrázek v galerii */
.stanektech-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.stanektech-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.stanektech-gallery-link {
    display: block;
    position: relative;
    height: 0;
    padding-bottom: 75%; /* Poměr 4:3 */
    overflow: hidden;
}

.stanektech-gallery-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.stanektech-gallery-item:hover .stanektech-gallery-image {
    transform: scale(1.05);
}

/* Titulek obrázku */
.stanektech-gallery-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0));
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.stanektech-gallery-item:hover .stanektech-gallery-item-caption {
    opacity: 1;
    transform: translateY(0);
}

.stanektech-gallery-item-caption h4 {
    margin: 0 0 5px;
    padding: 0;
    font-size: 16px;
    font-weight: 500;
}

.stanektech-gallery-item-caption p {
    margin: 0;
    padding: 0;
    font-size: 13px;
    opacity: 0.9;
}

/* Styl galerie: Grid */
.stanektech-gallery-style-grid .stanektech-gallery-item {
    padding: 10px;
    background: #fff;
    border: 1px solid #eee;
}

.stanektech-gallery-style-grid .stanektech-gallery-link {
    margin-bottom: 10px;
}

.stanektech-gallery-style-grid .stanektech-gallery-item-caption {
    position: static;
    background: transparent;
    color: #333;
    opacity: 1;
    transform: none;
    padding: 5px 0 0;
}

.stanektech-gallery-style-grid .stanektech-gallery-item-caption h4 {
    color: #222;
    font-size: 15px;
}

.stanektech-gallery-style-grid .stanektech-gallery-item-caption p {
    color: #666;
    font-size: 13px;
}

/* Styl galerie: Masonry */
.stanektech-gallery-style-masonry {
    column-count: 3;
    column-gap: 15px;
    display: block;
}

.stanektech-gallery-style-masonry.stanektech-gallery-col-2 {
    column-count: 2;
}

.stanektech-gallery-style-masonry.stanektech-gallery-col-3 {
    column-count: 3;
}

.stanektech-gallery-style-masonry.stanektech-gallery-col-4 {
    column-count: 4;
}

.stanektech-gallery-style-masonry.stanektech-gallery-col-5 {
    column-count: 5;
}

.stanektech-gallery-style-masonry.stanektech-gallery-col-6 {
    column-count: 6;
}

.stanektech-gallery-style-masonry .stanektech-gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 15px;
}

/* Loading indikátor */
.stanektech-gallery-loading {
    text-align: center;
    padding: 30px;
    color: #666;
    font-style: italic;
}

/* Zprávy o prázdné galerii */
.stanektech-gallery-empty,
.stanektech-gallery-error {
    padding: 20px;
    background-color: #f8f9fa;
    border-left: 4px solid #2271b1;
    color: #555;
    font-style: italic;
    margin-bottom: 20px;
}

.stanektech-gallery-error {
    border-left-color: #dc3232;
}

/* Responzivita */
@media screen and (max-width: 992px) {
    .stanektech-gallery-categories.stanektech-gallery-col-5,
    .stanektech-gallery-categories.stanektech-gallery-col-6 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stanektech-gallery.stanektech-gallery-col-5,
    .stanektech-gallery.stanektech-gallery-col-6 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stanektech-gallery-style-masonry.stanektech-gallery-col-5,
    .stanektech-gallery-style-masonry.stanektech-gallery-col-6 {
        column-count: 4;
    }
}

@media screen and (max-width: 768px) {
    .stanektech-gallery-categories.stanektech-gallery-col-4,
    .stanektech-gallery-categories.stanektech-gallery-col-5,
    .stanektech-gallery-categories.stanektech-gallery-col-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stanektech-gallery.stanektech-gallery-col-4,
    .stanektech-gallery.stanektech-gallery-col-5,
    .stanektech-gallery.stanektech-gallery-col-6 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stanektech-gallery-style-masonry.stanektech-gallery-col-4,
    .stanektech-gallery-style-masonry.stanektech-gallery-col-5,
    .stanektech-gallery-style-masonry.stanektech-gallery-col-6 {
        column-count: 3;
    }
}

@media screen and (max-width: 576px) {
    .stanektech-gallery-categories {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .stanektech-gallery {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .stanektech-gallery-style-masonry {
        column-count: 2 !important;
    }
}

@media screen and (max-width: 400px) {
    .stanektech-gallery-categories {
        grid-template-columns: 1fr !important;
    }
    
    .stanektech-gallery {
        grid-template-columns: 1fr !important;
    }
    
    .stanektech-gallery-style-masonry {
        column-count: 1 !important;
    }
}

/* Lightbox přizpůsobení */
.lb-data .lb-details {
    width: 90%;
    text-align: left;
}

.lb-data .lb-caption {
    font-size: 16px;
    font-weight: 500;
}

.lb-data .lb-number {
    font-size: 13px;
    color: #ddd;
}

.lb-closeContainer {
    position: absolute;
    top: 0;
    right: 0;
    padding: 10px;
}