﻿/* Gallery container */
.masonry-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: flex-start;
}

.project-gallery-content {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin: 10px 0px;
}

.project-gallery-controls {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin: 10px 0px;
}
/* Tile styles */
.project-tile {
    width: calc(33.333% - 20px);
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
    margin-bottom: 20px;
}

.project-tile:hover {
        transform: scale(1.02);
}

    .project-tile img {
        width: 100%;
        height: 201px;
        display: block;
        object-fit: cover;
        object-position: center;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

.project-tile .edit-link {
        display: block;
        text-align: center;
        width: 100%;
        margin-top: 10px;
}

/* Hover overlay */
.overlay {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0,0,0,0.7);
    color: white;
    font-size: 13px;
    padding: 12px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
    transform: translateY(20px);
    max-height:201px;
}

.project-tile:hover .overlay {
    opacity: 1;
    transform: translateY(0);
}
/* Title in overlay */
.overlay h3 {
        margin: 0 0 5px;
        font-size: 18px;
        font-weight: bold;
        color:#fff;
}

.overlay h5 {
    margin: 0 0 5px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

/* Text styling */
.overlay p, .overlay small {
    margin: 0;
    line-height: 1.4;
    color:#fff;
}

/* Filter/Search bar */

.filter-group {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-group span {
        font-weight: bold;
        margin-right: 8px;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-button {
    margin-right: 10px;
    padding: 6px 12px;
    cursor: pointer;
    border: none;
    color: #fff;
    font-weight: 500;
    border: 2px solid #1270b6;
    background: #1270b6;
    border-radius: 5px;
	line-height:1.0;
}

    .filter-button.active {
        color: #fff;
        font-weight: 500;
        background: #2d4c72;
        border-color: #2d4c72;
    }

#search-box {
    margin-left: 0px;
    padding: 6px;
    min-width: 200px;
    border-radius: 5px;
    border: 1px solid #ccc;
    max-width: 500px;
    width: 100%;
}

/* Responsive layout */
@media screen and (max-width: 768px) {
    .project-tile {
        width: calc(50% - 20px);
    }
}

@media screen and (max-width: 480px) {
    .project-tile {
        width: 100%;
    }
    .overlay {
        font-size: 12px;
    }
}

.project-gallery-edit {
    min-height: 200px;
    padding: 20px;
    background: #f8f8f8;
    border: 1px solid #ddd;
}

.edit-link {
    position: relative;
    z-index: 10; /* Bring it in front */
    background: #007bff;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    display: inline-block;
    text-decoration: none;
    margin-top: 10px;
}

.edit-link:hover {
        background: #0056b3;
 }

.project-tile .admin-only {
    display: none!important;
}

body.user-is-admin .admin-only {
    display: block!important;
}

.hidden-tile {
    display: none!important;
}

.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #fff;
    padding: 24px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    position: relative;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.modal-content img {
        max-width: 100%;
        height: auto;
        border-radius: 6px;
        margin-bottom: 15px;
    }

.modal-body {
    text-align: center;
}

.modal-body h3 {
        margin-top: 10px;
        font-size: 20px;
        color: #333;
}

.modal-body p {
        margin: 8px 0;
        font-size: 14px;
        color: #555;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    z-index: 10000;
    background:#fff;
}

#lnkAddEditProject {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 20px;
}

#lnkAddEditProject:hover {
        background: #218838;
}
