/* 1. Global Reset & Bootstrap Variable Neutralization */
*, *::before, *::after {
    box-sizing: border-box;
}

:root {
    --bs-body-bg: #f0f2f5 !important;
}

html, body {
    background-color: #f0f2f5 !important;
    margin: 0;
    padding: 0;
    font-family: Calibri, Arial, Helvetica, sans-serif;
}

/* ---- Text formatting ---- */
.page-h-txt {
    text-align: left;
    font-size: 26px;
    font-weight: 750;
}

.group-h-txt {
    text-align: left;
    font-size: 18px;
    font-weight: 650;
}

.sect-h-txt {
    text-align: left;
    font-size: 20px;
    font-weight: 750;
}

.std-text {
    line-height: 1.5;
    text-align: left;
    font-size: 18px;
}

.page-text {
    line-height: 1.5;
    text-align: left;
    font-size: 18px;
}

/* Code & Preformatted Blocks */
pre, code {
    max-width: 100%;
    white-space: pre-wrap !important;
    word-break: break-all;
    overflow-x: auto;
    box-sizing: border-box;
}

/* ------------ Powershell Warning Section------------- */
.powershell-caution-box {
    background-color: #fff8f8;
    border-left: 4px solid #d9534f;
    border-radius: 4px;
    padding: 15px;
    margin: 15px 0;
    color: #333333;
}

.powershell-caution-header svg {
    width: 24px;
    height: 24px;
    min-width: 20px;
    min-height: 20px;
    margin-right: 8px;
    flex-shrink: 0;
    fill: #d9534f;
}

.powershell-caution-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #d9534f;
}

.powershell-caution-box p,
.powershell-caution-box li {
    font-size: .9rem;
    line-height: 1.4;
    margin-bottom: 6px;
}

.powershell-caution-box h4 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 10px 0 6px 0;
    color: #2c3e50;
}

.powershell-caution-box code {
    background-color: #f1f1f1;
    color: #c7254e;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.75rem;
}

.powershell-caution-footer {
    background-color: #fdf2f2;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 8px 12px;
    margin-top: 10px;
    font-size: 1rem;
}

/* ------------------ Desktop Layout ------------------ */
.wrapper {
    max-width: 80%;
    min-height: 100vh;
    margin: 0 auto;
    background-color: transparent !important;
    padding: 20px 10px;
    display: flex;
    gap: 15px;
}

.left-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 250px;
    flex-shrink: 0;
    gap: 10px;
}

.logo-link {
    display: inline-block;
    text-decoration: none;
}

.logo {
    width: 100px;
    height: 120px;
    display: block;
}

.mobile-header-row {
    display: none;
}

.sidenav {
    width: 100%;
    background-color: #111;
    border-radius: 8px;
    flex-grow: 1;
    overflow: hidden;
}

    .sidenav a {
        color: white;
        padding: 10px;
        text-decoration: none;
        display: block;
        font-size: 22px;
    }

        .sidenav a.active {
            color: #ffcc00;
            font-weight: bold;
            border-left: 4px solid #ffcc00;
            padding-left: 12px;
        }

        .sidenav a:hover {
            background-color: #ddd;
            color: black;
        }

.nav-group {
    position: relative;
    width: 100%;
}

.sub-nav-items {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease-in-out, opacity 0.25s ease-in-out;
    background-color: #1a1a1a;
}

    .sub-nav-items a {
        font-size: 1.25rem;
        padding: 6px 0 6px 10px;
    }

.nav-group:hover .sub-nav-items,
.nav-group.is-active .sub-nav-items {
    max-height: 250px;
    opacity: 1;
}

.my-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    background-color: #ffffff;
    padding: 12px;
    margin-top: 130px; /* PC mode remains intact flush with menu */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    min-height: 80vh;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

    .my-content h1,
    .my-content h2,
    .my-content h3,
    .my-content h4,
    .my-content p,
    .my-content div,
    .page-h-txt,
    .sect-h-txt,
    .group-h-txt {
        max-width: 100%;
        overflow-wrap: break-word;
        word-break: break-word;
    }

.nav-toggle,
.nav-toggle-label {
    display: none;
}

/* --- RESPONSIVE STYLES --- */

@media screen and (max-width: 1600px) {
    .wrapper {
        max-width: 85%;
    }
}

@media screen and (max-width: 1400px) {
    .wrapper {
        max-width: 90%;
    }
}

@media screen and (max-width: 1200px) {
    .wrapper {
        max-width: 95%;
    }
}

@media screen and (max-width: 1000px) {
    .wrapper {
        max-width: 98%;
    }
}

/* 800 BREAKPOINT - MOBILE MODE */
@media screen and (max-width: 800px) {

    .wrapper {
        width: 100% !important;
        max-width: 100% !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 10px 8px !important;
        background-color: transparent !important;
    }

    .left-col {
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0 !important;
    }

    .desktop-logo {
        display: none !important;
    }

    /* Top Row Container: 5% inset padding */
    .mobile-header-row {
        display: flex !important;
        width: 100% !important;
        padding: 0 5% !important;
        justify-content: space-between !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }

    .mobile-logo-link {
        display: inline-block !important;
    }

    .mobile-logo {
        width: 60px !important;
        height: auto !important;
        margin: 0 !important;
    }

    /* Hamburger Button Controller */
    .nav-toggle-label {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        width: 42px !important;
        height: 36px !important;
        cursor: pointer !important;
        padding: 8px !important;
        border: 2px solid #333 !important;
        border-radius: 6px !important;
        background-color: #fff !important;
        margin: 0 !important;
    }

        .nav-toggle-label span {
            display: block !important;
            height: 3px !important;
            width: 100% !important;
            background-color: #111 !important;
            border-radius: 2px !important;
            transition: all 0.3s ease !important;
        }

    .nav-toggle {
        display: none !important;
    }

    /* Menu Drawer: CLOSED BY DEFAULT on mobile */
    .sidenav {
        display: none !important;
        width: 220px !important;
        max-width: 220px !important;
        flex-direction: column !important;
        background-color: #111 !important;
        border-radius: 8px !important;
        padding: 10px 0 !important;
        margin: 10px 0 10px 5% !important;
        align-self: flex-start !important;
    }

    /* OPEN MENU DRAWER when checkbox is checked */
    .left-col .nav-toggle:checked ~ .sidenav,
    .nav-toggle:checked ~ .sidenav {
        display: flex !important;
    }

    .sidenav a {
        width: 100% !important;
        text-align: left !important;
        padding: 10px 14px !important;
        font-size: 16px !important;
        border-bottom: 1px solid #222 !important;
    }

        .sidenav a:last-child {
            border-bottom: none !important;
        }

    .sub-nav-items {
        padding-left: 10px !important;
    }

        .sub-nav-items a {
            font-size: 14px !important;
            padding: 8px 12px !important;
        }

    /* Full-width Mobile Content Card shifted up to the old line position */
    .my-content {
        display: flex !important;
        width: 100% !important;
        max-width: 100% !important;
        flex-grow: 1 !important;
        background-color: #ffffff !important;
        padding: 8px !important;
        margin-top: 10px !important; /* Moved up to sit right under header row */
        min-height: auto !important;
        box-sizing: border-box !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
        overflow-x: hidden !important;
    }

    /* Animate Hamburger lines into an "X" when drawer opens */
    .left-col .nav-toggle:checked ~ .mobile-header-row .nav-toggle-label span:nth-child(1) {
        transform: translateY(7px) rotate(45deg) !important;
    }

    .left-col .nav-toggle:checked ~ .mobile-header-row .nav-toggle-label span:nth-child(2) {
        opacity: 0 !important;
    }

    .left-col .nav-toggle:checked ~ .mobile-header-row .nav-toggle-label span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg) !important;
    }
}
