/* Sidebar Styles */
#sidebar {
    width: 250px;
    min-height: 100vh;
    padding: 20px;
    position: fixed;
    transition: left 0.3s ease;
    background-color: rgb(252, 249, 249);
    z-index: 1000;
    top: 59px; /* Height of navbar */
}

#sidebar ul {
    padding: 0;
    list-style: none;
}

#sidebar ul li {
    margin-bottom: 15px;
}

#sidebar ul li a {
    display: flex;
    align-items: center;
    padding: 10px;
    font-size: 18px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}

#sidebar ul li a i {
    margin-right: 10px;
    font-size: 20px;
}

#sidebar ul li a:hover {
    background: #28a745;
    color: white;
    transform: scale(1.05);
}

/* Content Styles */
.content {
    margin-left: 260px;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

/* Formula Box Styles */
.formula-box {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.formula-box h3 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.formula-box h3 i {
    margin-right: 10px;
}

.formula-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.formula-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.3s;
}

.formula-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

.formula-item h4 {
    font-size: 18px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 5px;
}

.formula-item p {
    margin-bottom: 8px;
    font-size: 14px;
}

.formula {
    font-family: 'Courier New', monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 8px;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
}

/* Quiz Section */
.quiz {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.quiz h4 {
    color: #28a745;
}

.options {
    list-style: none;
    padding: 0;
}

.options li {
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    margin: 5px 0;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.options li:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.options li.correct {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.options li.incorrect {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.explanation {
    display: none;
    margin-top: 15px;
    padding: 15px;
    background: #e9ecef;
    border-left: 5px solid #28a745;
    border-radius: 0 5px 5px 0;
}

/* Toggle Button */
#sidebarToggle {
    position: fixed;
    top: 15px;
    left: 15px;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    border-radius: 5px;
    z-index: 1001;
    background: transparent;
}

/* Responsive Design */
@media (max-width: 768px) {
    #sidebar {
        left: -250px;
    }

    #sidebar.active {
        left: 0;
        box-shadow: 0 0 15px rgba(0,0,0,0.2);
    }

    .content {
        margin-left: 0;
    }

    .formula-grid {
        grid-template-columns: 1fr;
    }
}

/* Hide toggle button in large screens */
@media (min-width: 769px) {
    #sidebarToggle {
        display: none;
    }
}

/* Specific styles for 480px and below */
@media (max-width: 480px) {
    #sidebarToggle {
        top: 10px;
        left: 10px;
        padding: 8px 12px;
        font-size: 16px;
    }
    
    #sidebar.active {
        left: 0;
        width: 80%;
    }
    
    #sidebar ul li a {
        font-size: 16px;
        padding: 8px;
    }
    
    #sidebar ul li a i {
        font-size: 18px;
    }
    
    .content {
        padding: 15px 10px;
    }
    
    .quiz {
        padding: 15px;
    }
    
    /* Add overlay when sidebar is active */
    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .overlay.active {
        display: block;
    }
}

.container-fluid .navbar-brand {
    font-family: 'Work Sans';
    font-size: 22px;
    text-align: center;
    width: 100%; /* Ensure full width */
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer {
    background:#19692c; /* Same color as navbar */
    color: white; /* White text for contrast */
    text-align: center;
    padding: 15px 0;
    font-size: 14px;
    width: 100%;
    bottom: 0;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.2);
    position: relative; /* Change to 'fixed' if you want it always visible */
}

.footer-content {
    max-width: 1200px;
    margin: auto;
    font-family: 'Work Sans';
    font-size: 19px;
}

.footer-content p {
    margin: 0;
    color: white;
}

@media (max-width: 768px) {
    .footer {
        font-size: 12px;
        padding: 10px 0;
    }
}

