.logic-stories-heading-image {
    width: 40%;        /* adjust this value to taste */
    max-width: 340px;  /* prevents it from getting too large on big screens */
    min-width: 210px;
    height: auto;
    display: block;
    margin-left: 0;    /* ensures left alignment */
	margin-top: -45px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .logic-stories-heading-image {
        width: 40%;
        max-width: 350px;
		margin-top: -90px;
    }
}

@media (max-width: 600px) {
    .logic-stories-heading-image {
        width: 50%;
        max-width: 260px;
        min-width: 160px;
		margin-top: -30px;
    }
}

/* --- Layout Container --- */

.logic-stories-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 20px;
    padding: 20px;
    box-sizing: border-box;
}

/* --- Sidebar --- */

.logic-stories-sidebar {
    border-right: 1px solid #ddd;
    padding: 20px;
    box-sizing: border-box;
}

.logic-stories-sidebar,
.logic-stories-main {
    padding: 20px;
}

.ls-sidebar-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Search box */

.ls-search-box {
    width: 100%;
}

.ls-search-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

/* Story list */

.ls-story-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ls-story-item {
    margin-bottom: 12px;
}

.ls-story-item a {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ls-story-date {
    font-size: 12px;
    color: #777;
}

.ls-story-title {
    font-size: 14px;
    font-weight: 500;
}

.ls-story-item a:hover {
    text-decoration: underline;
}

@media (max-width: 900px) {
	.logic-stories-layout {
	        grid-template-columns: 1fr !important; /* only content visible */		
	}

    	.logic-stories-sidebar {
		display: none; /* sidebar hidden by default */
    	}
}

/* --- Main Content Area --- */

.logic-stories-main {
    padding-left: 10px;
}

.logic-stories-heading {
    margin-bottom: 20px;
    font-size: 26px;
    font-weight: 600;
}

/* --- Story Card Grid --- */

.story-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* --- Story Card --- */

.story-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    background: #ffffff;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    position: relative;
}

/* Header line: post number, date, title */
.story-header {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
	font-family: "Mongolian Baiti", serif;
    font-weight: bold;
    margin-bottom: 10px; /* space before preview text */
}

.post-number {
    color: rgba(0,32,96,0.8);
}

.post-date {
    color: #777;

}

.post-title {
    color: rgba(0,32,96,0.8); /* dark blue */
}

/* Preview text with line clamp */
.preview-text {
    margin: 0;
    color: #444;
    display: -webkit-box;
    -webkit-line-clamp: 3; /* number of preview lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.story-card:hover {
    box-shadow: 0 4px 15px rgba(0,32,96,0.8);
    border: 0.8px solid #002060;                    /* thin black border */
    transform: translateY(-3px);
}

/* Icon placeholder */

.story-card-icon {
    width: 100%;
    height: 120px;
    background: #e0e0e0;
    border-radius: 6px;
}

.story-card-icon2 {
    width: 100%;
    height: 120px;
    background: #ffffff;  /* ← pure white background */
    border-radius: 6px;

    overflow: hidden;              /* keeps image inside */
    display: flex;                 /* centers image vertically */
    justify-content: center;       /* centers image horizontally */
    align-items: center;           /* centers image vertically */
}

.two-boxes-card-icon {
    width: 80%;
    height: auto;
    display: block;
    border-radius: 8px;
    object-fit: contain;   /* or 'contain' depending on your art style */
}


/* Title + Date */

.story-card-title {
    font-size: 15px;
    font-weight: 600;
}

.story-card-date {
    font-size: 12px;
    color: #777;
}

/* Overall card still uses your existing .story-card styles */

/* Book cover container */
.book-cover {
    display: flex;
    width: 100%;
    height: 180px;
    background: #fdfaf4;              /* soft paper tone */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    overflow: hidden;
    border: 2px solid #c9b27a;        /* uniform accent color (golden-olive) */
}

/* Spine on the left */
.book-spine {
    width: 18%;
    background: linear-gradient(180deg, #b89a5c, #8c6f3b);
    box-shadow: inset -3px 0 4px rgba(0,0,0,0.25);
}

/* Main face of the book */
.book-face {
    position: relative;
    flex: 1;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top left, #fffdf7 0%, #f7f0e4 60%, #f1e6d4 100%);
}

/* Gold-embossed text style */
.book-number,
.book-title,
.book-date {
    text-align: center;
    color: #b08a3c;
    background: linear-gradient(135deg, #f9f1d0, #c89b3c, #fdf7e3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 1px 1px rgba(0,0,0,0.25);
    letter-spacing: 0.04em;
}

/* Hierarchy */
.book-number {
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.book-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.book-date {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Olive leaf corner ornaments (CSS-only) */
.book-ornament {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid #c9b27a;   /* same accent color */
    border-radius: 50%;
}

.book-ornament-top-left {
    top: 8px;
    left: 12px;
    border-right: none;
    border-bottom: none;
}

.book-ornament-top-right {
    top: 8px;
    right: 12px;
    border-left: none;
    border-bottom: none;
}

.book-ornament-bottom-left {
    bottom: 8px;
    left: 12px;
    border-right: none;
    border-top: none;
}

.book-ornament-bottom-right {
    bottom: 8px;
    right: 12px;
    border-left: none;
    border-top: none;
}

/* Sidebar toggle button */
.ls-sidebar-toggle {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    margin-bottom: 10px;
    padding: 5px;
}

/* Collapsed state */
.logic-stories-layout.collapsed {
    grid-template-columns: 60px 1fr;
}

.logic-stories-layout.collapsed .logic-stories-sidebar {
    overflow: hidden;
    width: 60px;
}

.logic-stories-layout.collapsed .ls-story-list,
.logic-stories-layout.collapsed #searchbar {
    display: none;
}

.logic-stories-layout.collapsed .logic-stories-heading-image {
    width: 22%;
    max-width: 300px;
}

/* Only override .content when inside the Logic Stories layout */


.story-legend {
    margin: 12px 0 28px 0;
    padding: 10px 0;
    border-top: 1px solid #e2e2e2;
    border-bottom: 1px solid #e2e2e2;
    font-size: 0.92rem;
    color: #555;
}

.story-legend-title {
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}


.solution-toggle {
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
    text-align: center;
    margin: 10px 0 15px 0;
    user-select: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    opacity: 0.85;
    transition: opacity 0.2s ease, color 0.2s ease;
}

.solution-toggle:hover {
    opacity: 1;
    color: #000;
}

.story-solution {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.45s ease, opacity 0.35s ease;
	
	overflow-y: auto;
}

.story-solution.open {
    max-height: 2000px;
    opacity: 1;
}

.story-divider {
    border-top: 1px solid #ccc;
    margin: 25px 0 20px 0;
}

.story-card-image {
    display: block;
    max-width: 90%;       /* adjust as needed */
    max-height: 90%;      /* ensures it fits inside the card */
    margin: auto;         /* centers horizontally */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);  /* centers vertically + horizontally */
}

.story-page-title {
	font-family: Times New Roman, serif;
	font-weight: 500;
    color: #000;
	
	text-decoration: underline;
    text-decoration-thickness: 1px;   /* thinner underline */
    text-underline-offset: 10px;       /* moves underline slightly down */
}

.story-page-date {
	font-family: Times New Roman, serif;
	font-weight: 400;
    color: #999;
}

.story-video {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

.story-video iframe,
.story-video video {
    max-width: 100%;
    border-radius: 8px;
}
