﻿/*.templates-wrapper {
    position: relative; 
    width: 100%;
    max-height: 2000px;
    overflow: hidden;
}*/

.templates-masonry {
    column-count: 3;
    column-gap: 2rem;
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

@media (max-width:1024px) {
    .templates-masonry {
        column-count: 2
    }
}

@media (max-width:768px) {
    .templates-masonry {
        column-count: 1
    }
}

.template-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 2rem;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    -moz-column-break-inside: avoid;
    position: relative;
    overflow: hidden;
    transition: transform .3s ease,opacity .3s ease;
    opacity: 0;
    animation: masonryFadeIn .5s ease forwards;
}

@keyframes masonryFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.template-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .3s ease,filter .3s ease;
}

.template-item:hover img {
    transform: scale(1.03);
    filter: brightness(.9)
}

.template-item:hover {
    box-shadow: 0 8px 18px rgba(0,0,0,0.1)
}

.template-item .preview-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity .3s ease;
    z-index: 10;
    pointer-events: none;
}

.template-item:hover .preview-overlay {
    opacity: 1;
    pointer-events: all
}

.template-item .preview-button {
    background-color: rgb(0 61 98);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    text-align: center;
    z-index: 11;
    position: relative;
    transition: background-color .3s ease,transform .2s ease;
}

.template-item:hover .preview-button {
    background-color: rgb(10 90 140);
    transform: scale(1.05);
}

.template-item .category-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background-color: #ff8c00;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    white-space: nowrap;
    max-width: 75%;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: right;
    z-index: 12;
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

/*
.templates-blur-overlay {
    position: absolute;
    top: 1100px;
    left: 0;
    width: 110%;
    height: 100%;
    z-index: 20;
    pointer-events: none; 
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: linear-gradient( to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.05) 10%, rgba(255,255,255,0.15) 25%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0.7) 75%, rgba(255,255,255,1) 100% );
}

.templates-blur-overlay .subscribe-btn {
    position: absolute;
    top: 150px;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 40; 
    pointer-events: all;
    background-color: #f97316;
    color: #fff;
    font-weight: 600;
    padding: 0.9rem 1.8rem;
    border-radius: 9999px;
    box-shadow: 0 4px 10px rgba(249,115,22,.3);
    transition: background 0.2s ease, transform 0.2s ease;
}

.templates-blur-overlay .subscribe-btn:hover {
    background-color: #ea580c;
    transform: translate(-50%, -50%) scale(1.05);
}
*/