/* css/main.css */

/* Global Styles & Reset */
:root {
    --primary-color: #3498db;          /* Blue */
    --secondary-color: #2c3e50;         /* Dark Blue/Gray */
    --accent-color: #e74c3c;           /* Red */
    --text-color: #333;
    --light-gray: #f4f4f4;
    --white: #fff;
    --dark-gray: #7f8c8d;
}

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

html {
    scroll-behavior: smooth; /* สำหรับ Smooth Scrolling เมื่อคลิก Anchor Link */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* ตัวอย่างฟอนต์ */
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

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

h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

p {
    margin-bottom: 10px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

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

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.btn-secondary:hover {
    background-color: #34495e;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

/* --- Header & Navbar --- */
.main-header {
    background: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo a {
    font-size: 2rem;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
}

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

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

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1rem;
    padding: 5px 0;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    left: 0;
    bottom: 0;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after { /* เพิ่ม class active สำหรับหน้าปัจจุบัน */
    width: 100%;
}

/* --- Footer --- */
.main-footer {
    background-color: var(--secondary-color);
    color: var(--white);
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
}

.main-footer p {
    margin: 0;
    font-size: 0.9rem;
}

.main-footer .social-links a {
    color: var(--white);
    font-size: 1.5rem;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.main-footer .social-links a:hover {
    color: var(--primary-color);
}

/* --- Responsive Utilities --- */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        margin-top: 20px;
        align-items: center;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .nav-links a {
        padding: 10px 0;
        display: block;
        text-align: center;
        width: 100%;
    }

    h1 {
        font-size: 2.8rem !important;
    }

    h2 {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}