/* === RESET & BASIC SETUP === */
body {
    font-family: 'Kanit', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    color: #333;
    line-height: 1.7;
}

.container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 1rem;
}

h1, h2, h3, h4 {
    color: #0d2c4b; /* Dark Blue */
}

h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

section {
    padding: 5rem 0;
}

/* === HEADER & NAVIGATION === */
.main-header {
    background-color: #69a8f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-nav {
    padding: 0.5rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo img {
    height: 50px;
    width: auto;
}

.nav-logo span {
    color: #0d2c4b;
    font-size: 1.2rem;
    font-weight: 700;
    margin-left: 0.75rem;
}

.nav-links a {
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    margin: 0 1rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.3s, border-bottom-color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #0056b3; /* Bright Blue */
    border-bottom-color: #0056b3;
}

/* === HERO SLIDE === */
.hero-slide {
    height: 90vh;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(img/blackground1.jpg);
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 1rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s, color 0.3s;
}

.btn-primary {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* === ABOUT SECTION === */
.about-section {
    background-color: #f8f9fa;
}

.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.portfolio-grid img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* === SERVICES SECTION === */
.services-section { background-color: #ffffff; }
/* ใช้ Style ของ .promo-grid และ .promo-card จากเวอร์ชันก่อนได้เลย */
.promo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.promo-card { background-color: white; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); overflow: hidden; text-decoration: none; color: #343a40; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.promo-card:hover { transform: translateY(-10px); box-shadow: 0 8px 16px rgba(0,0,0,0.2); }
.promo-card img { width: 100%; height: 220px; object-fit: cover; }
.card-content { padding: 1.5rem; }
.card-content h3 { margin-top: 0; font-size: 1.5rem; color: #0056b3; }

/* === PROMOTIONS SECTION === */
.promotions-section {
    background-color: #f8f9fa;
}

.promotions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.promotion-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column; /* จัดเรียงเนื้อหาจากบนลงล่าง */
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.promotion-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.promo-card-header img {
    width: 100%;
    height: auto;
    display: block;
}

.promo-card-body {
    padding: 1.5rem;
    text-align: center;
    flex-grow: 1; /* ทำให้ body ยืดเพื่อดัน footer ไปข้างล่างสุด */
}

.promo-card-body h3 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: #0056b3;
}

.promo-description {
    color: #555;
    margin-bottom: 1.5rem;
    min-height: 40px; /* ทำให้ความสูงของส่วนนี้เท่าๆ กัน */
}

.promo-price {
    background-color: #f1f1f1;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.promo-price .price-label {
    font-size: 0.9rem;
    display: block;
    color: #666;
}

.promo-price .price-amount {
    font-size: 2.8rem;
    font-weight: 700;
    color: #d92525; /* สีแดงเด่น */
    line-height: 1;
}

.promo-price .price-unit {
    font-size: 1.2rem;
    color: #d92525;
    margin-left: 0.25rem;
}

.promo-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    color: #444;
}

.promo-features li {
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.promo-card-footer {
    padding: 1.5rem;
    background-color: #f8f9fa;
    text-align: center;
}

.btn-secondary {
    background-color: #28a745; /* สีเขียว */
    color: white;
    border: 1px solid #28a745;
 display: inline-block; /* ทำให้ปุ่มไม่ยืดเต็ม แต่ยังกำหนดขนาดได้ */
    padding: 0.8rem 2.5rem; /* กำหนดความกว้างปุ่มด้วย padding ซ้าย-ขวา */
}

.btn-secondary:hover {
    background-color: #218838;
}


/* --- ปรับแก้ Responsive สำหรับส่วนโปรโมชั่น --- */
@media (max-width: 1200px) {
    .promotions-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablet: แถวละ 2 */
    }
}

@media (max-width: 768px) {
    .promotions-grid {
        grid-template-columns: 1fr; /* Mobile: แถวละ 1 */
    }
}

/* === KNOWLEDGE SECTION === */
.knowledge-section { background-color: #f8f9fa; }
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item {
    background-color: white;
    margin-bottom: 1rem;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid #007bff;
}
.faq-item h4 { margin: 0 0 0.5rem 0; font-size: 1.3rem; }
.faq-item p { margin: 0; }

/* === WHY-SOLAR SECTION === */
.why-solar-section { background-color: #ffffff; }
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.benefit-item { text-align: center; }
.benefit-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }

/* === FOOTER === */
footer {
    background-color: #0d2c4b;
    color: #e9ecef;
    text-align: center;
    padding: 4rem 0;
}
footer h2 { color: white; }
footer a { color: #a9d4fd; text-decoration: none; }
footer a:hover { text-decoration: underline; }
.social-links { margin: 1.5rem 0; }
.social-links a { margin: 0 1rem; font-size: 1.2rem; text-decoration: none; }
.copyright { margin-top: 2rem; font-size: 0.9rem; color: #adb5bd; }

/* === RESPONSIVE DESIGN === */
@media (max-width: 992px) {
    h2 { font-size: 2.2rem; }
    .about-layout, .promo-grid, .benefits-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-container { flex-direction: column; }
    .nav-links { margin-top: 1rem; }
    .hero-content h1 { font-size: 2.8rem; }
    .about-layout { grid-template-columns: 1fr; }
    .benefits-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 576px) {
    .promo-grid, .benefits-grid { grid-template-columns: 1fr; }
    .nav-links a { margin: 0 0.5rem; }
}

/* === CONTACT PAGE === */
.contact-page-section {
    background-color: #f8f9fa;
    min-height: 60vh; /* กำหนดความสูงขั้นต่ำ */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 0;
}

.contact-container {
    max-width: 600px;
    width: 100%;
    background-color: #ffffff;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    text-align: center;
}

.contact-buttons-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem; /* ระยะห่างระหว่างปุ่ม */
}

.contact-btn {
    display: inline-flex; /* ใช้ inline-flex เพื่อให้ icon กับ text อยู่ข้างกัน */
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.contact-btn svg {
    width: 30px;
    height: 30px;
    margin-right: 1rem;
}

.facebook-btn {
    background-color: #1877F2;
}

.line-btn {
    background-color: #06C755;
}

.other-contacts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e0e0e0;
    color: #666;
}
.other-contacts p {
    margin: 0.5rem 0;
}
.other-contacts a {
    color: #0056b3;
    font-weight: bold;
}

#contact-footer {
    background-color: #f8f9fa;
    color: #6c757d;
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid #e0e0e0;
}

/* === ABOUT PAGE - NEW LAYOUT === */

.about-page-section {
    padding: 5rem 0;
}

.about-page-section.bg-light {
    background-color: #f8f9fa;
}

.about-page-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 4rem;
}

.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem; /* ระยะห่างระหว่างคอลัมน์ */
    align-items: center; /* ทำให้เนื้อหาในคอลัมน์อยู่กึ่งกลางแนวตั้ง */
}

.column-left img,
.column-right iframe {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.column-right iframe {
    height: 450px; /* กำหนดความสูงของแผนที่ */
    border: none;
}

.column-right h3,
.column-left h3 {
    font-size: 1.8rem;
    margin-top: 0;
    color: #0056b3;
}

.address-details p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* --- Responsive for About Page --- */
@media (max-width: 992px) {
    .two-column-layout {
        grid-template-columns: 1fr; /* ทำให้เหลือ 1 คอลัมน์บนจอขนาดเล็ก */
        gap: 2rem;
    }
    
    .about-page-title {
        margin-bottom: 2.5rem;
    }
}
/* === PORTFOLIO / SHOWCASE SECTION === */

.portfolio-section {
    padding: 5rem 0;
    background-color: #f8f9fa; /* สีพื้นหลังเทาอ่อน */
}

.portfolio-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #0d2c4b; /* Dark Blue */
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.showcase-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column; /* จัดเรียงเนื้อหาจากบนลงล่าง */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.showcase-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.card-image-container img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10; /* กำหนดสัดส่วนภาพให้เท่ากันทุกการ์ด */
    object-fit: cover; /* ทำให้รูปเต็มพื้นที่โดยไม่เสียสัดส่วน */
    display: block;
}

.card-text-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* ทำให้ส่วนนี้ยืดเพื่อดันปุ่มไปข้างล่าง */
}

.card-text-content h3 {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #0d2c4b;
    line-height: 1.4;
}

.card-text-content p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* ทำให้ย่อหน้ายืดเพื่อดันปุ่มไปข้างล่าง */
}

.btn-read-more {
    display: inline-block;
    background-color: #0d2c4b; /* Dark Blue */
    color: #ffffff;
    padding: 0.7rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    font-weight: bold;
    align-self: flex-start; /* จัดปุ่มให้อยู่ซ้าย (ถ้าต้องการให้อยู่กลางให้ใช้ align-self: center) */
    transition: background-color 0.3s;
}

.btn-read-more:hover {
    background-color: #0056b3; /* Bright Blue */
}


/* --- Responsive for Showcase Section --- */
@media (max-width: 992px) {
    .showcase-grid {
        grid-template-columns: 1fr 1fr; /* Tablet: แถวละ 2 */
    }
}

@media (max-width: 768px) {
    .showcase-grid {
        grid-template-columns: 1fr; /* Mobile: แถวละ 1 */
    }
}