@charset "UTF-8";
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700;800&family=Kanit:wght@500;700&display=swap');

/* KP SYSTEM - RESPONSIVE RED THEME */

:root {
    --red-primary: #c62828;
    --red-dark:    #8e1414;
    --red-deep:    #6a0d0d;
    --red-soft:    #fde9e9;
    --red-accent:  #ff5252;
    --ink:         #1f1f1f;
    --ink-soft:    #4a4a4a;
    --paper:       #ffffff;
    --cream:       #fff8f5;
    --border:      #e9dede;
    --shadow-sm:   0 2px 6px rgba(70, 10, 10, 0.06);
    --shadow-md:   0 6px 20px rgba(70, 10, 10, 0.10);
    --radius:      10px;
    --radius-lg:   16px;
    --trans:       180ms ease;
    --font-head:   'Prompt', 'Kanit', 'Tahoma', sans-serif;
    --font-body:   'Prompt', 'Sarabun', 'Tahoma', sans-serif;
}

/* Defeat legacy fixed widths */
html, body { max-width: 100vw; overflow-x: hidden; }

.shell, #wrapper, #wrapper-middle, #header, #navigation, #main,
#content, #content2, #sidebar, #slider,
.widgets, .widgets2, .widgets3, .projects, .projects-slider,
.post, .box {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

#slider, #slider .jcarousel-container, #slider .jcarousel-clip {
    width: 100% !important;
    max-width: 100% !important;
}


/* ========== KP HERO SLIDER (slider.jpg bg + slide images on top) ========== */
.kp-hero {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    background: #ffffff url('images/slider.jpg') no-repeat center center;
    background-size: cover;
    aspect-ratio: 16 / 9;
    max-height: 460px;
    border-bottom: 1px solid var(--border);
}

.kp-hero-track {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: transparent;
}

.kp-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 700ms ease-in-out;
    z-index: 1;
    background: transparent;
}

.kp-slide.kp-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.kp-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
    float: none !important;
    max-width: none !important;
    background: transparent;
}

.kp-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 16px 18px 20px;
    background: linear-gradient(to top, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.9) 60%, rgba(255,255,255,0) 100%);
    color: var(--ink);
}

.kp-caption h2 {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--red-deep);
    margin: 0 0 6px 0;
    text-shadow: none;
}

.kp-caption-text,
.kp-caption-text h3 {
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.5;
    color: var(--ink);
    font-weight: 400;
    text-shadow: none;
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.kp-caption-text span,
.kp-caption-text h3 span {
    color: var(--red-primary);
    font-weight: 600;
}

.kp-hero-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(198, 40, 40, 0.9);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 180ms ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.kp-hero-btn:hover {
    background: var(--red-dark);
    transform: translateY(-50%) scale(1.08);
    color: #fff;
}
.kp-hero-prev { left: 12px; }
.kp-hero-next { right: 12px; }

.kp-hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 10;
}
.kp-hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(198, 40, 40, 0.3);
    border: 1px solid rgba(198, 40, 40, 0.5);
    cursor: pointer;
    padding: 0;
    transition: all 200ms ease;
}
.kp-hero-dot.active {
    background: var(--red-primary);
    border-color: var(--red-primary);
    width: 24px;
    border-radius: 4px;
}

@media screen and (min-width: 600px) {
    .kp-caption { padding: 24px 28px 30px; }
    .kp-caption h2 { font-size: 26px; margin-bottom: 8px; }
    .kp-caption-text, .kp-caption-text h3 { font-size: 15px; }
    .kp-hero-btn { width: 46px; height: 46px; font-size: 18px; }
}

@media screen and (min-width: 900px) {
    .kp-hero {
        aspect-ratio: auto;
        height: 364px;
        max-height: none;
    }

    .kp-slide {
        display: block;
    }

    /* Image floats left like original design */
    .kp-slide img {
        display: block !important;
        position: absolute;
        left: 0;
        top: 0;
        width: 50% !important;
        height: 100% !important;
        max-width: 50% !important;
        object-fit: contain !important;
        padding: 20px;
        z-index: 1;
    }

    /* Caption sits on right half */
    .kp-caption {
        position: absolute;
        top: 0;
        right: 0;
        bottom: auto;
        left: auto;
        width: 50%;
        max-width: 520px;
        height: 100%;
        background: none !important;
        padding: 50px 60px 40px 30px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: left;
        z-index: 2;
    }

    .kp-caption h2 {
        font-size: 38px !important;
        line-height: 1.1;
        color: var(--red-primary) !important;
        text-shadow: none !important;
        margin-bottom: 14px;
        font-weight: 700;
    }

    .kp-caption-text,
    .kp-caption-text h3 {
        font-size: 16px !important;
        line-height: 1.55;
        color: var(--ink) !important;
        text-shadow: none !important;
        font-weight: 500;
    }

    .kp-caption-text span,
    .kp-caption-text h3 span {
        color: var(--red-primary);
        font-weight: 600;
    }

    .kp-hero-btn {
        background: rgba(255,255,255,0.95) !important;
        color: var(--red-primary);
    }

    .kp-hero-btn:hover {
        background: var(--red-primary) !important;
        color: #fff;
    }
}

/* Neutralize legacy #slider rules */
#slider { display: none !important; }


/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; outline: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink-soft);
    background: #666666 url('images/bg/background-pattern-006.gif') repeat;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a {
    color: var(--red-primary);
    text-decoration: none;
    transition: color var(--trans);
}
a:hover { color: var(--red-dark); }

img { max-width: 100%; height: auto; border: 0; display: block; }

input, textarea, select, button {
    font-family: inherit;
    font-size: 14px;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--ink);
    line-height: 1.3;
}

/* Layout */
.shell {
    width: 100% !important;
    max-width: 1180px !important;
    margin: 0 auto !important;
    padding: 0;
}

#wrapper {
    background: transparent;
    min-height: 100vh;
}

#wrapper-top, #wrapper-bottom { display: none; }

#wrapper-middle {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    background: var(--paper);
    padding: 0;
    box-shadow: var(--shadow-md);
}

/* Header */
#header {
    position: relative;
    width: 100%;
    padding: 14px 18px;
    height: auto;
    background: linear-gradient(135deg, #8e1414 0%, #c62828 60%, #ff5252 100%);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    overflow: hidden;
}

#logo, #logo2 {
    display: flex;
    align-items: center;
    float: none;
    padding: 0;
    width: auto;
    position: relative;
    z-index: 2;
}

#logo2 img, #logo img {
    max-height: 62px;
    width: auto;
}

/* Socials */
.socials {
    display: flex;
    gap: 6px;
    float: none;
    align-items: center;
    position: relative;
    z-index: 2;
}

.socials a {
    width: 32px;
    height: 32px;
    float: none;
    padding: 0;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.18) !important;
    background-size: 18px 18px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    transition: all var(--trans);
}
.socials a:hover {
    background-color: rgba(255,255,255,0.35) !important;
}


/* Socials - hide text, show only icons */
.socials a {
    width: 34px !important;
    height: 34px !important;
    float: none !important;
    padding: 0 !important;
    text-indent: -9999px !important;
    overflow: hidden !important;
    border-radius: 50% !important;
    background-color: rgba(255,255,255,0.2) !important;
    background-image: none !important;
    background-size: 18px 18px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    transition: all var(--trans);
    display: inline-block !important;
    position: relative;
}
.socials a::before {
    content: '';
    position: absolute;
    inset: 0;
    background-size: 18px 18px;
    background-repeat: no-repeat;
    background-position: center;
}
.socials a.facebook::before { content: 'f'; text-indent: 0; font-weight:700; color:#fff; display:flex; align-items:center; justify-content:center; font-family: Arial, sans-serif; font-size: 16px; }
.socials a.twitter::before  { content: 't'; text-indent: 0; font-weight:700; color:#fff; display:flex; align-items:center; justify-content:center; font-family: Arial, sans-serif; font-size: 16px; }
.socials a.digg::before     { content: 'g'; text-indent: 0; font-weight:700; color:#fff; display:flex; align-items:center; justify-content:center; font-family: Arial, sans-serif; font-size: 16px; }
.socials a.delicious::before{ content: 'd'; text-indent: 0; font-weight:700; color:#fff; display:flex; align-items:center; justify-content:center; font-family: Arial, sans-serif; font-size: 16px; }
.socials a.su::before       { content: 's'; text-indent: 0; font-weight:700; color:#fff; display:flex; align-items:center; justify-content:center; font-family: Arial, sans-serif; font-size: 16px; }
.socials a.rss::before      { content: 'r'; text-indent: 0; font-weight:700; color:#fff; display:flex; align-items:center; justify-content:center; font-family: Arial, sans-serif; font-size: 16px; }
.socials a:hover {
    background-color: rgba(255,255,255,0.4) !important;
    transform: translateY(-2px);
}

/* Hide rss/su/delicious/digg on small screens to avoid crowding */
@media screen and (max-width: 500px) {
    .socials a.digg, .socials a.delicious, .socials a.su, .socials a.rss { display: none !important; }
}

/* Search */
#search {
    position: relative;
    top: auto; right: auto;
    width: 100%;
    max-width: 280px;
    background: none;
    z-index: 2;
}

#search form { display: flex; }

#search .field {
    width: 100%;
    padding: 9px 14px;
    font-size: 13px;
    border: 0;
    border-radius: 20px;
    background: rgba(255,255,255,0.95);
    color: var(--ink);
}

/* Clearfix */
.cl { display: block; clear: both; height: 0; }

/* Navigation */
#navigation {
    background: linear-gradient(180deg, #2b2b2b 0%, #1a1a1a 100%);
    box-shadow: inset 0 -3px 0 var(--red-primary);
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

#navigation ul {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    min-width: 100%;
    list-style: none;
    padding: 0;
    margin: 0;
}

#navigation ul li {
    list-style: none;
    display: block;
    float: none;
    flex-shrink: 0;
    line-height: 1;
    font-weight: 500;
    font-size: 14px;
    border-right: 1px solid rgba(255,255,255,0.08);
    text-shadow: none;
    position: relative;
}

#navigation ul li a {
    display: block;
    float: none;
    padding: 14px 18px;
    color: rgba(255,255,255,0.85);
    background: none !important;
    font-family: var(--font-head);
    letter-spacing: 0.3px;
    transition: all var(--trans);
    text-decoration: none;
}

#navigation ul li a:hover {
    color: #fff;
    background: var(--red-primary) !important;
    text-decoration: none;
}

/* Main */
#main {
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    padding: 24px 18px;
}

#content, #content2 {
    display: block;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0;
}

#sidebar {
    display: block;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 20px;
}

/* Post / Titles */
.post { margin-bottom: 8px; }

.post h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    padding: 0 0 12px 0;
    background: none;
    position: relative;
    display: inline-block;
}

.post p { padding-bottom: 14px; }

.post img {
    display: block;
    float: none;
    padding: 0 0 14px 0;
    max-width: 100%;
}

.post a {
    display: inline-block;
    padding: 4px 2px;
    font-size: 13px;
}

.post font[color="red"] {
    color: var(--red-primary) !important;
    font-weight: 600;
}

/* Box */
.box {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
}
.box h3 {
    font-size: 17px;
    color: var(--red-deep);
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 2px solid var(--red-soft);
}
.box ul {
    list-style: none;
    padding: 0;
}
.box li {
    list-style: none;
    padding: 6px 0 6px 18px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--ink-soft);
    position: relative;
    border-bottom: 1px dashed var(--border);
}
.box li:last-child { border-bottom: 0; }
.box li a { color: var(--ink-soft); }
.box li a:hover { color: var(--red-primary); }

/* Read more */
a.read-more, a.read-more2 {
    display: inline-block;
    float: none;
    margin-top: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    background: var(--red-primary);
    border-radius: 20px;
    background-image: none;
    padding-left: 14px;
    transition: all var(--trans);
}
a.read-more:hover, a.read-more2:hover {
    background: var(--red-dark);
    color: #fff;
    text-decoration: none;
}

/* Widgets grid */
.widgets, .widgets2, .widgets3 {
    position: relative;
    margin-top: 24px;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    background: none !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
}

/* Cards */
.col, .col2, .col3 {
    display: flex;
    flex-direction: column;
    float: none;
    width: 100%;
    padding: 0;
    height: auto;
}

.col.about-us, .col.about-us2, .col2.about-us3, .col3.about-us {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    transition: all var(--trans);
    padding-right: 16px;
}
.col.about-us:hover, .col2.about-us3:hover, .col3.about-us:hover, .col.about-us2:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--red-soft);
}

.col h3, .col2 h3, .col3 h3 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
    padding: 0;
    margin-bottom: 10px;
    background: none !important;
}

.col3.about-us h3 a,
.col2.about-us3 h3 a {
    color: var(--ink);
}
.col3.about-us h3 a:hover,
.col2.about-us3 h3 a:hover {
    color: var(--red-primary);
}

.col center, .col2 center, .col3 center {
    width: 100%;
    display: block;
    margin-bottom: 10px;
    background: var(--cream);
    border-radius: var(--radius);
    padding: 12px;
    overflow: hidden;
}
.col center img, .col2 center img, .col3 center img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    max-height: 170px;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    border: 0;
    transition: transform var(--trans);
}

.col p, .col2 p, .col3 p {
    font-size: 13px;
    line-height: 1.55;
    color: var(--ink-soft);
    padding-bottom: 8px;
    flex-grow: 1;
}

.activities h3, .about-us h3, .about-us2 h3, .we-hire h3, .contacts h3 {
    padding: 0 0 10px 0 !important;
    background: none !important;
}

.contacts {
    background: var(--paper);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.contacts h3 {
    font-size: 18px;
    color: var(--red-deep);
    margin-bottom: 12px;
    padding-bottom: 10px !important;
    border-bottom: 2px solid var(--red-soft);
}
.contacts p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink-soft);
    margin-bottom: 8px;
}
.contacts strong { color: var(--ink); }
.contacts a { color: var(--red-primary); }

/* Projects */
.projects {
    display: block;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 0 !important;
    margin-bottom: 20px;
}
.projects h3 {
    font-size: 18px;
    color: var(--red-deep);
    padding-bottom: 12px !important;
    margin-bottom: 14px;
    border-bottom: 2px solid var(--red-soft);
}
.projects-slider {
    padding-left: 0;
    float: none;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.projects-slider .jcarousel-container,
.projects-slider .jcarousel-clip {
    width: 100% !important;
    height: auto !important;
    overflow-x: auto;
}
.projects-slider ul {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    list-style: none;
    padding: 4px 0;
    margin: 0;
    width: max-content;
}
.projects-slider ul li {
    flex-shrink: 0;
    width: 100px !important;
    height: auto !important;
    padding: 0 !important;
    overflow: visible;
    font-size: 11px;
    text-align: center;
}
.projects-slider ul li a {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    color: var(--ink-soft);
}
.projects-slider ul li img {
    width: 100% !important;
    height: 90px !important;
    object-fit: cover;
    border: 1px solid var(--border) !important;
    padding: 2px !important;
    background: var(--paper);
    border-radius: 6px;
    margin-bottom: 4px;
}
.projects-slider .jcarousel-prev,
.projects-slider .jcarousel-next { display: none !important; }

/* Cart */
.my-cart {
    font-size: 12px !important;
    line-height: 1.4 !important;
}

/* Pagination */
a.paginate, a.current, span.inactive {
    display: inline-block;
    padding: 6px 11px;
    margin: 2px;
    font-size: 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--ink-soft);
    text-decoration: none;
}
a.paginate:hover {
    background: var(--red-primary);
    color: #fff;
    border-color: var(--red-primary);
    text-decoration: none;
}
a.current {
    background: var(--red-primary);
    color: #fff;
    border-color: var(--red-primary);
    font-weight: 600;
}
span.inactive { color: #ccc; }

/* Footer */
#footer {
    padding: 30px 20px 40px;
    background: var(--ink);
    color: rgba(255,255,255,0.7);
    text-align: center;
    font-size: 13px;
    border-top: 4px solid var(--red-primary);
}
.copy {
    display: block;
    float: none;
    color: rgba(255,255,255,0.7);
    margin-bottom: 10px;
}
.copy span { color: var(--red-accent); padding: 0 10px; }
.copy a { color: rgba(255,255,255,0.9); text-decoration: none; }
.copy a:hover { color: var(--red-accent); text-decoration: underline; }

#bottom-nav { line-height: 1.7; color: rgba(255,255,255,0.6); }
#bottom-nav a { color: #fff; }
#bottom-nav span { padding: 0 8px; color: var(--red-accent); }

/* Tables responsive */
table { max-width: 100%; }
iframe { max-width: 100%; }

/* RESPONSIVE */

/* Tablet (>=600px) */
@media screen and (min-width: 600px) {
    #main { padding: 30px 24px; }

    .col, .col2, .col3 {
        width: calc(50% - 8px);
    }

    #header { padding: 18px 24px; }

    .post h3 { font-size: 26px; }

    #slider .caption h2 { font-size: 32px; }
    #slider .caption { padding: 36px 32px; width: 60%; max-width: 60%; }
    #slider .jcarousel-container,
    #slider .jcarousel-clip,
    #slider .jcarousel-clip ul li { min-height: 280px; }
}

/* Desktop (>=900px) */
@media screen and (min-width: 900px) {
    #main {
        padding: 36px 30px;
    }

    .col, .col2, .col3 {
        width: calc(33.333% - 12px);
    }

    #slider .caption h2 { font-size: 40px; }
    #slider .caption h3 { font-size: 18px; }
}

/* Small phone (<380px) */

/* ========== SOFTWARE DOWNLOAD ROW ========== */
.sw-download {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0 6px;
    padding: 10px 12px;
    background: linear-gradient(135deg, var(--red-soft) 0%, #fff4f4 100%);
    border-left: 3px solid var(--red-primary);
    border-radius: 8px;
}

.sw-download-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--red-deep);
    white-space: nowrap;
}

.sw-contact {
    font-size: 13px;
    color: var(--ink-soft);
    font-style: italic;
}

.sw-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #fff !important;
    background: linear-gradient(135deg, var(--red-primary) 0%, var(--red-dark) 100%);
    border-radius: 20px;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.3);
    transition: all 200ms ease;
    letter-spacing: 0.3px;
    position: relative;
    overflow: hidden;
}

.sw-download-btn::before {
    content: '\21E9';
    font-size: 14px;
    font-weight: 700;
    margin-right: 2px;
}

.sw-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(198, 40, 40, 0.45);
    background: linear-gradient(135deg, var(--red-dark) 0%, var(--red-deep) 100%);
    color: #fff !important;
    text-decoration: none !important;
}

.sw-download-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(198, 40, 40, 0.3);
}


@media screen and (max-width: 380px) {
    #header { padding: 12px 14px; }
    #logo2 img { max-height: 52px; }
    .socials a { width: 28px; height: 28px; }
    #navigation ul li a { padding: 12px 14px; font-size: 13px; }
    .post h3 { font-size: 20px; }
    #main { padding: 20px 14px; }
}
