/* ==================== Sidebar / Layout CSS ==================== */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
}

.container {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 220px;
    background-color: #2c3e50;
    color: white;
    overflow-y: auto;
}

.sidebar p {
    font-weight: bold;
    padding: 10px 15px;   /* 10px top/bottom, 15px left/right */
    margin: 0;             /* remove default margin */
    background-color: #eaf0fa; /* optional: slightly darker shade for header */
    color: #1a3e72;
    font-size: 1.3em;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0; /* remove default top/bottom margin */
}

.sidebar li {
    padding: 2px 10px;
    cursor: pointer;
    border-bottom: 1px solid #34495e;
}

.sidebar li:hover, .sidebar .active {
    background-color: #34495e;
}

.content {
    flex: 1;
    background-color: #ecf0f1;
}

.content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ==================== General body styles ==================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;
}

/* Container to center text with margins */
.content {
    max-width: 900px; /* maximum width for readability */
    margin: 0 auto; /* centers content horizontally */
    padding: 20px 40px; /* space inside content */
    background-color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-radius: 8px;
}

/* Headings */
/* H1 */
h1 {
    font-size: 1.3em;
    color: #fff;
    border-left: 8px solid #eaf0fa;
    padding-left: 0.5em;
    background-color: #1a3e72;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* H2 */
h2 {
    font-size: 1.2em;
    color: #1a3e72;
    border-left: 4px solid #1a3e72;
    padding-left: 0.5em;
    background-color: #eaf0fa;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* H3 */
h3 {
    font-size: 1.1em;
    color: #1a3e72;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

/* Paragraphs */
p {
    margin: 0.8em 0;
}

/* Lists */
ul, ol {
    margin-left: 1em;
    margin-bottom: 1em;
}

li {
    margin: 0.5em 0;
}

/* Strong text */
strong {
    color: #0a2140;
}

/* Links */
a {
    color: #1a3e72;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Quiz section styling */
.quiz-container {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0px 3px 8px rgba(0,0,0,0.1);
}

.option {
    display: block;
    margin: 10px 0;
    font-size: 1em;
}

button {
    background-color: #1a3e72;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
}

button:hover {
    background-color: #15305a;
}

/* Correct/Wrong feedback */
#result {
    margin-top: 15px;
    font-weight: bold;
    font-size: 1.1em;
}

#result.correct {
    color: green;
}

#result.wrong {
    color: red;
}

/* Table Styling */
table {
    width: 95%;
    border-collapse: collapse;
    margin: 1.5em auto;
    font-size: 0.87em;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

thead {
    background-color: #1a3e72;
    color: #fff;
    text-align: left;
}

/* Style for table headers */
th {
    background-color: #1a3e72;
    color: #fff;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid #e0e6f0;
    font-weight: 600; /* typical for headers */
}

/* Style for table data cells */
td {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e6f0;
    text-align: left;
}

tr:nth-child(even) {
    background-color: #f7f9fc;
}

tr:hover {
    background-color: #eaf0fa;
    transition: background-color 0.2s ease-in-out;
}

th {
    font-weight: 600;
    letter-spacing: 0.5px;
}

td {
    color: #333;
}

caption {
    caption-side: top;
    text-align: left;
    font-weight: bold;
    margin-bottom: 0.5em;
    color: #1a3e72;
}

/* Responsive table */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        border-radius: 8px;
    }
}

/* Responsive text */
@media (max-width: 768px) {
    .content {
        padding: 15px 20px;
    }

    h1 {
        font-size: 1.3em;
    }

    h2 {
        font-size: 1.2em;
    }

    h3 {
        font-size: 1.1em;
    }
}
