body {
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background-color: #FFFFFF; /* white */
}

html {
    height: 100%;
    background-color: #FFFFFF; /* white */
}

#mainContent {
    flex: 1 0 auto;
    display: block;
    background-color: #FFFFFF; /* white */
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background-color: #334155; /* slate */
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-right: calc(max(calc((100% - var(--content-max-width, 1360px)) / 2), calc(var(--content-edge-gap, 32px) / 2)) + 14px + env(safe-area-inset-right));
    padding-bottom: 12px;
    padding-left: calc(max(calc((100% - var(--content-max-width, 1360px)) / 2), calc(var(--content-edge-gap, 32px) / 2)) + 14px + env(safe-area-inset-left));
    position: sticky;
    top: 0;
    z-index: 1001;
    gap: 16px;
}

.topbar .logo {
    background: linear-gradient(to right, #FF6B35, #F9C80E); /* tangerine -> golden */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 35px;
    margin-right: auto;
    text-decoration: none;
    /* Remove underline */
    order: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    order: 3;
    margin-left: 0;
    border-left: 1px solid rgba(247, 247, 242, 0.35); /* off-white tint */
    padding-left: calc(12px * 1.3);
    padding-right: 0;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    text-transform: uppercase;
    text-decoration: none;
    width: 40px;
    height: 40px;
    line-height: 1;
    padding: 0;
    border-radius: 8px;
    border: 0;
    margin-left: 0;
    margin-right: -6px;
}

.lang-switch:hover {
    background-color: rgba(51, 65, 85, 0.22); /* slate tint */
}

.topbar-button {
    position: static;
    transform: none;
    display: flex;
    align-items: center; /* Ensure all items are vertically centered */
    order: 2;
}

.topbar-button a {
    padding: 10px 20px;
    text-decoration: none;
    text-align: center;
    border-radius: 8px; /* Rounded corners for buttons */
}

.topbar-button > a:last-child {
    padding-right: calc(8px * 1.3);
}

.topbar-button a:hover {
    background-color: rgba(51, 65, 85, 0.22); /* slate tint */
}

.topbar-button a:focus-visible,
.dropdown .dropbtn:focus-visible,
.dropdown-content a:focus-visible,
.dropdown-submenu > summary:focus-visible {
    outline: 2px solid #F7F7F2;
    outline-offset: 2px;
}

.menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #F7F7F2; /* warm off-white */
    background: transparent;
    border: 0;
    padding: 8px 12px;
    border-radius: 8px;
}

@media (hover: hover) and (pointer: fine) {
    .menu-btn:hover {
        background-color: rgba(51, 65, 85, 0.22); /* slate tint */
        color: #F7F7F2; /* warm off-white */
    }
}

.menu-icon {
    position: relative;
    width: 20px;
    height: 2px;
    background: currentColor;
    display: inline-block;
}

.menu-icon::before,
.menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 20px;
    height: 2px;
    background: currentColor;
}

.menu-icon::before {
    top: -6px;
}

.menu-icon::after {
    top: 6px;
}

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

.dropdown .dropbtn {
    padding: 10px 20px;
    text-decoration: none;
    background-color: transparent;
    border: none;
    cursor: pointer;
    border-radius: 8px; /* Rounded corners for drop button */
}

.dropdown .dropbtn:hover {
    background-color: rgba(51, 65, 85, 0.22); /* slate tint */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9; /* light gray */
    min-width: max-content; /* Adjust width based on content */
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); /* soft shadow */
    z-index: 1;
    top: calc(100% + 10px); /* Move the dropdown content down by 10px more */
    left: 50%;
    transform: translateX(-50%); /* Center the dropdown */
    border-radius: 8px; /* Rounded corners for dropdown */
    padding: 8px 0; /* Reduce lateral padding */
}

.dropdown-content a {
    padding: 15px 20px; /* Further reduce padding for dropdown items */
    text-decoration: none;
    display: block;
    text-align: center; /* Center the text within the dropdown items */
    border-radius: 8px; /* Rounded corners for dropdown items */
}

.dropdown-content a:hover {
    background-color: rgba(51, 65, 85, 0.12); /* slate tint */
}

.dropdown-content a:focus-visible,
.dropdown-submenu > summary:focus-visible {
    background-color: rgba(51, 65, 85, 0.12); /* slate tint */
    outline-color: #334155;
}

.dropdown-submenu {
    margin: 0;
}

.dropdown-submenu > summary {
    list-style: none;
    padding: 12px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
}

.dropdown-submenu > summary::-webkit-details-marker {
    display: none;
}

.dropdown-submenu > summary::after {
    content: "+";
    font-size: 16px;
    line-height: 1;
}

.dropdown-submenu[open] > summary::after {
    content: "-";
}

.dropdown-submenu > summary:hover {
    background-color: rgba(51, 65, 85, 0.12); /* slate tint */
}

.dropdown-submenu-links a {
    padding: 10px 28px;
    text-align: left;
}

.dropdown-submenu-links .dropdown-category-link {
    padding-top: 12px;
    padding-bottom: 12px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown:focus-within .dropdown-content {
    display: block;
}

.mobile-menu {
    display: flex;
    position: fixed;
    box-sizing: border-box;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100svh;
    height: 100dvh;
    width: 280px;
    background-color: #FFFFFF; /* white */
    box-shadow: none;
    padding: 70px 20px 110px;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(-110%);
    transition: transform 0.25s ease;
    z-index: 1000;
}

.mobile-menu.open {
    transform: translateX(0);
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35); /* dark overlay */
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 999;
}

.mobile-overlay.open {
    display: block;
    opacity: 1;
}

.mobile-close {
    position: absolute;
    top: 18px;
    right: 16px;
    background: transparent;
    border: 0;
    font-size: 18px;
    cursor: pointer;
}

.mobile-section {
    margin-bottom: 8px;
}

.mobile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 0 -20px;
    padding: 0 20px;
    border-radius: 0;
}

.mobile-section-header:hover {
    background-color: rgba(51, 65, 85, 0.12); /* slate tint */
}

.mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.mobile-toggle::before {
    content: "";
    width: 9px;
    height: 9px;
    border-right: 2px solid #000; /* black */
    border-bottom: 2px solid #000; /* black */
    transform: rotate(45deg);
}

.mobile-section.open .mobile-toggle::before {
    transform: rotate(-135deg);
}

.mobile-sublist[hidden] {
    display: none;
}

.mobile-link {
    display: block;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
}

.mobile-section-header .mobile-link {
    flex: 1;
    padding: 10px 0;
    border-radius: 0;
}

.mobile-section-header .mobile-link:hover {
    background-color: transparent;
}

.mobile-menu > .mobile-link {
    margin: 0 -20px;
    padding: 10px 20px;
    border-radius: 0;
}

.mobile-link:hover {
    background-color: rgba(51, 65, 85, 0.12); /* slate tint */
}

.mobile-sublist {
    padding-left: 16px;
    padding-top: 6px;
    padding-bottom: 8px;
}

.mobile-sublist a {
    display: block;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
}

.mobile-sublist a:hover {
    background-color: rgba(51, 65, 85, 0.12); /* slate tint */
}

.mobile-subgroup {
    margin: 2px 0;
}

.mobile-subgroup > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

.mobile-subgroup > summary::-webkit-details-marker {
    display: none;
}

.mobile-subgroup > summary::after {
    content: "+";
    font-size: 15px;
    line-height: 1;
}

.mobile-subgroup[open] > summary::after {
    content: "-";
}

.mobile-subgroup > summary:hover {
    background-color: rgba(51, 65, 85, 0.12); /* slate tint */
}

.mobile-subgroup-links {
    padding-left: 10px;
    padding-bottom: 4px;
}

.mobile-subgroup-links a {
    display: block;
    text-decoration: none;
    padding: 7px 12px;
    border-radius: 8px;
}

.mobile-subgroup-links .mobile-subgroup-category {
}

.mobile-subgroup-links a:hover {
    background-color: rgba(51, 65, 85, 0.12); /* slate tint */
}

.mobile-social {
    position: absolute;
    left: 36px;
    right: 36px;
    bottom: 22px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0 0;
    border-top: 1px solid rgba(51, 65, 85, 0.2); /* subtle slate divider */
    align-items: center;
    background: #FFFFFF; /* white */
    z-index: 2;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #334155; /* slate */
    text-decoration: none;
    border: 0;
    background: transparent;
    padding: 6px 10px;
    min-height: 32px;
    border-radius: 12px;
    gap: 6px;
}

.social-link svg {
    width: 26px;
    height: 26px;
}

.social-link:hover {
    background-color: rgba(51, 65, 85, 0.12); /* slate tint */
    color: #334155; /* slate */
}

.social-text {
    font-size: 14px;
    line-height: 1;
}

@media (max-width: 980px) {
    html,
    body {
        background-color: #FFFFFF; /* white */
    }

    .topbar {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
        align-items: center;
        width: 100%;
        max-width: none;
        margin: 0;
    }

    .topbar .logo {
        font-size: 26px;
        justify-self: center;
        margin-right: 0;
        order: 2;
    }

    .topbar-actions {
        display: contents;
        margin-left: 0;
        border-left: 0;
        padding-left: 0;
    }

    .menu-btn {
        justify-self: start;
        order: 1;
    }

    .lang-switch {
        justify-self: end;
        order: 3;
    }

    .topbar-button {
        display: none;
    }

    .menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

@media (min-width: 981px) {
    .mobile-menu {
        display: none;
    }

    .mobile-overlay {
        display: none;
    }
}

@media (hover: none), (pointer: coarse) {
    .lang-switch:hover,
    .topbar-button a:hover,
    .dropdown .dropbtn:hover,
    .dropdown-content a:hover,
    .dropdown-submenu > summary:hover,
    .mobile-section-header:hover,
    .mobile-link:hover,
    .mobile-sublist a:hover,
    .mobile-subgroup > summary:hover,
    .mobile-subgroup-links a:hover,
    .social-link:hover {
        background-color: transparent;
        text-shadow: none;
        transform: none;
        filter: none;
    }

    .menu-btn,
    .mobile-close,
    .mobile-toggle,
    .mobile-link,
    .mobile-sublist a,
    .mobile-subgroup > summary,
    .social-link {
        -webkit-tap-highlight-color: transparent;
    }

    .menu-btn:active,
    .mobile-close:active,
    .mobile-toggle:active,
    .mobile-section-header:active,
    .mobile-link:active,
    .mobile-sublist a:active,
    .mobile-subgroup > summary:active,
    .mobile-subgroup-links a:active,
    .social-link:active {
        background-color: transparent;
        box-shadow: none;
        text-shadow: none;
        transform: none;
        filter: none;
    }

    .menu-btn:focus-visible,
    .mobile-close:focus-visible,
    .mobile-toggle:focus-visible,
    .mobile-link:focus-visible,
    .mobile-sublist a:focus-visible,
    .mobile-subgroup > summary:focus-visible,
    .social-link:focus-visible {
        outline: 2px solid #0f172a;
        outline-offset: 2px;
        box-shadow: none;
    }
}

