/* Simple Photo Album Styles */
.spa-container {
    font-family: 'Kovanov Regular', sans-serif;
    padding: 20px;
}

#spa-search {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 2px solid blue;
    border-radius: 8px;
    font-size: 16px;
}

.spa-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.spa-photo {
    text-align: center;
    background: #f9f9f9;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
    transition: transform 0.3s ease;
}

.spa-photo:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.spa-image-wrapper {
    overflow: hidden;
    border-radius: 10px;
}

.spa-photo img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.spa-photo img:hover {
    transform: scale(1.05);
}

.spa-title {
    margin: 10px 0;
    font-size: 16px;
    color: #000;
}

.spa-download {
    display: inline-block;
    margin-top: 5px;
    padding: 8px 12px;
    background: blue;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    transition: 0.3s;
}

.spa-download:hover {
    background: #212839;
}

/* Modal Styles */
.spa-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
}

.spa-modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
    animation: zoom 0.3s;
}

@keyframes zoom {
    from { transform: scale(0.5); }
    to   { transform: scale(1);   }
}

.spa-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 100000;
}

.spa-close:hover,
.spa-close:focus {
    color: #bbb;
    text-decoration: none;
}

#spa-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 50px;
}

/* Responsive: small modal adjustments */
@media only screen and (max-width: 700px) {
    .spa-modal-content {
        width: 100%;
    }
    .spa-close {
        right: 10px;
        top: 10px;
        font-size: 30px;
    }
}

/* Responsive: mobile & tablet tweaks */
@media only screen and (max-width: 768px) {
    .spa-container {
        padding: 10px;
    }
    #spa-search {
        font-size: 14px;
        padding: 8px;
    }
    .spa-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    .spa-photo {
        padding: 8px;
    }
    .spa-title {
        font-size: 14px;
    }
    .spa-download {
        display: block;
        width: 100%;
        margin: 8px 0;
        padding: 10px;
        font-size: 16px;
        box-sizing: border-box;
    }
    .spa-modal-content {
        max-width: 95%;
        max-height: 70vh;
    }
}

/* Disable hover-only transforms on pure touch devices */
@media (hover: none) {
    .spa-photo:hover {
        transform: none;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
}