.work-section {
    padding: 0;
    background-color: #0D0D0D;
    text-align: center;
    overflow: hidden;
}

.section-title {
    font-size: 48px;
    font-family: 'bosch', sans-serif;
    color: #FFFFF0;
    margin-bottom: 60px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    justify-content: center;
    align-items: stretch;
    width: 100%;
}

.work-item {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
    aspect-ratio: 2 / 3; /* Ensures book cover ratio */
    height: calc(100vh - 80px); /* Adjust to fit below navbar */
}

/* Make images fit in a structured and uniform way */
.work-item .work-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
}

/* Hover effect: Scale image & show overlay */
.work-item:hover .work-img {
    transform: scale(1.05);
}

.work-item .work-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 40px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    color: #FFFFF0;
    font-family: 'bosch', sans-serif;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

/* Show overlay on hover */
.work-item:hover .work-info {
    opacity: 1;
}

/* Always show text on mobile with better visibility */
@media screen and (max-width: 768px) {
    .work-item {
        height: auto;
        display: flex;
        flex-direction: column;
    }
    .work-item .work-img {
        height: auto;
    }
    .work-item .work-info {
        opacity: 1;
        position: relative;
        height: auto;
        background: rgba(0, 0, 0, 0.9);
        padding: 20px;
        text-align: center;
    }
    .work-info h3, .work-info p {
        text-align: center;
        width: 100%;
    }
}

.work-info h3 {
    font-size: 28px;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0;
}

.work-info p {
    font-size: 16px;
    opacity: 0.8;
    margin-top: 10px;
    line-height: 1.5;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .work-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .work-info {
        padding: 20px;
    }
    .work-info h3 {
        font-size: 24px;
    }
    .work-info p {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .work-info {
        padding: 10px;
    }
    .work-info h3 {
        font-size: 20px;
    }
    .work-info p {
        font-size: 13px;
    }
}

/* Coming Soon Styling */
.coming-soon .work-img {
    filter: grayscale(100%) brightness(40%);
}

.coming-soon .work-info {
    background: rgba(13, 13, 13, 0.8);
}
