﻿:root {
    --brand: #FF5900;
    --brand-dark: #D24A00;
    --brand-light: #FF7A33;
    --brand-glow: rgba(255, 89, 0, 0.18);
    --ink: #0f172a;
    --ink-soft: #334155;
    --muted: #64748b;
    --line: #e7ebf0;
    --bg: #ffffff;
    --bg-soft: #f7f8fb;
    --radius: 18px;
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.06);
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.14);
}

html, body {
    font-family: 'Inter', 'Noto Sans Thai', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

a, .btn-link {
    color: var(--brand-dark);
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 0;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzU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2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}


/* ===== Modern Header / Nav ===== */
.custom-header {
    background: linear-gradient(120deg, var(--brand) 0%, var(--brand-dark) 100%);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.85rem 1.5rem;
    max-width: 1320px;
    margin: 0 auto;
}

.header-logo { flex: 0 0 auto; }

.header-nav-wrap {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
}

.header-nav-wrap > nav { max-width: 100%; }

/* Below xl: logo on top row, nav becomes one tidy scrollable row */
@media (max-width: 1199.98px) {
    .header-inner { flex-wrap: wrap; row-gap: 0.6rem; padding: 0.7rem 1rem; }
    .header-nav-wrap { flex-basis: 100%; }
    .header-nav-wrap > nav.d-xl-none {
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .header-nav-wrap > nav.d-xl-none::-webkit-scrollbar { display: none; }
    .header-nav-wrap > nav.d-xl-none > * { flex: 0 0 auto; }
}

.brand-wordmark {
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 1.15rem;
    color: var(--ink);
}

.brand-wordmark .accent { color: var(--brand); }

/* Nav links */
.custom-nav {
    position: relative;
    text-decoration: none;
    color: var(--ink-soft) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.35rem 0.15rem;
    transition: color 0.25s ease;
}

    .custom-nav:hover,
    .custom-nav.active {
        color: var(--brand) !important;
    }

    .custom-nav::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -2px;
        width: 100%;
        height: 2px;
        border-radius: 2px;
        background: var(--brand);
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.28s ease;
    }

    .custom-nav:hover::after,
    .custom-nav.active::after {
        transform: scaleX(1);
    }

/* ===== HumanOk standout nav pill ===== */
.nav-humanok {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
    color: #fff !important;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    text-decoration: none;
    background: linear-gradient(120deg, var(--brand-light), var(--brand-dark));
    box-shadow: 0 8px 20px var(--brand-glow);
    animation: hokPulse 2.6s ease-in-out infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

    .nav-humanok:hover,
    .nav-humanok.active {
        color: #fff !important;
        transform: translateY(-2px);
        filter: brightness(1.04);
        box-shadow: 0 14px 30px rgba(255, 89, 0, 0.5);
    }

    .nav-humanok .hok-badge {
        font-size: 0.6rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        background: #fff;
        color: var(--brand-dark);
        padding: 0.08rem 0.34rem;
        border-radius: 999px;
        line-height: 1.3;
    }

    .nav-humanok::after { display: none; }

/* ===== ERP standout nav pill (outlined, distinct from HumanOk) ===== */
.nav-erp {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1;
    padding: 0.48rem 0.9rem;
    border-radius: 999px;
    text-decoration: none;
    color: var(--brand-dark) !important;
    background: #fff;
    border: 1.5px solid var(--brand);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
    .nav-erp:hover,
    .nav-erp.active {
        background: var(--brand);
        color: #fff !important;
        transform: translateY(-1px);
    }
    .nav-erp::after { display: none; }

@keyframes hokPulse {
    0%, 100% { box-shadow: 0 8px 20px var(--brand-glow); }
    50% { box-shadow: 0 8px 30px rgba(255, 89, 0, 0.55); }
}

@media (prefers-reduced-motion: reduce) {
    .nav-humanok { animation: none; }
}

/* ===== Buttons ===== */
.btn-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(120deg, var(--brand-light), var(--brand));
    color: #fff;
    font-weight: 700;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    border: none;
    text-decoration: none;
    box-shadow: 0 10px 24px var(--brand-glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

    .btn-brand:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 34px var(--brand-glow);
        filter: brightness(1.03);
        color: #fff;
    }

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--ink);
    font-weight: 700;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

    .btn-ghost:hover {
        border-color: var(--brand);
        color: var(--brand);
        background: rgba(255, 89, 0, 0.04);
    }

/* ===== Hero ===== */
.hero {
    position: relative;
    overflow: hidden;
    padding: 96px 0 104px;
    background:
        radial-gradient(760px 360px at 88% -25%, rgba(255, 122, 51, 0.07), transparent 62%),
        linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    padding: 0.4rem 0.95rem;
    border-radius: 999px;
    margin-bottom: 1.4rem;
}

    .hero-eyebrow::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--brand);
    }

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 1.2rem;
}

    .hero-title .grad {
        color: var(--brand);
    }

.hero-lead {
    font-size: clamp(1.05rem, 1.6vw, 1.28rem);
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 2.6rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3.2rem;
}

.hero-stat .num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--ink);
    line-height: 1;
}

.hero-stat .num span { color: var(--brand); }

.hero-stat .label {
    font-size: 0.9rem;
    color: var(--muted);
    margin-top: 0.35rem;
}

/* ===== Sections ===== */
.section {
    padding: 84px 0;
    background: var(--bg);
}

.section.alt { background: var(--bg-soft); }

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-eyebrow {
    text-align: center;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 0.6rem;
}

.section-title {
    font-size: clamp(1.8rem, 3.4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 14px;
    color: var(--ink);
    text-transform: none;
}

.section-subtitle {
    text-align: center;
    color: var(--muted);
    max-width: 620px;
    margin: 0 auto 52px;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* ===== Grid ===== */
.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 26px;
    justify-content: center;
}

/* Neutralize Bootstrap column widths inside our card grid */
.row > [class*="col-"] {
    width: auto;
    max-width: none;
    flex: initial;
    padding: 0;
}

/* ===== Cards ===== */
.card,
.service-card {
    position: relative;
    background: var(--bg);
    padding: 32px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
    text-align: left;
    margin-bottom: 0;
    min-height: 220px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

    .card::before,
    .service-card::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 3px;
        background: linear-gradient(90deg, var(--brand-light), var(--brand));
        transform: scaleX(0);
        transform-origin: left;
        transition: transform 0.3s ease;
    }

    .card:hover,
    .service-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-lg);
        border-color: rgba(255, 89, 0, 0.25);
    }

        .card:hover::before,
        .service-card:hover::before {
            transform: scaleX(1);
        }

.card-title,
.service-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.card-text,
.service-text {
    font-size: 1rem;
    color: var(--muted);
    margin-bottom: 20px;
    line-height: 1.65;
    flex: 1;
}

.card-link,
.service-link {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--brand);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.2s ease, color 0.2s ease;
    border: none;
    padding: 0;
    align-self: flex-start;
}

    .card-link::after,
    .service-link::after {
        content: "→";
        transition: transform 0.2s ease;
    }

    .card-link:hover,
    .service-link:hover {
        color: var(--brand-dark);
    }

        .card-link:hover::after,
        .service-link:hover::after {
            transform: translateX(4px);
        }

/* ===== Language switch ===== */
.lang-switch {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

    .lang-switch .opt {
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.02em;
        color: var(--muted);
        padding: 0.25rem 0.6rem;
        border-radius: 999px;
        line-height: 1;
        transition: background 0.2s ease, color 0.2s ease;
    }

    .lang-switch .opt.active {
        background: var(--brand);
        color: #fff;
    }

/* ===== Footer ===== */
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.footer-heading {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    line-height: 2.1;
}

@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr; gap: 22px; }
}

.site-footer {
    background: var(--ink);
    color: #cbd5e1;
    padding: 56px 0 28px;
}

.site-footer a { color: #cbd5e1; text-decoration: none; transition: color 0.2s ease; }
.site-footer a:hover { color: #fff; }

.footer-brand {
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.footer-brand .accent { color: var(--brand-light); }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 36px;
    padding-top: 22px;
    text-align: center;
    font-size: 0.88rem;
    color: #94a3b8;
}

/* ===== Reveal on scroll ===== */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

@media (max-width: 640px) {
    .hero { padding: 70px 0 78px; }
    .section { padding: 60px 0; }
    .hero-stats { gap: 1.8rem; }
}

/* ===== Service catalog category heading ===== */
.catalog-cat {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--ink, #1a1a2e);
    margin: 2rem 0 1rem;
    padding-left: 12px;
    border-left: 3px solid var(--brand, #FF5900);
}

/* ===== Blazor Server reconnect ("rejoin") modal — global (framework-controlled ids/classes) ===== */
.components-reconnect-first-attempt-visible,
.components-reconnect-repeated-attempt-visible,
.components-reconnect-failed-visible,
.components-pause-visible,
.components-resume-failed-visible,
.components-rejoining-animation {
    display: none;
}

#components-reconnect-modal.components-reconnect-show .components-reconnect-first-attempt-visible,
#components-reconnect-modal.components-reconnect-show .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-paused .components-pause-visible,
#components-reconnect-modal.components-reconnect-resume-failed .components-resume-failed-visible,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-retrying .components-reconnect-repeated-attempt-visible,
#components-reconnect-modal.components-reconnect-retrying .components-rejoining-animation,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-failed .components-reconnect-failed-visible {
    display: block;
}

#components-reconnect-modal {
    background-color: #ffffff;
    color: #0f172a;
    width: 21rem;
    margin: 20vh auto;
    padding: 2rem;
    border: 0;
    border-radius: 0.75rem;
    box-shadow: 0 12px 34px 2px rgba(15, 23, 42, 0.28);
    font-family: "Noto Sans Thai", "Inter", system-ui, sans-serif;
    opacity: 0;
    transition: display 0.5s allow-discrete, overlay 0.5s allow-discrete;
    animation: components-reconnect-modal-fadeOutOpacity 0.5s both;
}

#components-reconnect-modal[open] {
    animation: components-reconnect-modal-slideUp 1.5s cubic-bezier(.05, .89, .25, 1.02) 0.3s, components-reconnect-modal-fadeInOpacity 0.5s ease-in-out 0.3s;
    animation-fill-mode: both;
}

#components-reconnect-modal::backdrop {
    background-color: rgba(15, 23, 42, 0.45);
    animation: components-reconnect-modal-fadeInOpacity 0.5s ease-in-out;
    opacity: 1;
}

@keyframes components-reconnect-modal-slideUp {
    0% { transform: translateY(30px) scale(0.95); }
    100% { transform: translateY(0); }
}

@keyframes components-reconnect-modal-fadeInOpacity {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes components-reconnect-modal-fadeOutOpacity {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.components-reconnect-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

#components-reconnect-modal p {
    margin: 0;
    text-align: center;
    line-height: 1.6;
}

#components-reconnect-modal button {
    border: 0;
    background-color: var(--brand, #FF5900);
    color: white;
    font-weight: 600;
    padding: 8px 28px;
    border-radius: 999px;
    cursor: pointer;
}

#components-reconnect-modal button:hover { filter: brightness(0.92); }
#components-reconnect-modal button:active { filter: brightness(1); }

.components-rejoining-animation {
    position: relative;
    width: 80px;
    height: 80px;
}

.components-rejoining-animation div {
    position: absolute;
    border: 3px solid var(--brand, #FF5900);
    opacity: 1;
    border-radius: 50%;
    animation: components-rejoining-animation 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.components-rejoining-animation div:nth-child(2) { animation-delay: -0.5s; }

@keyframes components-rejoining-animation {
    0%   { top: 40px; left: 40px; width: 0;    height: 0;    opacity: 0; }
    4.9% { top: 40px; left: 40px; width: 0;    height: 0;    opacity: 0; }
    5%   { top: 40px; left: 40px; width: 0;    height: 0;    opacity: 1; }
    100% { top: 0;    left: 0;    width: 80px; height: 80px; opacity: 0; }
}
