/* --- การตั้งค่าพื้นฐาน และ โทนสี (จากโลโก้) --- */
:root {
    --primary-blue: #5D9CEC;   /* สีฟ้าจากโลโก้ */
    --primary-cyan: #4FC1E9;   /* สีฟ้าอ่อนจากโลโก้ */
    --primary-green: #48CFAD;  /* สีเขียวจากโลโก้ */
    --dark-text: #434A54;      /* สีข้อความเทาเข้ม */
    --light-text: #AAB2BD;     /* สีข้อความเทาอ่อน */
    --bg-white: #FFFFFF;
    --bg-light: #F5F7FA;       /* พื้นหลังสีเทาอ่อนๆ */
    --gradient-main: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 20px rgba(93, 156, 236, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Kanit', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-white);
    color: var(--dark-text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- Utility Classes --- */
.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section-padding { padding: 5rem 0; }
.bg-light { background-color: var(--bg-light); }
.text-center { text-align: center; }
.justify-center { justify-content: center; }
.mb-4 { margin-bottom: 2rem; }

/* --- Navbar --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.logo img {
    height: 60px; /* ปรับขนาดโลโก้ตามต้องการ */
    width: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary-blue);
    background-color: rgba(93, 156, 236, 0.1);
}

/* --- Hero Section --- */
.hero {
    display: flex;
    align-items: center;
    min-height: 85vh;
    padding: 0 5%;
    background: radial-gradient(circle at top right, rgba(79, 193, 233, 0.1), transparent),
                radial-gradient(circle at bottom left, rgba(72, 207, 173, 0.1), transparent);
}

.hero-content { flex: 1; padding-right: 3rem; }
.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-content p { font-size: 1.2rem; color: var(--light-text); margin-bottom: 2.5rem; }

.hero-image { flex: 1; text-align: center; }
.hero-image img {
    width: 100%;
    max-width: 600px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    animation: float 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

/* --- Buttons --- */
.btn-main, .btn-secondary {
    display: inline-block;
    padding: 12px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-main {
    background: var(--gradient-main);
    color: white;
    box-shadow: 0 4px 15px rgba(72, 207, 173, 0.4);
}
.btn-main:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(72, 207, 173, 0.6); }
.btn-secondary {
    background: white;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}
.btn-secondary:hover { background: var(--primary-blue); color: white; }

/* --- Services Section (แก้ไข: ไม่มีไอคอน) --- */
.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}
.section-title::after {
    content: ''; display: block; width: 60px; height: 4px;
    background: var(--gradient-main); margin: 15px auto 0; border-radius: 2px;
}
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}
.card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    border-bottom: 4px solid transparent;
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--primary-blue);
}
.service-card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--primary-blue); }
.service-card p { color: var(--light-text); }

/* --- About Preview Section --- */
.about-preview { display: flex; align-items: center; gap: 4rem; }
.about-text { flex: 1; }
.about-text h2 { font-size: 2.5rem; margin-bottom: 1.5rem; color: var(--primary-blue); }
.about-text p { margin-bottom: 2rem; font-size: 1.1rem; }
.about-img { flex: 1; }
.about-img img { width: 100%; border-radius: 20px; box-shadow: var(--shadow-md); }

/* --- Page Header (สำหรับหน้าย่อย) --- */
.page-header {
    background: linear-gradient(135deg, #e0f7fa 0%, #e1f5fe 100%);
    padding: 6rem 0 4rem;
    text-align: center;
}
.page-header h1 { font-size: 3rem; color: var(--primary-blue); }
.page-header p { font-size: 1.2rem; color: var(--light-text); }

/* --- Portfolio Grid (หน้าประวัติการทำงาน) --- */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}
.portfolio-item {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s;
}
.portfolio-item:hover { transform: translateY(-10px); box-shadow: var(--shadow-md); }
.portfolio-img { height: 250px; overflow: hidden; }
.portfolio-img img {
    width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s;
}
.portfolio-item:hover .portfolio-img img { transform: scale(1.1); }
.portfolio-info { padding: 1.5rem; }
.portfolio-info h3 { margin-bottom: 0.5rem; color: var(--primary-blue); }

/* --- Footer --- */
.footer {
    background: linear-gradient(to right, #2C3E50, #434A54);
    color: white; padding: 4rem 0;
}
.social-links { display: flex; gap: 15px; margin-bottom: 2rem; }
.social-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 10px 25px; border-radius: 30px;
    text-decoration: none; color: white; font-weight: 500;
    transition: all 0.3s;
}
.fb { background-color: #3b5998; }
.line { background-color: #00c300; }
.social-btn:hover { transform: scale(1.1); opacity: 0.9; }
.copyright { opacity: 0.7; font-size: 0.9rem; }

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 1rem; }
    .hero, .about-preview { flex-direction: column; text-align: center; }
    .hero-content { padding-right: 0; margin-bottom: 3rem; }
    .hero-content h1 { font-size: 2.5rem; }
    .cards-grid, .portfolio-grid { grid-template-columns: 1fr; }
}