/* stories.css - Styles specific to stories.html */

/* Grid layout for story cards */
.story-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
    width: 100%;
}

/* Story card with expand/collapse functionality */
.story-card {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: white;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.story-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.story-card h3 {
    margin: 16px 16px 8px 16px;
    font-size: 1.2rem;
}

.story-card .preview-content {
    margin: 0 16px 16px 16px;
    color: #666;
    flex-grow: 1;
}

/* Overlay styling */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

.overlay-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.close-btn:hover {
    color: orange;
}

/* Quiz elements in overlay */
.story-quiz {
    background: #eef2f7;
    padding: 2rem;
    margin: 2rem 0;
    border-left: 6px solid #0077cc;
}

.story-reveal {
    display: none;
    margin-top: 1rem;
    background: #dff0d8;
    padding: 1rem;
    border-left: 6px solid #4CAF50;
}

/* Ensure the overlay scrolls properly on mobile */
@media (max-width: 768px) {
    .overlay-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}