/* =========================================
   Book Page Styles (from book.html)
   ========================================= */

.story-container {
    max-width: 800px;
    margin: 0 auto;
    /* background: #fff; */
    padding: 40px;
    border-radius: 2px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    /* subtle shadow */
}

@media screen and (max-width: 479px) {
    .story-container {
        padding: 20px;
    }
}

.story-title-styled {
    font-family: "Lato", sans-serif;
    /* Or a serif font if available */
    font-size: 2.5em;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

#story-image {
    display: block;
    margin: 0 auto 40px;
    max-height: 500px;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.story-text-content {
    font-family: "Georgia", serif;
    /* Serif for reading */
    font-size: 1.15em;
    line-height: 1.8;
    color: #333;
}

.story-text-content p {
    margin-bottom: 1.5em;
}

/* Drop cap for first letter of first paragraph */
.story-text-content p:first-of-type::first-letter {
    font-size: 3em;
    float: left;
    line-height: 0.8;
    margin-right: 0.1em;
    color: #55a646;
    /* Theme green */
}

/* =========================================
   Stories Library Styles (from stories.html)
   ========================================= */

.search-container {
    margin-top: 20px;
    margin-bottom: 40px;
    text-align: center;
}

.search-input {
    padding: 12px 20px;
    width: 100%;
    max-width: 400px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #55a646;
    /* Matching theme green */
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding-bottom: 60px;
}

/* Specific override for the "More Stories" section in book.html to center items */
#more-stories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

#more-stories-grid .story-card {
    width: 300px;
    max-width: 100%;
}

.story-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    /* For the anchor wrap */
    color: inherit;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

.story-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f0f0f0;
    border-bottom: 1px solid #eee;
}

.story-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.story-card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.story-card-preview {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.story-card-footer {
    margin-top: auto;
}

.read-button {
    /* inherited from button classes */
}