:root {
    --deped-blue: #0038a8;
    --deped-red: #ce1126;
    --light-gray: #f5f7fa;
    --dark: #1e1e2f;
    --muted: #5f6678;
    --header-height: 80px;
    --sidebar-width: 310px;
    --sidebar-rail-width: 74px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light-gray);
    color: var(--dark);
    overflow-x: hidden;
}

header {
    position: fixed;
    width: 100%;
    min-height: var(--header-height);
    top: 0;
    left: 0;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.header-inner {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 16px;
    min-height: var(--header-height);
    padding: 15px 8%;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-container img {
    width: 50px;
    height: auto;
}

.logo-container span {
    font-weight: 700;
    font-size: 18px;
    color: var(--deped-blue);
}

.menu-toggle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    background: var(--deped-blue);
    color: white;
    width: 46px;
    height: 46px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.25s ease;
}

.menu-toggle[aria-expanded="true"] {
    background: var(--deped-red);
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: white;
}

.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: var(--sidebar-width);
    max-width: 84vw;
    height: calc(100vh - var(--header-height));
    background: white;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    padding: 12px 18px 20px;
    transform: translateX(calc(-100% + var(--sidebar-rail-width)));
    transition: transform 0.28s ease;
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-tools {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.sidebar ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: opacity 0.2s ease;
}

.sidebar:not(.open) ul {
    opacity: 0;
    pointer-events: none;
}

.sidebar ul li a {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    color: var(--dark);
    font-size: 15px;
    font-weight: 600;
    position: relative;
    transition: 0.3s ease;
}

.sidebar ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 0;
    height: 2px;
    background: var(--deped-red);
    transition: 0.3s ease;
}

.sidebar ul li a:hover,
.sidebar ul li a.nav-active {
    color: var(--deped-red);
}

.sidebar ul li a:hover::after,
.sidebar ul li a.nav-active::after {
    width: 100%;
}

.page-shell,
footer {
    transition: margin-left 0.28s ease;
}

body.sidebar-open .page-shell,
body.sidebar-open footer {
    margin-left: var(--sidebar-width);
}

body:not(.sidebar-open) .page-shell,
body:not(.sidebar-open) footer {
    margin-left: var(--sidebar-rail-width);
}

.page-shell {
    min-height: calc(100vh - var(--header-height));
    padding: 120px 10% 80px;
}

.page-section {
    max-width: 860px;
    animation: riseIn 0.65s ease both;
}

.hero {
    min-height: 44vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.eyebrow {
    margin-bottom: 12px;
    color: var(--deped-red);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.page-section h1 {
    max-width: 820px;
    color: var(--deped-blue);
    font-size: 42px;
    line-height: 1.18;
}

.page-section p:not(.eyebrow) {
    margin-top: 20px;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.7;
    font-size: 16px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    margin-top: 44px;
}

.card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border-top: 4px solid var(--deped-blue);
    transition: 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    border-top-color: var(--deped-red);
}

.card h2 {
    color: var(--deped-blue);
    font-size: 19px;
    line-height: 1.3;
}

.card p {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
}

.top-btn {
    position: fixed;
    right: 18px;
    bottom: 18px;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--deped-red);
    color: white;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.3s ease;
}

.top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

footer {
    text-align: center;
    padding: 30px;
    background: var(--deped-blue);
    color: white;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .header-inner {
        padding: 12px 5%;
    }

    .page-shell {
        padding: 110px 7% 70px;
    }

    .page-section h1 {
        font-size: 36px;
    }

    .content-grid {
        gap: 18px;
    }
}

@media (max-width: 768px) {
    body.sidebar-open .page-shell,
    body.sidebar-open footer,
    body:not(.sidebar-open) .page-shell,
    body:not(.sidebar-open) footer {
        margin-left: 0;
    }

    .page-section h1 {
        font-size: 30px;
    }

    .logo-container span {
        font-size: 15px;
    }

    .page-shell {
        min-height: auto;
        padding: 100px 6% 60px;
    }

    .hero {
        min-height: 34vh;
    }

    .card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header-inner {
        padding: 12px 5%;
    }

    .logo-container img {
        width: 40px;
    }

    .logo-container span {
        font-size: 14px;
    }

    .page-section h1 {
        font-size: 26px;
    }

    .page-section p:not(.eyebrow) {
        font-size: 14px;
    }
}
