/*
    Spenca sidebar + chrome — navy / blue theme
*/

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
    --esb-accent: #004a9b;
    --esb-accent-2: #0e4194;
    --esb-accent-deep: #04122e;
    --esb-sky: #1e6ec8;
    --esb-accent-soft: #d6e6f8;
    --esb-ink: #04122e;
    --esb-muted: #5b6b86;
    --esb-bg: #eef2f9;
    --esb-surface: #ffffff;
    --esb-line: #c5d4e8;
    --esb-font: "DM Sans", "Segoe UI", sans-serif;
}

html {
    font-size: 16px;
}

body {
    font-family: var(--esb-font);
    background: var(--esb-bg);
    font-size: 16px;
    color: var(--esb-ink);
}

p {
    font-family: var(--esb-font);
    font-size: 1.1em;
    font-weight: 300;
    line-height: 1.7em;
    color: var(--esb-muted);
}

a,
a:hover,
a:focus {
    color: inherit;
    text-decoration: none;
    transition: all 0.25s ease;
}

.navbar {
    padding: 15px 10px;
    background: var(--esb-surface);
    border: none;
    border-radius: 0;
    margin-bottom: 40px;
    box-shadow: 1px 1px 3px rgba(15, 23, 42, 0.08);
}

.navbar-btn {
    box-shadow: none;
    outline: none !important;
    border: none;
}

.line {
    width: 100%;
    height: 1px;
    border-bottom: 1px dashed var(--esb-line);
    margin: 40px 0;
}

/* ---------------------------------------------------
    HEADER BAR
----------------------------------------------------- */

.app-header {
    background: linear-gradient(135deg, #1e6ec8 0%, #0e4194 52%, #04122e 100%);
    min-height: 72px;
    width: 100%;
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    box-shadow: 0 8px 24px rgba(4, 18, 46, 0.32);
    z-index: 100;
    box-sizing: border-box;
}

.app-header .header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: start;
    z-index: 2;
    flex-wrap: wrap;
}

.app-header .header-right {
    justify-self: end;
    min-width: 1px;
}

.app-header .header-btn-sidebar {
    background: rgba(255, 255, 255, 0.16) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    color: #f8fafc !important;
    font-family: var(--esb-font);
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 8px 14px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}

.app-header .header-btn-sidebar:hover,
.app-header .header-btn-sidebar:focus {
    background: rgba(255, 255, 255, 0.26) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.22);
}

.app-header .header-btn-sidebar:active {
    transform: translateY(1px);
}

.app-header .header-home-link {
    display: inline-flex;
    text-decoration: none !important;
}

.app-header .header-btn-home {
    font-family: var(--esb-font);
    font-weight: 600;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
    color: var(--esb-accent) !important;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
    padding: 7px 12px;
    white-space: nowrap;
}

.app-header .header-btn-home:hover,
.app-header .header-btn-home:focus {
    background: #fff !important;
    color: var(--esb-accent-deep) !important;
}

.app-header .header-title {
    margin: 0;
    padding: 0 8px;
    text-align: center;
    font-weight: 700;
    font-size: clamp(1.25rem, 2.6vw, 2.15rem);
    line-height: 1.15;
    color: #f8fafc;
    text-shadow: 0 2px 12px rgba(15, 23, 42, 0.25);
    font-family: var(--esb-font);
    letter-spacing: -0.02em;
    word-break: break-word;
    justify-self: center;
    max-width: min(720px, 52vw);
    pointer-events: none;
}

@media (max-width: 768px) {
    .app-header {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 10px;
        padding: 12px 14px;
        min-height: auto;
    }

    .app-header .header-left {
        justify-self: center;
        order: 2;
    }

    .app-header .header-title {
        order: 1;
        max-width: 100%;
        font-size: 1.25rem;
    }

    .app-header .header-right {
        display: none;
    }

    .app-header .header-btn-sidebar span {
        display: none;
    }
}

/* ---------------------------------------------------
    SIDEBAR STYLE
----------------------------------------------------- */

#sidebar {
    width: 260px;
    position: fixed;
    top: 0;
    left: -270px;
    height: 100vh;
    z-index: 9999;
    background: linear-gradient(180deg, #1e6ec8 0%, #0e4194 52%, #04122e 100%);
    color: #fff;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 4px 0 22px rgba(4, 18, 46, 0.38);
    font-family: var(--esb-font);
}

#sidebar.active {
    left: 0 !important;
}

#dismiss {
    width: 36px;
    height: 36px;
    line-height: 36px;
    text-align: center;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    z-index: 10;
}

#dismiss:hover {
    background: #fff;
    color: var(--esb-accent);
}

.overlay {
    display: none;
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.35s ease-in-out;
    top: 0;
    left: 0;
}

.overlay.active {
    display: block;
    opacity: 1;
}

#sidebar .sidebar-header {
    padding: 20px 48px 16px 20px;
    background: rgba(15, 23, 42, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 1em;
    font-weight: 600;
    line-height: 1.45;
    min-height: 70px;
}

#sidebar ul.components {
    padding: 12px 0 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#sidebar ul p {
    color: #fff;
    padding: 8px 16px 12px;
    margin: 0;
    font-size: 0.95em;
    font-weight: 600;
    letter-spacing: 0.02em;
    opacity: 0.95;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 6px;
}

#sidebar ul li a {
    padding: 8px 16px;
    font-size: 1.05em;
    display: block;
    border-left: 3px solid transparent;
    color: rgba(248, 250, 252, 0.95);
}

#sidebar ul li a:hover {
    color: var(--esb-accent);
    background: #fff;
    border-left-color: var(--esb-accent-2);
}

#sidebar ul li.active > a,
a[aria-expanded="true"] {
    color: #fff;
    background: rgba(15, 23, 42, 0.22);
}

a[data-toggle="collapse"] {
    position: relative;
}

a[data-toggle="collapse"]::after {
    content: '\203A';
    font-size: 1.2em;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.2s ease;
    opacity: 0.85;
}

a[data-toggle="collapse"][aria-expanded="true"]::after {
    transform: translateY(-50%) rotate(90deg);
}

.dropdown-toggle::after {
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

ul ul a {
    font-size: 0.95em !important;
    padding: 7px 16px 7px 28px !important;
    background: rgba(15, 23, 42, 0.18);
}

ul ul a:hover {
    background: #fff !important;
    color: var(--esb-accent) !important;
}

ul.CTAs {
    padding: 20px;
}

ul.CTAs a {
    text-align: center;
    font-size: 0.9em !important;
    display: block;
    border-radius: 8px;
    margin-bottom: 5px;
}

a.download {
    background: #fff;
    color: var(--esb-accent);
}

a.article,
a.article:hover {
    background: rgba(15, 23, 42, 0.22) !important;
    color: #fff !important;
}

/* Custom scrollbar (native fallback) */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 3px;
}

#sidebar::-webkit-scrollbar-track {
    background: transparent;
}

/* ---------------------------------------------------
    CONTENT STYLE
----------------------------------------------------- */

#content {
    width: 100%;
    padding: 20px;
    min-height: 100vh;
    transition: all 0.3s;
    position: absolute;
    top: 0;
    right: 0;
}
