/* Page specific styles */
main {
    padding: 2rem;
}

section {
    background: rgba(255, 255, 255, 0.8); /* Partly transparent white background */
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem auto; /* Center sections horizontally */
    width: 75%; /* Set section width to 75% */
}

section img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 1rem;
}

section h1 {
    font-size: 2.5rem; /* Increase the font size */
    color: #5f4b8b; /* Dark purple color */
    margin-bottom: 1.5rem; /* Add space below the h1 */
    text-align: center; /* Center align the h1 */
    text-transform: uppercase; /* Uppercase text for h1 */
    letter-spacing: 0.1rem; /* Increase letter spacing */
}

h2 {
    font-size: 1.8rem; /* Slightly smaller than h1 */
    color: #333; /* Dark color for h2 */
    margin-bottom: 1rem; /* Add space below the h2 */
}

/* Image and content styles */
.content-with-image {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.content-with-image img.left-image {
    margin-right: 1rem;
    width: 30%;
    flex-shrink: 0;
}

.content-with-image img.right-image {
    margin-left: 1rem;
    width: 30%;
    flex-shrink: 0;
}

.content-with-image div {
    flex-grow: 1;
}

.coloring-book-btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #5f4b8b;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
}

.coloring-book-btn:hover {
    background-color: #4a3a6a;
    transform: scale(1.05);
}

.meditations-affirmations-btn {
    display: block;
    margin: .2rem auto;
    padding: 0.7rem 1.5rem;
    background-color: #f9d342;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.5rem;
    transition: background-color 0.3s, transform 0.3s;
    text-align: center;
    width: 35%; 
}

.meditations-affirmations-btn:hover {
    background-color: #e0bc2d;
    transform: scale(1.05);
}

.guides-btn {
    display: block;
    margin: 2rem auto; /* Center the button horizontally and add margin to the top and bottom */
    padding: 0.7rem 1.5rem;
    background-color: #f9d342;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.3s;
    text-align: center;
    width: fit-content; /* Ensure the button width adjusts to fit the content */
}

.guides-btn:hover {
    background-color: #e0c336;
    transform: scale(1.05);
}

/* FAQ styles */
.faq-item {
    margin-bottom: 1rem;
}

.faq-item h2 {
    font-size: 1.2rem;
    cursor: pointer;
    background: rgba(95, 75, 139, 0.1);
    padding: 1rem;
    border-radius: 8px;
    transition: background-color 0.3s;
}

.faq-item h2:hover {
    background: rgba(95, 75, 139, 0.2);
}

.faq-answer {
    display: none;
    padding: 1rem;
    background: rgba(95, 75, 139, 0.05);
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* Search Section Styles */
.search-section {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.search-container {
    display: flex;
    justify-content: center;
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

#searchInput {
    flex: 1;
    padding: 0.8rem 1.2rem;
    font-size: 1.1rem;
    border: 2px solid #5f4b8b;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#searchInput:focus {
    border-color: #4a3a6a;
    box-shadow: 0 0 5px rgba(95, 75, 139, 0.3);
}

#searchButton {
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    background-color: #5f4b8b;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    white-space: nowrap;
}

#searchButton:hover {
    background-color: #4a3a6a;
    transform: scale(1.05);
}

/* No Results Message */
.no-results {
    display: none;
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(95, 75, 139, 0.1);
    border-radius: 8px;
    color: #5f4b8b;
    font-size: 1.2rem;
    font-weight: 500;
}

.number-cards {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem auto;
    width: 75%;
    box-sizing: border-box;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    box-sizing: border-box;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .number-cards {
        width: 95%;
        padding: 1rem;
        margin: 1rem auto;
        box-sizing: border-box;
    }

    .search-section {
        padding: 0.5rem;
        margin-bottom: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .search-container {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    #searchInput {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
        border-width: 1px;
        box-sizing: border-box;
    }

    #searchButton {
        width: 100%;
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        box-sizing: border-box;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .card {
        margin-bottom: 0;
        width: 100%;
        box-sizing: border-box;
        padding: 1rem;
    }

    .no-results {
        font-size: 1rem;
        padding: 0.8rem;
        margin: 0.5rem;
        width: calc(100% - 1rem);
        box-sizing: border-box;
    }

    main {
        padding: 1rem;
    }

    section {
        padding: 1rem;
        margin: 1rem;
        width: 90%;
    }

    section h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .content-with-image {
        flex-direction: column;
        align-items: center;
    }

    .content-with-image img.left-image,
    .content-with-image img.right-image {
        margin: 1rem 0;
        width: 80%;
    }

    .coloring-book-btn,
    .meditations-affirmations-btn,
    .guides-btn {
        width: 90%;
        font-size: 1rem;
    }
}

.card {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
    box-sizing: border-box;
}

.card img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.card h2 {
    font-size: 1.5rem;
    margin: 0.5rem 0 1rem;
    color: #5f4b8b;
}

.card p {
    font-size: 1rem;
    color: #333;
    margin: 0;
    flex-grow: 1;
    line-height: 1.5;
}

footer {
    background: rgba(95, 75, 139, 0.9);
    color: #fff;
    text-align: center;
    padding: 1rem;
    border-radius: 8px;
}
