/*@font-face {
    font-family: "Prompt";
    src: url("../fonts/Prompt/Prompt-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Prompt";
    src: url("../fonts/Prompt/Prompt-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Prompt";
    src: url("../fonts/Prompt/Prompt-Italic.ttf") format("truetype");
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Prompt";
    src: url("../fonts/Prompt/Prompt-BoldItalic.ttf") format("truetype");
    font-style: italic;
    font-weight: 700;
    font-display: swap;
}*/

@font-face {
    font-family: "Anuphan";
    src: url("../fonts/Anuphan/static/Anuphan-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Anuphan";
    src: url("../fonts/Anuphan/static/Anuphan-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Google Sans";
    src: url("../fonts/Google_Sans/static/GoogleSans-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Google Sans";
    src: url("../fonts/Google_Sans/static/GoogleSans-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Google Sans";
    src: url("../fonts/Google_Sans/static/GoogleSans-Italic.ttf") format("truetype");
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Google Sans";
    src: url("../fonts/Google_Sans/static/GoogleSans-BoldItalic.ttf") format("truetype");
    font-style: italic;
    font-weight: 700;
    font-display: swap;
}

/*@font-face {
    font-family: "Sarabun";
    src: url("../fonts/Sarabun/Sarabun-Regular.ttf") format("truetype");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Sarabun";
    src: url("../fonts/Sarabun/Sarabun-Bold.ttf") format("truetype");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "Sarabun";
    src: url("../fonts/Sarabun/Sarabun-Italic.ttf") format("truetype");
    font-style: italic;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "Sarabun";
    src: url("../fonts/Sarabun/Sarabun-BoldItalic.ttf") format("truetype");
    font-style: italic;
    font-weight: 700;
    font-display: swap;
}*/

:root {
    --primary-color: #001760;
    --primary-bg-color: #A6D1F0;
    --font-family-en: "Anuphan", Arial, Helvetica, sans-serif;
}

* {
    margin: 0;
    font-family: "Anuphan", Arial, Helvetica, sans-serif;
    font-variant-ligatures: none;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}


html,
body {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #d9e8f6;
}

@media (hover: hover) and (pointer: fine) {
    html::-webkit-scrollbar,
    body::-webkit-scrollbar,
    *::-webkit-scrollbar {
        width: 12px;
        height: 12px;
    }

    html::-webkit-scrollbar-track,
    body::-webkit-scrollbar-track,
    *::-webkit-scrollbar-track {
        background: #d9e8f6;
    }

    html::-webkit-scrollbar-thumb,
    body::-webkit-scrollbar-thumb,
    *::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 999px;
        border: 3px solid #d9e8f6;
    }

    html::-webkit-scrollbar-thumb:hover,
    body::-webkit-scrollbar-thumb:hover,
    *::-webkit-scrollbar-thumb:hover {
        background: #0e3aa9;
    }
}

body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensures body takes full height of viewport */
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(166, 209, 240, 0.45), transparent 35%),
        radial-gradient(circle at bottom right, rgba(0, 23, 96, 0.12), transparent 30%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

#page-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.95);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

body.page-loaded #page-loading-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#page-loading-overlay .loading-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #cfe0f6;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: page-loading-spin 0.8s linear infinite;
}

#page-loading-overlay .loading-text {
    color: var(--primary-color);
    font-size: 14px;
    letter-spacing: 0.02em;
}

@keyframes page-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

main {
    position: relative;
    flex: 1 0 auto; /* Allow main to fill available vertical space between header/footer */
    display: flex;
    flex-direction: column;
    background: transparent;
    z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
}

/*html, body {*/
/*    overflow-x: hidden;*/
/*    max-width: 100%;*/
/*}*/

/* Ensure the wrapper that holds the sidebar and content stretches properly */
section#content {
    display: flex;
    flex: 1; /* VERY IMPORTANT: Forces this section to fill the <main> element */
    align-items: stretch; /* Makes aside and div.content equal height */
    background-color: #FFFFFF;
}

/* Make sure the sidebar container itself stretches */
section#content aside {
    width: 320px;
    background: #ffffff;
    flex-shrink: 0;
}

/* Same rules but applied directly if you use aside without section#content */
aside {
    width: 320px;
    background: #ffffff;
    flex-shrink: 0;
}

header {
    position: sticky;
    top: 0;
    z-index: 9999;
    width: 100%;
}

#contact_bar {
    background-color: #A6D1F0;
    color: var(--primary-color);
    text-align: center;
    padding: 8px;
    font-size: 14px;
    height: 40px;
    vertical-align: center;
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 30px;
}

p.version-numbering {
    /*margin: 5px;*/
    /*text-align: right;*/
    /*align-self: end;*/
    /*width: fit-content;*/
    /*color: dodgerblue;*/
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    text-align: center;
}

section#contact_bar div p {
    font-family: "Anuphan", Arial, Helvetica, sans-serif !important;
}

footer p {
    color: white !important;
    font-size: 16px !important;
}

/* Mobile Logic: Force items to new lines */
@media (max-width: 767px) {
    .footer-content {
        flex-direction: column;
        gap: 2px;
    }



    .footer-content .sep { display: none; } /* Hide the pipes on mobile */
}

#contact_bar div.row-box {
    gap: 10px;
    display: flex;
}

#company_banner {
    display: flex;
    align-items: center;
    background-color: var(--primary-color);
    color: white;
    height: 70px;
}

#company_banner div h1.category-title {
    margin-left: 25px;
    font-size: 24px;
}

#company_banner > a {
    display: flex;
    align-self: flex-end;
}

#company_banner > a img {
    display: block;
}

/*aside {*/
/*    position: sticky;*/
/*    top: 0;*/
/*}*/

#company_banner h1,
#company_banner h2,
#company_banner .row-th span.text-right {
    font-size: 20px;
}

#company_banner > div {
    flex-grow: 1;
}

#company_banner .row-th {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

#company_banner .row-th .text-right {
    padding-right: 16px;
}

.logo-wrapper {
    position: relative;
    display: inline-block;
    width: 70px;  /* Matches your image width */
    height: 70px; /* Matches your image height */
}

.logo-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#navigation {
    width: 70%;
    min-height: 58px;
    display: flex;
    align-items: center;
    border-top-left-radius: 12px;

    /* Crucial Updates */
    position: relative;
    background: transparent; /* Start transparent */
    overflow: visible;
    transition: transform 0.3s ease;
}

/* The Animated Background Layer */
#navigation::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Stay behind the menu links */
    border-top-left-radius: 12px;

    /* Animation Start: Slid up and out of view */
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* When scrolled, slide the blue background in */
#navigation.is-scrolled::before {
    transform: translateY(0);
}

#navigation ul {
    list-style-type: none;
    margin: 0 auto;
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}

#navigation ul li {
    display: flex;
}

#navigation ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f5f8ff;
    text-align: center;
    padding: 10px 14px;
    margin: 0;
    min-height: 40px;
    text-decoration: none;
    font-size: 16px;
    border: 0;
    border-radius: 0;
    position: relative;
    transition: color 0.2s ease;
}

#navigation ul li a::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 5px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.75);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#navigation ul li a .nav-msds {
    color: #ff9f9f;
    font-weight: 700;
}

#navigation ul li a:hover,
#navigation ul li a.active {
    color: #ffffff;
}

#navigation ul li a:hover::after {
    transform: scaleX(1);
}

#navigation ul li a.active::after {
    transform: scaleX(1);
    background: #ffffff;
}

#navigation ul li a.active {
    font-weight: bold;
}

#navigation .dropdown-lang {
    margin-left: auto;
    position: relative;
    display: flex;
}

#navigation .dropdown-lang > a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    min-height: 40px;
    font-size: 15px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

#navigation .dropdown-lang:hover .dropdown-content {
    display: block;
}

#navigation .dropdown-lang:focus-within .dropdown-content {
    display: block;
}

#navigation .dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #ffffff;
    min-width: 150px;
    padding: 8px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
    z-index: 9999;
    border-radius: 14px;
    border: 1px solid #e5edf7;
}

#navigation .dropdown-content a {
    color: var(--primary-color);
    background-color: #ffffff;
    padding: 10px 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    border-radius: 10px;
}

#navigation .dropdown-content a:hover {
    background: #eef4ff;
    color: var(--primary-color);
    font-weight: 600;
}

#navigation .dropdown-lang:hover .lang-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.35);
}

#navigation ul li.lang-inline {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-right: 8px;
}

#navigation ul li.lang-inline a.lang-link {
    padding: 8px 2px;
    min-height: 0;
    font-size: 14px;
    letter-spacing: 0.04em;
    opacity: 0.9;
}

#navigation ul li.lang-inline a.lang-link::after {
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
}


#navigation ul li.lang-inline .lang-pipe {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1;
    transform: translateY(-1px);
}

footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    margin-top: auto;
    padding: 10px;
    flex-shrink: 0;
}

footer a {
    color: #ffffff;
    text-decoration: underline;
}

header span.slogan-phone {
    display: none;
}

header h2.phone-title {
    display: none;
}

a.icon-mobile-menu {
    display: none;
}

#hamburger-menu {
    display: none; /* Hidden on desktop */
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 35px;
    height: 30px;
    padding: 0;
    margin-right: 15px;
}

#hamburger-menu span {
    width: 100%;
    height: 4px;
    background-color: #FFFFFF; /* Change to match your theme */
    border-radius: 4px;
    transition: all 0.3s linear;
}

footer span.mobile {
    display: none;
}

/* DIDN'T USE IT YET */
#cookie-minor-box {
    display: none;
}

#cookie-minor-box {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 280px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#cookie-note {
    font-size: 13px;
    color: #444;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

#cookie-choice-form {
    display: flex;
    align-items: center;
    gap: 12px;
}

#btn-accept {
    background: var(--primary-color); /* Your New Navy Blue */
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

#btn-reject {
    background: transparent;
    color: #777;
    border: none;
    padding: 0;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

#btn-accept:hover {
    background: #000f3d; /* Slightly darker navy for hover */
}

#btn-reject:hover {
    color: var(--primary-color); /* Matches the theme on hover */
}
