/* --- Basic Reset & Defaults --- */
:root {
    /* Light Theme Colors */
    --bg-color-light: #ffffff;
    --text-color-light: #24292e;
    --primary-color-light: #0366d6;
    --secondary-color-light: #005cc5;
    --card-bg-light: #f6f8fa;
    --border-color-light: #e1e4e8;
    --header-bg-light: #f6f8fa;
    --footer-bg-light: #f1f1f1;
    --icon-color-light: #586069;
    --code-bg-light: #f3f3f3;
    --link-color-light: var(--primary-color-light);
    --cyan-light: #3fb1a0;
    --orange-light: #f27764;
    --red-light: #f05856;
    --yellow-light: #efc112;
    --scrollbar-track-color-light: #f1f1f1; /* Light grey track */
    --scrollbar-thumb-color-light: #c1c1c1; /* Mid grey thumb */
    --scrollbar-thumb-hover-color-light: #a8a8a8; /* Darker grey thumb hover */

    --bg-color-dark: #1a1a1a;
    --text-color-dark: #e0e0e0;
    --primary-color-dark: #007acc;
    --secondary-color-dark: #33a1ff;
    --card-bg-dark: #252526;
    --border-color-dark: #333333;
    --header-bg-dark: #1e1e1e;
    --footer-bg-dark: #161616;
    --icon-color-dark: #bdbdbd;
    --code-bg-dark: var(--card-bg-dark);
    --link-color-dark: var(--secondary-color-dark);
    --cyan-dark: #2de9cd;
    --orange-dark: #f27764;
    --red-dark: #f05856;
    --yellow-dark: #f9d344;
    --scrollbar-track-color-dark: #2c2c2c;  /* Darker grey track */
    --scrollbar-thumb-color-dark: #555;   /* Mid-dark grey thumb */
    --scrollbar-thumb-hover-color-dark: #777; /* Lighter grey thumb hover */


    /* --- Assign Default (Light) Theme Variables --- */
    --bg-color: var(--bg-color-light);
    --text-color: var(--text-color-light);
    --primary-color: var(--primary-color-light);
    --secondary-color: var(--secondary-color-light);
    --card-bg: var(--card-bg-light);
    --border-color: var(--border-color-light);
    --header-bg: var(--header-bg-light);
    --footer-bg: var(--footer-bg-light);
    --icon-color: var(--icon-color-light);
    --code-bg: var(--code-bg-light);
    --link-color: var(--link-color-light);
    --red: var(--red-light);    
    --cyan: var(--cyan-light);    
    --orange: var(--orange-light);    
    --yellow: var(--yellow-light);    
    --scrollbar-track-color: var(--scrollbar-track-color-light);
    --scrollbar-thumb-color: var(--scrollbar-thumb-color-light);
    --scrollbar-thumb-hover-color: var(--scrollbar-thumb-hover-color-light);    
    --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    /*--font-main: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;*/
}

/* --- Dark Theme Overrides --- */
html[data-theme="dark"] {
    --bg-color: var(--bg-color-dark);
    --text-color: var(--text-color-dark);
    --primary-color: var(--primary-color-dark);
    --secondary-color: var(--secondary-color-dark);
    --card-bg: var(--card-bg-dark);
    --border-color: var(--border-color-dark);
    --header-bg: var(--header-bg-dark);
    --footer-bg: var(--footer-bg-dark);
    --icon-color: var(--icon-color-dark);
    --code-bg: var(--code-bg-dark);
    --link-color: var(--link-color-dark);
    --red: var(--red-dark);    
    --cyan: var(--cyan-dark);    
    --orange: var(--orange-dark);    
    --yellow: var(--yellow-dark);    
    --scrollbar-track-color: var(--scrollbar-track-color-dark);
    --scrollbar-thumb-color: var(--scrollbar-thumb-color-dark);
    --scrollbar-thumb-hover-color: var(--scrollbar-thumb-hover-color-dark);    
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    /* Smooth scroll for anchor links */
    scrollbar-width: auto; /* Or 'auto' */
    scrollbar-color: var(--scrollbar-thumb-color) var(--scrollbar-track-color);    
}

/* --- Apply Variables & Transitions --- */
body {
    font-family: var(--font-main);
    line-height: 1.6;
    background-color: var(--bg-color);
    color: var(--text-color);
    /* Smooth transitions for theme changes */
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;    
}

/* WebKit scrollbar pseudo-elements (Chrome, Edge, Safari, etc.) */
/* Apply to the body or potentially all elements for wider coverage */
body::-webkit-scrollbar {
/*    width: 8px;
    height: 8px;*/
}

body::-webkit-scrollbar-track {
    background: var(--scrollbar-track-color);
    border-radius: 4px;
}

body::-webkit-scrollbar-thumb {
    background-color: var(--scrollbar-thumb-color);
    border-radius: 4px;
    border: 1px solid var(--scrollbar-track-color);
}

body::-webkit-scrollbar-thumb:hover {
    background-color: var(--scrollbar-thumb-hover-color);
}

.notvis {
    display:none;
}

.red {
    color: var(--red);
}

.cyan {
    color: var(--cyan);
}

.orange {
    color: var(--orange);
}

.yellow {
    color: var(--yellow);
}

.new {
    font-weight: 600;    
    color : var(--cyan);
}

.improve {
    font-weight: 600;    
    color : var(--yellow);
}

.fix {
    font-weight: 600;    
    color : var(--red);
}

.hint {
    font-weight: 600;    
    color : rgb(182, 133, 0);
}


.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Standard Bold Elements */
strong, b {
    font-weight: 700; /* Bold */
}

/* Ensure code blocks keep their monospace font */
code, pre, .generic-content-area code, .generic-content-area pre,
.docs-content code, .docs-content pre {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    /* Keep existing font-size etc. */
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Prevents bottom space */
}

h1,
h2,
h3 {
    margin-bottom: 0.8em;
    line-height: 1.3;
    color: var(--text-color);
}

h1 {
    font-size: 2.8rem;
    color: var(--text-color);
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5em;
    color: var(--text-color);
    font-weight: 600;
}

h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-color);
}

p {
    margin-bottom: 1em;
}

/* --- Header --- */
.site-header {
    background-color: var(--header-bg);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* --- Desktop Header Layout (Grid) --- */
.header-grid-container {
    display: grid;
    /* Columns: Logo(auto) | Nav(fills space) | Actions(auto) */
    grid-template-columns: auto 1fr auto;
    align-items: center;
    /* Vertically align items in rows */
    gap: 1.5rem;
    /* Adjust gap between columns */
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    /* Remove justify-content: space-between; if present */
    align-items: center;
    /* Keep vertical alignment */
    gap: 1rem;
    /* Optional: adds some base gap between direct children */
}

.logo {
    /* Reset margins if any were added */
    margin-left: 0;
    margin-right: 0;
    flex-shrink: 0;
    /* Keep this if needed */
    /* ... other existing logo styles ... */
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.5em;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.85;
}

/* Style the text within the logo */
.logo-text {
    position: relative;
    /* Allow repositioning */
    top: 0px;
    /* Move text 4px upwards */
    /* Optional: Adjust line-height if needed, but 'top' is more direct */
    /* line-height: 1; */
    color: var(--text-color);
}

/* Style the new icon */
.logo-icon {
    height: 1.5em;
    /* Controls icon size relative to font size */
    /* Or use a fixed size like: height: 28px; */
    width: auto;
    /* Maintain aspect ratio */
    /* vertical-align: middle; /* Flexbox align-items: center is generally better */
}

/* Make the navigation push subsequent items to the right */
.main-nav {
    /* Remove margin-left: auto; */
    margin-left: 0;
    justify-self: center;
    /* Center the nav element within its grid cell */
}

.main-nav ul {
    list-style: none;
    display: flex;
    /* Center items if ul doesn't fill space, or let justify-self handle it */
    justify-content: center;
    gap: 1.5rem;
    /* Space between nav links */
    padding: 0;
    /* Remove default ul padding */
    margin: 0;
    /* Remove default ul margin */
}

.main-nav a {
    color: var(--text-color);
    font-weight: 400;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--primary-color);
}

/* Active Nav Link Style (Optional) */
.main-nav a.active-nav {
    color: var(--primary-color);
    /* Highlight active link */
    font-weight: 600;
    /* Add other styles like border-bottom if desired */
}

/* Column 3: Header Actions */
.header-actions {
    display: flex;
    /* Arrange buttons inside horizontally */
    align-items: center;
    /* Vertically align buttons */
    gap: 0.75rem;
    /* Space between buttons */
    /* Reset margins if any were added */
    margin-left: 0;
}

/* Header Download Button */
.header-cta {
    margin-left: 0.5rem;
    /* Space from theme toggle */
    white-space: nowrap;
    /* Prevent wrapping */
    flex-shrink: 0;
    /* Prevent shrinking */
    /* ... keep existing .cta-button styles ... */
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff !important;
    /* Ensure text is white */
    padding: 0.6em 1.2em;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: var(--secondary-color);
    color: #fff !important;
    transform: translateY(-1px);
    /* Slight lift on hover */
}

.cta-button:active {
    transform: translateY(0px);
    /* Click effect */
}

.cta-button .icon {
    float: left;
    height: 25px;
    margin: 1px 8px 0px -5px;
}

.large-cta {
    padding: 0.8em 1.8em;
    font-size: 1.1rem;
}

.secondary-cta {
    background-color: transparent;
    color: var(--primary-color) !important;
    border: 1px solid var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    font-weight: 600;
}

.secondary-cta:hover {
    background-color: rgba(from var(--primary-color) r g b / 0.1);
    /* Dynamic alpha */
    color: var(--secondary-color) !important;
    border-color: var(--secondary-color);
}

.mobile-menu-toggle {
    display: none;
    /* Hidden by default */
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.8rem;
    cursor: pointer;
}

/* --- Hero Section --- */
.hero {
    padding: 4rem 0;
    text-align: center;
    background-color: var(--bg-color);
    /* Can be same as body or slightly different */
}

.hero .subtitle {
    font-size: 1.2rem;
    color: #a0a0a0;
    /* Slightly lighter text */
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: color-mix(in srgb, var(--text-color) 70%, var(--bg-color) 30%);
}

.hero .version-info {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #888;
    color: color-mix(in srgb, var(--text-color) 50%, var(--bg-color) 50%);
}

.hero-visual {
    margin: 3rem auto 0;
    max-width: 800px;
    /* Adjust as needed */
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    /* Add styling for your actual image/gif here */
}

.hero-visual img, .mini-hero img {
    border-radius: 5px;
}

/* Style the container for the 'more downloads' link */
.more-downloads-link-container {
    margin-top: 1.5rem;
    /* Add space above the link */
    font-size: 0.9rem;
    /* Make text slightly smaller */
}

/* Style the link itself */
.more-downloads-link {
    /* Use link color from theme */
    color: var(--link-color);
    text-decoration: underline;
    /* Standard link underline */
    transition: color 0.2s ease;
}

.more-downloads-link:hover {
    /* Use secondary color on hover */
    color: var(--secondary-color);
    text-decoration: none;
    /* Optional: remove underline on hover */
}

/* --- Features Section --- */
.features {
    padding: 4rem 0;
    background-color: var(--card-bg);
    transition: background-color 0.3s ease;
}

.features-bg {
    padding: 3rem 0;    
    background-color: var(--card-bg);
    transition: background-color 0.3s ease;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    /* Responsive grid */
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    background-color: var(--bg-color);
    /* Card background */
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-item.left {
    text-align: left;
}

.feature-item.left h2 {
    text-align: left;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-item h3 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.feature-item h2 {
    margin-bottom: 1.5rem;
}

.feature-item p {
    font-size: 0.95rem;
    color: color-mix(in srgb, var(--text-color) 80%, var(--bg-color) 20%);
}

.feature-item p.left {
    text-align: left;
}

.feature-item p.full-color, .feature-item ul.full-color {
    color: color-mix(in srgb, var(--text-color) 80%, var(--bg-color) 20%);
}

/* --- Download Section --- */
.download-section {
    padding: 4rem 0;
    text-align: center;
}

.download-section .cta-button {
    margin-top: 1rem;
}

.download-section .compatibility {
    font-size: 0.9rem;
    color: #888;
    margin-top: 1rem;
}

/* --- Detailed Feature Section (Two Columns) --- */
.feature-detailed {
    padding: 4rem 0;
    background-color: var(--bg-color);
    transition: background-color 0.3s ease;
}

/* Alternate background color for visual separation */
.feature-detailed.alt-bg {
    background-color: var(--card-bg);
}

.alt-bg2 {
    background-color: color-mix(in srgb, var(--text-color) 9%, var(--bg-color) 91%);
}

.feature-detailed .container {
    display: flex;
    gap: 3rem;
    /* Adjust gap between columns */
    align-items: center;
    /* Vertically align items in columns */
}

.feature-detailed .feature-text {
    flex: 1;
    /* Take up half the space */
    min-width: 0;
    /* Prevent text overflow issues */
}

/* Adjust list padding */
.feature-text ul,
.feature-text ol {
    padding-left: 2em;
}

.feature-detailed .feature-image {
    flex: 1;
    /* Take up half the space */
    min-width: 0;
    /* Prevent image overflow issues */
    text-align: center;
    /* Center image if needed */
}

.feature-detailed .feature-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    /* Optional: Rounded corners */
    /* Optional: Add subtle shadow like hero image */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
}

/* Style for the text content */
.feature-detailed .feature-text h2 {
    text-align: left;
    /* Override centered h2 if needed */
    margin-bottom: 1rem;
    font-size: 1.8rem;
    /* Slightly smaller H2 */
}

.feature-detailed .feature-text h3 {
    text-align: left;
    margin-bottom: 1rem;
    font-size: 1.6rem;
}

.feature-detailed .feature-text p {
    margin-bottom: 1.5rem;
    color:  color-mix(in srgb, var(--text-color) 80%, var(--bg-color) 20%);
    /* Optional: Limit text width for readability */
    /* max-width: 65ch; */
}

/* Modifier class to put the image on the right */
.feature-detailed.image-right .feature-image {
    order: 2;
    /* Move image column to the end */
}

.feature-detailed.image-right .feature-text {
    order: 1;
    /* Ensure text comes first */
}

/* Modifier class to put the image on the right */
.feature-detailed.image-left .feature-image {
    order: 1;
    /* Move image column to the end */
}

.feature-detailed.image-left .feature-text {
    order: 2;
    /* Ensure text comes first */
}

/* --- Docs Preview Section --- */
.docs-preview {
    padding: 3rem 0;
    background-color: var(--color-bg);
    text-align: center;
}

.docs-preview h2 {
    margin-bottom: 0.5rem;
}

.docs-preview p {
    margin-bottom: 1.5rem;
    color:  color-mix(in srgb, var(--text-color) 80%, var(--bg-color) 20%);
}

/* --- Info Grid Section --- */
.info-grid {
    padding: 4rem 0;
    background-color: var(--card-bg);
    transition: background-color 0.3s ease;
}

.info-grid h2 {
    text-align: center;
    margin-bottom: 3rem;
    /* More space below section title */
    font-size: 2rem;
    /* Consistent section title size */
}

.info-grid-container {
    display: grid;
    /* Creates responsive columns: min 220px wide, max 1fr (equal share) */
    /* Adjust minmax(220px, ...) value based on your content/preference */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    /* Space between grid items */
}

.info-box {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    padding: 2rem 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-color);
}

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

.info-box .icon {
    font-size: 2.5rem;
    /* Adjust icon size */
    margin-bottom: 1rem;
    color: var(--primary-color);
    /* Use accent color for icon */
    /* If using icon font like Font Awesome, target the <i> tag */
    /* Example: .info-box .icon i { font-size: 2.5rem; ... } */
}

.info-box h3 {
    font-size: 1.2rem;
    /* Heading size for the box */
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.info-box p {
    font-size: 0.9rem;
    color: color-mix(in srgb, var(--text-color) 80%, var(--bg-color) 20%);
    line-height: 1.5;
    margin-bottom: 0;
    /* Remove default paragraph margin if needed */
}

/* Optional: Make boxes links (if you wrap the content in <a>) */
.info-box a {
    text-decoration: none;
    color: inherit;
    /* Inherit text color */
    display: block;
    /* Make the whole box clickable */
    height: 100%;
    /* Ensure link fills the box */
}

.info-box a:hover {
    color: inherit;
    /* Prevent link color change on hover if desired */
}


/* --- Footer --- */
.site-footer {
    background-color: var(--footer-bg);
    color: color-mix(in srgb, var(--text-color) 60%, var(--bg-color) 40%);
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
    font-size: 0.9rem;
}

.site-footer a {
    color: color-mix(in srgb, var(--text-color) 70%, var(--bg-color) 30%);
}

.site-footer a:hover {
    color: var(--primary-color);
}


/* --- Responsive Design --- */
@media (max-width: 768px) {
    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .site-header .container {
        position: relative;
        /* Needed for absolute positioning of nav */
    }

    /* Override Grid layout on mobile, revert to Flex for simpler alignment */
    .header-grid-container {
        display: flex;
        justify-content: space-between;
        /* Logo left, actions right */
        gap: 1rem;
        /* Keep some gap */
        /* Remove grid-template-columns */
        grid-template-columns: none;
    }

    .main-nav {
        display: none;
        /* Styles for when it becomes active (absolute positioning) */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--header-bg);
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        padding: 1rem 0;
        z-index: 99;
        /* Ensure it's below header */
        justify-self: initial;
        /* Reset grid centering */
    }

    /* Header actions adjust */
    .header-actions {
        gap: 0.5rem;
        /* Reduce gap slightly on mobile */
        /* margin-left: auto; /* Use if justify-content: space-between isn't enough */
    }

    .main-nav.active {
        display: block;
        /* Show nav when active class is added */
    }

    .main-nav ul {
        flex-direction: column;
        /* Stack links vertically */
        align-items: center;
        gap: 1rem;
    }

    .header-cta {
        display: none;
        /* Hide header CTA button on small screens */
    }

    .mobile-menu-toggle {
        margin-left: 0;
        display: none;
        /* Hide on desktop */
        flex-shrink: 0;
        display: block;
        /* Show hamburger icon */
    }

    .hero {
        padding: 3rem 0;
    }

    .features {
        padding: 3rem 0;
    }

    .download-section {
        padding: 3rem 0;
    }

    .docs-preview {
        padding: 2rem 0;
    }

    .feature-list {
        grid-template-columns: 1fr;
        /* Stack features vertically */
    }
}

/* --- Theme Toggle Button Styles --- */
.theme-toggle {
    margin-left: 0;
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    /* Clickable area */
    margin-left: 1rem;
    /* Space from nav items */
    color: var(--icon-color);
    /* Use icon color var */
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.theme-toggle:hover {
    background-color: rgba(128, 128, 128, 0.1);
    /* Subtle hover */
    color: var(--primary-color);
}

.theme-toggle svg {
    width: 18px;
    /* Adjust size */
    height: 18px;
    fill: currentColor;
    /* Icon color inherits from button color */
}

/* Hide the icon that is NOT active */
html[data-theme="dark"] .theme-toggle .sun-icon {
    display: block;
    /* Show sun in dark mode */
}

html[data-theme="dark"] .theme-toggle .moon-icon {
    display: none;
    /* Hide moon in dark mode */
}

html[data-theme="light"] .theme-toggle .sun-icon,
/* Hide sun by default (light) */
.theme-toggle .sun-icon

/* Hide sun initially before JS runs */
    {
    display: none;
}

html[data-theme="light"] .theme-toggle .moon-icon,
/* Show moon by default (light) */
.theme-toggle .moon-icon

/* Show moon initially */
    {
    display: block;
}

/* --- Responsive: Adjust positioning if needed --- */
@media (max-width: 768px) {
    .theme-toggle {
        /* Example: Position it differently on mobile if needed */
        /* position: absolute; top: 1rem; right: 4rem; */
        margin-left: auto;
        /* Push it to the right before hamburger */
        margin-right: 0.5rem;
    }
}

/* --- Download Page Specific Styles --- */
.download-page-content {
    padding: 3rem 0;
    /* Adjust padding as needed */
}

.download-page-content h1 {
    text-align: center;
    font-size: 2.4rem;
    margin-bottom: 1rem;
}

.download-intro {
    text-align: center;
    font-size: 1.1rem;
    color: color-mix(in srgb, var(--text-color) 80%, var(--bg-color) 20%);
    /* Subtle grey */
    max-width: 70ch;
    margin: 0 auto 3rem auto;
    /* Center and add bottom margin */
}

.download-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 900px;
    /* Limit width for readability */
    margin-left: auto;
    margin-right: auto;
}

.download-list li {
    /* ... existing styles like display: flex, flex-wrap: wrap, gap ... */
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    /* Ensure wrapping is enabled */
    gap: 1.5rem;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.download-list .download-details {
    flex: 2 1 300px;
    /* Allow growing (2), shrinking (1), suggest 300px basis */
    min-width: 0;
    /* Allow shrinking below content size */
}

.download-list .download-action {
    flex: 1 1 220px;
    /* Allow growing (1), shrinking (1), suggest 220px basis */
    min-width: 0;
    /* Allow shrinking below content size */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Default align left */
    justify-content: center;
}

.download-list h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.download-list .version-info {
    font-size: 0.85rem;
    color: color-mix(in srgb, var(--text-color) 70%, var(--bg-color) 30%);
    margin-bottom: 0.75rem;
    font-style: italic;
}

.download-list p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    color: color-mix(in srgb, var(--text-color) 85%, var(--bg-color) 15%);
}

.download-list p:last-child {
    margin-bottom: 0;
}

.download-list .compatibility {
    font-size: 0.85rem;
    margin-top: 0.75rem;
    color: color-mix(in srgb, var(--text-color) 65%, var(--bg-color) 35%);
}

.download-list .download-link {
    /* Make button slightly less wide than default large CTA if needed */
    padding: 0.7em 1.5em;
    margin-bottom: 0.75rem;
    /* Space below button */
    white-space: nowrap;
    /* Prevent button text wrapping */
}

.download-list .file-size {
    font-size: 0.8em;
    opacity: 0.8;
    margin-left: 0.5em;
}

.download-list .checksums {
    font-size: 0.8rem;
    margin-top: 0.25rem;
    /* Space above checksums */
}

.download-list .checksums a {
    color: color-mix(in srgb, var(--text-color) 70%, var(--bg-color) 30%);
    text-decoration: underline;
    margin: 0 0.25rem;
}

.download-list .checksums a:hover {
    color: var(--primary-color);
}

/* Add spacing between the two portable download buttons */
.download-list .portable-link+.portable-link {
    margin-top: 0.75rem;
    /* Add space above the second button */
}

/* Adjust spacing for the portable checksums if needed */
.download-list .portable-checksums {
    margin-top: 0.75rem;
    /* Space above the checksums block */
    line-height: 1.4;
    /* Adjust line height for readability if using <br> */
}

.download-list .portable-checksums span {
    display: inline-block;
    /* Or block if you want them fully separate */
}

/* On WIDER screens (e.g., 600px and up), align action buttons right */
@media (min-width: 600px) {
    .download-list .download-action {
        align-items: flex-end;
    }

    .download-list .checksums {
        text-align: right;
    }
}

/* On NARROW screens (e.g., 599px and down), force stacking */
@media (max-width: 599px) {

    .download-list .download-details,
    .download-list .download-action {
        flex-basis: 100%;
        /* Force item to take full width */
        flex-grow: 0;
        /* Prevent growing beyond 100% */
        width: 100%;
        /* Explicitly set width */
    }

    /* Reset action alignment to left when stacked */
    .download-list .download-action {
        align-items: flex-start;
        /* Add space between stacked text and buttons */
        margin-top: 1rem;
    }

    /* Reset checksum alignment to left when stacked */
    .download-list .checksums {
        text-align: left;
    }
}

/* Table Styles */
.table-container {
    overflow-x: auto;
    /* Enable horizontal scroll on small screens */
    margin: 1.5rem 0;
}

.generic-content-area table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.generic-content-area th,
.generic-content-area td {
    border: 1px solid var(--border-color);
    padding: 0.75em 1em;
    text-align: left;
    vertical-align: top;
    /* Ensure text uses theme color */
    color: var(--text-color);
    transition: background-color 0.3s ease;
    /* Smooth theme transitions */
}

.generic-content-area th {
    background-color: var(--card-bg);
    /* Header background */
    font-weight: 600;
}

/* Zebra striping for rows */
.generic-content-area tbody tr:nth-child(odd) {
    background-color: rgba(from var(--card-bg) r g b / 0.5);
}

.generic-content-area tbody tr:hover {
    background-color: rgba(from var(--primary-color) r g b / 0.1);
}

.generic-content-area tfoot {
    font-weight: 600;
    background-color: var(--card-bg);
}

.generic-content-area caption {
    caption-side: bottom;
    text-align: center;
    padding: 0.75em;
    font-size: 0.85rem;
    color: color-mix(in srgb, var(--text-color) 70%, var(--bg-color) 30%);
    margin-top: 0.5rem;
}

/* Right-align numeric data */
.generic-content-area td.numeric {
    text-align: right;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    /* Monospaced font */
}

.generic-page-main {
    padding: 2rem 0 3rem 0;
    /* Add vertical padding to main area */
}

/* Container specifically for generic content width limiting */
.generic-content-area .content-container {
    max-width: 800px;
    /* Adjust max-width for optimal reading length */
    margin-left: auto;
    margin-right: auto;
}

/* Typography within the content area */
.generic-content-area h1 {
    font-size: 2.6rem;
    /* Adjust title size */
    margin-bottom: 0.75rem;
    line-height: 1.2;
    font-weight: 700;
    /* Bolder title */
}

.generic-content-area h2 {
    font-size: 1.9rem;
    /* Adjust H2 size */
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    /* Ensure left alignment */
    font-weight: 600;
}

.generic-content-area h3 {
    font-size: 1.5rem;
    /* Adjust H3 size */
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    text-align: left;
    font-weight: 600;
}

.generic-content-area p,
.generic-content-area ul,
.generic-content-area ol {
    margin-bottom: 1.3rem;
    line-height: 1.7;
    /* Slightly taller line-height for readability */
    font-size: 1rem;
    /* Base font size */
    /* Ensure text uses theme color */
    color: var(--text-color);
}

/* Adjust list padding */
.generic-content-area ul,
.generic-content-area ol {
    padding-left: 2em;
}

.generic-content-area ul li,
.generic-content-area ol li {
    margin-bottom: 0.5rem;
}

.generic-content-area ul ul,
.generic-content-area ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    /* Adjust nested list spacing */
}


/* Meta information style */
.page-meta {
    font-size: 0.9rem;
    color: color-mix(in srgb, var(--text-color) 70%, var(--bg-color) 30%);
    /* Subtle grey */
    margin-bottom: 2rem;
    margin-top: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

/* Style time element if needed */
/*.page-meta time {
*/

/* Image Styles */
.generic-content-area img {
    max-width: 100%;
    /* Ensure images don't overflow container */
    height: auto;
    display: block;
    /* Remove extra space below image */
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    /* Optional: slightly rounded corners */
}

/* Figure and Figcaption */
.content-figure {
    margin: 2rem 0;
    /* Add space around figures */
    padding: 0;
}

.content-figure img {
    margin-top: 0;
    /* Reset margin if inside figure */
    margin-bottom: 0.5rem;
    /* Space between image and caption */
}

.content-figure figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: color-mix(in srgb, var(--text-color) 70%, var(--bg-color) 30%);
    font-style: italic;
}

/* Style for smaller, centered images */
.inline-image {
    max-width: 300px;
    /* Limit width */
    margin-left: auto;
    margin-right: auto;
}

/* Blockquote Styles */
.generic-content-area blockquote {
    margin: 2rem 0;
    /* Vertical space */
    padding: 1rem 1.5rem;
    padding-left: 1.75rem;
    /* More left padding */
    border-left: 4px solid var(--primary-color);
    /* Use primary color for border */
    background-color: var(--card-bg);
    /* Subtle background */
    border-radius: 0 5px 5px 0;
    /* Rounded corners on right */
    font-style: italic;
    color: color-mix(in srgb, var(--text-color) 90%, var(--bg-color) 10%);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.generic-content-area blockquote p {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
    /* Slightly larger text */
}

.generic-content-area blockquote p:last-child {
    margin-bottom: 0;
}

.generic-content-area blockquote footer {
    font-weight: 400;
    margin-top: 0.75rem;
    font-style: normal;
    font-size: 0.9rem;
    text-align: right;
    color: color-mix(in srgb, var(--text-color) 75%, var(--bg-color) 25%);
}

.generic-content-area blockquote footer cite {
    font-style: normal;
}


/* Code block styling (Ensure it inherits theme) */
.generic-content-area pre {
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1.5rem 0;
    max-width: 100%;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.generic-content-area code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

.generic-content-area :not(pre)>code {
    /* Inline code */
    background-color: rgba(from var(--secondary-color) r g b / 0.15);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.85em;
    color: var(--secondary-color);
}


/* Definition List Styles */
.generic-content-area dl {
    margin: 1.5rem 0;
}

.generic-content-area dt {
    /* Term */
    font-weight: 600;
    margin-top: 1rem;
    color: var(--text-color);
}

.generic-content-area dd {
    /* Definition */
    margin-left: 1.5em;
    /* Indent definition */
    margin-bottom: 0.75rem;
    color: color-mix(in srgb, var(--text-color) 90%, var(--bg-color) 10%);
}

.generic-content-area dt:first-child {
    margin-top: 0;
    /* Remove top margin from first term */
}


/* Callout Box Styles (reuse from docs or define here if needed) */
.generic-content-area .callout {
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-left-width: 4px;
    border-left-style: solid;
    border-radius: 4px;
    background-color: var(--card-bg);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.generic-content-area .callout p:last-child {
    margin-bottom: 0;
}

.generic-content-area .callout strong {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Define specific callout types */
.generic-content-area .callout.note {
    border-left-color: #007acc;
    /* Blue */
}

.generic-content-area .callout.note strong {
    color: #33a1ff;
}

.generic-content-area .callout.warning {
    border-left-color: #f1c40f;
    /* Yellow */
}

.generic-content-area .callout.warning strong {
    color: #f1c40f;
}

.generic-content-area .callout.tip {
    border-left-color: #2ecc71;
    /* Green */
}

.generic-content-area .callout.tip strong {
    color: #2ecc71;
}


/* Responsive Video Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    /* Optional black background */
    margin: 1.5rem 0;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    /* Remove default border */
}

/* Side-by-Side Image Container */
.image-flex-container {
    display: flex;
    flex-wrap: wrap;
    /* Wrap on small screens */
    gap: 1.5rem;
    /* Space between images */
    margin: 2rem 0;
    align-items: flex-start;
    /* Align tops */
}

.flex-figure {
    flex: 1;
    /* Each figure takes equal space */
    min-width: 200px;
    /* Minimum width before wrapping */
    margin: 0;
    /* Reset figure margin */
}

.flex-figure img {
    margin-bottom: 0.5rem;
    /* Space before caption */
}


/* Horizontal Rule Variations */
.content-divider {
    /* Already defined: centered, short */
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 3rem auto;
    max-width: 200px;
}

.full-width-divider {
    /* New: full width */
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 3rem 0;
    /* Only vertical margin */
    width: 100%;
    max-width: none;
    /* Override short max-width */
}

/* Horizontal Rule / Divider */
.content-divider {
    border: 0;
    height: 1px;
    background-color: var(--border-color);
    margin: 3rem auto;
    /* Center if max-width is applied */
    max-width: 200px;
    /* Make it shorter than full width */
}

/* --- Image Gallery Styles --- */
.image-gallery {
    margin: 2rem 0;
}

.gallery-grid {
    display: grid;
    /* Adjust minmax(100px, ...) for desired thumbnail size range */
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    /* Adjust gap between thumbnails */
}

.gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    /* Optional rounded corners */
    aspect-ratio: 1 / 1;
    /* Make thumbnails square (adjust if needed) */
    background-color: var(--card-bg);
    /* Placeholder background */
    cursor: pointer;
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s ease;
}

.gallery-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-thumbnail {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Cover the area, cropping if needed */
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-thumbnail {
    transform: scale(1.05);
    /* Slight zoom on hover */
}

/* --- Video Card Thumbnail Styling --- */
.video-thumbnail-container {
    position: relative;
    width: 100%;
    /* Let image define aspect ratio or set one */
    /* aspect-ratio: 16 / 9; */
    background-color: #000;
}

.video-thumbnail-container img {
    display: block;
    width: 100%;
    height: auto;
    transition: opacity 0.3s ease;
}
a.video-card:hover .video-thumbnail-container img {
    opacity: 0.7; /* Dim image on hover */
}

.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    background-color: rgba(0, 0, 0, 0.4);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 70px; /* Vertically center play icon */
    pointer-events: none; /* Make it unclickable */
    transition: transform 0.2s ease, background-color 0.2s ease;
}
a.video-card:hover .play-icon-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background-color: rgba(from var(--primary-color) r g b / 0.8);
}

/* --- Lightbox Styles --- */
.lightbox-overlay {
    /* display: none; /* REMOVED display: flex; from here */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    /* Dark semi-transparent overlay */
    z-index: 1000;
    /* Ensure it's on top */
    /* Use flex to center content - MOVED TO .visible rule */
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: pointer;
    /* Indicate clicking overlay closes it */
    opacity: 0;
    /* Start fully transparent */
    visibility: hidden;
    /* Use visibility for transitions */
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
    /* Delay hiding */
    /* Apply flex ONLY when visible */
    display: flex;
    /* Keep flex properties for alignment calculation */
}

/* Style for when the lightbox is active */
.lightbox-overlay.visible {
    /* display: flex; /* Already set in base rule now */
    opacity: 1;
    /* Fade in */
    visibility: visible;
    /* Make it visible */
    transition-delay: 0s;
    /* Remove delay when becoming visible */
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    /* Limit image width */
    max-height: 90vh;
    aspect-ratio: 16 / 9; /* Set aspect ratio for video */
    /* Limit image height */
    display: flex;
    cursor: default;
    /* Prevent overlay cursor on image area */
}

/* Add a class to set the aspect ratio specifically for video */
.lightbox-content.is-video {
    width: 90vw; /* Set a width for the video */
    aspect-ratio: 16 / 9; /* Enforce the aspect ratio */
}

.lightbox-content.is-image {
    width: auto; /* Let image determine width */
    height: auto; /* Let image determine height */
    aspect-ratio: unset; /* Remove fixed aspect ratio for images */
}

.lightbox-media-container {
    width: 100%;
    height: 100%;
    display: none; /* Hide both containers by default */
}
.lightbox-media-container.active {
    display: flex; /* Show the active one */
    align-items: center;
    justify-content: center;
}

#lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    /* Maintain aspect ratio */
    height: auto;
    /* Maintain aspect ratio */
    object-fit: contain;
    /* Ensure whole image is visible */
    border-radius: 3px;
    /* Optional */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

#video-container {
    /* Most styles inherited from .video-container */
    padding-bottom: 0; /* Override padding hack */
    position: static; /* Override position */
}

#lightbox-video {
    width: 100%;
    height: 100%;
    border: 0;
}

.lightbox-close {
    position: absolute;
    top: 10px;
    /* Position relative to viewport top */
    right: 15px;
    /* Position relative to viewport right */
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    font-size: 1.8rem;
    line-height: 35px;
    /* Center the 'x' */
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
    z-index: 1001;
    /* Ensure it's above image */
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

/* Ensure specificity to the generic content area */
.generic-content-area .content-two-column {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 2rem; /* Space between columns */
    align-items: flex-start; /* Align items to the top */
    margin: 3rem 0; /* Vertical spacing around the section */
    padding: 1.5rem; /* Optional padding inside */
    background-color: var(--card-bg); /* Optional subtle background */
    border: 1px solid var(--border-color); /* Optional border */
    border-radius: 8px; /* Optional rounded corners */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.generic-content-area .column-text {
    flex: 1.5; /* Allow text column to be slightly wider */
    min-width: 250px; /* Minimum width before wrapping */
}

.generic-content-area .column-image {
    flex: 1; /* Image column */
    min-width: 200px; /* Minimum width before wrapping */
    text-align: center; /* Center image within its column */
}

/* Reset margins for elements within the text column if needed */
.generic-content-area .column-text > *:first-child {
    margin-top: 0;
}
.generic-content-area .column-text > *:last-child {
    margin-bottom: 0;
}
/* Style headings within the column like normal H3 */
.generic-content-area .column-text h3 {
     margin-top: 0; /* Remove top margin if it's the first element */
     font-size: 1.5rem;
     margin-bottom: 0.8rem;
     /* Inherits other H3 styles */
}

/* Image styling within the column */
.generic-content-area .column-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin-top: 0; /* Reset default image margin */
    margin-bottom: 0;
    /* Optional shadow */
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

/* Modifier class for Image Left layout */
.generic-content-area .content-two-column.image-left .column-image {
    order: 1; /* Image first */
}
.generic-content-area .content-two-column.image-left .column-text {
    order: 2; /* Text second */
}


/* Responsive stacking for the two-column section */
@media (max-width: 640px) { /* Adjust breakpoint as needed */
    .generic-content-area .content-two-column {
        /* Stack columns instead of flex row */
        /* We rely on flex-wrap: wrap and min-width now */
        /* Or explicitly set direction: flex-direction: column; */
        padding: 1rem; /* Reduce padding */
    }

    /* Ensure image doesn't take full width when stacked unless desired */
    .generic-content-area .column-image {
         /* text-align: left; /* Align image left when stacked */
         margin-top: 1rem; /* Add space above image when stacked */
    }

    /* Reset order if image-left modifier was used */
    .generic-content-area .content-two-column.image-left .column-image,
    .generic-content-area .content-two-column.image-left .column-text {
        order: 0; /* Reset order */
    }
     /* Ensure text comes first visually when stacked */
    .generic-content-area .column-text { order: 1; }
    .generic-content-area .column-image { order: 2; }

}

/* Import or rely on main style.css being loaded first */

/* --- Documentation Layout --- */
.docs-container {
    display: flex;
    flex-direction: row;
    /* Default side-by-side layout */
    align-items: flex-start;
    /* Align items to the top */
    gap: 2rem;
    /* Space between sidebar and content */
    margin-top: 2rem;
    /* Space below header */
    margin-bottom: 3rem;
    /* Space above footer */
}

/* --- Sidebar Styling --- */
.docs-sidebar {
    line-height: 1.15;
    font-size: 90%;
    flex: 0 0 238px;
    /* Sidebar width - doesn't grow or shrink */
    padding-right: 1.5rem;
    border-right: 1px solid var(--border-color);

    /* --- Sticky Sidebar Logic --- */
    position: sticky;
    /* Adjust this 'top' value based on your header's height + desired gap */
    /* Example: 60px header height + 20px gap = 80px */
    top: 80px;
    /* Constrain height to viewport minus the top offset */
    height: calc(100vh - 80px);
    /* Use the same value as 'top' here */
    /* Add vertical scrollbar ONLY if sidebar content is taller than its height */
    overflow-y: auto;
    /* --- End Sticky Sidebar Logic --- */
    scrollbar-width: thin; /* Or 'auto', 'none' */
    /* Keep other styles like h3, nav etc. as they were */
}

/* Keep the rest of the .docs-sidebar child styles (h3, nav, ul, li, a, etc.) */
.docs-sidebar h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-weight: 600;
}

.docs-nav ul {
    /* etc... keep existing styles */
    list-style: none;
    padding-left: 0;
}

.docs-nav>ul>li {
    margin-bottom: 1rem;
    /* Space between top-level sections */
}

/* Nested list styling */
.docs-nav ul ul {
    padding-left: 1rem;
    /* Indent nested items */
    margin-top: 0.5rem;
}

.docs-nav li {
    margin-bottom: 0.3rem;
    /* Space between links */
}

.subidx {
    margin-top : -1px !important;
    font-size : 90%;    
}

.subidx li, .subidx li a, .subidx li a strong {
    margin-bottom: 3px;  
    padding:0;
    font-weight: normal;
}

.docs-nav strong {
    font-weight: 600;
    color: var(--text-color);
    /* Make top-level items slightly bolder */
    display: block;
    /* Ensure it takes full width */
    margin-bottom: 0.22rem;
}

/* Ensure links under strong don't act like block */
.docs-nav strong>a {
    display: inline;
    margin-bottom: 0;
}

.docs-nav a {
    display: block;
    /* Make links easier to click */
    padding: 0.2rem 0.2rem;
    border-radius: 4px;
    color: var(--text-color);
    opacity: 0.8;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    font-weight: 400;
}

.docs-nav a:hover {
    background-color: rgba(from var(--primary-color) r g b / 0.1);
    color: var(--primary-color);
    opacity: 1;
    font-weight: 600;
}

/* Style for a potentially active link (add class via JS if needed) */
.docs-nav a.active {
    background-color: rgba(from var(--primary-color) r g b / 0.2);
    color: var(--secondary-color);
    font-weight: 500;
    opacity: 1;
}


/* --- Content Area Styling --- */
.docs-content {
    flex: 1;
    /* Takes up the remaining space */
    min-width: 0;
    /* Prevent content from overflowing container */
}

.docs-content section {
    /*margin-bottom: 3rem;*/
    /* Space between content sections */
    padding-bottom: 0rem;
}

/* Consistent heading styles */
.docs-content h1 {
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 700;
}

.docs-content h2 {
    font-size: 1.8rem;
    margin-top: 2.5rem;
    /* More space above H2 */
    margin-bottom: 1rem;
    text-align: left;
    /* Override centered H2 from main style if needed */
    padding-bottom: 0.3rem;
    border-bottom: 1px dashed var(--border-color);
    font-weight: 600;
    /* Lighter separator for H2 */
}

.docs-content h2.first {
    margin-top: 0;
}

.docs-content h3 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.docs-content p,
.docs-content ul,
.docs-content ol {
    margin-bottom: 1.2rem;
    /* Consistent spacing for text blocks */
    max-width: 80ch;
    /* Improve readability */
}

.docs-content ul,
.docs-content ol {
    padding-left: 1.8rem;
    /* Standard indentation for lists */
}

.docs-content ul li {
    margin-bottom: 0.5rem;
}

.docs-content ol li {
    margin-bottom: 0.5rem;
}

/* Code Block Styling */
.docs-content pre {
    background-color: var(--code-bg);
    border-color: var(--border-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    /* Add scrollbar if code is too wide */
    margin-bottom: 1.5rem;
    max-width: 100%;
    /* Ensure it doesn't overflow content area */
}

.docs-content code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

/* Inline code */
.docs-content :not(pre)>code {
    background-color: rgba(from var(--secondary-color) r g b / 0.15);
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-size: 0.85em;
    color: var(--secondary-color);
}

.docs-content :not(pre)>code.key, .container :not(pre)>code.key {
    background-color: rgba(from var(--cyan) r g b / 0.15);
    color: var(--cyan);
}

.docs-content :not(pre)>code.key, .container :not(pre)>code.param {
    background-color: rgba(from var(--cyan) r g b / 0.15);
    color: var(--red);
}

.container .mynote {
    opacity: 0.7;
}

pre.prompt comm {
    color: var(--orange);
}

pre.prompt {
    margin-top: -20px;
}

/* Section Divider */
hr.section-divider {
    height: 1px;
    color: none;
    opacity: 0.4;
    background-color: none;
    border: 1px dashed var(--border-color);
    margin: 0rem 0;
}

/* Callout boxes (like notes or warnings) */
.callout {
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-left-width: 4px;
    border-left-style: solid;
    border-radius: 4px;
    background-color: var(--card-bg);
    /* Use card background */
}

.callout p:last-child {
    margin-bottom: 0;
    /* Remove bottom margin from last paragraph inside */
}

.callout strong {
    /* Make title stand out */
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.callout.note {
    border-left-color: #007acc;
    /* Blue for notes */
}

.callout.note strong {
    color: #33a1ff;
}

.callout.warning {
    border-left-color: #f1c40f;
    /* Yellow for warnings */
}

.callout.warning strong {
    color: #f1c40f;
}

.callout.tip {
    border-left-color: #2ecc71;
    /* Green for tips */
}

.callout.tip strong {
    color: #2ecc71;
}


/* --- Responsive Design for Docs --- */
@media (max-width: 900px) {
    .docs-container {
        flex-direction: column;
        /* Stack sidebar and content */
    }

    .docs-sidebar {
        flex: 0 0 auto;
        /* Reset flex properties */
        width: 100%;
        /* Take full width */
        border-right: none;
        /* Remove side border */
        border-bottom: 1px solid var(--border-color);
        /* Add bottom border */
        padding-right: 0;
        /* Remove padding */
        margin-bottom: 2rem;
        /* Space below sidebar */

        /* --- Disable Sticky on Small Screens --- */
        position: static;
        /* Override sticky positioning */
        height: auto;
        /* Let height be natural */
        overflow-y: visible;
        /* Remove internal scrollbar */
        /* --- End Disable Sticky --- */
    }

    .docs-content {
        padding-left: 0;
        padding-right: 0;
    }
}

@media (max-width: 768px) {

    /* Mobile menu toggle is already handled by js/script.js and style.css */
    /* Adjust content heading sizes if needed */
    .docs-content h1 {
        font-size: 2rem;
    }

    .docs-content h2 {
        font-size: 1.6rem;
    }

    .docs-content h3 {
        font-size: 1.3rem;
    }
}

.tbluron {
    animation: 5.0s linear 0s normal forwards 1 tbluronk;
  }
  
  @keyframes tbluronk {
    0% {
        filter: blur(0px);
        opacity: 1;
    }
  
    50% {
      filter: blur(0px);
      opacity: 1;
    }
  
    80% {
        filter: blur(0px);
        opacity: 1;
    }
  
    90% {
      filter: blur(20px);
      opacity: 1;
    }
  
    100% {
        filter: blur(30px);
        opacity: 0;
    }
  }
  
  .tbluroff {
    animation: 0.3s linear 0s normal forwards 1 tbluroffk;
  }
  
  @keyframes tbluroffk {
    0% {
        filter: blur(10px);
    }
  
    100% {
        filter: blur(0px);
    }
  }

/* --- Settings Page Specific Styles --- */

.settings-page-content .content-container {
    max-width: 960px; /* Allow slightly wider container for two columns */
}

.settings-page-content h1 {
    font-size: 2.4rem; /* Adjust as needed */
    margin-bottom: 1rem;
    text-align: center; /* Center main title */
}

.settings-page-content .page-intro {
    text-align: center;
    font-size: 1.05rem;
    color: color-mix(in srgb, var(--text-color) 85%, var(--bg-color) 15%);
    max-width: 75ch;
    margin: 0 auto 1.5rem auto;
}
/* Ensure inline code in intro is styled */
.settings-page-content .page-intro code {
    font-size: 0.9em;
    background-color: rgba(from var(--secondary-color) r g b / 0.15);
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: var(--secondary-color);
}


.settings-page-content h2 {
    font-size: 1.8rem;
    margin-top: 3rem; /* Space above section headings */
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-weight: 600;
}
.settings-page-content h2:first-of-type {
    margin-top: 2rem; /* Less top margin for the first H2 */
}

/* Settings Definition List (using Grid for 2 columns) */
.settings-list {
    display: grid;
    /* Columns: Setting Name (auto width) | Description (fills space) */
    grid-template-columns: minmax(150px, auto) 1fr;
    gap: 0.8rem 2rem; /* Row gap, Column gap */
    align-items: baseline; /* Align text start */
    margin-bottom: 2rem; /* Space below each list section */
}

.settings-list.ugly {
    grid-template-columns: minmax(150px, 35%) 1fr;
}

.settings-list dt { /* Setting Name */
    grid-column: 1;
    font-weight: 600;
    padding: 0.25rem 0; /* Add padding for alignment */
    /* Style the code tag inside dt */
    code {
        font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
        font-size: 0.95em;
        font-weight: 600; /* Keep weight */
        color: var(--secondary-color); /* Use accent color */
        background-color: rgba(from var(--secondary-color) r g b / 0.1);
        padding: 0.2em 0.5em;
        border-radius: 4px;
        border: 1px solid rgba(from var(--secondary-color) r g b / 0.2);
        white-space: normal; /* Prevent wrapping */
    }
}

.settings-list dd { /* Description */
    grid-column: 2;
    margin-left: 0; /* Remove default DL indent */
    margin-bottom: 0; /* Handled by row gap */
    padding: 0.25rem 0; /* Match dt padding */
    font-size: 0.95rem;
    line-height: 1.6;
    color: color-mix(in srgb, var(--text-color) 90%, var(--bg-color) 10%);
    /* Style inline code within descriptions */
    code {
        font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
        font-size: 0.9em; /* Slightly smaller inline code */
        background-color: rgba(128, 128, 128, 0.15);
        padding: 0.15em 0.4em;
        border-radius: 3px;
        color: var(--secondary-color);
        /* Allow inline code to wrap if needed */
        /* white-space: normal; */ /* Default */
        word-break: break-word; /* Help break long code */
    }
    /* Style links within descriptions */
    a {
       /* Inherit link color or customize */
       /* color: var(--link-color); */
       text-decoration: underline;
    }
}

* Add styles for figures within this context if needed */
.settings-page-content .content-figure {
    margin: 2rem 0;
    padding: 0;
}
.settings-page-content .content-figure img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 0.5rem auto; /* Center image and add space below */
    border-radius: 5px;
    border: 1px solid var(--border-color); /* Optional border */
}
.settings-page-content .content-figure figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: color-mix(in srgb, var(--text-color) 70%, var(--bg-color) 30%);
    font-style: italic;
}

/* Optional utility class for centering figures/images if needed more broadly */
.centered-figure {
    /* Any specific centering styles, often handled by margin:auto on img */
}

/* Ensure inline code is styled correctly everywhere */
.settings-page-content code { /* General inline code */
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    background-color: rgba(128, 128, 128, 0.15); /* Fallback/adjust theme var */
    background-color: rgba(from var(--secondary-color) r g b / 0.1); /* Themed */
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: var(--secondary-color);
    word-break: break-word;
}
/* Specific styling for code within DT remains */
.settings-list dt code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--secondary-color);
    background-color: rgba(from var(--secondary-color) r g b / 0.15); /* Adjusted alpha slightly */
    padding: 0.2em 0.5em;
    border-radius: 4px;
    border: 1px solid rgba(from var(--secondary-color) r g b / 0.2);
    /* white-space: nowrap; /* <<< REMOVE OR COMMENT OUT THIS LINE */
}

/* Style for the figures holding the settings screenshots */
.settings-page-content .settings-figure {
    margin: 1rem auto 2rem auto; /* Adjust vertical margins, auto horizontal centers */
    padding: 0;
    max-width: 600px; /* Optional: constrain max width */
    text-align: center; /* Center the image within the figure */
}
.settings-page-content .settings-figure img {
    max-width: 100%;
    height: auto;
    display: inline-block; /* Allows centering via text-align on parent */
    margin: 0; /* Reset default margins */
    border: 1px solid var(--border-color);
    border-radius: 4px; /* Optional rounded corners */
}
/* Optional: Add figcaption styles if needed later */
/* .settings-page-content .settings-figure figcaption { ... } */

/* Optional: Style for inline download links */
.download-link-inline {
    /* Add specific styles if needed, e.g., icon */
    /* color: var(--primary-color); */
}

/* --- Responsive Adjustments for Settings List --- */
@media (max-width: 650px) { /* Adjust breakpoint as needed */
    .settings-list {
        grid-template-columns: 1fr; /* Stack into a single column */
        gap: 0.25rem 0; /* Reduce row gap, remove column gap */
    }

    .settings-list dt,
    .settings-list dd {
        grid-column: 1; /* Ensure both occupy the single column */
        padding: 0.1rem 0; /* Adjust padding if needed */
    }

    .settings-list dt {
         margin-bottom: 0.1rem; /* Add small space below term */
    }
    .settings-list dd {
         margin-bottom: 0.75rem; /* Add space below description */
         padding-left: 0.5rem; /* Optional indent for description */
    }
}  

/* --- Optional: Table of Contents Styles --- */
.toc {
    background-color: var(--card-bg); /* Subtle background */
    border: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0 2rem 0; /* Adjust spacing */
    border-radius: 6px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.toc h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem; /* Adjust size */
    border-bottom: none; /* Remove heading underline */
    padding-bottom: 0;
    text-align: left;
}

.toc ul {
    list-style: none; /* Remove default bullets */
    padding: 0;
    margin: 0;
    /* Optional: Arrange in columns */
    /* column-count: 2; */ /* Adjust column count based on space */
    /* column-gap: 2rem; */
}

.toc ul li {
    margin-bottom: 0.3rem;
}

.toc ul li a {
    /* Inherit link color or customize */
    text-decoration: none; /* Remove underline */
    font-weight: 400;
}

.toc ul li a:hover {
    text-decoration: underline; /* Add underline on hover */
    color: var(--primary-color);
}

/* --- Video Page Styles --- */

.video-page-content {
    /* Inherits padding from .generic-page-main or set specific */
    /* padding: 3rem 0; */
}

/* Center the intro text */
.video-page-content .page-intro {
    text-align: center;
    max-width: 70ch; /* Limit width for readability */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem; /* Space below intro */
    font-size: 1.05rem;
    color: color-mix(in srgb, var(--text-color) 85%, var(--bg-color) 15%);
}

/* Video Grid Layout */
.video-grid-container {
    display: grid;
    /* Responsive grid: columns min 300px wide, max 1fr (equal share) */
    /* Adjust minmax(300px, ...) based on desired card size */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem; /* Space between video cards */
    margin-top: 2rem; /* Space above grid if needed */
}

/* Individual Video Card Styling */
.video-card-hero {
    background-color: var(--card-bg);
    border: none;
    overflow: hidden; /* Ensures border-radius clips the video */
    display: flex;
    flex-direction: column; /* Stack video and info vertically */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.3s ease, background-color 0.3s ease;
}

.video-card-hero:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}


/* Individual Video Card Styling */
.video-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden; /* Ensures border-radius clips the video */
    display: flex;
    flex-direction: column; /* Stack video and info vertically */
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.3s ease, background-color 0.3s ease;
}

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

/* Video Info Section (Title & Description) */
.video-info {
    padding: 1rem 1.5rem 1.5rem 1.5rem; /* Padding around text */
    flex-grow: 1; /* Allows info area to grow if cards have different heights */
}

.video-info h3 {
    margin-top: 0; /* Remove top margin */
    margin-bottom: 0.75rem;
    font-size: 1.3rem; /* Adjust title size */
    font-weight: 600;
}

.video-info p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: color-mix(in srgb, var(--text-color) 90%, var(--bg-color) 10%);
    margin-bottom: 0; /* Remove bottom margin from paragraph */
}

/* --- FAQ Section Enhancement --- */

#faq {
    /* Add extra padding at the bottom if needed */
    /* padding-bottom: 2rem; */
}

#faq h2 {
    /* Ensure FAQ heading stands out if needed */
    /* margin-bottom: 2rem; */
}
/* --- UPDATED RULE: Targets the Question Paragraph --- */
#faq p.faq-question {
    font-weight: 600; /* Make question bolder */
    font-size: 1.2rem; /* Slightly larger than normal text, adjust as needed */
    color: var(--text-color); /* Ensure full text color */
    margin-top: 2.5rem; /* More space ABOVE each question */
    margin-bottom: 0.4rem; /* Less space between Question and its Answer */
    line-height: 1.4; /* Adjust line height if needed */
    /* Remove styles inherited from h3 if any were present */
    border-bottom: none;
    padding-bottom: 0;
}

/* Reduce top margin for the very first question */
#faq p.faq-question:first-of-type { /* UPDATED SELECTOR */
    margin-top: 1.5rem;
}

/* --- Rule for the Answer Paragraph --- */
/* This rule likely doesn't need much change, */
/* but ensure its top margin works well with the question's bottom margin */
#faq p:not(.faq-question) { /* Target paragraphs that AREN'T questions */
    margin-top: 0; /* Bring answer closer to its question */
    margin-bottom: 1.5rem; /* Add space AFTER the answer, before next question */
    padding-left: 1em; /* Indent the answer slightly */
    line-height: 1.7; /* Improve readability */
    color: color-mix(in srgb, var(--text-color) 90%, var(--bg-color) 10%); /* Slightly softer color for answer */
}

/* --- Gallery Page Styles (Leveraging Generic Gallery Styles) --- */

.gallery-page-content {
    /* Inherits padding from .generic-page-main or set specific */
}

/* Center the intro text */
.gallery-page-content .page-intro {
    text-align: center;
    max-width: 70ch; /* Limit width */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem; /* Space below intro */
    font-size: 1.05rem;
    color: color-mix(in srgb, var(--text-color) 85%, var(--bg-color) 15%);
}

/* Container for the grid (Can reuse generic gallery class) */
.image-gallery {
    margin: 2rem 0;
}

/* The Grid itself (Can reuse generic gallery class) */
.gallery-grid {
    display: grid;
    /* Adjust minmax based on desired size (~3-4 across on wide screens) */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem; /* Adjust gap */
}

/* Individual Gallery Item Link/Card */
.gallery-item {
    display: block; /* Make the link a block container */
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden; /* Clip contents */
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
    /* Remove position: relative if it was added */
    /* Remove aspect-ratio if it was added */
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Gallery Thumbnail Image */
.gallery-thumbnail {
    display: block; /* Ensure it's a block element */
    width: 100%;
    height: auto; /* Let height be determined by aspect ratio */
    /* object-fit: cover; /* Only needed if setting fixed height/aspect-ratio */
    /* Remove border-bottom if you don't want a line */
    /* border-bottom: 1px solid var(--border-color); */
    /* Ensure no fixed height is set here */
}
/* Remove hover zoom if desired */
/*
.gallery-item:hover .gallery-thumbnail {
    transform: scale(1.05);
}
*/

/* Gallery Caption Text */
.gallery-caption {
    padding: 0.75rem 1rem; /* Adjust padding as needed */
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    color: var(--text-color);
    /* Ensure standard block layout */
    display: block;
    /* Remove any absolute positioning if previously added */
}

/* --- Cheatsheet Page Styles --- */

.cheatsheet-content .content-container {
    max-width: 1000px; /* Allow slightly wider container for columns */
}

.cheatsheet-content h1 {
    text-align: center; /* Center main title */
    margin-bottom: 1rem;
}
.cheatsheet-content .page-intro {
    text-align: center;
    max-width: 70ch;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.8rem; /* Space below intro */
}

/* Common styling for cheat sheet sections */
.cheat-section {
    margin: 1.5rem 0; /* Space between sections */
}

.cheat-section code { /* General inline code */
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    background-color: rgba(128, 128, 128, 0.15); /* Fallback/adjust theme var */
    background-color: rgba(from var(--secondary-color) r g b / 0.1); /* Themed */
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: var(--secondary-color);
    word-break: break-word;
}

.cheat-section p {
    color: var(--text-color);
}

.cheat-section h2 {
    font-size: 1.6rem; /* Slightly smaller section headings */
    margin-top: 0;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    font-weight: 600;
}

/* Base style for definition lists used in cheatsheet */
.cheat-dl {
    display: grid; /* Base grid layout */
    gap: 0.2rem 1.5rem; /* Row gap, Column gap */
    align-items: baseline;
}
.cheat-dl dt {
    grid-column: 1;
    font-weight: 600;
    code {
        font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
        font-size: 0.95em;
        font-weight: 600;
        color: var(--secondary-color);
        background-color: rgba(from var(--secondary-color) r g b / 0.1);
        padding: 0em 0.5em;
        border-radius: 4px;
        border: 1px solid rgba(from var(--secondary-color) r g b / 0.2);
        word-break: break-word;
        overflow-wrap: break-word;
        display: inline-block; /* Allows padding/background */
        margin-bottom: 0.2rem; /* Space if dt wraps */
    }
}
.cheat-dl dd {
    grid-column: 2;
    margin-left: 0;
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: color-mix(in srgb, var(--text-color) 90%, var(--bg-color) 10%);
    word-break: break-word;
    overflow-wrap: break-word;
    code { /* Inline code within descriptions */
        font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
        font-size: 0.9em;
        background-color: rgba(128, 128, 128, 0.15);
        padding: 0.15em 0.4em;
        border-radius: 3px;
        color: var(--secondary-color);
        word-break: break-word;
    }
}

/* --- Column Layout Styles --- */

/* 1 Column Layout */
.one-column .cheat-dl {
    grid-template-columns: 1fr; /* Single column */
    gap: 0.3rem 0; /* Smaller row gap */
}
.one-column .cheat-dl dt,
.one-column .cheat-dl dd {
    grid-column: 1; /* Both items in the first column */
}
.one-column .cheat-dl dd {
    margin-bottom: 0.1rem; /* Space below description */
    /* padding-left: 1em; /* Optional indent */
}

/* 2 Column Layout */
.two-column .cheat-dl {
    /* Define the two columns */
    grid-template-columns: minmax(150px, 30%) 1fr; /* Adjust percentage/px as needed */
}
/* dt and dd styles are already set for 2 columns by default */

/* 3 Column Layout (Using UL) */
.three-column .cheat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    /* CSS Columns */
    column-count: 3;
    column-gap: 2rem;
}

/* 3 Column Layout (Using UL) */
.three-column p {
    margin: 4px 0px 7px 0px;
}

.three-column h3, .four-column h3 {
    margin: 4px 0px 7px 0px;
    background-color: var(--card-bg);
    font-size: 110%;
    padding: 2px 0px 2px 0px;
}


.three-column .cheat-list li {
    margin-bottom: 0.2rem;
    /* Prevent items breaking across columns */
    break-inside: avoid-column;
    page-break-inside: avoid; /* Older syntax */
    padding-bottom: 0.2rem; /* Add space below item before column break */
    /* Style items if needed */
    code {
        font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
        font-size: 0.95em;
        font-weight: 600;
        color: var(--secondary-color);
        margin-right: 0.5em;
    }
}

.four-column .cheat-dl {
    display: block; /* Override display: grid */
    /* Apply CSS Columns */
    column-count: 4;
    column-gap: 2rem; /* Adjust gap */
    /* Remove grid-specific properties if inherited */
    grid-template-columns: none;
}

.four-column .cheat-dl dt,
.four-column .cheat-dl dd {
    grid-column: auto; /* Reset grid column assignment */
    display: block; /* Ensure dt and dd are block elements */
    margin-bottom: 0rem; /* Consistent small space below dt/dd */
    /* Prevent items breaking across columns */
    break-inside: avoid;
    page-break-inside: avoid; /* Older syntax */
    padding-bottom: 0rem; /* Add space before potential break */
}

.four-column .cheat-dl dd {
    margin-left: 0; /* Remove default DL indent */
    /* Add slightly more space below description */
    margin-bottom: 0.75rem;
}

.method-signature {
    font-weight: bold;
    margin-top: 15px;
    margin-bottom: 5px;
}

/* --- Testimonials Section Styles (Compact Version) --- */

.testimonials-section {
    padding: 1rem 0;
    background-color: var(--card-bg);
    transition: background-color 0.3s ease;
}

.testimonials-section h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 600;
}

/* Changed from grid to a standard block for single column */
.testimonials-grid {
    max-width: 800px; /* Constrain width for single column readability */
    margin: 0 auto;
    padding: 0 20px;
    display: flex; /* Using flexbox to handle stacking */
    flex-direction: column;
    gap: 1.5rem; /* Space between testimonial cards */
}

/* UPDATED: Testimonial Card layout changed to horizontal */
.testimonial-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0rem 1rem;
    display: flex; /* Use flex for horizontal layout */
    align-items: flex-start; /* Align items to the top */
    gap: 1.5rem; /* Space between avatar and text content */
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* REMOVED .testimonial-author as it's no longer needed for layout */
/* The styles for its children will be applied directly */

.author-avatar {
    width: 80px; /* Reduced avatar size */
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0; /* Margin handled by parent gap */
    flex-shrink: 0; /* Prevent avatar from shrinking */
    border: none;
}

/* NEW: Wrapper for all text content */
.testimonial-content {
    display: flex;
    flex-direction: column; /* Stack quote and author info */
}

.testimonial-quote {
    margin: 1rem 0rem 0.3rem 0rem !important;
    padding: 0.5rem 1.5rem !important;
    border: none;
    font-style: normal;
    order: 1; /* Display quote first */
}
.testimonial-quote p {
    font-size: 0.95rem; /* Slightly reduced font size */
    line-height: 1.6;
    color:  color-mix(in srgb, var(--text-color) 80%, var(--bg-color) 20%);
    margin: 0;
    /* Removed pseudo-element quotes for a cleaner look, can be re-added */
    /* position: relative; */
    /* padding-left: 0; */
}
/* Remove pseudo-element if it was used */
/* .testimonial-quote p::before { content: ''; } */


/* --- UPDATED: Author Info Styles --- */
.author-info {
    order: 2; /* Keep author info after quote */
    display: flex; /* Arrange name and title horizontally */
    flex-wrap: wrap; /* Allow wrapping on very small screens */
    align-items: baseline; /* Align text along the baseline */
    margin-bottom: 0.3rem !important;
}

.author-name {
    margin: 0;
    margin-bottom: 0.3rem !important;    
    font-weight: 600;
    font-size: 1rem;
    color:  color-mix(in srgb, var(--text-color) 80%, var(--bg-color) 20%) !important;
}

.author-title {
    margin: 0;
        margin-bottom: 0.3rem !important;
    font-size: 0.9rem; /* Keep slightly smaller size */
    color: color-mix(in srgb, var(--text-color) 75%, var(--bg-color) 25%) !important;
    /* Optional: Add a separator using a pseudo-element */
    position: relative;
}
/* This adds a comma or other separator before the title */
.author-title::before {
    content: ", "; /* You can change this to " - " or " | " etc. */
    color: color-mix(in srgb, var(--text-color) 75%, var(--bg-color) 25%) !important;
}

.progress-ring {
  position: absolute;
  top: 10px;
  right: 10px;
}

.ring {
  stroke-dasharray: 63;
  stroke-dashoffset: 63;
  animation: fillRing 3s linear infinite;
}

@keyframes fillRing {
  to { stroke-dashoffset: 0; }
}

.dots {
  position: absolute;
  top: 3px;
  right: 29px;
  font-size: 25px;
  display: flex;
  gap: 2px;
  color: #3fb1a0;
  cursor:pointer;
}

.dots span {
  animation: dotblink 2s infinite;
}

.dots span:nth-child(2) {
  animation-delay: 0.4s;
}
.dots span:nth-child(3) {
  animation-delay: 0.8s;
}

@keyframes dotblink {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

@media (max-width: 500px) {
    .testimonial-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .testimonial-content {
        align-items: center;
    }
    .author-avatar {
        margin-bottom: 1rem;
    }
    /* Optional: Center the author info when stacked */
    .author-info {
        justify-content: center;
    }
}

@media (max-width: 650px) { /* Breakpoint for 2/3/4 columns -> 1 */
    .two-column .cheat-dl,
    .four-column .cheat-dl { /* Stack DL based layouts */
        display: grid; /* Revert to grid for easier stacking */
        grid-template-columns: 1fr;
        gap: 0.3rem 0;
        column-count: 1; /* Ensure column count is 1 */
    }
    .two-column .cheat-dl dt,
    .two-column .cheat-dl dd,
    .four-column .cheat-dl dt,
    .four-column .cheat-dl dd {
        grid-column: 1;
        break-inside: auto; /* Allow breaking normally when stacked */
        page-break-inside: auto;
        padding-bottom: 0; /* Reset padding */
    }
     .two-column .cheat-dl dd,
     .four-column .cheat-dl dd {
        margin-bottom: 0.75rem;
        /* padding-left: 1em; /* Optional indent */
    }

    .three-column .cheat-list { /* Stack UL based layout */
        column-count: 1;
    }
     .three-column .cheat-list li {
         break-inside: auto;
         page-break-inside: auto;
         padding-bottom: 0;
     }
}

@media (max-width: 1100px) { /* Breakpoint for 4 columns -> 3 */
    .four-column .cheat-dl {
        column-count: 3;
    }
}

@media (max-width: 900px) { /* Breakpoint for 3 columns -> 2 */
    .three-column .cheat-list,
    .four-column .cheat-dl {
        column-count: 2;
    }
}