/* Course Navigation Styles */
.course-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #2c3e50;
    color: white;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 50px;
}

.course-nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 50px;
    box-sizing: border-box;
}

.course-nav-logo {
    font-weight: bold;
    font-size: 1.2rem;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.course-nav-logo:hover {
    color: #ff9e3d;
}

.course-nav-menu {
    display: flex;
    gap: 0 !important;
    align-items: center;
    height: 50px;
}

.course-nav-dropdown {
    position: relative;
    display: inline-block;
}

.course-nav-dropdown-btn {
    background-color: #34495e;
    color: white;
    border: none;
    cursor: pointer;
    padding: 8px 15px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    height: 36px;
    box-sizing: border-box;
}

.course-nav-dropdown-btn:hover {
    background-color: #34495e;
}

.course-nav-dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 4px;
    z-index: 1001;
    right: 0;
    top: 100%;
    margin-top: 0;
    /* Add transition for smooth appearance/disappearance */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0s linear 0.2s;
}

.course-nav-dropdown-item {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    border-bottom: 1px solid #eee;
}

.course-nav-dropdown-item:last-child {
    border-bottom: none;
}

.course-nav-dropdown-item.available {
    color: #2980b9;
    font-weight: bold;
}

.course-nav-dropdown-item.coming-soon {
    color: #7f8c8d;
    cursor: not-allowed;
}

.course-nav-dropdown-item.coming-soon span {
    font-size: 12px;
    background-color: #95a5a6;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
}

/* Show dropdown on hover with delay */
.course-nav-dropdown:hover .course-nav-dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

/* Keep dropdown visible when hovering over the content */
.course-nav-dropdown-content:hover {
    display: block;
    opacity: 1;
    visibility: visible;
}

.course-nav-dropdown.active .course-nav-dropdown-content {
    display: block;
    opacity: 1;
    visibility: visible;
}

.course-nav-dropdown-item:hover:not(.coming-soon) {
    background-color: #f5f7fa;
}

/* Home button */
.course-nav-home {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 4px;
    height: 36px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    font-weight: bold;
}

.course-nav-home:hover {
    background-color: #34495e;
}

/* Mobile menu button */
.course-nav-mobile-toggle {
    position: fixed;
    z-index: 1100;
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Responsive styles */
@media (max-width: 768px) {
    .course-nav {
        height: auto;
    }
    .course-nav-container {
        padding: 0 15px;
        height: 50px;
    }
    
    .course-nav-logo {
        font-size: 1rem;
        width: auto !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .course-nav-menu {
        display: none;
        position: fixed;
        top: 50px;
        right: 0 !important;
        left: auto !important;
        min-width: 200px !important;
        width: auto !important;
        max-width: 90vw !important;
        background-color: #2c3e50;
        flex-direction: column;
        padding: 0;
        z-index: 1005;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        border-radius: 0 0 8px 8px;
    }
    
    .course-nav-menu.active {
        display: flex;
    }
    
    .course-nav-mobile-toggle {
        position: fixed;
        width: auto !important;
        right: 0 !important;
        display: inline-block;
        z-index: 3000;
    }
    
    .course-nav-dropdown {
        width: 100%;
        margin: 0;
        background-color: #34495e;
    }
    
    .course-nav-dropdown-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 15px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .course-nav-dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        margin-top: 0;
        background-color: #34495e;
        display: none;
        opacity: 1;
        visibility: visible;
    }
    
    /* Show dropdown content when parent is clicked */
    .course-nav-dropdown.active .course-nav-dropdown-content {
        display: block;
    }
    
    .course-nav-dropdown-item {
        color: white;
        border-bottom: 1px solid #2c3e50;
        padding: 12px 20px;
        font-size: 14px;
    }
    .course-nav-dropdown-item.available {
        color: white;
        font-weight: bold;
    }
    
    .course-nav-home {
        width: 100%;
        text-align: center;
        display: block;
        padding: 12px 15px;
        font-size: 16px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    /* Fix for hover behavior on mobile */
    .course-nav-dropdown:hover .course-nav-dropdown-content {
        display: none;
    }
    
    .course-nav-dropdown.active:hover .course-nav-dropdown-content {
        display: block;
    }
    
    .course-nav-linkedin {
        margin-right: 48px !important;
    }
}

/* Add padding to body to account for fixed navbar */
body {
    padding-top: 50px;
    /* overflow-x: hidden;  Removed to allow horizontal scrolling for tables */
}

/* Remove or shrink the pseudo-element that extends the hover area */
.course-nav-dropdown::after {
    content: '';
    position: absolute;
    height: 0;
    width: 100%;
    bottom: 0;
    left: 0;
    z-index: 0;
}

/* --- Footer Styles (shared across all pages) --- */
.site-footer {
    width: 100%;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    padding: 6px 0;
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 999;
    font-size: 0.97em;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}
.footer-feedback-btn, .footer-chat-btn, .footer-contact-link {
    background: none;
    color: #222;
    border: none;
    border-radius: 50%;
    padding: 8px;
    font-size: 1.2em;
    box-shadow: none;
    cursor: pointer;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.18s, background 0.18s;
}
.footer-feedback-btn:hover:not(:disabled), .footer-feedback-btn:focus-visible {
    color: #0a66c2;
    background: #eaf2f8;
    outline: none;
}
.footer-contact-link:hover, .footer-contact-link:focus-visible {
    color: #0a66c2;
    background: #eaf2f8;
    outline: none;
    text-decoration: underline;
}
.footer-chat-btn {
    color: #aaa;
    background: none;
    border: none;
    cursor: not-allowed;
    opacity: 0.7;
}
.footer-chat-btn:hover, .footer-chat-btn:focus-visible {
    color: #aaa;
    background: none;
    outline: none;
}
@media (max-width: 600px) {
    .site-footer {
        font-size: 0.93em;
        padding: 4px 0;
        gap: 4px;
    }
    .footer-feedback-btn, .footer-chat-btn, .footer-contact-link {
        min-width: 44px;
        font-size: 1.2em;
        padding: 4px 6px;
        justify-content: center;
    }
    .footer-label {
        display: none !important;
    }
}

.site-footer svg + .footer-label,
.site-footer .footer-feedback-btn > .footer-label,
.site-footer .footer-chat-btn > .footer-label {
    margin-left: 0.33em;
}

.content-inner {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
  padding-bottom: 70px !important;
}

/* Ensure all block elements inside .content-inner/section never overflow */
.content-inner section,
.content-inner .diagram,
.content-inner .example,
.content-inner .prompt-example,
.content-inner .response-example,
.content-inner .code-block,
.content-inner canvas,
.content-inner img,
.content-inner table {
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}

@media (max-width: 900px) {
  .content-inner {
    max-width: 100%;
    padding-left: 8px;
    padding-right: 8px;
  }
}