.knowledge-hub {
    padding: 40px;
    max-width: 900px;
    margin: auto;
}

/* .knowledge-title {
    font-size: 28px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 30px;
} */

.knowledge-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.knowledge-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: 0.3s ease-in-out;
}

.knowledge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.15);
}

.knowledge-heading {
    font-size: 20px;
    margin-bottom: 10px;
}

.knowledge-text {
    font-size: 16px;
    color: #555;
}

.knowledge-link {
    display: inline-block;
    margin-top: 10px;
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}

.knowledge-link:hover {
    text-decoration: underline;
}

/* Fun Fact Box */
.fact-box {
    background: #f8f9fa;
    padding: 15px;
    border-left: 5px solid #007bff;
    font-style: italic;
    font-size: 16px;
    margin-bottom: 20px;
    text-align: center;
    border-radius: 5px;
}

/* Quiz Section */
.quiz-section {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.quiz-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 15px;
}

.quiz-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: auto;
    max-width: 400px;
}

.quiz-option {
    display: block;
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background: #007bff;
    color: white;
    font-size: 16px;
    transition: 0.3s;
}

.quiz-option:hover {
    background: #0056b3;
}

/* Video Container (Hidden by Default) */
.video-container {
    display: none;
    margin-top: 10px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* "Watch Instead" Button */
.video-toggle {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    margin-top: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: 0.3s;
}

.video-toggle:hover {
    background: #0056b3;
}

.news-section {
    margin: 20px 0;
}

.news-title {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
}

.news-card {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    margin: 10px 0;
    padding: 10px;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.news-image {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

.news-content {
    flex-grow: 1;
}

.news-content h3 {
    margin: 0;
    font-size: 18px;
}

.news-content a {
    text-decoration: none;
    color: #007bff;
}

.news-content a:hover {
    text-decoration: underline;
}

.news-empty {
    color: #64748b;
    padding: 24px;
    text-align: center;
}

/* Stock Widget */
.stock-widget {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.stock-widget h2 {
    color: #007bff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

#stock-prices p {
    font-size: 18px;
    font-weight: bold;
    margin: 5px 0;
}

/* Investment Calculator */
.investment-calculator {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.investment-calculator h2 {
    color: #28a745;
    border-bottom: 2px solid #28a745;
    padding-bottom: 5px;
}

.investment-calculator label {
    display: block;
    margin: 10px 0;
    font-size: 16px;
}

.investment-calculator input {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.investment-calculator button {
    background: #28a745;
    color: white;
    padding: 10px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    margin-top: 10px;
    width: 100%;
}

.investment-calculator button:hover {
    background: #218838;
}

#investment-result {
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
}

/* Finance Glossary */
.glossary {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.glossary h2 {
    color: #dc3545;
    border-bottom: 2px solid #dc3545;
    padding-bottom: 5px;
}

.glossary ul {
    list-style-type: none;
    padding: 0;
}

.glossary li {
    font-size: 16px;
    margin: 8px 0;
}

.glossary strong {
    color: #333;
    font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
    .investment-calculator input {
        width: 100%;
    }
    
    .investment-calculator button {
        width: 100%;
    }
}
