/* Postcard grid styles for Christmas fanzine - 3D folding cards */
.postcard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
    margin: 40px 0;
}

.postcard-container {
    perspective: 1000px;
    aspect-ratio: 3/4;
}

.postcard {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
    text-decoration: none;
}

.postcard-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.postcard-container:hover .postcard-inner {
    transform: rotateY(180deg);
}

.postcard-front,
.postcard-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    top: 0;
    left: 0;
}

.postcard-front {
    background: #fff;
}

.postcard-front-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    padding: 12px 16px;
    border-top: 2px solid rgba(200, 200, 200, 0.3);
}

.postcard-front-title h3 {
    font-family: "Meow Script", cursive;
    font-size: 1.3rem;
    margin: 0;
    color: #2c3e50;
    font-weight: 400;
    text-align: center;
}

.postcard-back {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.postcard-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.postcard-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    text-align: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.postcard-placeholder h3 {
    font-size: 1.2rem;
    margin: 0 0 10px 0;
    color: #404040;
}

.postcard-placeholder .postcard-author {
    font-family: "Meow Script", cursive;
    font-size: 1.1rem;
    color: #757575;
    margin: 0;
}

.postcard-content {
    text-align: center;
    color: #404040;
    padding: 20px;
}

.postcard-title {
    font-size: 1.3rem;
    margin: 0 0 12px 0;
    color: #2c3e50;
    font-weight: 600;
}

.postcard-back .postcard-author {
    font-family: "Meow Script", cursive;
    font-size: 1.2rem;
    color: #6c757d;
    margin: 0 0 20px 0;
}

.postcard-cta {
    font-size: 0.95rem;
    color: #495057;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid #dee2e6;
}

/* Add subtle shadow on hover */
.postcard-container:hover .postcard-front,
.postcard-container:hover .postcard-back {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

@media screen and (max-width: 700px) {
    .postcard-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 16px;
    }

    .postcard-title {
        font-size: 1.1rem;
    }

    .postcard-back .postcard-author {
        font-size: 1rem;
    }

    .postcard-cta {
        font-size: 0.85rem;
    }
}
