:root {
    --primary-green: #0a3a32;
    --primary-blue: #1b5b8c;
    --primary-orange: #d95e26;
    --primary-gold: #91683a;
    --text-dark: #333333;
    --text-gray: #666666;
    --bg-light: #fcfbf9;
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Prompt', sans-serif; color: var(--text-dark); line-height: 1.6; background-color: var(--bg-light); }
.container { width: 90%; max-width: 1200px; margin: 0 auto; }

/* ================= Navbar ================= */
.navbar { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(10px); padding: 20px 0; border-bottom: 2px solid var(--primary-gold); position: sticky; top: 0; z-index: 100; transition: all 0.3s ease; }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo h2 { color: var(--primary-green); font-weight: 700; font-size: 1.6rem; letter-spacing: 0.5px; }
.logo span { color: var(--primary-gold); font-weight: 500; }

.nav-menu { display: flex; align-items: center; gap: 40px; }
.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: var(--text-dark); font-weight: 500; transition: color 0.3s; padding-bottom: 5px; }
.nav-links a:hover, .nav-links a.active { color: var(--primary-green); border-bottom: 2px solid var(--primary-green); }

.lang-switcher { display: flex; gap: 8px; font-weight: 600; font-size: 0.9rem; }
.lang-switcher a { text-decoration: none; color: var(--text-gray); transition: 0.3s; }
.lang-switcher a.active, .lang-switcher a:hover { color: var(--primary-green); }
.lang-switcher span { color: #ccc; }

/* ================= Hero Section (พื้นหลังมีมิติ) ================= */
.hero { 
    background: linear-gradient(135deg, #ffffff 0%, #fdf8f5 100%);
    padding: 80px 0; 
    overflow: hidden; 
    position: relative;
}

/* ลวดลายจุด (Dot Pattern) บางๆ เพื่อไม่ให้ดูเรียบเกินไป */
.hero-bg-pattern {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(var(--primary-gold) 0.5px, transparent 0.5px);
    background-size: 20px 20px;
    opacity: 0.15;
    z-index: 0;
}

.bg-glow { position: absolute; width: 600px; height: 600px; background: radial-gradient(circle, rgba(10,58,50,0.04) 0%, rgba(255,255,255,0) 70%); top: -10%; right: 5%; border-radius: 50%; z-index: 0; }

.hero-container { display: flex; align-items: center; gap: 50px; position: relative; z-index: 1; }
.hero-content { flex: 1; }
.badge { display: inline-block; color: var(--primary-green); font-weight: 600; margin-bottom: 15px; border-top: 2px solid var(--primary-gold); padding-top: 5px; font-size: 0.9rem; letter-spacing: 1px; }
.hero h1 { font-size: 3.2rem; color: var(--primary-green); line-height: 1.2; margin-bottom: 20px; text-shadow: 1px 1px 2px rgba(0,0,0,0.05); }
.hero p { color: var(--text-dark); font-size: 1.1rem; margin-bottom: 35px; }

.hero-actions { display: flex; gap: 15px; margin-bottom: 30px; }
.btn { padding: 12px 28px; border-radius: 30px; text-decoration: none; font-weight: 500; display: inline-block; transition: all 0.3s ease; }
.btn-primary { background-color: var(--primary-green); color: var(--white); border: 2px solid var(--primary-green); box-shadow: 0 4px 15px rgba(10,58,50,0.25); }
.btn-primary:hover { background-color: #062621; border-color: #062621; transform: translateY(-3px); box-shadow: 0 6px 20px rgba(10,58,50,0.4); }
.btn-outline { background-color: transparent; color: var(--primary-green); border: 2px solid var(--primary-green); }
.btn-outline:hover { background-color: var(--primary-green); color: var(--white); transform: translateY(-3px); }

.hero-tags { font-size: 0.9rem; color: var(--primary-gold); font-weight: 500; }
.hero-image { flex: 1; }

/* ================= Images Style ================= */
.main-img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(166,25,46,0.15);
    border: 3px solid var(--white);
}

.card-img {
    width: calc(100% - 30px);
    height: 180px;
    object-fit: cover;
    margin: 0 15px 15px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ================= Services Section ================= */
.services { padding: 80px 0; background-color: var(--white); position: relative; z-index: 1; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
.service-card { 
    background: var(--white); 
    border-radius: 12px; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.05); 
    border: 1px solid #f0f0f0;
    border-bottom: 4px solid var(--primary-gold);
    overflow: hidden; 
    transition: all 0.4s ease;
}
.service-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(166,25,46,0.1); border-color: #e0e0e0; }

.service-info { padding: 20px; }
.icon-circle { width: 35px; height: 35px; border-radius: 50%; margin-bottom: 15px; }
.icon-green { background-color: var(--primary-green); }
.icon-blue { background-color: var(--primary-blue); }
.icon-orange { background-color: var(--primary-orange); }
.icon-gold { background-color: var(--primary-gold); }
.service-info h3 { font-size: 1.1rem; line-height: 1.3; color: var(--text-dark); }

/* ================= Animations ================= */
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.appear { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }

/* Responsive */
@media (max-width: 992px) {
    .hero-container { flex-direction: column; text-align: center; }
    .hero h1 { font-size: 2.5rem; }
    .hero-actions { justify-content: center; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
/* ================= Footer ================= */
footer {
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    border-top: 1px solid #eaeaea;
    color: var(--text-gray);
    font-size: 0.9rem;
}
/* ================= Subpage Header ================= */
.page-header {
    padding: 80px 0 60px;
    text-align: center;
    background: linear-gradient(135deg, #f9f9fb 0%, #ffffff 100%);
    position: relative;
    border-bottom: 1px solid #eaeaea;
}
.page-header h1 {
    color: var(--primary-green);
    font-size: 2.8rem;
    margin-bottom: 15px;
}
.page-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ================= Partners Grid ================= */
.partners-section {
    padding: 80px 0;
    background-color: var(--white);
}
.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* ================= Partner Card ================= */
.partner-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid #f0f0f0;
    border-top: 4px solid var(--primary-gold);
    overflow: hidden;
    transition: all 0.4s ease;
    text-align: center;
    padding: 30px 20px 20px;
}
.partner-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(10,58,50,0.08);
    border-color: #e0e0e0;
}

.partner-photo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 4px solid var(--bg-light);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.partner-info h3 {
    color: var(--primary-green);
    font-size: 1.2rem;
    margin-bottom: 5px;
    line-height: 1.3;
}

.partner-role {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
    min-height: 45px; /* ล็อกความสูงไว้เพื่อให้กล่องโลโก้ด้านล่างเรียงตรงกัน */
}

/* ส่วนของโลโก้บริษัทด้านล่างการ์ด */
.partner-company {
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
}
.partner-company .company-link {
    display: flex;
    flex-direction: column; /* จัดให้เรียงจากบนลงล่าง */
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 10px; /* ระยะห่างระหว่างโลโก้กับชื่อบริษัท */
    text-decoration: none; /* เอาเส้นใต้ลิงก์ออก */
    transition: all 0.3s ease;
    width: 100%;
}
.partner-company .company-link:hover {
    transform: scale(1.05); /* ขยายใหญ่ขึ้นเล็กน้อยเมื่อเอาเมาส์ชี้ */
}
.partner-company .company-link img {
    max-height: 45px;
    max-width: 120px;
    object-fit: contain;
}
.partner-company .company-link span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-gold);
}
.partner-company .company-link:hover span {
    color: var(--primary-green); /* เปลี่ยนสีข้อความเมื่อเอาเมาส์ชี้ */
}

/* Responsive สำหรับหน้าพาร์ตเนอร์ */
@media (max-width: 1024px) {
    .partners-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}
@media (max-width: 600px) {
    .partners-grid { grid-template-columns: 1fr; }
    .page-header h1 { font-size: 2.2rem; }
}
/* ================= Articles Grid ================= */
.articles-section {
    padding: 80px 0;
    background-color: var(--bg-light);
}
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
.article-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}
.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}
.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}
.article-content {
    padding: 25px;
}
.article-date {
    color: var(--primary-gold);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 10px;
    display: block;
}
.article-content h3 {
    color: var(--primary-green);
    margin-bottom: 10px;
    line-height: 1.4;
}
.article-content p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 15px;
}
.read-more {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ================= Contact Section ================= */
.contact-section {
    padding: 80px 0;
    background-color: var(--white);
}
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}
.contact-info {
    padding: 40px;
    background-color: var(--bg-light);
    border-radius: 12px;
    border-left: 4px solid var(--primary-green);
}
.contact-info h2 {
    color: var(--primary-green);
    margin-bottom: 25px;
}
.info-item {
    margin-bottom: 15px;
    color: var(--text-dark);
}
.info-item strong {
    color: var(--primary-gold);
    display: inline-block;
    width: 80px;
}

.contact-form {
    padding: 20px 0;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-green);
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Prompt', sans-serif;
    outline: none;
    transition: border 0.3s;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-gold);
}

/* Responsive สำหรับ 2 หน้านี้ */
@media (max-width: 992px) {
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-wrapper { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 768px) {
    .articles-grid { grid-template-columns: 1fr; }
}
/* ================= Video Modal Popup ================= */
.modal {
    display: none; /* ซ่อนไว้ก่อน จะแสดงเมื่อกดการ์ด */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* พื้นหลังสีดำโปร่งแสง */
    align-items: center;
    justify-content: center;
}
.modal-content {
    position: relative;
    width: 90%;
    max-width: 900px; /* ขนาดสูงสุดของวิดีโอ */
    background: #000;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
}
.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}
.close-modal:hover {
    color: var(--primary-gold);
}
/* ทำให้วิดีโอรองรับทุกหน้าจอ (สัดส่วน 16:9) */
.video-container {
    position: relative;
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
/* ================= Profile Modal (หน้า Partners) ================= */
.profile-modal {
    display: none; 
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.profile-modal-content {
    background: var(--white);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow-y: auto; /* ให้เลื่อนสกอร์บาร์ได้ถ้าเนื้อหายาว */
    position: relative;
    animation: modalFadeIn 0.4s ease-out;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.close-profile {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 35px;
    color: var(--text-gray);
    cursor: pointer;
    transition: 0.3s;
    line-height: 1;
}
.close-profile:hover {
    color: var(--primary-orange);
}
.profile-header {
    text-align: center;
    padding: 40px 30px 20px;
    border-bottom: 2px solid #f0f0f0;
    background: linear-gradient(to bottom, #f9f9fb, #ffffff);
}
.profile-header img {
    height: 60px;
    margin-bottom: 15px;
}
.profile-header h2 {
    color: var(--primary-green);
    font-size: 1.5rem;
    margin-bottom: 5px;
}
.profile-subtitle {
    color: var(--primary-gold);
    font-weight: 500;
}
.profile-body {
    padding: 30px;
}
.profile-body h3 {
    color: var(--primary-blue);
    margin: 25px 0 10px;
    border-left: 4px solid var(--primary-gold);
    padding-left: 10px;
}
.profile-body ul {
    margin-bottom: 20px;
    padding-left: 20px;
    color: var(--text-dark);
}
.profile-body ul li {
    margin-bottom: 8px;
}
.profile-cta {
    background: #fdf8f5;
    padding: 25px;
    text-align: center;
    border-radius: 8px;
    margin: 30px 0;
    border: 1px solid #fce8df;
}
.profile-cta p {
    margin-bottom: 15px;
    color: var(--primary-green);
}
.profile-contact {
    font-size: 0.9rem;
    color: var(--text-gray);
    line-height: 1.8;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}
.profile-contact a {
    color: var(--primary-blue);
    text-decoration: none;
}
.profile-contact a:hover {
    text-decoration: underline;
}