/* ========================================================
   GLOBAL STYLES & RESET
   ======================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

/* ========================================================
   COLOR PALETTE & BACKGROUNDS
   ======================================================== */
.light-blue-bg { background-color: #e3f2fd; border-left: 5px solid #2196f3; }
.green-bg { background-color: #e8f5e9; border-left: 5px solid #4caf50; }
.saffron-bg { background-color: #fff3e0; border-left: 5px solid #ff9800; }
.violet-bg { background-color: #f3e5f5; border-left: 5px solid #9c27b0; }
.soft-red-bg { background-color: #ffebee; border-left: 5px solid #f44336; }

/* ========================================================
   NAVIGATION & HEADER
   ======================================================== */
#navbar {
    position: sticky;
    top: 0;
    background-color: #1565c0;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-links button {
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 8px 12px;
    margin-left: 5px;
    cursor: pointer;
    font-weight: 600;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-links button:hover {
    background: rgba(255,255,255,0.2);
}

.print-btn {
    background-color: #ff9800 !important;
    border: none !important;
}

header {
    background: linear-gradient(135deg, #2196f3, #9c27b0);
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 20px;
}

header h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 10px; }
header p { font-size: 1.2rem; font-weight: 600; }

/* ========================================================
   MAIN CONTAINERS & TYPOGRAPHY
   ======================================================== */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 25px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #222;
    border-bottom: 2px solid #ccc;
    padding-bottom: 5px;
}

h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #444;
}

p, li { font-size: 1.05rem; margin-bottom: 10px; font-weight: 500; }
ol, ul { margin-left: 25px; margin-bottom: 15px; }

strong { font-weight: 700; color: #111; }

.example-box {
    background-color: #fffde7;
    border-left: 4px solid #fbc02d;
    padding: 10px 15px;
    margin: 15px 0;
    font-style: italic;
    font-weight: 600;
}

.exam-trap {
    background-color: #ffebee;
    border-left: 4px solid #f44336;
    padding: 10px 15px;
    margin: 15px 0;
    font-weight: 600;
    color: #b71c1c;
}

/* ========================================================
   TABLES
   ======================================================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
}
th, td {
    border: 1px solid #ccc;
    padding: 12px;
    text-align: left;
}
th {
    background-color: #4caf50;
    color: white;
    font-weight: 700;
}
td { font-weight: 500; }

/* ========================================================
   TABS / ACCORDIONS (Study Material)
   ======================================================== */
.tab-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.tab-buttons {
    flex: 1 1 250px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tab-btn {
    background-color: #f1f1f1;
    border: 1px solid #ccc;
    padding: 12px 15px;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.tab-btn:hover { background-color: #ddd; }
.tab-btn.active {
    background-color: #2196f3;
    color: white;
    border-color: #1976d2;
}

.tab-content-area {
    flex: 3 1 600px;
    background: white;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 400px;
}

.tab-content { display: none; animation: fadeIn 0.4s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ========================================================
   VISUAL AIDS (CSS ONLY - NO LIBRARIES)
   ======================================================== */
/* 1. Roadmap */
.roadmap {
    border-left: 4px solid #ff9800;
    padding-left: 20px;
    margin-left: 10px;
    margin-bottom: 30px;
}
.roadmap-item {
    position: relative;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border: 1px solid #eee;
    border-radius: 4px;
    font-weight: 600;
}
.roadmap-item::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 15px;
    width: 12px;
    height: 12px;
    background: #ff9800;
    border-radius: 50%;
}

/* 2. Flowchart */
.flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
}
.flow-box {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
    padding: 15px 30px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    width: 250px;
}
.final-box {
    background-color: #4caf50;
    color: white;
    border-color: #388e3c;
}
.arrow {
    font-size: 1.5rem;
    color: #555;
    margin: 5px 0;
}

/* 3. Mindmap */
.mindmap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px 0;
}
.mm-center {
    background-color: #9c27b0;
    color: white;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}
.mm-branches {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}
.mm-branch {
    background-color: #f3e5f5;
    border: 2px solid #ce93d8;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}

/* ========================================================
   QUESTIONS & ANSWER KEY
   ======================================================== */
.toggle-btn {
    background-color: #4caf50;
    color: white;
    padding: 12px 20px;
    border: none;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 15px;
    width: 100%;
}
.toggle-btn:hover { background-color: #388e3c; }

.hidden-answers { display: none; background: #eee; padding: 20px; border-radius: 4px; }
.mcq-answers li { font-weight: 600; margin-bottom: 8px; list-style-type: none; }

/* ========================================================
   FOOTER
   ======================================================== */
footer {
    text-align: center;
    padding: 30px 20px;
    background-color: #222;
    color: #ccc;
    font-weight: 500;
}

/* ========================================================
   RESPONSIVE & PRINT DESIGN
   ======================================================== */
@media (max-width: 768px) {
    .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
    .nav-links button { margin: 2px; font-size: 0.8rem; }
    #navbar { flex-direction: column; gap: 10px; }
    header h1 { font-size: 1.8rem; }
}

@media print {
    #navbar, .toggle-btn, .tab-buttons { display: none !important; }
    .tab-content { display: block !important; margin-bottom: 20px; border-bottom: 2px dashed #ccc; padding-bottom: 20px; }
    body { background: white; color: black; }
    .container { border: none; box-shadow: none; margin: 0; padding: 0; }
    .hidden-answers { display: block !important; }
}