/* ============================================================
   Kids Kingdom - Story Page Stylesheet
   Hero + Story content wrapped together in a single flexible
   jungle-border frame (CSS border-image - stretches to fit any
   content length, corners stay fixed, edges stretch/repeat).
   ============================================================ */

.story-frame {
    border-style: solid;
    border-width: 0px !important;
    border-image-source: url(/assets/images/borders/border-jungle.png);
    border-image-slice: 0 fill;
    border-image-width: 0px;
    border-image-repeat: stretch;
    padding: 40px 0vw;
    margin: 30px 0;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border: none !important;
}

/* ================= HERO (inside the frame) ================= */
.story-hero {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 30px;
}

.story-hero h1 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    color: var(--color-dark);
    margin-bottom: 10px;
}

.story-hero .subheading {
    font-size: 1.1rem;
    color: var(--color-primary);
    font-weight: 600;
    margin-bottom: 14px;
}

.story-hero .intro-paragraph {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 18px;
}

.lang-toggle-link {
    display: inline-block;
    background: var(--color-bg);
    color: var(--color-primary);
    padding: 8px 20px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    margin: 20px;
}

.lang-toggle-link:hover {
    background: var(--color-primary);
    color: #fff;
}

.story-hero-image {
    max-width: 100%;
    margin: 20px auto;
}

.story-hero-image img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius);
    background: transparent;
}

/* ================= STORY BODY ================= */
.story-body {
    max-width: 900px;
    margin: 0 auto;
}

.story-body p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
}

.story-body .story-image {
    margin: 28px auto;
    text-align: center;
    background: transparent;
}

.story-body .story-image img {
    display: block;
    max-width: 100%;
    width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    background: transparent;
}

.story-moral {
    margin-top: 30px;
    padding: 18px 22px;
    background: var(--color-bg);
    border-radius: var(--radius);
    font-size: 1.05rem;
    color: var(--color-dark);
}

.story-moral strong {
    color: var(--color-primary);
}

/* ================= RESPONSIVE ================= */
@media (max-width: 767px) {
    .story-frame {
        border-width: 16px;
        border-image-width: 16px;
        padding: 26px 0vw;
    }

    .story-hero h1 {
        font-size: 1.8rem;
        text-align: left;
    }

    .story-body p {
        font-size: 1rem;
    }
}











/* ============================================================
   Story Audio Narrator - Play/Pause/Stop buttons + word highlight
   Append this to story.css
   ============================================================ */

.story-audio-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 16px 0;
}

.story-audio-btn {
    background: var(--color-bg);
    color: var(--color-primary);
    border: none;
    padding: 10px 22px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.story-audio-btn:hover {
    background: var(--color-primary);
    color: #fff;
}

.story-audio-stop {
    background: #fdeaea;
    color: #c0392b;
}

.story-audio-stop:hover {
    background: #c0392b;
    color: #fff;
}

/* Words start with default paragraph color (inherits from .story-body p) */
.story-word {
    transition: color 0.15s ease;
}

/* Words that have been read/spoken so far get highlighted */
.story-word-read {
    color: var(--color-primary);
}

@media (max-width: 767px) {
    .story-audio-controls {
        gap: 8px;
    }

    .story-audio-btn {
        padding: 9px 16px;
        font-size: 0.85rem;
    }
}








@media (min-width: 1024px) and (max-width: 1280px) {
	.story-hero .subheading{
		
	}	
	.story-hero {
		text-align: left;
	}
	.story-audio-controls {
		display: flex;
		justify-content: flex-start;
	}
	.lang-toggle-link{
		margin: 20px 0px;
	}
}

@media (max-width: 1023px) and (min-width: 768px) {
	.story-hero .subheading{
		
	}	
	.story-hero {
		text-align: left;
	}
	.story-audio-controls {
		display: flex;
		justify-content: flex-start;
	}
	.lang-toggle-link{
		margin: 20px 0px;
	}
}


@media (max-width: 767px) {
	.story-hero .subheading{
		
	}	
	.story-hero {
		text-align: left;
	}
	.story-audio-controls {
		display: flex;
		justify-content: flex-start;
	}
	.lang-toggle-link{
		margin: 20px 0px;
	}
}



@media (max-width: 580px) {
	.story-hero .subheading{
		
	}	
	.story-hero {
		text-align: left;
	}
	.story-audio-controls {
		display: flex;
		justify-content: flex-start;
	}
	.lang-toggle-link{
		
	}
}



@media (max-width: 420px) {
	.story-hero .subheading{
		
	}	
	.story-hero {
		text-align: left;
	}
	.story-audio-controls {
		display: flex;
		justify-content: flex-start;
	}
	.lang-toggle-link{
		margin: 10px 0px;
	}
}
