:root {
    --primary: #3b82f6; /* Blue */
    --primary-dark: #2563eb;
    --secondary: #0ea5e9; /* Sky */
    --bg-main: #f8fafc;
    --bg-glass: rgba(255, 255, 255, 0.65);
    --bg-glass-hover: rgba(255, 255, 255, 0.9);
    --text-main: #0f172a; /* Slate 900 */
    --text-muted: #475569; /* Slate 600 */
    --border: rgba(255, 255, 255, 0.5);
    --border-strong: rgba(59, 130, 246, 0.2);
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --font-en: 'Inter', sans-serif;
    --font-th: 'Prompt', sans-serif;
}

html { scroll-behavior: smooth; }

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

body {
    font-family: var(--font-th);
    background: linear-gradient(135deg, #e0f2fe 0%, #f8fafc 100%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-en);
    font-weight: 700;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Glassmorphism Utility */
.glass {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-glass);
}

/* Topbar */
.topbar {
    background-color: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 8px 0;
}

.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.topbar-info i, .topbar-contact i {
    color: var(--primary);
    margin-right: 5px;
}

.topbar-contact a:hover {
    color: var(--primary);
}

/* Header & Navbar */
.header {
    background-color: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.header.scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: var(--shadow-sm);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-en);
    letter-spacing: 1px;
    color: var(--text-main);
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links > a, .dropbtn {
    font-weight: 500;
    position: relative;
    padding: 10px 5px;
    color: var(--text-muted);
}

.nav-links > a::after, .dropbtn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.nav-links > a:hover::after, .nav-links > a.active::after, .dropdown:hover .dropbtn::after {
    width: 100%;
}

.nav-links > a:hover, .nav-links > a.active, .dropdown:hover .dropbtn {
    color: var(--primary);
}

.dropbtn i {
    font-size: 0.8rem;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropbtn i {
    transform: rotate(180deg);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 150%;
    left: 0;
    background: var(--bg-glass-hover);
    backdrop-filter: blur(16px);
    min-width: 200px;
    box-shadow: var(--shadow-md);
    border-radius: 12px;
    border: 1px solid var(--border);
    z-index: 1;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 10px 0;
}

.dropdown:hover .dropdown-content {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    top: 100%;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 10px 20px;
    display: block;
    font-size: 0.95rem;
    transition: background 0.2s ease, padding-left 0.2s ease, color 0.2s ease;
}

.dropdown-content a:hover {
    background-color: rgba(59, 130, 246, 0.05);
    color: var(--primary);
    padding-left: 25px;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-family: var(--font-en);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-outline {
    background: var(--bg-glass);
    backdrop-filter: blur(4px);
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-2px);
}

.btn-text {
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-text i {
    transition: transform 0.3s ease;
}

.btn-text:hover i {
    transform: translateX(5px);
}

/* Hero Section */
.hero {
    position: relative;
    height: calc(100vh - 120px);
    min-height: 600px;
    display: flex;
    align-items: center;
    background-image: url('../images/hero_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.4) 100%);
    backdrop-filter: blur(3px);
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    animation: fadeInUp 1s ease forwards;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text-main);
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
}

/* Services / Products */
.services {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
    border-color: var(--primary);
    background: var(--bg-glass-hover);
}

.product-image {
    width: 100%;
    object-fit: cover;
    background-color: var(--bg-main);
    height: 220px;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    width: 100%;
    object-fit: cover;
    background-color: var(--bg-main);
    transform: scale(1.05);
}

.product-info {
    padding: 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    z-index: 2;
    background: transparent;
}

.product-info h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.product-info p {
    color: var(--text-muted);
    margin-bottom: 25px;
    flex-grow: 1;
}

/* Inner Pages */
.page-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.9), rgba(255, 255, 255, 0.95)), url('../images/hero_bg.png');
    background-size: cover;
    background-position: center;
    text-align: center;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(5px);
}

.page-title {
    font-size: 3rem;
    color: var(--text-main);
    margin-bottom: 15px;
}

.page-title span {
    color: var(--primary);
}

.breadcrumb {
    color: var(--text-muted);
    font-size: 1rem;
}

.breadcrumb a {
    color: var(--primary);
    margin: 0 5px;
    font-weight: 500;
}

.page-content {
    padding: 80px 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info-box {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    border-radius: 16px;
}

.contact-info-box h3 {
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    color: var(--text-main);
    font-family: var(--font-th);
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.text-content p {
    margin-bottom: 15px;
    color: var(--text-muted);
}

.text-content h3 {
    margin: 30px 0 15px;
    color: var(--text-main);
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-top: 80px;
    border-top: 1px solid var(--border);
}

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

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-en);
    margin-bottom: 20px;
    color: var(--text-main);
}

.footer-logo span {
    color: var(--primary);
}

.footer-col p {
    color: var(--text-muted);
    margin-bottom: 25px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: white;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    color: var(--text-muted);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.social-links a:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-3px);
    border-color: var(--primary);
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    display: inline-block;
    color: var(--text-main);
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary);
}

.newsletter-form {
    display: flex;
    position: relative;
}

.newsletter-form input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    background-color: white;
    border: 1px solid var(--border-strong);
    border-radius: 30px;
    color: var(--text-main);
    font-family: var(--font-en);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.newsletter-form button {
    position: absolute;
    right: 5px;
    top: 5px;
    bottom: 5px;
    width: 36px;
    border: none;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background-color: var(--primary-dark);
}

.contact-list {
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-muted);
}

.contact-list i {
    color: var(--primary);
    margin-top: 5px;
}

.contact-list a:hover {
    color: var(--primary);
}

.footer-bottom {
    background-color: rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .topbar {
        display: none;
    }
    
    .nav-links {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--bg-glass-hover);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 40px;
        transition: left 0.4s ease;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .dropdown-content {
        position: static;
        visibility: visible;
        opacity: 1;
        transform: none;
        box-shadow: none;
        background: transparent;
        border: none;
        display: none;
        text-align: center;
    }
    
    .dropdown:hover .dropdown-content {
        display: block;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom .container {
        flex-direction: column;
        gap: 10px;
    }
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Accessibility focus states */
*:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }


/* Brands Section */
.brands {
    padding: 60px 0;
    background-color: var(--bg-glass);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.brands-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-muted);
    font-size: 1.2rem;
    font-weight: 500;
}

.brand-slider-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.brand-track {
    display: flex;
    align-items: center;
    width: max-content;
    animation: scrollBrands 20s linear infinite;
}

.brand-track:hover {
    animation-play-state: paused;
}

@keyframes scrollBrands {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.brand-item {
    margin: 0 40px;
    font-family: Arial, sans-serif;
    font-weight: 900;
    font-size: 2.2rem;
    color: var(--text-muted);
    opacity: 0.6;
    transition: all 0.3s ease;
    cursor: default;
    user-select: none;
}

.brand-item:hover {
    opacity: 1;
    transform: scale(1.05);
}

.brand-item.hp { font-family: 'Times New Roman', serif; font-weight: 700; font-style: italic; letter-spacing: -2px; }
.brand-item.lenovo { font-weight: 900; letter-spacing: -1px; }
.brand-item.acer { font-weight: 900; letter-spacing: -1px; }
.brand-item.hikvision { font-weight: 900; letter-spacing: 1px; }
.brand-item.huawei { font-weight: 700; letter-spacing: 0px; }
.brand-item.ruijie { font-weight: 900; letter-spacing: -1px; }
.brand-item.mikrotik { font-weight: 700; letter-spacing: 0px; }
.brand-item.fortigate { font-weight: 700; letter-spacing: 0px; }
.brand-item.ubiquiti { font-weight: 700; letter-spacing: 0px; }
.brand-item.tplink { font-weight: 700; letter-spacing: -1px; }
.brand-item.aruba { font-weight: 700; letter-spacing: 0px; }
.brand-item.hpe { font-weight: 700; letter-spacing: 0px; }
.brand-item.fortinet { font-weight: 700; letter-spacing: 0px; }
.brand-item.synology { font-weight: 700; letter-spacing: 0px; }



.brand-item:hover.hp { color: #005696; }
.brand-item:hover.lenovo { color: #e2231a; }
.brand-item:hover.acer { color: #83b817; }
.brand-item:hover.hikvision { color: #cc0000; }
.brand-item:hover.huawei { color: #CF0A2C; }
.brand-item:hover.ruijie { color: #00428D; }
.brand-item:hover.mikrotik { color: #ED1C24; }
.brand-item:hover.fortigate { color: #E41E2D; }
.brand-item:hover.ubiquiti { color: #0055FF; }
.brand-item:hover.tplink { color: #00AFB2; }
.brand-item:hover.aruba { color: #FF8300; }
.brand-item:hover.hpe { color: #01A982; }
.brand-item:hover.fortinet { color: #EE3124; }
.brand-item:hover.synology { color: #0056B3; }


.brand-item:hover:not(.hp):not(.lenovo):not(.acer):not(.hikvision):not(.huawei):not(.ruijie):not(.mikrotik):not(.fortigate):not(.ubiquiti):not(.tplink):not(.aruba):not(.hpe):not(.fortinet):not(.synology) { color: var(--primary-dark); }

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}

/* Floating LINE Button */
.floating-line-btn {
    position: fixed;
    bottom: 95px;
    right: 30px;
    width: 55px;
    height: 55px;
    background-color: #06C755;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(6, 199, 85, 0.4);
    z-index: 998;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: bounceLine 3s infinite;
}

.floating-line-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(6, 199, 85, 0.6);
    color: white;
    animation-play-state: paused;
}

@keyframes bounceLine {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Floating FB Button */
.floating-fb-btn {
    position: fixed;
    bottom: 160px;
    right: 30px;
    width: 55px;
    height: 55px;
    background-color: #1877F2;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(24, 119, 242, 0.4);
    z-index: 998;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: bounceFb 3s infinite;
    animation-delay: 1.5s;
}

.floating-fb-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(24, 119, 242, 0.6);
    color: white;
    animation-play-state: paused;
}

@keyframes bounceFb {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
}

.reveal-up {
    transform: translateY(40px);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal.active {
    opacity: 1;
    transform: translate(0, 0);
}

/* Staggered children reveal */
.reveal-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-stagger.active > * {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger.active > *:nth-child(1) { transition-delay: 0.1s; }
.reveal-stagger.active > *:nth-child(2) { transition-delay: 0.2s; }
.reveal-stagger.active > *:nth-child(3) { transition-delay: 0.3s; }
.reveal-stagger.active > *:nth-child(4) { transition-delay: 0.4s; }
.reveal-stagger.active > *:nth-child(5) { transition-delay: 0.5s; }
.reveal-stagger.active > *:nth-child(6) { transition-delay: 0.6s; }


@media (max-width: 768px) {
    .floating-line-btn {
        bottom: 95px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    .floating-fb-btn {
        bottom: 155px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    #back-to-top {
        right: 20px;
    }
}
