/* ============================================================
   REASONINGABILITY.COM - MASTER STYLESHEET
   ============================================================ */

/* ============================================================
   CSS VARIABLES / ROOT
   ============================================================ */
:root {
    --primary: #1E3A8A;
    --primary-light: #3B82F6;
    --primary-dark: #3B82F6;
    --secondary: #3B82F6;
    --accent: #10B981;
    --purple: #6f42c1;
    --purple-dark: #764ba2;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    --dark: #343a40;
    --light: #f8f9fa;
    --muted: #6c757d;
    --white: #ffffff;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
}

/* ============================================================
   BASE STYLES
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background-color: #f6f9fa;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

.display-4, .display-5, .display-6 {
    font-weight: 700;
}

.lead {
    font-size: 1.1rem;
    color: #555;
}
.hero-section .lead {
    color: #fff;
}
/* ============================================================
   NAVBAR & MEGA MENU STYLES
   ============================================================ */
.reasoning-navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.1);
    position: relative;
}

.navbar-brand {
    font-weight: 800;
    color: white !important;
    font-size: 1.6rem;
    letter-spacing: 0.5px;
}

#navbarNav .nav-link {
    color: rgba(255, 255, 255, 0.95) !important;
    font-weight: 600;
    margin: 0 5px;
    padding: 8px 12px !important;
    border-radius: 6px;
    transition: all 0.3s;
}

#navbarNav .nav-link:hover {
    color: white !important;
    background: rgba(255, 255, 255, 0.15);
}

#navbarNav .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Mega Menu */
.mega-dropdown {
    position: static !important;
}

.mega-dropdown .dropdown-menu {
	position: absolute;
    top: 100%;
    left: 0;
    max-width: none;
    transform: translateX(0);
    padding: 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-top: 3px solid #007bff;
    border-radius: 0 0 0.75rem 0.75rem;
    display: none;
    z-index: 1000;
    background-color: #fff;
    margin-top: -14px;
}

.mega-dropdown:hover .dropdown-menu {
    display: block;
}

.mega-dropdown .dropdown-toggle::after {
    display: none;
}

/* Mega Menu Columns */
.mega-menu-columns-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.mega-menu-column {
    flex: 1;
    min-width: 200px;
    padding: 0 15px;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
}

.mega-menu-column:last-child {
    border-right: none;
}

/* Category Headers with Gradients */
.category-title {
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
}

.mega-menu-column:nth-child(1) .category-title {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
}

.mega-menu-column:nth-child(2) .category-title {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
}

.mega-menu-column:nth-child(3) .category-title {
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
}

.mega-menu-column:nth-child(4) .category-title {
    background: linear-gradient(135deg, #ec008c 0%, #fc6767 100%);
}

.category-title i {
    margin-right: 10px;
    font-size: 1.2rem;
}

/* Topic Items */
.topic-list-ul {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.topic-item {
    transition: all 0.3s ease;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.topic-item:hover {
    background: rgba(37, 117, 252, 0.08);
    transform: translateX(5px);
}

.topic-item a {
    color: #333;
    text-decoration: none;
    font-weight: 700;
    flex-grow: 1;
    display: flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s;
}

.topic-item:hover a {
    color: var(--secondary);
}

.topic-icon {
    width: 28px;
    text-align: center;
    margin-right: 12px;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.mega-menu-column:nth-child(1) .topic-icon { color: #6a11cb; }
.mega-menu-column:nth-child(2) .topic-icon { color: #11998e; }
.mega-menu-column:nth-child(3) .topic-icon { color: #ff7e5f; }
.mega-menu-column:nth-child(4) .topic-icon { color: #ec008c; }

.topic-description {
    display: none;
    font-size: 0.85rem;
    color: #666;
    margin-top: 3px;
    line-height: 1.4;
    padding-left: 40px;
    flex-basis: 100%;
}

.topic-item:hover .topic-description {
    display: block;
}

/* Search Box in Mega Menu */
.mega-dropdown-menu {
    position: absolute !important;
    left: 0;
    right: 0;
    top: 100%;
    width: 100%;
    padding: 25px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
    border: none;
    margin-top: 0;
    background-color: white;
    transform: none !important;
}
.mega-dropdown-menu .search-box {
    position: relative;
    margin: 0 0 15px 0;
    width: 100%;
    padding: 0 15px;
}

.mega-dropdown-menu .search-box input {
    padding-left: 40px;
    border-radius: 50px;
    border: 1px solid #ddd;
    width: 100%;
}

.mega-dropdown-menu .search-box i {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

/* Sub-exam list styling */
.sub-menu-exam {
    list-style: none;
    padding-left: 20px;
    margin-top: 2px;
}

.sub-exam-item a {
    font-size: 0.9em;
    color: #5a6268;
}

.sub-exam-item a:hover {
    color: #007bff;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumb {
    background: var(--light);
    padding: 12px 20px;
    border-radius: 8px;
}

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

.breadcrumb-item a {
    color: #007bff;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* ============================================================
   HERO SECTIONS
   ============================================================ */
/* Generic Hero */
.hero-section {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    padding: 40px;
    margin-bottom: 30px;
}

.worksheet-hero {
    background: #ffffff;
    border-radius: 18px;
    padding: 32px 24px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

/* Gradient Heroes */
.practice-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 18px;
    padding: 50px;
    margin-bottom: 40px;
    text-align: center;
}

.category-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 18px;
    padding: 40px;
    margin-bottom: 30px;
}

.topic-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 18px;
    padding: 40px;
    margin-bottom: 30px;
}

.hero-description {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 18px;
    padding: 40px;
    margin-bottom: 30px;
}

/* ============================================================
   STAT BOXES
   ============================================================ */
.stat-box {
    text-align: center;
    padding: 20px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    margin: 10px 0;
    backdrop-filter: blur(5px);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.stats-number {
    font-size: 2rem;
    font-weight: bold;
}

/* ============================================================
   WORKSHEET COMPONENTS
   ============================================================ */
.worksheet-meta {
    color: #6c757d;
    font-size: 0.98rem;
}

.worksheet-card {
    margin-bottom: 30px;
    box-shadow: 1px 3px 7px #cbe3fc27;
    border-radius: 15px;
    border: 0;
}

.card-body .btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
}

/* ============================================================
   DIFFICULTY BADGES (COMPLETE)
   ============================================================ */
.difficulty-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.difficulty-absolute-beginner {
    background: #e8f4f8;
    color: #0c5460;
}

.difficulty-beginner {
    background: #d4edda;
    color: #155724;
}

.difficulty-beginner-intermediate {
    background: #d1ecf1;
    color: #0c5460;
}

.difficulty-intermediate {
    background: #fff3cd;
    color: #856404;
}

.difficulty-intermediate-advanced {
    background: #ffe0b2;
    color: #e65100;
}

.difficulty-advanced {
    background: #f8d7da;
    color: #721c24;
}

.difficulty-expert {
    background: #e2d5f5;
    color: #4a1d6d;
}

/* Legacy difficulty badges */
.difficulty-badge.beginner,
.badge-beginner {
    background-color: #28a745;
    color: #fff;
}

.difficulty-badge.intermediate,
.badge-intermediate {
    background-color: #ffc107;
    color: #343a40;
}

.difficulty-badge.advanced,
.badge-advanced {
    background-color: #dc3545;
    color: #fff;
}

/* Problem Type Badge */
.problem-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #e8f4f8;
    color: #0c5460;
    margin-left: 10px;
}

/* Badge difficulty variants */
.badge-difficulty {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 12px;
}

/* ============================================================
   LEARNING & INFO CARDS
   ============================================================ */
.learning-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin: 15px 0;
}

.learning-card ul {
    margin-bottom: 0;
}

/* Tip Cards */
.tip-card {
    background: linear-gradient(135deg, #e8f4f8 0%, #d4eaf1 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.shortcut-card {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe8a3 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.mistake-card {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Step Cards */
.step-card {
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
    transition: transform 0.2s;
    background: white;
    border-radius: 8px;
}

.step-card:hover {
    transform: translateX(5px);
}

/* Example Card */
.example-card {
    background: #f0f4ff;
    border-left: 4px solid var(--primary);
}

/* ============================================================
   BUTTONS & OPTIONS
   ============================================================ */
.option-btn {
    margin-bottom: 9px;
    font-size: 1.05em!important;
    text-align: left;
    width: 100%;
    padding-left: 20px;
}

.btn-group-vertical {
    max-width: 100%;
    display: flex;
    align-items: stretch;
}

/* Worksheet Buttons */
.worksheet-btn {
    margin: 5px;
    transition: all 0.2s;
    text-align: left;
}

.worksheet-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Related Links */
.related-link {
    text-decoration: none;
    transition: all 0.2s;
}

.related-link:hover {
    transform: translateX(5px);
    color: var(--primary) !important;
}

/* ============================================================
   EXPLANATION & SOLUTION STYLES
   ============================================================ */
.explanation {
    background: #f1f7ff;
    border-radius: 7px;
    border-left: 4px solid #b2d8ea;
    padding: 15px 22px;
    margin-top: 10px;
    font-size: 1.03em;
    line-height: 1.6;
}

/* ============================================================
   PROGRESS SECTION
   ============================================================ */
.progress-section {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

/* ============================================================
   SERIES NAVIGATION
   ============================================================ */
.series-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    flex-wrap: wrap;
    gap: 15px;
}

/* ============================================================
   TABLE OF CONTENTS
   ============================================================ */
.table-of-contents {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.table-of-contents a {
    text-decoration: none;
    display: block;
    padding: 5px 0;
}

.table-of-contents a:hover {
    color: var(--primary);
}

/* ============================================================
   PREREQUISITE BADGES
   ============================================================ */
.prerequisite-badge {
    background: #e9ecef;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 3px;
    display: inline-block;
}

/* ============================================================
   COLOR UTILITIES
   ============================================================ */
.text-purple {
    color: #6f42c1 !important;
}

.bg-purple {
    background-color: #6f42c1 !important;
}

.btn-outline-purple {
    color: #6f42c1;
    border-color: #6f42c1;
}

.btn-outline-purple:hover {
    background-color: #6f42c1;
    color: white;
}

.bg-purple.bg-opacity-10 {
    background-color: rgba(111, 66, 193, 0.1);
}

.bg-primary.bg-opacity-15 {
    background-color: rgba(13, 110, 253, 0.15);
}

.bg-success.bg-opacity-15 {
    background-color: rgba(25, 135, 84, 0.15);
}

.bg-warning.bg-opacity-15 {
    background-color: rgba(255, 193, 7, 0.15);
}

.bg-purple.bg-opacity-15 {
    background-color: rgba(111, 66, 193, 0.15);
}

/* ============================================================
   CATEGORY & TOPIC CARDS
   ============================================================ */
.category-card {
    transition: transform 0.3s;
    height: 100%;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* Topic Cards */
.topic-card {
    transition: transform 0.3s;
    height: 100%;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.topic-stats {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 8px;
}

/* Problem Type Cards */
.problem-type-card {
    transition: transform 0.2s;
    height: 100%;
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.problem-type-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* ============================================================
   PROBLEM TYPE LIST
   ============================================================ */
.problem-type-list {
    list-style: none;
    padding-left: 0;
    max-height: 500px;
    overflow-y: auto;
}

.problem-type-list li {
    margin-bottom: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.2s;
}

.problem-type-list li:hover {
    background: #f8f9fa;
}

.problem-type-list a {
    text-decoration: none;
    color: #495057;
    display: block;
}

.problem-type-list a:hover {
    color: #007bff;
}

.badge-problem-count {
    background: #e9ecef;
    color: #495057;
    font-size: 0.7rem;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 12px;
}

/* Topic List (for practice hub) */
.topic-list {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

.topic-list li {
    margin-bottom: 8px;
}

.topic-list a {
    text-decoration: none;
    color: #495057;
}

.topic-list a:hover {
    color: #007bff;
}

/* ============================================================
   DIFFICULTY METER
   ============================================================ */
.difficulty-meter {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin: 10px 0;
}

.difficulty-fill {
    height: 100%;
    border-radius: 2px;
}

.difficulty-fill.bg-success {
    background-color: #28a745;
}

.difficulty-fill.bg-warning {
    background-color: #ffc107;
}

.difficulty-fill.bg-danger {
    background-color: #dc3545;
}

/* ============================================================
   WORKSHEET LINKS
   ============================================================ */
.worksheet-link {
    font-family: monospace;
    font-size: 0.85rem;
    margin-right: 8px;
}

.worksheet-links {
    margin-top: 12px;
}

/* ============================================================
   RESOURCE ICONS
   ============================================================ */
.resource-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* ============================================================
   PDF CARDS
   ============================================================ */
.pdf-card {
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.pdf-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ============================================================
   HOW-TO CARDS
   ============================================================ */
.how-to-card {
    transition: transform 0.3s ease;
}

.how-to-card:hover {
    transform: translateY(-5px);
}

/* ============================================================
   TAG & FOOTER STYLES
   ============================================================ */
.tags-footer {
    font-size: 0.9em;
    color: #888;
    background: #fbfcfe;
    border-top: 1px solid #eef2f6;
}

.tags-footer .fa {
    color: #6cb2e3;
}

/* ============================================================
   AD PLACEHOLDER
   ============================================================ */
.ad-placeholder {
    background: #fff8e1;
    border: 1px dashed #e0b84f;
    color: #7a5a00;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin: 24px 0;
}

/* ============================================================
   SEARCH BOX (Main Content)
   ============================================================ */
.content-search-box {
    position: relative;
    margin-bottom: 20px;
}

.content-search-box input {
    padding-left: 40px;
    border-radius: 50px;
    border: 1px solid #ddd;
    width: 100%;
    max-width: 500px;
}

.content-search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #777;
}

/* ============================================================
   CONTENT GRID & SECTIONS
   ============================================================ */
.section-header {
    color: var(--primary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    font-size: 2rem;
    font-weight: bold;
}

.section-header i {
    margin-right: 15px;
    color: var(--secondary);
}

.content-category-section {
    margin-bottom: 40px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background-color: #fefefe;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.content-category-section h2 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.content-category-section h2 i {
    margin-right: 10px;
    color: var(--secondary);
}

.content-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
}

.content-column {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    background-color: #fdfdfd;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid #f0f0f0;
}

.content-column h3 {
    color: var(--secondary);
    font-size: 1.25rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.content-column h3 i {
    margin-right: 10px;
    color: var(--accent);
}

.content-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.content-column li {
    margin-bottom: 10px;
}

.content-column li a {
    color: #444;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: color 0.2s, transform 0.2s;
}

.content-column li a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.content-column li a i {
    margin-right: 10px;
    color: #777;
}
/* Hero sections - keeping first style's clean white approach but adding gradient option */
  .worksheet-hero { 
    background: #ffffff; 
    border-radius: 18px; 
    padding: 32px 24px; 
    box-shadow: 0 4px 18px rgba(0,0,0,0.06); 
  }
  
  .hero-section { 
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); 
    color: white; 
    padding: 40px; 
    margin-bottom: 30px; 
  }
  
  /* Badges from first style - more colorful */
  .problem-type-badge { 
    display: inline-block; 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    font-weight: 600; 
    background: #e8f4f8; 
    color: #0c5460; 
    margin-left: 10px; 
  }
  
  .difficulty-badge { 
    display: inline-block; 
    padding: 4px 12px; 
    border-radius: 20px; 
    font-size: 0.8rem; 
    font-weight: 600; 
    margin-left: 10px; 
  }
  
  .difficulty-absolute-beginner { background: #e8f4f8; color: #0c5460; }
  .difficulty-beginner { background: #d4edda; color: #155724; }
  .difficulty-beginner-intermediate { background: #d1ecf1; color: #0c5460; }
  .difficulty-intermediate { background: #fff3cd; color: #856404; }
  .difficulty-intermediate-advanced { background: #ffe0b2; color: #e65100; }
  .difficulty-advanced { background: #f8d7da; color: #721c24; }
  .difficulty-expert { background: #e2d5f5; color: #4a1d6d; }
  
  /* Cards - first style's approach */
  .learning-card { 
    background: #f8f9fa; 
    border-radius: 12px; 
    padding: 15px; 
    margin: 15px 0; 
  }
  
  .worksheet-card { 
    margin-bottom: 30px; 
    box-shadow: 1px 3px 7px #cbe3fc27; 
    border-radius: 15px; 
    border: 0; 
  }
  
  /* Step cards with first style's color accents */
  .step-card { 
    margin-bottom: 20px; 
    border-left: 4px solid var(--primary); 
    transition: transform 0.2s; 
    background: white; 
    border-radius: 8px; 
  }
  .step-card:hover { transform: translateX(5px); }
  
  /* Tip/Mistake cards using first style's color palette */
  .tip-card { 
    background: #e8f4f8; 
    border-radius: 12px; 
    padding: 20px; 
    margin-bottom: 20px; 
  }
  
  .shortcut-card { 
    background: #fff3cd; 
    border-radius: 12px; 
    padding: 20px; 
    margin-bottom: 20px; 
  }
  
  .mistake-card { 
    background: #f8d7da; 
    border-radius: 12px; 
    padding: 20px; 
    margin-bottom: 20px; 
  }
  
  /* Buttons from first style */
  .option-btn { 
    margin-bottom: 9px; 
    font-size: 1.05em; 
    text-align: left; 
    width: 100%; 
    padding-left: 20px; 
  }
  
  .worksheet-btn { 
    margin: 5px; 
    transition: all 0.2s; 
    text-align: left; 
  }
  .worksheet-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1); 
  }
  
  /* Explanation from first style */
  .explanation { 
    background: #f1f7ff; 
    border-radius: 7px; 
    border-left: 4px solid #b2d8ea; 
    padding: 15px 22px; 
    margin-top: 10px; 
    font-size: 1.03em; 
    line-height: 1.6; 
  }
  
  /* Progress and navigation from first style */
  .progress-section { 
    background: white; 
    border-radius: 12px; 
    padding: 15px; 
    margin: 20px 0; 
    text-align: center; 
  }
  
  .series-nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin: 20px 0; 
    flex-wrap: wrap; 
    gap: 15px; 
  }
  
  /* Stats with first style's color scheme */

  .stat-number { 
    font-size: 2rem; 
    font-weight: bold; 
    display: block; 
    color: var(--primary);
  }
  .stat-label { 
    font-size: 0.9rem; 
    opacity: 0.9; 
    color: var(--primary);
  }
  
  /* Links and navigation */
  .related-link { 
    text-decoration: none; 
    transition: all 0.2s; 
  }
  .related-link:hover { 
    transform: translateX(5px); 
    color: var(--primary) !important; 
  }
  
  .breadcrumb a { 
    text-decoration: none; 
  }
  
  /* Table of contents */
  .table-of-contents { 
    background: #f8f9fa; 
    border-radius: 12px; 
    padding: 20px; 
    margin-bottom: 30px; 
  }
  .table-of-contents a { 
    text-decoration: none; 
    display: block; 
    padding: 5px 0; 
  }
  .table-of-contents a:hover { 
    color: var(--primary); 
  }
  
  /* Prerequisites badge */
  .prerequisite-badge { 
    background: #e9ecef; 
    padding: 5px 12px; 
    border-radius: 20px; 
    font-size: 0.85rem; 
    margin: 3px; 
    display: inline-block; 
  }
  
  /* Example card */
  .example-card { 
    background: #f0f4ff; 
    border-left: 4px solid var(--primary); 
  }
  
  /* Responsive */
  @media (max-width: 768px) { 
    .hero-section { 
      padding: 20px; 
    } 
    .stat-number { 
      font-size: 1.5rem; 
    } 
  }

.card-text {
    white-space: pre-wrap;
    font-family: inherit;
}

.dot-situation-question svg {
    max-width: 100%;
    height: auto;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px auto;
    display: block;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.answer-figures svg {
    max-width: 180px;
    height: auto;
}
.question-figure svg {
    max-width: 250px;
    height: auto;
}

.embedded-figures-question svg {
    max-width: 100%;
    height: auto;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px auto;
    display: block;
}
.embedded-figures-question .question-figure svg {
    max-width: 250px;
}
.embedded-figures-question .answer-figures svg {
    max-width: 140px;
}
/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */
/* Tablet and below (max-width: 991.98px) */
@media (max-width: 991.98px) {
    .mega-dropdown .dropdown-menu {
        position: relative;
        width: auto;
        box-shadow: none;
        border-top: none;
        padding: 15px;
        margin-top: .5rem;
        border-radius: .375rem;
        left: auto;
        right: auto;
        top: auto;
        display: block;
    }
    
    .mega-menu-columns-container {
        flex-direction: column;
        gap: 0;
    }
    
    .mega-menu-column {
        min-width: unset;
        max-width: unset;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        padding: 15px 0;
    }
    
    .mega-menu-column:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        margin: 0;
        text-align: left;
    }
    
    .navbar-collapse {
        overflow-y: auto;
        max-height: 80vh;
    }
    
    .mega-dropdown-menu .search-box {
        padding: 0;
    }
    
    .hero-section,
    .worksheet-hero {
        padding: 20px;
    }
    
    .practice-hero,
    .category-hero,
    .topic-hero,
    .hero-description {
        padding: 20px;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .display-4, .display-5, .display-6 {
        font-size: 1.75rem;
    }
    
    .content-column {
        max-width: 100%;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .practice-hero,
    .category-hero,
    .topic-hero,
    .hero-description {
        padding: 20px;
    }
}

/* ============================================================
   PRINT STYLES (for PDF generation reference)
   ============================================================ */
@media print {
    .reasoning-navbar,
    footer,
    .ad-placeholder,
    .btn-group-vertical .option-btn {
        display: none;
    }
    
    body {
        background: white;
        font-size: 10pt;
    }
    
    .worksheet-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .explanation {
        background: #f5f5f5;
        border-left: 2px solid #ccc;
    }
}