/* History Styles */

.history-content {
    padding: 2rem 0;
}

.intro-section {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
}

.intro-section h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
}

/* Books Grid */
.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.book-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    display: flex;
    flex-direction: column;
}

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

.book-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-info .topic-link {
    margin-top: auto;
}

.book-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.book-cover {
    max-width: 200px;
    height: auto;
    margin: 0 auto 1rem auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: block;
}

.book-card h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.book-publisher {
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.book-card p {
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Units Section */
.units-section {
    margin-top: 3rem;
}

.unit-container {
    margin-bottom: 3rem;
    background: #f8f9fa;
    border-radius: 15px;
    padding: 2rem;
}

.unit-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.unit-header h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
}

.unit-header p {
    margin: 0;
    opacity: 0.95;
}

/* Chapters Grid */
.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.chapter-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-left: 4px solid #667eea;
    display: flex;
    flex-direction: column;
}

.chapter-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.chapter-number {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.chapter-card h4 {
    color: #333;
    margin-bottom: 0.8rem;
    font-size: 1.2rem;
}

.chapter-topics {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    flex-grow: 1;
}

.chapter-topics li {
    color: #666;
    padding: 0.4rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
}

.chapter-topics li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

.chapter-card .topic-link {
    margin-top: auto;
    text-align: center;
}

/* Chapter Lesson Page */
.chapter-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

.chapter-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
}

.chapter-header .chapter-number {
    background: rgba(255, 255, 255, 0.3);
    font-size: 1rem;
    margin-bottom: 1rem;
}

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

.chapter-header p {
    opacity: 0.95;
    font-size: 1.1rem;
}

.section {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    border-bottom: 2px solid #667eea;
    padding-bottom: 0.5rem;
}

.section h3 {
    color: #764ba2;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.historical-note {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 5px;
}

.historical-note h4 {
    color: #1976d2;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.timeline {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin: 1.5rem 0;
}

.timeline-item {
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.timeline-date {
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.key-figure {
    background: #fff3e0;
    border: 2px solid #ff9800;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.key-figure h4 {
    color: #e65100;
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.key-terms {
    background: #f3e5f5;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.key-terms h3 {
    color: #7b1fa2;
    margin-top: 0;
}

.key-terms dl {
    margin: 0;
}

.key-terms dt {
    color: #6a1b9a;
    font-weight: 600;
    margin-top: 1rem;
    font-size: 1.1rem;
}

.key-terms dd {
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: #555;
}

.summary-box {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border: 2px solid #667eea;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.summary-box h3 {
    color: #667eea;
    margin-top: 0;
}

.summary-box ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.summary-box li {
    margin-bottom: 0.5rem;
    color: #333;
}

/* Navigation */
.chapter-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    gap: 1rem;
}

.nav-button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
    font-weight: 500;
}

.nav-button:hover {
    background: #5568d3;
}

.nav-button.disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .intro-section h2 {
        font-size: 1.5rem;
    }

    .books-grid {
        grid-template-columns: 1fr;
    }

    .chapters-grid {
        grid-template-columns: 1fr;
    }

    .chapter-header h1 {
        font-size: 1.8rem;
    }

    .section {
        padding: 1.5rem;
    }

    .chapter-nav {
        flex-direction: column;
    }
}
