/* BOOKS.CSS */

.gallery-filters {
    text-align: center;
    margin: 20px 0 40px;
}

.gallery-filters .filter-button {
    font-size: 16px;
    color: #545454;
    text-decoration: none;
    padding: 10px 12px;
    background-color: transparent;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 4px;
}

.gallery-filters .filter-button:hover,
.gallery-filters .filter-button.active {
    background-color: #ddd;
    color: #545454;
}

/* Masonry */
.masonry {
    column-count: 4;
    column-gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
    animation-delay: 0.2s;
    will-change: opacity, transform;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 16px;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.masonry-item img:hover {
    transform: scale(1.03);
}

/* Responsive */
@media (max-width: 1200px) {
    .masonry {
        column-count: 3;
        padding: 0 32px;
    }
}

@media (max-width: 900px) {
    .masonry {
        column-count: 2;
        padding: 0 16px;
    }
}

@media (max-width: 600px) {
    .masonry {
        column-count: 1;
        padding: 0 16px;
    }
}

/* Add fade transition to masonry items */
.masonry-item {
    break-inside: avoid;
    margin-bottom: 16px;
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Hidden state for filtered-out items (use in JS) */
.masonry-item.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

/* Section Headings */
#authored-illustrated h2,
#illustrated h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #222;
    text-align: center;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    padding: 0 16px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.book-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.book-item img:hover {
    transform: scale(1.03);
}

/* Fade-in animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive tweaks */
@media (max-width: 700px) {
    .books-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 16px;
        padding: 0 12px 30px;
    }
}

/* Authored Books Section */
#authored-illustrated {
    margin: 60px 0;
    padding: 40px 16px;
    background-color: #fafafa;
    border-radius: 8px;
    text-align: center; /* centers the heading only */
}

#authored-illustrated h2 {
    font-size: 1.8rem;
    margin-bottom: 24px;
    text-align: center;
}

.authored-book {
    display: flex;
    gap: 24px;
    margin-bottom: 40px;
    align-items: flex-start;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 24px;
    max-width: 1000px; /* optional for better line length */
    margin-left: auto;
    margin-right: auto;
}


.authored-book img {
    width: 180px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    transition: transform 0.3s ease; /* Add this for hover animation */
    cursor: pointer; /* Optional: makes it feel clickable */
}

.authored-book img:hover {
    transform: scale(1.03); /* Slight zoom */
}

.book-info {
    text-align: left;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
      align-items: flex-start; /* or center if you want centered buttons */
}

.book-info h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.book-info p {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 12px;
}


/* Responsive for smaller screens */
@media (max-width: 700px) {
    .authored-book {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .authored-book img {
        width: 60%;
        margin-bottom: 16px;
    }

    .book-info {
        text-align: center;
    }

    .book-info .button {
        align-self: center; /* center the button on mobile only */
    }
}

/* Coming Soon Section */
#coming-soon {
    margin: 60px 0;
    padding: 40px 16px;
    background-color: #fafafa;
    border-radius: 8px;
}

#coming-soon h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 24px;
}

#coming-soon h3 {
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.coming-soon-list {
    list-style: none;
    padding: 0;
    margin: 0 auto;
    max-width: 800px;
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

.coming-soon-list li {
    position: relative;
    padding-left: 2em;
    margin-bottom: 24px;
}

.coming-soon-list li::before {
    content: "📖";
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2em;
    line-height: 1.6;
}

.coming-soon-list strong {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: #222;
    display: block;
    line-height: 1.4;
    margin-bottom: 6px;
}

.coming-soon-list .publisher {
    font-weight: normal;
    font-style: italic;
    color: #555;
}

.coming-soon-list .description {
    font-family: 'Work Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    margin-top: 4px;
}