/* css/gallery.css */

/* --- Styly pro přehled alb a detail (beze změny) --- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; padding: 40px 0; }
.album-card { display: block; text-decoration: none; background-color: var(--card-bg); border: 1px solid var(--border-color); border-radius: 10px; overflow: hidden; transition: all 0.3s ease; }
.album-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.3); border-color: var(--light-blue); }
.album-cover { height: 220px; background-size: cover; background-position: center; display: flex; align-items: flex-end; padding: 15px; position: relative; }
.album-cover::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); }
.album-info { position: relative; z-index: 2; color: var(--white); }
.album-info h3 { margin: 0; color: var(--white); }
.album-info p { margin: 5px 0 0; font-size: 0.9em; color: #ccc; }
.album-description { padding: 20px; color: var(--text-color); }
.album-detail-header { text-align: center; padding: 40px 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 15px; }
.photo-item { display: block; cursor: pointer; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; border: 1px solid var(--border-color); transition: transform 0.3s ease; }
.photo-item img:hover { transform: scale(1.05); }

/* --- Styly pro Pinterest Modal (Detail fotky) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.6); backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); z-index: 2000;
    display: none; justify-content: center; align-items: center;
    padding: 20px; box-sizing: border-box;
}
.pinterest-modal {
    display: flex; width: 80%; height: 80vh; max-width: 1200px;
    border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
}
.modal-image-panel {
    flex: 3; display: flex; justify-content: center; align-items: center;
    position: relative; padding: 10px; box-sizing: border-box;
}
.modal-image-panel img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.modal-info-panel {
    flex: 1; background-color: var(--background-color); padding: 70px;
    width: 75%; color: var(--text-color); margin-left: 100px;
    overflow-y: auto; border-left: 1px solid var(--border-color);
}
.modal-info-panel h3 { margin-top: 0; color: var(--primary-blue); }
.modal-info-panel p { color: #ccc; line-height: 1.6; }

/* --- Ovládací tlačítka --- */
.modal-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(20, 20, 20, 0.6); color: white; border: none; font-size: 2rem;
    padding: 15px; cursor: pointer; z-index: 2001; transition: background-color 0.3s ease;
}
.modal-nav:hover { background: rgba(0, 0, 0, 0.8); }
.modal-prev { left: 15px; }
.modal-next { right: 15px; }
.modal-close {
    position: absolute; top: 15px; right: 15px; background: rgba(20, 20, 20, 0.6);
    color: white; border: none; font-size: 1.5rem; width: 40px; height: 40px;
    border-radius: 50%; cursor: pointer; z-index: 2002;
    line-height: 40px; text-align: center;
}

/* ========== TABLETY ========== */
@media (max-width: 992px) {
    .pinterest-modal { flex-direction: column; width: 95%; height: 95vh; }
    .modal-image-panel { flex: 3; } /* Větší prostor pro obrázek */
    .modal-info-panel {
        flex: 1; /* Menší prostor pro info */
        max-height: 30vh;
        width: 100%; /* Reset šířky */
        margin-left: 0; /* Reset odsazení */
        border-left: none; /* Odebrání oddělovače */
        border-top: 1px solid var(--border-color); /* Přidání horního oddělovače */
    }
}

/* ========== MOBILNÍ ZOBRAZENÍ (PRO TELEFONY) ========== */
@media (max-width: 768px) {
    .gallery-grid { gap: 15px; }
    .photo-grid { gap: 10px; }

    /* Modal na mobilu */
    .pinterest-modal { width: 100%; height: 98vh; } /* Téměř celá obrazovka */
    .modal-overlay { padding: 10px; }
    .modal-info-panel {
        padding: 20px; /* VÝRAZNĚ menší odsazení */
        max-height: 25vh; /* Ještě menší výška info panelu */
    }
    .modal-info-panel h3 { font-size: 1.2em; }
    .modal-info-panel p { font-size: 0.9em; }

    /* Zmenšení tlačítek pro mobil */
    .modal-nav {
        font-size: 1.5rem;
        padding: 10px;
    }
    .modal-prev { left: 5px; }
    .modal-next { right: 5px; }
    .modal-close {
        top: 10px; right: 10px;
        width: 35px; height: 35px;
        line-height: 35px;
        font-size: 1.2rem;
    }
}