:root {
    --p-blue: #00468c;
    /* สีน้ำเงิน Prosoft Style */
    --s-blue: #0056b3;
    --accent-orange: #ff6600;
    /* สีส้มตัดเพื่อให้ดูมีพลัง */
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-main: #333333;
    --text-light: #666666;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Prompt', sans-serif;
}

body {
    background-color: var(--white);
    color: var(--text-main);
    line-height: 1.6;
}

/* --- Top Bar Adjustment --- */
.top-bar {
    background: #f1f1f1;
    padding: 8px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-light);
    border-bottom: 1px solid var(--border-color);
}

.lang-switcher {
    display: flex;
    gap: 10px;
    align-items: center;
}

.lang-switcher a {
    text-decoration: none;
    color: inherit;
    font-weight: 600;
}

.lang-switcher a.active {
    color: var(--p-blue);
}

/* --- Floating Widgets --- */
.floating-social {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    z-index: 2000;
}

.social-item {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: 0.3s;
}

.social-fb {
    background: #3b5998;
}

.social-line {
    background: #00b900;
}

.social-yt {
    background: #ff0000;
}

.social-item:hover {
    width: 55px;
    padding-right: 10px;
}

.chat-bubble {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 65px;
    height: 65px;
    background: #00b900;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(0, 185, 0, 0.4);
    z-index: 2000;
    text-decoration: none;
}

/* --- Banner Dots --- */
.hero-banner {
    position: relative;
}

.banner-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    cursor: pointer;
}

.dot.active {
    background: var(--accent-orange);
    width: 30px;
    border-radius: 10px;
}

.top-info span {
    margin-right: 20px;
}

.top-info i {
    color: var(--p-blue);
    margin-right: 5px;
}

/* --- Navbar --- */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: var(--white);
    padding: 15px 10%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.nav-logo img {
    height: 100px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 1rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--p-blue);
}

.btn-quote {
    padding: 10px 20px;
    background: var(--accent-orange);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: 0.3s;
}

.btn-quote:hover {
    background: #e65c00;
}

/* --- Hero Banner --- */
.hero-banner {
    width: 100%;
    height: 500px;
    background: linear-gradient(rgba(0, 70, 140, 0.7), rgba(0, 70, 140, 0.7)), url('https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    padding: 0 15%;
}

.hero-banner h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
}

/* --- About Section --- */
.about-section {
    padding: 80px 10%;
    background: var(--white);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    margin-top: 20px;
}

.about-content h3 {
    font-size: 1.6rem;
    color: var(--p-blue);
    margin-bottom: 20px;
    font-weight: 600;
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.feature-item i {
    width: 45px;
    height: 45px;
    background: rgba(0, 70, 140, 0.08);
    color: var(--p-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.feature-item span {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.about-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.03);
}

/* การจัดรูปแบบ responsive จะรวมอยู่ด้านล่างสุดของไฟล์ */

/* --- Product Sections --- */
.section-title {
    padding: 60px 10% 40px;
    text-align: center;
}

.section-title h2 {
    font-size: 2.2rem;
    color: var(--p-blue);
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-orange);
}

.product-grid {
    padding: 0 5% 80px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 35px 20px;
    text-align: center;
    transition: 0.3s;
    border-bottom: 4px solid transparent;
}

.product-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 4px solid var(--accent-orange);
}

.product-card i {
    font-size: 3rem;
    color: var(--p-blue);
    margin-bottom: 25px;
}

.product-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--p-blue);
}

.product-card p {
    color: var(--text-light);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.btn-more {
    color: var(--p-blue);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid var(--p-blue);
    padding: 8px 25px;
    border-radius: 4px;
    transition: 0.3s;
}

.btn-more:hover {
    background: var(--p-blue);
    color: var(--white);
}

/* --- Portfolio Section (Carousel) --- */
.portfolio-section {
    padding: 80px 10%;
    background: var(--light-bg);
    overflow: hidden;
}

.portfolio-carousel-wrapper {
    position: relative;
    max-width: 1150px;
    margin: 40px auto 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.portfolio-carousel-container {
    flex: 1;
    overflow: hidden;
    padding: 30px 10px;
}

.portfolio-track {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 25px;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    width: max-content;
}

.portfolio-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    flex: 0 0 320px;
    width: 320px;
    opacity: 0.65;
    transform: scale(0.88);
}

.portfolio-card.active {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 20px 40px rgba(0, 70, 140, 0.15);
    border-color: var(--p-blue);
    z-index: 5;
}

.portfolio-img {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-card.active:hover .portfolio-img img {
    transform: scale(1.08);
}

.portfolio-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #888;
    color: var(--white);
    padding: 4px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 2;
    transition: 0.3s;
}

.portfolio-card.active .portfolio-tag {
    background: var(--accent-orange);
}

.portfolio-body {
    padding: 25px;
}

.portfolio-body h3 {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: 10px;
    font-weight: 600;
    transition: 0.3s;
}

.portfolio-card.active .portfolio-body h3 {
    color: var(--p-blue);
    font-size: 1.35rem;
}

.portfolio-body p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.portfolio-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
    margin-top: 10px;
}

.client-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.client-name i {
    color: var(--p-blue);
}

.btn-case-study {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--p-blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.btn-case-study:hover {
    gap: 8px;
    color: var(--accent-orange);
}

.portfolio-nav-btn {
    width: 45px;
    height: 45px;
    background: var(--white);
    color: var(--p-blue);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
    flex-shrink: 0;
    z-index: 10;
}

.portfolio-nav-btn:hover {
    background: var(--p-blue);
    color: var(--white);
    border-color: var(--p-blue);
    transform: scale(1.1);
}

.portfolio-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.portfolio-dots .dot {
    width: 12px;
    height: 12px;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.portfolio-dots .dot.active {
    background: var(--accent-orange);
    width: 30px;
    border-radius: 10px;
}

/* --- News Section --- */
.news-section {
    background: var(--white);
    padding: 80px 10%;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.news-item {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.news-img {
    width: 100%;
    height: 180px;
    background: #ddd;
}

.news-body {
    padding: 20px;
}

.news-body h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--p-blue);
}

.news-body span {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* --- Enterprise Footer --- */
.footer {
    background: #222;
    color: var(--white);
    padding: 80px 10% 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

.footer h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.1rem;
    border-left: 4px solid var(--accent-orange);
    padding-left: 15px;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 12px;
}

.footer ul a {
    color: #aaa;
    text-decoration: none;
    transition: 0.3s;
}

.footer ul a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    font-size: 0.85rem;
    color: #777;
}

/* --- Responsive Design Optimizations --- */
@media (max-width: 1024px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        padding: 15px 5%;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .hero-banner h1 {
        font-size: 2.2rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .portfolio-carousel-wrapper {
        max-width: 100%;
        gap: 10px;
    }

    .portfolio-card {
        min-width: 280px;
    }
}

@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        padding: 10px 5%;
    }

    .lang-switcher {
        justify-content: center;
        margin-top: 4px;
    }

    .hero-banner {
        height: auto;
        padding: 80px 5%;
    }

    .hero-banner h1 {
        font-size: 1.8rem;
    }

    .hero-banner p {
        font-size: 1.1rem !important;
        margin-bottom: 20px !important;
    }

    .section-title {
        padding: 40px 5% 25px;
    }

    .about-section,
    .portfolio-section,
    .news-section {
        padding: 50px 5%;
    }

    .product-grid {
        padding: 0 5% 50px;
        gap: 20px;
    }

    .news-grid {
        gap: 20px;
        margin-top: 25px;
    }

    /* Portfolio Carousel Mobile Adjustment */
    .portfolio-carousel-wrapper {
        gap: 5px;
    }

    .portfolio-carousel-container {
        padding: 20px 0;
        overflow: visible;
    }

    .portfolio-track {
        justify-content: flex-start;
        gap: 15px;
    }

    .portfolio-card {
        min-width: 85%;
        max-width: 85%;
        flex-shrink: 0;
        transform: scale(0.95);
        opacity: 0.6;
    }

    .portfolio-card.active {
        transform: scale(1.02);
        opacity: 1;
    }

    .portfolio-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .nav-links {
        gap: 12px;
        font-size: 0.95rem;
    }

    .footer {
        padding: 50px 5% 20px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer h4 {
        border-left: none;
        border-bottom: 2px solid var(--accent-orange);
        padding-left: 0;
        padding-bottom: 8px;
        display: inline-block;
        margin-bottom: 15px;
    }

    .chat-bubble {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        right: 15px;
        bottom: 15px;
    }

    .floating-social {
        transform: translateY(-30%);
    }

    .social-item {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .social-item:hover {
        width: 45px;
        padding-right: 0;
    }
}

@media (max-width: 576px) {
    .about-features {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }

    .nav-logo img {
        height: 45px;
    }

    .product-card {
        padding: 30px 20px;
    }

    .portfolio-body {
        padding: 20px;
    }

    .portfolio-card {
        min-width: 90%;
        max-width: 90%;
    }
}