body {
    background-color: black;
    color: white;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
}
.container {
    padding: 30px 15px;
    margin: 0 auto;
    max-width: 800px;
    text-align: center;
}
.description {
    padding: 1.5rem;
    font-size: 1.0rem;
    text-align: justify;
    text-justify: inter-word;
}
.span{
    margin-left: 10px;
    margin-bottom: 10px;
}
.sales{
    padding-top: 30px;
    font-size: 1.25rem;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.play_logo {
    max-width: 300px; /* Default size for desktop */
    margin-top: 40px;
}

@media (max-width: 768px) {
    .play_logo {
        max-width: 250px; /* Scale down for tablets */
    }
}

@media (max-width: 480px) {
    .play_logo {
        max-width: 200px; /* Further scale down for mobile devices */
    }
}
.legal{
    color: whitesmoke;
    font-size: small;
    text-decoration: none;
}
.footer{
    padding-top: 50px;
    display: block;
    font-size: 14px;
    padding: 10px 0;
    text-align: center;
}
footer a {
    color: whitesmoke;
    text-decoration: none;
    margin: 0 5px;
}
.cover {
    width: 500px; /* Default size for desktop */
    border-radius: 10px;
}

@media (max-width: 768px) {
    .cover {
        width: 350px; /* Scale down for tablets */
    }
}

@media (max-width: 480px) {
    .cover {
        width: 200px; /* Further scale down for mobile devices */
    }
}

.content {
    /*background-color: #56af98;*/
    /*border-radius: 10px;*/
    /*color: black;*/
    border-bottom: 2px white solid;
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
}
.by {
    padding: 0.1rem;
    font-style: italic;
    font-size: 1.2rem;
}
.author {
    font-size: 1.6rem;
}
.audiobook {
    font-style: italic;
    font-size: 1.2rem;
}
.header {
    text-decoration: none;
    padding: 10px;
    text-align: left;
    justify-content: flex-start;
    display: flex;
    flex-direction: row;
    height: 2rem;
    align-items: center;
}
.banner {
    text-decoration: none;
    color: #56af98;
    font-size: 1.5rem;
    font-weight: bold;
    margin-left: 1rem;
}
.logo {
    height: 3rem;
}
.FadeAway{
    position: relative;
    top: -250px;
    height: 250px;
    background: linear-gradient(to bottom, rgba(0,0,0,0), rgba(0,0,0,1));
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 15px;
    row-gap: 50px; /* increased spacing between rows */
    margin-top: 15px;
    margin-bottom: 30px; /* added spacing below gallery grid */
}

.gallery-item {
    flex: 0 0 200px; /* fixed width for each cover */
    text-align: center;
    position: relative; /* ensure local positioning */
    transition: transform 0.3s ease;
}

.image-container {
    position: relative;
}

.image-container img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px; /* increased transition height */
    background: -moz-linear-gradient(top, black 0%, transparent 100%);
    background: -webkit-linear-gradient(top, black 0%, transparent 100%);
    background: linear-gradient(to top, black 0%, transparent 100%);
    border-radius: 5px;
    pointer-events: none;
}

.cover-text {
    position: absolute;
    top: 80%;
    left: 5px;
    right: 5px;
    color: white;
    text-shadow: 1px 1px 2px black;
    margin: 0;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* limits to 3 lines */
    -webkit-box-orient: vertical;
}

.gallery-item:hover {
    transform: translateY(-5px) scale(1.05);
}

.gallery-item p em {
    font-style: italic;
}

a {
    color: white;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1 {
    font-size: 5rem; /* Default size for desktop */
    margin: 20px 0;
    color: #56af98;
}

@media (max-width: 768px) {
    h1 {
        font-size: 4rem; /* Scale down for tablets and smaller screens */
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 3rem; /* Further scale down for mobile devices */
    }
}

img[alt="Ears Up! Logo"] {
    max-width: 250px; /* Make the logo smaller */
    margin-bottom: 20px;
}

.left-aligned {
    text-align: left;
}

.small-title {
    font-size: 2rem; /* Make the title smaller */
    color: white; /* Make the title white */
    text-align: center;
    margin-top: -250px; /* Remove the margin between the cover image and the title */
}

.sales-intro {
    display: flex;
    flex-direction: column; /* Arrange tiles in a vertical chain */
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 50px; /* Add spacing below sales blocks */
}

.sales-block {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sales-columns {
    display: flex;
    flex-direction: row; /* Default: image on the left */
    align-items: center;
    gap: 20px;
}

.sales-columns.reverse {
    flex-direction: row-reverse; /* Ensure image is on the right */
}

.sales-image {
    width: 250px; /* Adjust image size */
    height: auto;
    border-radius: 10px;
}

.sales-text-column {
    flex: 1; /* Allow text column to take remaining space */
}

.sales-text-column.left-aligned {
    text-align: left; /* Align text to the left */
}

.sales-text-column.right-aligned {
    text-align: right; /* Ensure text is aligned to the right */
    margin-left: auto; /* Push text to the right */
}

.sales-title {
    font-size: 1.5rem;
    color: #56af98;
    margin-bottom: 10px;
}

.sales-text {
    font-size: 1rem;
    color: white;
    margin: 0;
}

@media (min-width: 769px) {
    .header-container {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 20px; /* Add spacing between the logo and title */
        margin-bottom: 20px;
    }

    .header-logo {
        max-width: 100px; /* Adjust logo size */
        height: auto;
    }

    .header-title {
        font-size: 5rem; /* Adjust title size */
        color: #56af98;
        margin: 0;
    }
}

@media (max-width: 768px) {
    .sales-columns,
    .sales-columns.reverse {
        flex-direction: column; /* Stack image and text in a column */
        text-align: center; /* Center-align text for mobile */
    }

    .sales-image {
        margin-bottom: 15px; /* Add spacing below the image */
    }
}