/* Mobile Navigation Dropdown Styles */
.mobile-nav-dropdown {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                opacity 0.3s ease-out,
                visibility 0.3s ease-out;
    pointer-events: none;
}

.mobile-nav-dropdown.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.mobile-nav-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    transition: backdrop-filter 0.4s ease-out;
}

.mobile-nav-dropdown.active .mobile-nav-backdrop {
    backdrop-filter: blur(8px);
}

.mobile-nav-content {
    position: absolute;
    top: 60px;
    right: 0;
    width: 280px;
    max-width: 90vw;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border-radius: 0 0 0 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(73, 160, 120, 0.2);
    transform: translateX(100%) scale(0.95);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                box-shadow 0.3s ease-out;
    will-change: transform;
}

.mobile-nav-dropdown.active .mobile-nav-content {
    transform: translateX(0) scale(1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #49A078, #3e8865);
    color: white;
    border-radius: 0;
}

.mobile-nav-title {
    font-weight: 700;
    font-size: 1rem;
}

.mobile-nav-close {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.mobile-nav-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.mobile-nav-links {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    color: #1f2937;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                background 0.3s ease-out;
    font-weight: 500;
    position: relative;
    transform: translateX(30px);
    opacity: 0;
    overflow: hidden;
}

.mobile-nav-dropdown.active .mobile-nav-link {
    transform: translateX(0);
    opacity: 1;
}

.mobile-nav-dropdown.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-nav-dropdown.active .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-nav-dropdown.active .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
.mobile-nav-dropdown.active .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
.mobile-nav-dropdown.active .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }

.mobile-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(73, 160, 120, 0.1), transparent);
    transition: left 0.6s ease-in-out;
}

.mobile-nav-link:hover::before {
    left: 100%;
}

.mobile-nav-link:hover {
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #1f2937;
    transform: translateX(8px) scale(1.02);
    border-radius: 0.5rem;
    margin: 0 0.5rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

.mobile-nav-link:active {
    transform: translateX(4px) scale(0.98);
    transition: all 0.1s ease-out;
}

.mobile-nav-link i {
    font-size: 1.125rem;
    width: 1.25rem;
    text-align: center;
    color: #49A078;
    transition: all 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
}

.mobile-nav-link:hover i {
    color: #1f2937;
    transform: scale(1.2) rotate(5deg);
}

.mobile-nav-link span {
    flex: 1;
}

.mobile-nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    margin: 0.5rem 1.25rem;
}

/* Floating navigation button (replaces home button on mobile) */
#floatingHomeBtn {
    position: fixed;
    bottom: 130px;
    right: 6px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #49A078, #3e8865);
    color: white;
    border: none;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1),
                transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease-out,
                background 0.4s ease-in-out;
    will-change: transform, background, box-shadow;
}

#floatingHomeBtn:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #facc15, #f59e0b);
    color: #1f2937;
}

#floatingHomeBtn:active {
    transform: scale(0.95) translateY(1px);
    transition: all 0.1s ease-out;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to-br, #f0fdfa, #d9f99d);
    height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Universal responsive utilities */
*, *::before, *::after {
    box-sizing: border-box;
}

img, video, canvas, audio, iframe, embed, object {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Prevent any body scrolling - containers handle their own */
html {
    overflow: hidden;
    height: 100vh;
}

/* Navigation feedback styles - Match Computer Literacy */
.nav-feedback {
    position: fixed;
    top: 20px;
    transform: none;
    background: rgba(73, 160, 120, 0.9);
    color: rgba(255, 255, 255, 0.8);
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: normal;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 3px;
    max-width: 60px;
    text-align: center;
}

.nav-feedback.show {
    opacity: 1;
}

.nav-feedback.left {
    left: 10px;
}

.nav-feedback.right {
    right: 10px;
}

.nav-feedback i {
    font-size: 10px;
}

#nav-feedback-left {
    left: 10px;
}

#nav-feedback-right {
    right: 10px;
}

/* Mobile responsive navigation feedback */
@media (max-width: 768px) {
    .nav-feedback {
        font-size: 9px;
        padding: 2px 5px;
        top: 15px;
        max-width: 50px;
    }
    
    .nav-feedback i {
        font-size: 9px;
    }
    
    .nav-feedback.left {
        left: 8px;
    }
    
    .nav-feedback.right {
        right: 8px;
    }
    
    /* Make floating button visible and properly positioned on mobile */
    #floatingHomeBtn {
        display: flex !important;
        bottom: 120px !important;
        right: 20px !important;
        position: fixed !important;
        z-index: 1000 !important;
        background: rgba(73, 160, 120, 0.7) !important;
        backdrop-filter: blur(8px) !important;
        opacity: 0.8 !important;
    }
    
    /* Footer responsive styles */
    .footer {
        padding: 0 !important; /* Remove footer padding */
    }
    
    .footer .container { 
        flex-wrap: wrap !important; 
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 0 !important; /* Remove all padding */
        margin: 0 !important; /* Remove all margin */
        max-width: 100% !important; /* Full width */
    }
    
    /* Hide social links and copyright on mobile - only show logo + name */
    .footer-socials {
        display: none !important;
    }
    
    .footer-copyright {
        display: none !important;
    }
    
    /* Keep only the logo and name visible on mobile - absolute left position */
    .footer-logo {
        width: auto !important;
        justify-content: flex-start !important;
        text-align: left !important;
        gap: 0.25rem !important;
        margin: 0 !important; /* Remove all margins */
        padding: 0 !important; /* Remove all padding */
        flex-shrink: 0 !important;
        position: relative !important;
        left: 0 !important; /* Force to absolute left */
    }
    
    .footer-logo span {
        margin: 0 !important; /* Remove all margins */
        padding: 0 !important; /* Remove all padding */
    }
    
    .footer-logo img {
        margin: 0 !important; /* Remove all margins */
        padding: 0 !important; /* Remove all padding */
    }
    
    .footer-home-link:hover { 
        background: #49A078 !important; 
        color: #fff !important; 
    }
}

/* Extra small screens - closer spacing */
@media (max-width: 480px) {
    /* Header responsive height approach */
    nav {
        padding: 0.75rem 0.5rem !important;
        min-height: 60px !important;
        height: auto !important;
    }
    
    nav .container {
        gap: 0.5rem !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-wrap: wrap !important;
        align-items: center !important;
    }
    
    /* Logo and text container - allow natural sizing */
    nav .container > div:first-child {
        flex-shrink: 1 !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.5rem !important;
    }
    
    /* Logo image - reasonable size */
    nav .container > div:first-child img {
        width: 40px !important;
        height: 40px !important;
        flex-shrink: 0 !important;
    }
    
    /* Header title text - allow wrapping if needed */
    nav .container > div:first-child span {
        font-size: 1rem !important;
        line-height: 1.3 !important;
        flex-shrink: 1 !important;
        min-width: 0 !important;
        word-wrap: break-word !important;
    }
    
    /* Hamburger button - normal size */
    .hamburger {
        padding: 0.5rem !important;
        font-size: 1.25rem !important;
        flex-shrink: 0 !important;
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    /* Adjust layout to account for dynamic header */
    .layout {
        margin-top: 80px !important;
        margin-bottom: 50px !important;
        height: calc(100vh - 130px) !important;
    }
    
    /* Hide slogan completely on very small screens to save space */
    .slogan-container {
        display: none !important;
    }
    
    #floatingHomeBtn {
        bottom: 110px !important;
        right: 15px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 1.3rem !important;
    }
}

/* Desktop - hide floating button, show socials */
@media (min-width: 769px) {
    #floatingHomeBtn {
        display: none !important;
    }
    
    /* Show social links and copyright on desktop */
    .footer-socials {
        display: flex !important;
    }
    
    .footer-copyright {
        display: block !important;
    }
    
    .footer-logo {
        width: auto !important;
        justify-content: flex-start !important;
    }
}.layout {
    display: flex;
    flex: 1;
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.125rem;
    margin-top: 60px;
    margin-bottom: 50px;
    height: calc(100vh - 110px);
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #49A078, #3e8865);
    color: white;
    padding: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 0.125rem 0;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #facc15 #3e8865;
    border-radius: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) and (orientation: landscape) {
    .slide-container-wrapper {
        padding-bottom: 200px !important;
    }
    #chatButton {
        bottom: 250px !important;
        z-index: 60 !important;
    }
    #chatWidget {
        bottom: 270px !important;
        z-index: 60 !important;
    }
    .navigation {
        bottom: -50px !important;
    }
}

@media (min-width: 769px) {
    .sidebar {
        overflow-y: auto;
        overflow-x: hidden;
        scrollbar-width: thin;
        scrollbar-color: #facc15 #3e8865;
        border-radius: 0;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Ensure body stays locked to prevent full-page scrolling */
    body {
        overflow: hidden;
    }
    
    html {
        overflow: hidden;
    }
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #3e8865;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #facc15;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.module-toggle {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    color: #fffbe6;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.module-toggle.hidden {
    display: none;
}

.module-toggle:hover {
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
}

.module-toggle:not(.collapsed) {
    background: rgba(250, 204, 21, 0.2);
    color: #facc15;
}

.module-toggle .fa-chevron-down {
    transition: transform 0.2s;
}

.module-toggle.collapsed .fa-chevron-down {
    transform: rotate(-90deg);
}

.module-slides {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
}

.module-slides.open {
    display: flex;
}

.sidebar-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    transition: background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.sidebar-item:hover {
    background: rgba(250, 204, 21, 0.2);
}

.sidebar-link {
    color: #b45309;
    background: #fffbe6;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    transition: background 0.3s, color 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(250,204,21,0.08);
    cursor: pointer;
    text-decoration: none;
}

.sidebar-link.active,
.sidebar-item.active .sidebar-link {
    color: #facc15;
    font-weight: 800;
    background: rgba(250, 204, 21, 0.2);
}

.sidebar-link:hover, .sidebar-link:focus {
    color: #256d4f;
    background: #facc15;
    text-decoration: none;
    outline: none;
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(250,204,21,0.3);
}

.sidebar-item .slide-number {
    font-weight: bold;
    color: inherit;
    width: 2rem;
    text-align: right;
    margin-right: 0.5rem;
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.9rem;
    color: #e5e7eb;
}

/* Main Content */
.main-content {
    flex: 1;
    background: linear-gradient(145deg, #ffffff, #f1f5f9);
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
}

.max-w-5xl {
    width: 100%;
    max-width: 1280px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.slide-number-display {
    font-size: 1rem;
    font-weight: 600;
    color: #256d4f;
    background: #fffbe6;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin: 0 auto;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 500px;
    box-sizing: border-box;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-container-wrapper {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    flex: 1;
    position: relative;
    overflow: hidden;
}

.slide {
    width: 90%;
    max-width: 800px;
    background: linear-gradient(135deg, #ffffff, #e6fffa);
    border: 1px solid #e5e7eb;
    padding: 2rem;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    box-sizing: border-box;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.slide:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    transform: scale(1.01);
}

.slide.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.slide:not(.active) {
    opacity: 0;
    transform: translateY(20px);
}

.slide-content {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
    position: relative;
    z-index: 5;
    padding: 1.5rem;
    box-sizing: border-box;
}

.slide-content h2 {
    color: #256d4f;
    font-weight: 800;
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    transition: color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
}

.slide-content h2:hover {
    color: #facc15;
}

.slide-content p {
    color: #374151;
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    max-width: 700px;
}

.slide-content li {
    color: #374151;
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0;
}

.slide-content ul, 
.slide-content ol {
    text-align: left;
    max-width: 700px;
    margin: 1.5rem 0;
    padding-left: 1.5rem;
}

.slide-content .highlight-list li {
    background: #f3f4f6;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid #49A078;
}

.slide-content .text-lg {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
}

.navigation {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    box-sizing: border-box;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    z-index: 10;
}

.nav-btn {
    background: #49A078;
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 100px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    outline: none;
    border: none;
    cursor: pointer;
}

.nav-btn:focus {
    outline: none !important;
    box-shadow: none !important;
}

.nav-btn:hover {
    background: #facc15;
    color: #256d4f;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.nav-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    box-shadow: none;
}

.nav-btn[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%);
    background: #256d4f;
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 20;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-btn[data-tip]:hover::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 100%;
    transform: translateX(-50%) translateY(5px);
    border: 5px solid transparent;
    border-top-color: #256d4f;
    z-index: 20;
}

.highlight-list {
    list-style: decimal;
    list-style-position: outside;
    padding-left: 2rem;
    width: 100%;
    max-width: 600px;
    margin: 1rem auto;
    text-align: left;
}

.highlight-list li {
    color: #222;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    font-weight: 500;
}

.highlight-list li:hover {
    background: #fffbe6;
    color: #256d4f;
    transform: scale(1.02);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.ai-slide-block {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ai-action-box {
    background: #fffbe6;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
}

.ai-action-box:hover {
    background: #facc15;
    color: #256d4f;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.good-prompt {
    color: #059669;
    font-weight: 600;
}

.bad-prompt {
    color: #dc2626;
    font-weight: 600;
}

nav {
    background: #49A078;
    color: white;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    min-height: 60px;
    height: auto;
    display: flex;
    align-items: center;
}

nav .container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.slogan-container {
    flex: 1 1 0%;
    position: relative;
    overflow: hidden;
    min-width: 0;
    height: 2rem;
    display: flex;
    align-items: center;
}

.slogan-marquee-track {
    display: flex;
    width: max-content;
    position: absolute;
    left: 0; /* anchor left to avoid right-side clipping */
    top: 0;
    height: 100%;
    animation: marquee-loop 12s linear infinite;
    max-width: 100%;
    overflow: hidden;
}

.slogan-marquee {
    white-space: nowrap;
    color: #facc15;
    font-weight: bold;
    font-size: 1rem;
    display: inline-block;
    padding-right: 3rem;
}

@keyframes marquee-loop {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.hamburger {
    display: none;
    font-size: 1.25rem;
    cursor: pointer;
    background: #49A078;
    border: none;
    color: white;
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}

.footer {
    background: #DFF3EA;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: 50px;
    min-height: 50px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.footer .container {
    max-width: 1200px;
    margin: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    overflow: hidden;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.footer-socials {
    display: flex;
    gap: 0.75rem;
    margin: 0;
    flex-shrink: 0;
}

.footer-link {
    color: #49A078;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    white-space: nowrap;
}

.footer-link:hover {
    color: #3e8865;
}

.footer-copyright {
    font-size: 0.95rem;
    color: #256d4f;
    text-align: right;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#chatButton {
    bottom: 60px;
    right: 6px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#chatWidget {
    bottom: 80px;
    right: 6px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.demo-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: #f1f5f9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.demo-table th, .demo-table td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
}

.quiz-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.quiz-option {
    background: #f1f5f9;
    padding: 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.quiz-option:hover {
    background: #fffbe6;
    color: #256d4f;
    transform: scale(1.02);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.quiz-option.correct {
    background: #059669;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.quiz-option.wrong {
    background: #dc2626;
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.quiz-feedback {
    display: none;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.25rem;
    background: #f1f5f9;
}

@media (min-width: 769px) {
    .sidebar {
        display: block;
    }
    .layout {
        flex-direction: row;
        margin-top: 60px;
        margin-bottom: 50px;
        height: calc(100vh - 110px);
    }
    .main-content {
        padding: 1rem;
        overflow: hidden;
    }
    .slide-container-wrapper {
        max-width: 1200px;
        height: 100%;
        overflow: hidden;
    }
    .slide {
        max-width: 800px;
        padding: 2rem;
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }
    .navigation {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        flex-direction: column;
        width: 120px;
        z-index: 10;
    }
    .nav-btn {
        width: 100%;
        padding: 0.75rem;
    }
    .footer {
        height: 50px;
    }
    
    /* Lock body and html from scrolling on desktop */
    body, html {
        overflow: hidden;
        height: 100vh;
    }
}

/* Main Mobile Responsive Section - Exact Computer Literacy Implementation */
@media (max-width: 768px) {
    /* Allow mobile scrolling by overriding desktop lock */
    body, html {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        height: auto !important;
    }
    
    /* Dynamic header height approach for mobile */
    nav {
        height: auto !important;
        min-height: 60px !important;
    }
    
    nav .container {
        flex-wrap: wrap !important;
    }
    
    /* Adjust layout for dynamic header */
    .layout {
        margin-top: 80px !important;
        margin-bottom: 50px !important;
        height: calc(100vh - 130px) !important;
    }
    
    .sidebar {
        display: none !important;
    }
    .sidebar.active {
        display: block !important;
        position: fixed;
        left: 0;
        top: 60px;
        width: 280px;
        height: calc(100vh - 60px);
        z-index: 1000;
        background: rgba(73, 160, 120, 0.95);
        backdrop-filter: blur(10px);
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        border-right: 1px solid rgba(255, 255, 255, 0.2);
    }
    .main-content, .max-w-5xl, .max-w-4xl, .slide-container-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        min-height: 0 !important;
        height: calc(100vh - 110px) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: stretch !important;
        align-items: stretch !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    .slide-number-display {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        width: calc(100% - 2rem) !important;
        max-width: calc(100% - 2rem) !important;
        margin: 0 1rem !important;
        height: auto !important;
        min-height: 40px !important;
        padding: 0.75rem 1rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1rem !important;
        background: #fffbe6 !important;
        border-radius: 0.375rem !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
        z-index: 2 !important;
        text-align: center !important;
        line-height: 1.4 !important;
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: normal !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        box-sizing: border-box !important;
        flex-shrink: 0 !important;
        border: 1px solid rgba(37, 109, 79, 0.1) !important;
    }

    .slide-number-display.hidden {
        display: none !important;
    }
    .slide {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1.2rem 0.5rem 1.2rem 0.5rem !important;
        height: auto !important;
        max-height: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        flex: 1 1 auto !important;
        background: linear-gradient(135deg, #ffffff, #e6fffa) !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        margin: 0 !important;
        box-sizing: border-box !important;
    }
    .slide-content {
        padding: 1rem !important;
        max-width: 100% !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: flex-start !important;
        text-align: center !important;
        gap: 1.5rem !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        box-sizing: border-box !important;
    }
    .slide-content h2 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        line-height: 1.3 !important;
        text-align: center !important;
        max-width: 100% !important;
    }
    .slide-content p {
        font-size: 1.1rem !important;
        line-height: 1.7 !important;
        margin-bottom: 1rem !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Mobile responsive fixes for content elements */
    .slide-content li {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        margin-bottom: 0.5rem !important;
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Navigation responsive styles to match Computer Literacy */
    .navigation {
        position: relative !important;
        bottom: 0 !important;
        top: auto !important;
        transform: none !important;
        left: 0 !important;
        right: 0 !important;
        flex-direction: row !important;
        gap: 1rem !important;
        width: 100% !important;
        padding: 0.5rem 0 !important;
        justify-content: center !important;
        align-items: center !important;
        background: transparent !important;
        box-shadow: none !important;
        z-index: 2 !important;
        box-sizing: border-box !important;
    }
    .nav-btn {
        width: 30% !important;
        min-width: 100px !important;
        max-width: 180px !important;
        padding: 0.7rem !important;
        font-size: 1.1rem !important;
        border-radius: 0.5rem !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        background: #49A078 !important;
        color: white !important;
        font-weight: 600 !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
        border: none !important;
        cursor: pointer !important;
        transition: all 0.3s ease !important;
    }
    
    .highlight-list {
        padding-left: 1.25rem !important;
        margin: 0.75rem 0 !important;
        max-width: 100% !important;
    }
    
    .highlight-list li {
        font-size: 0.95rem !important;
        padding-left: 0.25rem !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.5 !important;
    }
    
    .demo-table {
        font-size: 0.8rem !important;
        margin: 0.75rem 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        display: block !important;
        white-space: nowrap !important;
    }
    
    .demo-table th, .demo-table td {
        padding: 0.4rem 0.25rem !important;
        font-size: 0.75rem !important;
        white-space: normal !important;
        word-break: break-word !important;
    }
    
    .quiz-container {
        gap: 0.5rem !important;
        max-width: 100% !important;
    }
    
    .quiz-option {
        padding: 0.5rem !important;
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .ai-action-box {
        padding: 0.75rem !important;
        font-size: 0.9rem !important;
        margin: 0.5rem 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Code blocks and pre elements */
    pre, code {
        font-size: 0.8rem !important;
        padding: 0.5rem !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        word-wrap: break-word !important;
        white-space: pre-wrap !important;
    }
    
    /* Images and media */
    img {
        max-width: 100% !important;
        height: auto !important;
        display: block !important;
        margin: 0 auto !important;
    }
    .navigation {
        position: static !important;
        bottom: 0 !important;
        top: auto !important;
        transform: none !important;
        left: 0 !important;
        right: 0 !important;
        flex-direction: row !important;
        gap: 0.25rem !important;
        width: 100% !important;
        padding: 0.5rem 0 !important;
        justify-content: center !important;
        align-items: center !important;
        background: transparent !important;
        box-shadow: none !important;
        z-index: 2 !important;
        box-sizing: border-box !important;
        margin-top: 0.5rem !important;
    }
    .nav-btn {
        width: 65px !important;
        padding: 0.25rem !important;
        font-size: 0.75rem !important;
        min-width: 65px !important;
        max-width: 65px !important;
        border-radius: 0.5rem !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        background: #49A078 !important;
        color: white !important;
        font-weight: 600 !important;
        gap: 1rem !important;
        word-break: break-word !important;
    }
    .slide-content h2 {
        font-size: 1.3rem !important;
        margin-bottom: 0.5rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
    .slide-content p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.5rem !important;
    }
    .navigation {
        position: relative !important;
        bottom: 0 !important;
        top: auto !important;
        transform: none !important;
        left: 0 !important;
        right: 0 !important;
        flex-direction: row !important;
        gap: 1rem !important;
        width: 100% !important;
        padding: 0.5rem 0 !important;
        justify-content: flex-start !important;
        align-items: center !important;
        background: transparent !important;
        box-shadow: none !important;
        z-index: 2 !important;
    }
    .nav-btn {
        width: 30% !important;
        min-width: 100px !important;
        max-width: 180px !important;
        padding: 0.7rem !important;
        font-size: 1.1rem !important;
        border-radius: 0.5rem !important;
        margin: 0 !important;
        box-sizing: border-box !important;
        background: #49A078 !important;
        color: white !important;
        font-weight: 600 !important;
        box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
    }
    .footer {
        height: 50px !important;
        width: 100% !important;
        padding: 0.5rem !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 100 !important;
        background: #DFF3EA !important;
        border-top: 1px solid rgba(0,0,0,0.1) !important;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.05) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .footer .container {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        align-items: center !important;
        padding: 0 0.5rem !important;
    }
    .footer-logo, .footer-socials, .footer-copyright {
        flex: 1 1 auto !important;
        text-align: center !important;
    }
    #chatButton {
        bottom: 60px !important;
    }
    #chatWidget {
        bottom: 80px !important;
    }
    .hamburger {
        display: block !important;
    }
    .nav-links {
        display: none !important;
    }
}

/* Medium screen tablet styles to match Computer Literacy */
@media (min-width: 769px) and (max-width: 1023px) {
    .slide {
        width: 95vw;
        max-width: calc(100vw - 2rem);
        padding: 0.25rem;
        height: auto;
        max-height: 100%;
        justify-content: flex-start;
        flex: 1 1 auto;
        box-sizing: border-box;
    }
    .slide-content {
        padding: 1.25rem;
        gap: 1.75rem;
    }
    .slide-content h2 {
        font-size: 2rem;
        margin-bottom: 1.25rem;
        line-height: 1.2;
    }
    .slide-content p {
        font-size: 1.125rem;
        line-height: 1.7;
        margin-bottom: 1.25rem;
    }
    .navigation {
        position: relative !important;
        bottom: auto !important;
        top: auto !important;
        transform: none !important;
        left: 0 !important;
        right: 0 !important;
        gap: 0.75rem !important;
        justify-content: center !important;
        z-index: 2 !important;
        flex-direction: row !important;
        width: 100% !important;
        padding: 0.5rem 0 !important;
        margin-top: 0.5rem !important;
    }
}

@media (max-width: 480px) {
    .slide-number-display {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }

    .slide-number-display.hidden {
        display: none !important;
    }
    .slide {
        width: 95vw;
        max-width: calc(100vw - 1rem);
        padding: 0.25rem;
        height: auto;
        max-height: 100%;
        justify-content: flex-start;
        flex: 1 1 auto;
        box-sizing: border-box;
    }
    .slide-content {
        padding: 0.25rem;
        gap: 0.75rem;
    }
    .slide-content h2 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }
    .slide-content p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }
    .navigation {
        position: fixed !important;
        bottom: 60px !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        transform: none !important;
        flex-direction: row !important;
        gap: 0.25rem !important;
        width: 100% !important;
        padding: 0.5rem 0 !important;
        justify-content: center !important;
        align-items: center !important;
        background: rgba(255, 255, 255, 0.9) !important;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1) !important;
        z-index: 1000 !important;
        backdrop-filter: blur(10px) !important;
    }
    .nav-btn {
        width: 28% !important;
        min-width: 80px !important;
        max-width: 120px !important;
        padding: 0.5rem 0.3rem !important;
        font-size: 0.8rem !important;
        background: #49A078 !important;
        color: white !important;
        border: none !important;
        cursor: pointer !important;
        border-radius: 0.5rem !important;
        font-weight: 600 !important;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        text-align: center !important;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
        position: relative !important;
        outline: none !important;
    }
    
    .nav-btn:hover {
        background: #facc15 !important;
        color: #256d4f !important;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
    }
    
    .nav-btn:focus {
        outline: none !important;
        box-shadow: none !important;
    }
    
    .nav-btn:disabled {
        background: #d1d5db !important;
        cursor: not-allowed !important;
        box-shadow: none !important;
    }
    .footer {
        padding: 0.3rem;
        font-size: 0.7rem;
    }
    .footer .container {
        gap: 0.3rem;
    }
    .main-content, .max-w-5xl, .slide-container-wrapper, .slide, .slide-content {
        padding: 0.05rem;
        min-height: 0;
        width: 100%;
        max-width: 100%;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) and (orientation: landscape) {
    .slide-container-wrapper {
        padding-bottom: 150px !important;
    }
    #chatButton {
        bottom: 200px !important;
        z-index: 60 !important;
    }
    #chatWidget {
        bottom: 220px !important;
        z-index: 60 !important;
    }
    .navigation {
        bottom: -40px !important;
    }
}

/* Hide tooltips on navigation buttons */
.nav-btn[data-tip]:hover::after {
    display: none;
}

.nav-btn[data-tip]:hover::before {
    display: none;
}

.navigation.hidden {
    display: none;
}

.slide-number-display.hidden {
    display: none;
}

/* Utility list-style classes: apply to existing .highlight-list elements
   - add class `seq` for ordered (1., 2., ...)
   - add class `bullet` for bullet markers
   - add class `asterisk` for asterisk (*) markers
   - add class `none` to remove markers entirely
   This keeps most slide HTML unchanged; authors can toggle marker style
   by changing the tag/class in the slide content (examples below).
*/
.highlight-list.seq {
    list-style-type: decimal !important;
}

.highlight-list.bullet {
    list-style-type: disc !important;
}

.highlight-list.none {
    list-style-type: none !important;
    padding-left: 0.5rem !important;
}

/* Asterisk style: use pseudo-element to insert a visible '*' before each item */
.highlight-list.asterisk {
    list-style: none !important;
    padding-left: 0.75rem !important;
}
.highlight-list.asterisk li {
    position: relative;
    padding-left: 1.25rem;
}
.highlight-list.asterisk li::before {
    content: "*";
    position: absolute;
    left: 0;
    color: #256d4f;
    font-weight: 700;
}

/* Diamond marker style */
.highlight-list.diamond {
    list-style: none !important;
    padding-left: 0.75rem !important;
}
.highlight-list.diamond li {
    position: relative;
    padding-left: 1.25rem;
}
.highlight-list.diamond li::before {
    content: "♦";
    position: absolute;
    left: 0;
    color: #256d4f;
    font-weight: 700;
}

/* Improve visibility for marker bullets when used */
.highlight-list.bullet li::marker {
    color: #256d4f;
    font-weight: 700;
}
.highlight-list.seq li::marker {
    color: #256d4f;
    font-weight: 700;
}

/* If code blocks are inside list items, ensure the list marker is visually suppressed
   when author wants no sequential number (use .none or .asterisk or .bullet as needed)
*/
.highlight-list.none li pre,
.highlight-list.none li code,
.highlight-list.asterisk li pre,
.highlight-list.asterisk li code,
.highlight-list.bullet li pre,
.highlight-list.bullet li code {
    margin: 0;
}

/* Examples for authors (apply in slide HTML or in the JS content strings):
   <ol class='highlight-list seq'>   <!-- sequential numbered list -->
   <ul class='highlight-list bullet'><!-- bullet list (use UL) -->
   <ol class='highlight-list asterisk'><!-- show * markers, tag can be OL or UL -->
   <ol class='highlight-list none'><!-- no markers, useful when code or custom layout should not show numbers -->
*/
/* Non-destructive overrides: hide numeric prefixes and make headings/code clearer */
.sidebar-item .slide-number {
    display: inline-block !important; /* reveal runtime module.slide numbering */
    min-width: 2.2em;
    text-align: right;
    margin-right: 0.6em;
    color: #256d4f;
    font-weight: 700;
}

/* Make slide headings underlined and slightly bolder for emphasis */
.slide-content h2 {
    font-weight: 800 !important;
    text-decoration: underline !important;
}

/* Ensure code/pre blocks do not inherit list numbering and are visually distinct */
.slide-content pre,
.slide-content code {
    display: block;
    background: #f8fafc;
    padding: 0.6rem;
    margin: 0.5rem 0;
    white-space: pre;
    font-family: "Courier New", Courier, monospace;
    color: #111827;
    border-radius: 6px;
    overflow-x: auto;
}

/* If code appears inside list items, remove the list marker and reset spacing */
.slide-content li pre,
.slide-content li code {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Make inline code inside highlight-list neutral so it doesn't look like a numbered item */
.highlight-list li pre,
.highlight-list li code {
    background: transparent;
    padding: 0.125rem 0.25rem;
}

/* Additional mobile styles - previously inline */
@media (max-width: 768px) {
    .slogan-container { 
        display: none !important; 
    }
}

/* Footer responsive styles - previously inline */
@media (max-width: 768px) {
    .footer .container { 
        flex-wrap: wrap !important; 
    }
    .footer-home-link {
        display: inline-block !important;
        font-weight: 600;
        color: #256d4f !important;
        background: #fff;
        border-radius: 6px;
        padding: 0.3em 1.1em;
        margin-left: auto;
        margin-right: 0.1em;
        box-shadow: 0 1px 4px rgba(0,0,0,0.04);
        border: 1px solid #49A078;
        order: 99;
        min-width: 60px;
        text-align: center;
    }
    .footer-home-link:hover { 
        background: #49A078; 
        color: #fff !important; 
    }
    
    /* Critical mobile overflow fixes */
    * {
        box-sizing: border-box !important;
    }
    
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
        max-width: 100vw !important;
    }
    
    .layout, .main-content, .slide-container-wrapper, .slide {
        max-width: 100vw !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Ensure all content elements respect mobile bounds */
    .slide-content > * {
        max-width: 100% !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Force tables to be mobile-friendly */
    table, .demo-table {
        width: 100% !important;
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    table thead, table tbody, table tr, table th, table td {
        display: block !important;
        width: 100% !important;
    }
    
    table tr {
        border: 1px solid #ccc !important;
        margin-bottom: 0.5rem !important;
        padding: 0.5rem !important;
    }
    
    table th, table td {
        border: none !important;
        padding: 0.25rem 0 !important;
        text-align: left !important;
    }
    
    /* Mobile-friendly list styles */
    ul, ol {
        padding-left: 1.25rem !important;
        margin: 0.5rem 0 !important;
        max-width: 100% !important;
    }
    
    li {
        margin-bottom: 0.25rem !important;
        line-height: 1.5 !important;
        word-wrap: break-word !important;
    }
}

/* Additional responsive handling for very small devices */
@media (max-width: 480px) {
    .slide-number-display {
        width: calc(100% - 1.5rem) !important;
        max-width: calc(100% - 1.5rem) !important;
        margin: 0 0.75rem !important;
        padding: 0.6rem 0.8rem !important;
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
    }
}

/* Critical fix for screens 370px and below */
@media (max-width: 370px) {
    /* Allow header to expand naturally */
    nav {
        padding: 0.5rem 0.3rem !important;
        min-height: 60px !important;
        height: auto !important;
        box-sizing: border-box !important;
        position: fixed !important;
        width: 100% !important;
    }
    
    nav .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        gap: 0.4rem !important;
        flex-wrap: wrap !important;
        box-sizing: border-box !important;
        min-height: 60px !important;
    }
    
    /* Logo container - allow natural flow */
    nav .container > div:first-child {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 0.4rem !important;
    }
    
    /* Logo image - maintain reasonable size */
    nav .container > div:first-child img {
        width: 36px !important;
        height: 36px !important;
        flex-shrink: 0 !important;
    }
    
    /* Text - maintain readability, allow wrapping */
    nav .container > div:first-child span {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
        word-wrap: break-word !important;
        flex-shrink: 1 !important;
    }
    
    /* Hamburger - reasonable size */
    .hamburger {
        width: 40px !important;
        height: 40px !important;
        padding: 0.4rem !important;
        font-size: 1.1rem !important;
        flex-shrink: 0 !important;
    }
    
    /* Adjust layout to account for potentially taller header */
    .layout {
        margin-top: 90px !important;
        height: calc(100vh - 140px) !important;
    }
}

@media (max-width: 360px) {
    /* Even smaller screens - allow header to expand */
    nav {
        padding: 0.4rem 0.25rem !important;
        min-height: 60px !important;
        height: auto !important;
    }
    
    nav .container {
        gap: 0.3rem !important;
        max-width: 100% !important;
        padding: 0 !important;
        flex-wrap: wrap !important;
        min-height: 60px !important;
    }
    
    /* Logo - maintain visibility */
    nav .container > div:first-child img {
        width: 32px !important;
        height: 32px !important;
    }
    
    /* Text - smaller but readable */
    nav .container > div:first-child span {
        font-size: 0.85rem !important;
        line-height: 1.2 !important;
    }
    
    /* Hamburger - functional size */
    .hamburger {
        padding: 0.35rem !important;
        font-size: 1rem !important;
        width: 38px !important;
        height: 38px !important;
    }
    
    /* Account for potentially taller header */
    .layout {
        margin-top: 100px !important;
        height: calc(100vh - 150px) !important;
    }
    
    .slide-number-display {
        width: calc(100% - 1rem) !important;
        max-width: calc(100% - 1rem) !important;
        margin: 0 0.5rem !important;
        padding: 0.5rem 0.6rem !important;
        font-size: 0.9rem !important;
        line-height: 1.25 !important;
    }
}

@media (min-width: 769px) {
    .footer-home-link { 
        display: none !important; 
    }
}
/* === FIX THE HEADER POSITIONING === */
nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 50 !important;
    height: 60px !important; /* Set fixed height */
}

.layout {
    margin-top: 60px !important; /* Push layout down by header height */
    /* REMOVED: border: 2px solid blue !important; */
}

.sidebar.active {
    top: 60px !important; /* Position sidebar below header */
    /* REMOVED any border/background colors */
}