/* ===== GLOBAL RESET AND BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== UNIFIED CHAPTER PAGE STYLES ===== */
/* This section contains common styles that can be used by all chapter pages */

/* Common Page Structure */
.chapter-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.chapter-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Common Header Styles */
.chapter-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chapter-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.chapter-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Common Back to Index Link */
.back-to-index {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 1rem;
}

.back-to-index:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
}

/* Common Navigation Tabs */
.nav-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.nav-tab {
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.nav-tab:hover {
    background-color: #f8f9fa;
}

.nav-tab.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Common Content Sections */
.content-section {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: none;
}

.content-section.active {
    display: block;
}

/* Common Heading Styles */
.chapter-h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

.chapter-h3 {
    color: #34495e;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.4rem;
}

.chapter-h4 {
    color: #2c3e50;
    margin: 1rem 0 0.5rem 0;
    font-size: 1.2rem;
}

/* Common Paragraph Styles */
.chapter-p {
    margin-bottom: 1rem;
    text-align: justify;
    line-height: 1.6;
}

/* Common Story Text Styles */
.chapter-story-text {
    font-size: 1.1rem;
    line-height: 1.8;
    text-indent: 2rem;
}

/* Common Quote Styles */
.chapter-quote {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 1rem;
    margin: 1rem 0;
    font-style: italic;
    font-size: 1.1rem;
}

/* Common Story Divider */
.chapter-story-divider {
    border-top: 3px solid #667eea;
    margin: 3rem 0;
    padding-top: 2rem;
}

/* Common Box Styles */
.chapter-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.chapter-box-title {
    font-weight: bold;
    color: #495057;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Common Character Box Styles */
.chapter-character-box {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.chapter-character-name {
    font-weight: bold;
    color: #0c5460;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Common Theme Box Styles */
.chapter-theme-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.chapter-theme-title {
    font-weight: bold;
    color: #856404;
    margin-bottom: 0.5rem;
}

/* Common Summary Box Styles */
.chapter-summary-box {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.chapter-summary-title {
    font-weight: bold;
    color: #0c5460;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Common Vocabulary Styles */
.chapter-vocabulary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.chapter-vocab-word {
    font-weight: bold;
    color: #495057;
}

.chapter-vocab-meaning {
    color: #6c757d;
    margin-left: 1rem;
}

/* Common Lessons Box Styles */
.chapter-lessons-box {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.chapter-lessons-title {
    font-weight: bold;
    color: #0c5460;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Common Question Styles */
.chapter-question {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
}

.chapter-question-number {
    font-weight: bold;
    color: #495057;
}

/* Common Footer Styles */
.chapter-footer {
    text-align: center;
    padding: 2rem;
    background: #343a40;
    color: white;
    border-radius: 10px;
    margin-top: 2rem;
}

/* Common Responsive Design */
@media (max-width: 768px) {
    .nav-tabs {
        flex-direction: column;
    }
    
    .nav-tab {
        border-bottom: 1px solid #dee2e6;
    }
    
    .chapter-header h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 10px;
    }
}

/* ===== INDEX PAGE STYLES ===== */
.index-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.index-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Index Page Header */
.index-page .index-header {
    background: rgba(255, 255, 255, 0.95);
    color: #2c3e50;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.index-page .index-header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.index-page .subtitle {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 1rem;
}

.index-page .description {
    font-size: 1.1rem;
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

/* Index Page Search Box */
.index-page .search-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.index-page .search-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.index-page .search-input:focus {
    border-color: #667eea;
}

.index-page .search-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #495057;
    font-weight: 500;
}

/* Index Page Chapters List */
.index-page .chapters-list {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.index-page .chapters-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.index-page .chapters-list li {
    border-bottom: 2px solid #f8f9fa;
    padding: 2rem 0;
    transition: all 0.3s ease;
}

.index-page .chapters-list li:last-child {
    border-bottom: none;
}

.index-page .chapters-list li:hover {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 10px;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: -1rem;
    margin-right: -1rem;
}

/* Index Page Chapter Header */
.index-page .chapter-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.index-page .chapter-number {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-weight: bold;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.index-page .chapter-info {
    flex-grow: 1;
}

.index-page .chapter-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.index-page .chapter-author {
    font-size: 1.1rem;
    color: #666;
    font-style: italic;
}

/* Index Page Chapter Content */
.index-page .chapter-content {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 2rem;
    align-items: start;
}

.index-page .chapter-theme {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.index-page .theme-title {
    font-weight: bold;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.index-page .theme-description {
    color: #6c757d;
    line-height: 1.6;
}

.index-page .chapter-highlights {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

.index-page .highlights-title {
    font-weight: bold;
    color: #856404;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

.index-page .highlights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.index-page .highlights-list li {
    padding: 0.3rem 0;
    color: #856404;
    position: relative;
    padding-left: 1.5rem;
    border-bottom: none;
    background: none;
    margin: 0;
}

.index-page .highlights-list li:before {
    content: "✦";
    color: #ffc107;
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Index Page Read Button */
.index-page .read-button {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
    align-self: center;
}

.index-page .read-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

/* Index Page Footer */
.index-page .index-footer {
    background: rgba(255, 255, 255, 0.95);
    text-align: center;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.index-page .index-footer p {
    color: #666;
    margin-bottom: 0.5rem;
}

.index-page .index-footer a {
    color: #667eea;
    text-decoration: none;
}

.index-page .index-footer a:hover {
    text-decoration: underline;
}

/* Index Page Responsive Design */
@media (max-width: 768px) {
    .index-page .chapter-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .index-page .chapter-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .index-page .index-header h1 {
        font-size: 2.2rem;
    }
    
    .index-page .container {
        padding: 15px;
    }
    
    .index-page .chapters-list {
        padding: 1rem;
    }
    

/* ===== COMMON UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}


/* Madam Rides Bus Page Header */
.madam-rides-bus-page .madam-rides-bus-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.madam-rides-bus-page .madam-rides-bus-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.madam-rides-bus-page .madam-rides-bus-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Madam Rides Bus Headings */
.madam-rides-bus-page .madam-rides-bus-h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 0.5rem;
}

.madam-rides-bus-page .madam-rides-bus-h3 {
    color: #34495e;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.4rem;
}

.madam-rides-bus-page .madam-rides-bus-h4 {
    color: #2c3e50;
    margin: 1rem 0 0.5rem 0;
    font-size: 1.2rem;
}

/* Madam Rides Bus Paragraphs */
.madam-rides-bus-page .madam-rides-bus-p {
    margin-bottom: 1rem;
    text-align: justify;
    line-height: 1.6;
}

/* Madam Rides Bus Story Text */
.madam-rides-bus-page .madam-rides-bus-story-text {
    font-size: 1.1rem;
    line-height: 1.8;
    text-indent: 2rem;
}

/* Madam Rides Bus Quotes */
.madam-rides-bus-page .madam-rides-bus-quote {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 1rem;
    margin: 1rem 0;
    font-style: italic;
    font-size: 1.1rem;
}

/* Madam Rides Bus Character Boxes */
.madam-rides-bus-page .madam-rides-bus-character-box {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.madam-rides-bus-page .madam-rides-bus-character-name {
    font-weight: bold;
    color: #0c5460;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Madam Rides Bus Theme Boxes */
.madam-rides-bus-page .madam-rides-bus-theme-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.madam-rides-bus-page .madam-rides-bus-theme-title {
    font-weight: bold;
    color: #856404;
    margin-bottom: 0.5rem;
}

/* Madam Rides Bus Summary Boxes */
.madam-rides-bus-page .madam-rides-bus-summary-box {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.madam-rides-bus-page .madam-rides-bus-summary-title {
    font-weight: bold;
    color: #0c5460;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Madam Rides Bus Vocabulary */
.madam-rides-bus-page .madam-rides-bus-vocabulary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.madam-rides-bus-page .madam-rides-bus-vocab-word {
    font-weight: bold;
    color: #495057;
}

.madam-rides-bus-page .madam-rides-bus-vocab-meaning {
    color: #6c757d;
    margin-left: 1rem;
}

/* Madam Rides Bus Lessons Box */
.madam-rides-bus-page .madam-rides-bus-lessons-box {
    background: #e8f4fd;
    border: 1px solid #bee5eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.madam-rides-bus-page .madam-rides-bus-lessons-title {
    font-weight: bold;
    color: #0c5460;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

/* Madam Rides Bus Comprehension Questions */
.madam-rides-bus-page .madam-rides-bus-comprehension-questions {
    background: #e2e3e5;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.madam-rides-bus-page .madam-rides-bus-question {
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: white;
    border-radius: 5px;
}

.madam-rides-bus-page .madam-rides-bus-question-number {
    font-weight: bold;
    color: #495057;
}

/* Madam Rides Bus Footer */
.madam-rides-bus-page .madam-rides-bus-footer {
    text-align: center;
    padding: 2rem;
    background: #343a40;
    color: white;
    border-radius: 10px;
    margin-top: 2rem;
}

/* Madam Rides Bus Responsive Design */
@media (max-width: 768px) {
    .madam-rides-bus-page .nav-tabs {
        flex-direction: column;
    }
    
    .madam-rides-bus-page .nav-tab {
        border-bottom: 1px solid #dee2e6;
    }
    
    .madam-rides-bus-page .madam-rides-bus-header h1 {
        font-size: 2rem;
    }
    
    .madam-rides-bus-page .container {
        padding: 10px;
    }
}
