* {
    box-sizing: border-box;
}

:root {
    --header-bg: #08283f;
    --header-bg-mid: #0b3552;
    --header-bg-soft: #124765;

    --header-text: #ffffff;
    --header-secondary: #e4f0f6;

    --tmd-gold: #f0c63f;

    --page-bg: #eaf0f3;
    --sidebar-bg: #eef3f6;

    --border: #d1dce2;

    --text-main: #111111;
    --text-secondary: #506873;

    --viewer-bg: #061720;
}


html,
body {
    margin: 0;

    width: 100%;
    height: 100%;

    font-family:
        "Noto Sans Thai",
        Tahoma,
        Arial,
        sans-serif;

    background: var(--page-bg);
}


body {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    overflow: hidden;
}


/* =========================================================
   HEADER
========================================================= */

.top-header {
    height: 64px;
    flex: 0 0 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 0 28px 0 18px;

    color: #ffffff;

    background:
        linear-gradient(
            110deg,
            var(--header-bg) 0%,
            var(--header-bg-mid) 58%,
            var(--header-bg-soft) 100%
        );

    border-bottom: 3px solid var(--tmd-gold);
}


.header-brand {
    display: flex;
    align-items: center;

    gap: 10px;

    min-width: 295px;
}


.header-logo {
    width: 44px;
    height: 44px;

    object-fit: contain;

    flex: 0 0 auto;
}


.header-agency {
    display: flex;
    flex-direction: column;

    line-height: 1.15;

    white-space: nowrap;
}


.header-agency strong {
    font-size: 20px;
    font-weight: 800;
}


.header-agency span {
    margin-top: 3px;

    font-size: 14px;
    font-weight: 600;

    color: var(--header-secondary);
}


.main-nav {
    height: 100%;

    display: flex;
    align-items: stretch;

    gap: 3px;

    white-space: nowrap;
}


.main-nav a {
    display: flex;
    align-items: center;

    padding: 0 13px;

    color: #ffffff;

    text-decoration: none;

    font-size: 18px;
    font-weight: 600;

    border-bottom: 3px solid transparent;

    transition:
        background .15s ease,
        border-color .15s ease;
}


.main-nav a:hover {
    background: rgba(255,255,255,.11);
}


.main-nav a.active {
    background: rgba(255,255,255,.15);

    border-bottom-color: #74d2ff;

    font-weight: 800;
}


/* =========================================================
   MAIN WORKSPACE
========================================================= */

.home-workspace {
    flex: 1 1 auto;

    min-height: 0;

    display: grid;

    grid-template-columns:
        215px
        minmax(0, 1fr);

    overflow: hidden;
}


/* =========================================================
   LEFT SIDEBAR
========================================================= */

.home-sidebar {
    min-width: 0;

    overflow-y: auto;

    padding: 14px 10px 70px;

    background: var(--sidebar-bg);

    border-right: 1px solid var(--border);
}


.sidebar-heading {
    padding: 3px 7px 13px;
}


.sidebar-heading strong {
    display: block;

    color: #101820;

    font-size: 17px;
    font-weight: 900;

    line-height: 1.35;
}


.sidebar-subtitle {
    display: block;

    margin-top: 4px;

    color: #4c6876;

    font-size: 13px;
    font-weight: 700;

    letter-spacing: .02em;
}


/* =========================================================
   MAIN MENU CARDS
========================================================= */

.sidebar-card {
    min-height: 94px;

    display: grid;

    grid-template-columns:
        25px
        minmax(0,1fr)
        14px;

    gap: 7px;

    align-items: start;

    margin-bottom: 9px;

    padding: 13px 9px;

    color: inherit;
    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 7px;

    text-decoration: none;

    box-shadow:
        0 2px 7px rgba(23, 48, 62, .05);

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}


.sidebar-card:hover {
    border-color: #8eb5c8;

    box-shadow:
        0 4px 12px rgba(23, 48, 62, .10);
}


.sidebar-number {
    padding-top: 2px;

    color: #5e7884;

    font-size: 12px;
    font-weight: 900;
}


.sidebar-text {
    min-width: 0;

    display: flex;
    flex-direction: column;
}


.sidebar-text strong {
    color: #101820;

    font-size: 16px;
    font-weight: 900;

    line-height: 1.35;
}


.sidebar-text span {
    margin-top: 6px;

    color: #526a75;

    font-size: 12px;
    font-weight: 600;

    line-height: 1.45;
}


.sidebar-arrow {
    padding-top: 22px;

    color: #247ca6;

    font-size: 21px;
    line-height: 1;
}


/* =========================================================
   REGION LINKS
========================================================= */

.sidebar-separator {
    height: 1px;

    margin: 12px 5px;

    background: #ccd8de;
}


.region-title {
    padding: 0 6px 7px;

    color: #5f7884;

    font-size: 11px;
    font-weight: 900;

    letter-spacing: .08em;
}


.region-links a {
    display: flex;
    flex-direction: column;

    margin-bottom: 7px;

    padding: 9px 10px;

    color: inherit;
    background: #f8fbfc;

    border: 1px solid #d3dfe4;
    border-radius: 6px;

    text-decoration: none;
}


.region-links a:hover {
    background: #ffffff;

    border-color: #94b9ca;
}


.region-links strong {
    color: #111820;

    font-size: 14px;
    font-weight: 900;
}


.region-links span {
    margin-top: 3px;

    color: #5b717c;

    font-size: 11px;
    font-weight: 600;
}


/* =========================================================
   ANIMATION VIEWER
========================================================= */

.animation-panel {
    position: relative;

    min-width: 0;
    min-height: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background:
        radial-gradient(
            circle at center,
            #142f3b 0%,
            #061720 72%
        );
}


#homeSatelliteVideo {
    display: none;

    width: 100%;
    height: 100%;

    object-fit: contain;

    background: #061720;
}


#homeSatelliteVideo.ready {
    display: block;
}


.animation-loading {
    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    z-index: 5;

    color: #d6e2e8;

    font-size: 15px;
    font-weight: 700;

    text-align: center;
}


.animation-loading.hidden {
    display: none;
}


/* =========================================================
   SHORT DESKTOP
========================================================= */

@media (min-width: 1001px) and (max-height: 850px) {

    .top-header {
        height: 60px;
        flex-basis: 60px;
    }

    .header-logo {
        width: 42px;
        height: 42px;
    }

    .header-agency strong {
        font-size: 19px;
    }

    .main-nav a {
        font-size: 17px;
    }

    .home-sidebar {
        padding-top: 10px;
    }

    .sidebar-heading strong {
        font-size: 16px;
    }

    .sidebar-card {
        min-height: 86px;

        padding-top: 10px;
        padding-bottom: 10px;
    }

    .sidebar-text strong {
        font-size: 15px;
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1100px) {

    .top-header {
        padding-right: 12px;
    }

    .main-nav a {
        padding-left: 8px;
        padding-right: 8px;

        font-size: 15px;
    }

    .home-workspace {
        grid-template-columns:
            200px
            minmax(0,1fr);
    }

}


/* =========================================================
   SMALL TABLET
========================================================= */

@media (max-width: 900px) {

    body {
        overflow: auto;
    }

    .top-header {
        height: auto;
        flex-basis: auto;

        flex-wrap: wrap;

        padding: 7px 12px 0;
    }

    .main-nav {
        width: 100%;
        height: 40px;

        overflow-x: auto;
    }

    .main-nav a {
        flex: 0 0 auto;
    }

    .home-workspace {
        display: flex;
        flex-direction: column;

        overflow: visible;
    }

    .home-sidebar {
        overflow: visible;

        padding-bottom: 12px;

        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .animation-panel {
        height: 64vh;
        min-height: 450px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .header-brand {
        min-width: 0;
    }

    .header-logo {
        width: 40px;
        height: 40px;
    }

    .header-agency strong {
        font-size: 18px;
    }

    .header-agency span {
        font-size: 12px;
    }

    .animation-panel {
        height: 55vh;
        min-height: 340px;
    }

}
