/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background: url('../images/section-hero-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    background-attachment: fixed;
    background-color: #f7fafc; /* Fallback color */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Removed overlay - letting transparent elements show background directly */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Header styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-brand i {
    font-size: 1.5rem;
    color: #ffd700;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-toggle, .video-mode-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.search-toggle:hover, .video-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

.search-toggle {
    padding: 0.5rem;
    width: 40px;
    justify-content: center;
}

.search-bar {
    display: none;
    padding-bottom: 1rem;
    position: relative;
}

.search-bar.active {
    display: block;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #2d3748;
}

.search-bar input:focus {
    outline: none;
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    padding: 0.5rem;
}

/* Main content */
.main {
    padding: 2rem 0 4rem 0;
    min-height: calc(100vh - 200px);
    position: relative;
    z-index: 1;
}

/* Hero section */
.hero {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    padding: 3rem 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
    backdrop-filter: blur(10px);
}

.hero-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #eaebeb;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.1rem;
    color: #9bfa9d;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.stat i {
    font-size: 2rem;
    color: #667eea;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}

.stat-label {
    font-size: 0.9rem;
    color: #9bfa9d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section headers */
.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h3 {
    font-size: 2rem;
    font-weight: 600;
    color: #eaebeb;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: #9bfa9d;
    font-size: 1.1rem;
}

/* Chapters section */
.chapters {
    margin-bottom: 4rem;
}

.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.chapter-card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.chapter-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chapter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chapter-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.chapter-status i {
    font-size: 1.5rem;
}

.chapter-status .completed {
    color: #48bb78;
}

.chapter-status .pending {
    color: #ed8936;
}

.chapter-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #eaebeb;
    margin-bottom: 0.5rem;
}

.chapter-content p {
    color: #9bfa9d;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.chapter-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.topic-tag {
    background: rgba(237, 242, 247, 0.2);
    color: #4a5568;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    backdrop-filter: blur(5px);
}

.chapter-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chapter-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}

.chapter-link:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

.chapter-link.disabled {
    background: #cbd5e0;
    color: #718096;
    cursor: not-allowed;
}

.video-prompt-btn {
    background: rgba(247, 250, 252, 0.2);
    border: 2px solid rgba(226, 232, 240, 0.3);
    color: #4a5568;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.video-prompt-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.video-prompt-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Featured Chapter Section */
.featured-chapter {
    margin: 3rem 0 4rem 0;
}

.featured-chapter-content {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 3rem;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
}

.featured-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.featured-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 2rem;
    flex-shrink: 0;
}

.featured-info h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #eaebeb;
    margin-bottom: 0.5rem;
}

.featured-info p {
    font-size: 1.2rem;
    color: #9bfa9d;
    line-height: 1.6;
}

.featured-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.featured-topic-tag {
    background: rgba(255, 255, 255, 0.1);
    color: #eaebeb;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.featured-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.highlight-item i {
    font-size: 2rem;
    color: #667eea;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.highlight-item h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #eaebeb;
    margin-bottom: 0.5rem;
}

.highlight-item p {
    color: #9bfa9d;
    line-height: 1.5;
    font-size: 0.95rem;
}

.featured-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.featured-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.featured-btn.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.featured-btn.primary:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.featured-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #eaebeb;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.featured-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Features section */
.features {
    margin-bottom: 4rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: rgba(255, 255, 255, 0.2);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s;
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-2px);
}

.feature-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.feature-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: #4a5568;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #2d3748;
    color: white;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.footer-brand i {
    color: #ffd700;
}

.footer-info p {
    color: #a0aec0;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.2s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: slideIn 0.3s;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a202c;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.modal-close:hover {
    background: #f7fafc;
}

.modal-body {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

/* Chapter page styles */
.chapter-page {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    margin: 2rem auto 4rem auto;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 1200px;
    width: 100%;
}

.chapter-nav {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.chapter-nav a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.chapter-nav a:hover {
    text-decoration: underline;
}

.chapter-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 1rem;
}

.chapter-subtitle {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 2rem;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a202c;
    margin-bottom: 1rem;
    padding-left: 1rem;
    border-left: 4px solid #667eea;
}

.content-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #2d3748;
    margin: 2rem 0 1rem;
}

.content-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a5568;
    margin: 1.5rem 0 0.75rem;
}

.content-section p {
    color: #4a5568;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.content-section ul, .content-section ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.content-section li {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.content-section strong {
    color: #1a202c;
    font-weight: 600;
}

.highlight-box {
    background: rgba(230, 255, 250, 0.2);
    border-left: 4px solid #48bb78;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    backdrop-filter: blur(10px);
}

.example-box {
    background: rgba(255, 245, 245, 0.2);
    border-left: 4px solid #f56565;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    backdrop-filter: blur(10px);
}

.video-prompts {
    background: rgba(250, 245, 255, 0.2);
    border: 2px solid rgba(214, 188, 250, 0.3);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
}

.video-prompts h4 {
    color: #553c9a;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.note-box {
    background: rgba(254, 252, 232, 0.2);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    backdrop-filter: blur(10px);
}

.warning-box {
    background: rgba(255, 245, 245, 0.2);
    border: 1px solid rgba(245, 101, 101, 0.3);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    backdrop-filter: blur(10px);
}

.info-table {
    background: rgba(255, 255, 255, 0.2);
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
    backdrop-filter: blur(10px);
}

.info-table th,
.info-table td {
    border: 1px solid rgba(226, 232, 240, 0.3);
    padding: 0.75rem;
    text-align: left;
}

.info-table th {
    background: rgba(237, 242, 247, 0.2);
    font-weight: 600;
}

.content-block {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
    color: #1a202c;
}

.subsection {
    margin-bottom: 2rem;
}

.subsection h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.video-prompts ul {
    color: #553c9a;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-stats {
        gap: 1rem;
    }
    
    .chapter-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .chapter-page {
        padding: 2rem 1rem;
        margin: 1rem auto 3rem auto;
    }
    
    .chapter-title {
        font-size: 2rem;
    }
    
    .featured-chapter-content {
        padding: 2rem;
    }
    
    .featured-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .featured-info h3 {
        font-size: 2rem;
    }
    
    .featured-highlights {
        grid-template-columns: 1fr;
    }
    
    .featured-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .main {
        padding: 1rem 0 3rem 0;
    }
    
    .hero-content h2 {
        font-size: 1.75rem;
    }
    
    .modal-content {
        width: 95%;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Video mode styles */
.video-mode .chapter-page {
    font-size: 1.1rem;
}

.video-mode .content-section h2,
.video-mode .content-section h3,
.video-mode .content-section h4 {
    background: #fff3cd;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    margin: 2rem 0 1rem;
}

.video-mode .highlight-box,
.video-mode .example-box {
    border-width: 3px;
    margin: 2.5rem 0;
}