
:root {
    --dg-font-heading: 'Encode Sans Condensed', sans-serif;
    --dg-font-body: 'Heebo', sans-serif;
    --dg-header-h: 72px;
    --dg-sidebar-w: min(320px, 88vw);
    --dg-z-header: 1000;
    --dg-z-sidebar: 1100;
    --dg-z-overlay: 1050;
    --dg-transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.dg-header {
    position: sticky;
    top: 0;
    z-index: var(--dg-z-header);
    background: var(--dg-primary);
    border-bottom: 1px solid var(--dg-border);
    box-shadow: 0 2px 12px rgba(14, 61, 102, 0.25);
    transition: background var(--dg-transition), box-shadow var(--dg-transition), border-color var(--dg-transition);
}

.dg-header.is-scrolled {
    background: #fff;
    border-bottom-color: #e2e8f0;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.dg-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1280px;
    margin: 0 auto;
    padding: .25rem 1.25rem;
    min-height: var(--dg-header-h);
}

.dg-header__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    text-decoration: none;
    color: var(--dg-text);
    font-family: var(--dg-font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
}

.dg-header__logo img {
    height: 70px;
    width: auto;
}

.dg-header__logo img.dg-header__logo-default {
    display: block;
}

.dg-header__logo img.dg-header__logo-scrolled {
    display: none;
}

.dg-header.is-scrolled .dg-header__logo img.dg-header__logo-default {
    display: none;
}

.dg-header.is-scrolled .dg-header__logo img.dg-header__logo-scrolled {
    display: block;
}

.dg-header.is-scrolled .dg-nav__link,
.dg-header.is-scrolled .dg-nav__trigger {
    color: var(--dg-primary);
}

.dg-header.is-scrolled .dg-nav__link:hover,
.dg-header.is-scrolled .dg-nav__trigger:hover,
.dg-header.is-scrolled .dg-nav__item.is-open > .dg-nav__trigger {
    color: var(--dg-highlight);
}

.dg-header.is-scrolled .dg-nav__link--cta {
    color: var(--dg-secondary);
}

.dg-header.is-scrolled .dg-header__toggle-bar {
    background: var(--dg-primary);
}

/* Desktop navigation */
.dg-nav-desktop {
    display: none;
}

.dg-nav__list {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dg-nav__item {
    position: relative;
}

.dg-nav__link,
.dg-nav__trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    font-size: 1.15rem;
    font-weight: 500;
    font-family: var(--dg-font-heading);
    color: var(--dg-text);
    text-decoration: none;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    line-height: 1.4;
    letter-spacing: 0.02em;
    transition: color 0.2s, background 0.2s;
}

.dg-nav__link:hover,
.dg-nav__trigger:hover,
.dg-nav__item.is-open > .dg-nav__trigger {
    color: var(--dg-highlight);
}

.dg-nav__link--cta {
    margin-left: 0.25rem;
    padding: 0.5rem 1rem;
    color: var(--dg-secondary);
    background: var(--dg-highlight);
}

.dg-nav__link--cta:hover {
    color: var(--dg-secondary);
    background: var(--dg-highlight-hover);
}

.dg-nav__chevron {
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform var(--dg-transition);
}

.dg-nav__item.is-open .dg-nav__chevron {
    transform: rotate(-135deg) translateY(1px);
}

.dg-nav__panel {
    position: absolute;
    top: calc(100%);
    left: -1rem;
    min-width: 260px;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(14, 61, 102, 0.12), 0 8px 24px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.97);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    pointer-events: none;
    z-index: 10;
}

.dg-nav__item.is-open .dg-nav__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dg-nav__panel--mega {
    left: 50%;
    transform: translateX(-50%) translateY(12px) scale(0.97);
    min-width: min(780px, 92vw);
    padding: 1.5rem 1.75rem;
}

.dg-nav__item--mega.is-open .dg-nav__panel--mega {
    transform: translateX(-50%) translateY(0) scale(1);
}

.dg-mega {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.dg-mega__title {
    margin: 0 0 0.75rem;
    padding: 0.4rem 0.75rem;
    font-family: var(--dg-font-heading);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dg-primary);
    background: rgba(20, 79, 132, 0.06);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dg-mega__title i {
    font-size: 0.7rem;
}

.dg-mega__col:nth-child(1) .dg-mega__title i { color: #8b5cf6; }
.dg-mega__col:nth-child(2) .dg-mega__title i { color: #f59e0b; }
.dg-mega__col:nth-child(3) .dg-mega__title i { color: #10b981; }

.dg-nav__sub {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dg-nav__sub a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 0.75rem;
    font-family: var(--dg-font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.dg-nav__sub a i {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border-radius: 8px;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dg-nav__sub a:hover {
    color: var(--dg-primary);
    background: rgba(20, 79, 132, 0.05);
}

.dg-nav__sub a:hover i {
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Pastel icon colors */
.dg-nav__sub li:nth-child(1) a i { color: #6366f1; background: rgba(99, 102, 241, 0.1); }
.dg-nav__sub li:nth-child(2) a i { color: #ec4899; background: rgba(236, 72, 153, 0.1); }
.dg-nav__sub li:nth-child(3) a i { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }
.dg-nav__sub li:nth-child(4) a i { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.dg-nav__sub li:nth-child(5) a i { color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
.dg-nav__sub li:nth-child(6) a i { color: #8b5cf6; background: rgba(139, 92, 246, 0.1); }
.dg-nav__sub li:nth-child(7) a i { color: #ef4444; background: rgba(239, 68, 68, 0.1); }
.dg-nav__sub li:nth-child(8) a i { color: #14b8a6; background: rgba(20, 184, 166, 0.1); }
.dg-nav__sub li:nth-child(9) a i { color: #f97316; background: rgba(249, 115, 22, 0.1); }

.dg-nav__badge em {
    font-style: normal;
    font-size: 0.7rem;
    font-weight: 600;
    color: #64748b;
    margin-left: 0.25rem;
}

.dg-nav__item--hidden,
.dg-nav__item--admin {
    display: none !important;
}

/* Hamburger — visible on mobile & tablet */
.dg-header__toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.dg-header__toggle:hover {
    background: rgba(167, 199, 83, 0.12);
}

.dg-header__toggle-bar {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--dg-text);
    border-radius: 2px;
    transition: transform var(--dg-transition), opacity var(--dg-transition);
}

.dg-header.is-menu-open .dg-header__toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.dg-header.is-menu-open .dg-header__toggle-bar:nth-child(2) {
    opacity: 0;
}

.dg-header.is-menu-open .dg-header__toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Overlay */
.dg-sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--dg-z-overlay);
    background: var(--dg-overlay);
    opacity: 0;
    transition: opacity var(--dg-transition);
    pointer-events: none;
}

.dg-sidebar-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.dg-sidebar-overlay[hidden] {
    display: block;
    visibility: hidden;
}

.dg-sidebar-overlay.is-visible[hidden] {
    visibility: visible;
}

/* Right sidebar */
.dg-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    z-index: var(--dg-z-sidebar);
    width: var(--dg-sidebar-w);
    height: 100%;
    height: 100dvh;
    background: var(--dg-secondary);
    /* box-shadow: -8px 0 32px rgba(14, 61, 102, 0.4); */
    transform: translateX(100%);
    transition: transform var(--dg-transition);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.dg-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--dg-border);
    flex-shrink: 0;
}

.dg-sidebar__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--dg-text);
    font-weight: 700;
}

.dg-sidebar__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--dg-text);
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.dg-sidebar__close:hover {
    background: rgba(167, 199, 83, 0.12);
}

.dg-sidebar__nav {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem 0;
}

.dg-sidebar__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dg-sidebar__link {
    display: block;
    padding: 0.75rem 1.25rem;
    font-family: var(--dg-font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--dg-text);
    text-decoration: none;
}

.dg-sidebar__link--cta {
    margin: 0.5rem 1.25rem 0;
    padding: 0.75rem 1rem;
    text-align: center;
    color: var(--dg-secondary);
    background: var(--dg-highlight);
    border-radius: 8px;
}

.dg-sidebar__group {
    border-bottom: 1px solid var(--dg-border);
}


.dg-sidebar__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-family: var(--dg-font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--dg-text);
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
}

.dg-sidebar__trigger::after {
    content: '';
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid var(--dg-text-muted);
    border-bottom: 2px solid var(--dg-text-muted);
    transform: rotate(45deg);
    transition: transform var(--dg-transition);
    flex-shrink: 0;
}

.dg-sidebar__group.is-open .dg-sidebar__trigger::after {
    transform: rotate(-135deg);
}

.dg-sidebar__sub {
    margin: 0;
    padding: 0 0 0.5rem;
    list-style: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.dg-sidebar__group.is-open .dg-sidebar__sub {
    max-height: 1200px;
}

.dg-sidebar__sub a {
    display: block;
    padding: 0.5rem 1.25rem 0.5rem 1.75rem;
    font-family: var(--dg-font-body);
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--dg-text-muted);
    text-decoration: none;
}

.dg-sidebar__sub a:hover {
    color: var(--dg-highlight);
}

.dg-sidebar__label {
    padding: 0.65rem 1.25rem 0.25rem 1.75rem;
    font-family: var(--dg-font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dg-highlight);
}

.dg-badge {
    display: inline-block;
    margin-left: 0.35rem;
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--dg-secondary);
    background: var(--dg-highlight);
    border-radius: 4px;
}

.dg-sidebar__footer {
    flex-shrink: 0;
    padding: 1rem 1.25rem 1.5rem;
    border-top: 1px solid var(--dg-border);
    background: var(--dg-primary);
}

.dg-sidebar__footer-title {
    margin: 0 0 0.5rem;
    font-family: var(--dg-font-heading);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dg-highlight);
}

.dg-sidebar__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dg-sidebar__legal a {
    font-family: var(--dg-font-body);
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--dg-text-muted);
    text-decoration: none;
}

.dg-sidebar__legal a:hover {
    color: var(--dg-highlight);
}

body.dg-no-scroll {
    overflow: hidden;
}

/* Tablet & mobile: hide desktop nav, show hamburger */
@media (max-width: 1023px) {
    .dg-nav-desktop {
        display: none !important;
    }

    .dg-header__toggle {
        display: flex;
    }
}

/* Desktop: show nav, hide hamburger; hover + click for dropdowns */
@media (min-width: 1024px) {
    .dg-nav-desktop {
        display: block;
    }

    .dg-header__toggle,
    .dg-sidebar,
    .dg-sidebar-overlay {
        display: none !important;
    }

    /* Hover opens dropdown on desktop only */
    .dg-nav__item--has-menu:hover > .dg-nav__panel,
    .dg-nav__item--has-menu:focus-within > .dg-nav__panel {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .dg-nav__item--mega:hover > .dg-nav__panel--mega,
    .dg-nav__item--mega:focus-within > .dg-nav__panel--mega {
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* Tablet: click-toggle for desktop-style panels when JS adds tablet mode — handled in JS */
